@raolin2025/claude-code-node 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/cli.js +5 -5
package/package.json
CHANGED
package/src/core/cli.js
CHANGED
|
@@ -171,8 +171,8 @@ function buildBanner({ model, permissionMode, session, maxTokens }) {
|
|
|
171
171
|
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, '')
|
|
172
172
|
const robotPlain = robotColored.map(line => stripAnsi(line))
|
|
173
173
|
|
|
174
|
-
// 在 col1
|
|
175
|
-
const visibleWidth =
|
|
174
|
+
// 在 col1 内居中(按最大可见长度 21 计算,短的自动靠右)
|
|
175
|
+
const visibleWidth = 21
|
|
176
176
|
const totalCol1 = 24
|
|
177
177
|
const leftPad = Math.floor((totalCol1 - visibleWidth) / 2)
|
|
178
178
|
const rightPad = totalCol1 - visibleWidth - leftPad
|
|
@@ -214,8 +214,8 @@ function buildBanner({ model, permissionMode, session, maxTokens }) {
|
|
|
214
214
|
pad('─'.repeat(col2 - 2), col2, 'center'),
|
|
215
215
|
pad('/help — commands · /exit — quit', col2, 'center')
|
|
216
216
|
]
|
|
217
|
-
//
|
|
218
|
-
const titleStart =
|
|
217
|
+
// 内容从第2行开始(让分隔线与机器人中间横线对齐)
|
|
218
|
+
const titleStart = 1
|
|
219
219
|
const titleLines = []
|
|
220
220
|
for (let i = 0; i < robotLines.length; i++) {
|
|
221
221
|
const ti = i - titleStart
|
|
@@ -235,7 +235,7 @@ function buildBanner({ model, permissionMode, session, maxTokens }) {
|
|
|
235
235
|
pad(`Budget: 0 / ${maxTokens ?? 200000}`, col3, 'right'),
|
|
236
236
|
pad(`Session: ${sessionId?.toString().slice(-6)}`, col3, 'right')
|
|
237
237
|
]
|
|
238
|
-
const infoStart =
|
|
238
|
+
const infoStart = 1
|
|
239
239
|
const infoLines = []
|
|
240
240
|
for (let i = 0; i < robotLines.length; i++) {
|
|
241
241
|
const ti = i - infoStart
|