@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/core/cli.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raolin2025/claude-code-node",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Node.js AI Code Agent CLI - Zero dependencies, pure JavaScript, security hardened, multi-channel notifications",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
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 内居中(按可见长度 19 计算)
175
- const visibleWidth = 19
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
- // 内容放在中间位置(21行中,从第8行开始放5行内容)
218
- const titleStart = Math.floor((robotLines.length - baseTitleLines.length) / 2)
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 = Math.floor((robotLines.length - baseInfoLines.length) / 2)
238
+ const infoStart = 1
239
239
  const infoLines = []
240
240
  for (let i = 0; i < robotLines.length; i++) {
241
241
  const ti = i - infoStart