claude-brain 0.3.3 → 0.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/cli/ui/components.ts +3 -3
package/package.json
CHANGED
package/src/cli/ui/components.ts
CHANGED
|
@@ -21,8 +21,8 @@ export function box(content: string, title?: string): string {
|
|
|
21
21
|
const body = lines.map(line => {
|
|
22
22
|
// Strip ANSI codes to calculate visible length
|
|
23
23
|
const visible = stripAnsi(line)
|
|
24
|
-
const padding = Math.max(0, innerWidth - visible.length)
|
|
25
|
-
return theme.secondary('│') + ' ' + line + ' '.repeat(padding
|
|
24
|
+
const padding = Math.max(0, innerWidth - visible.length - 1)
|
|
25
|
+
return theme.secondary('│') + ' ' + line + ' '.repeat(padding) + theme.secondary('│')
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
return [top, ...body, bottom].join('\n')
|
|
@@ -78,5 +78,5 @@ export function summaryPanel(title: string, items: Array<{ label: string; value:
|
|
|
78
78
|
// Strip ANSI escape codes for length calculation
|
|
79
79
|
function stripAnsi(str: string): string {
|
|
80
80
|
// eslint-disable-next-line no-control-regex
|
|
81
|
-
return str.replace(/\u001B\[[0-9;]*
|
|
81
|
+
return str.replace(/\u001B\[[0-9;]*[a-zA-Z]/g, '')
|
|
82
82
|
}
|