@bahulam/code 2.6.1 → 2.6.2
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/README.md +8 -1
- package/package.json +5 -3
- package/pulse/app/activity/page.tsx +1 -1
- package/pulse/app/globals.css +3 -3
- package/pulse/app/help/page.tsx +10 -10
- package/pulse/app/layout.tsx +2 -2
- package/pulse/app/memory/page.tsx +1 -1
- package/pulse/app/overview-client.tsx +1 -1
- package/pulse/app/page.tsx +2 -2
- package/pulse/app/plans/page.tsx +1 -1
- package/pulse/app/sessions/page.tsx +1 -1
- package/pulse/app/settings/page.tsx +1 -1
- package/pulse/app/tools/page.tsx +1 -1
- package/pulse/cli.js +8 -8
- package/pulse/components/layout/sidebar.tsx +2 -2
- package/pulse/package.json +2 -2
- package/src/agents/workflow_scaffold.mjs +1 -1
- package/src/core/attachments.mjs +287 -1
- package/src/core/backend-url.mjs +18 -5
- package/src/core/bundled-runtime.mjs +348 -0
- package/src/core/headless.mjs +1 -1
- package/src/core/settings-sync.mjs +1 -1
- package/src/core/stream-client.mjs +122 -3
- package/src/core/tool-executor.mjs +10 -3
- package/src/index.mjs +16 -16
- package/src/onboarding/preflight.mjs +14 -0
- package/src/terminal/main.mjs +19 -19
- package/src/terminal/repl-explore.mjs +9 -0
- package/src/terminal/repl.mjs +122 -11
- package/src/terminal/skills.mjs +1 -1
- package/src/tools/project-overview.mjs +66 -4
- package/src/ui/banner.mjs +5 -5
- package/src/ui/input-dock.mjs +76 -18
- package/src/ui/palette.mjs +2 -2
- package/src/ui/tool-card.mjs +23 -3
package/src/ui/tool-card.mjs
CHANGED
|
@@ -90,7 +90,19 @@ export function summarizeResult(tool, data) {
|
|
|
90
90
|
return { text: 'timed out', tone: 'danger' };
|
|
91
91
|
}
|
|
92
92
|
if (data.success === false) {
|
|
93
|
-
|
|
93
|
+
// For shell / test / build / lint / validate failures, the actual output
|
|
94
|
+
// usually holds the actionable line ("FAIL src/foo.test.js expected 3
|
|
95
|
+
// got 2") while data.error is a generic wrapper ("Test suite failed",
|
|
96
|
+
// "Command exited with code 1"). Prefer the first output line when it
|
|
97
|
+
// has meaningful content; fall back to error for other tools.
|
|
98
|
+
const shellFamily = new Set([
|
|
99
|
+
'shell', 'run_tests', 'validate_build', 'lint_check',
|
|
100
|
+
'validate_file', 'validate_structure',
|
|
101
|
+
]);
|
|
102
|
+
const outputLine = firstOutputLine(data);
|
|
103
|
+
const msg = shellFamily.has(tool) && outputLine
|
|
104
|
+
? String(outputLine).slice(0, 140)
|
|
105
|
+
: String(data.error || outputLine || 'failed').slice(0, 140);
|
|
94
106
|
return { text: msg, tone: 'danger' };
|
|
95
107
|
}
|
|
96
108
|
|
|
@@ -344,9 +356,17 @@ export function formatCard({ tool, args, result, durationMs, indent, columns, cw
|
|
|
344
356
|
const candidate = `${head} ${arrow} ${body}${tail}`;
|
|
345
357
|
if (!head.includes('\n') && visibleWidth(candidate) <= cols) return candidate;
|
|
346
358
|
if (!head.includes('\n') && isInlineOutcomeTool(tool)) {
|
|
359
|
+
// Reserve = outcome width + 4 (2 gap + a couple padding). Compact the head
|
|
360
|
+
// to whatever remains. Floor at 12 so the head stays recognizable; on
|
|
361
|
+
// very narrow terminals (cols - reserve < 12) fall through to the
|
|
362
|
+
// two-line gutter shape below rather than emit an overflowing line.
|
|
347
363
|
const reserve = visibleWidth(`${arrow} ${body}${tail}`) + 4;
|
|
348
|
-
const
|
|
349
|
-
|
|
364
|
+
const headBudget = cols - reserve;
|
|
365
|
+
if (headBudget >= 12) {
|
|
366
|
+
const compactHead = truncateMiddle(head, headBudget);
|
|
367
|
+
const combined = `${compactHead} ${arrow} ${body}${tail}`;
|
|
368
|
+
if (visibleWidth(combined) <= cols) return combined;
|
|
369
|
+
}
|
|
350
370
|
}
|
|
351
371
|
|
|
352
372
|
// Doesn't fit on one line → push outcome to a separate gutter line.
|