@bahulam/code 2.6.15 → 2.6.17
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 +5 -5
- package/src/auth/tarang-auth.mjs +6 -0
- package/src/config/cli-args.mjs +7 -1
- package/src/config/model-catalog.mjs +57 -0
- package/src/core/bundled-runtime.mjs +12 -0
- package/src/core/error-guidance.mjs +8 -4
- package/src/core/local-agent.mjs +3 -3
- package/src/index.mjs +7 -3
- package/src/permissions/command-classifier.mjs +50 -2
- package/src/telemetry/index.mjs +97 -71
- package/src/terminal/main.mjs +40 -0
- package/src/terminal/repl-format.mjs +64 -4
- package/src/terminal/repl-model-form.mjs +132 -0
- package/src/terminal/repl-render.mjs +152 -26
- package/src/terminal/repl-resume.mjs +27 -12
- package/src/terminal/repl-state.mjs +15 -0
- package/src/terminal/repl.mjs +489 -21
- package/src/ui/approval.mjs +22 -5
- package/src/ui/input-dock.mjs +67 -5
- package/src/ui/render-queue.mjs +500 -0
- package/src/ui/slash-commands.mjs +2 -0
- package/src/ui/sub-agent.mjs +17 -2
|
@@ -50,6 +50,8 @@ export const COMMANDS = {
|
|
|
50
50
|
'/review': 'Code review agent',
|
|
51
51
|
'/architect': 'Feature architect agent',
|
|
52
52
|
'/safety': 'Show safety guardrail status',
|
|
53
|
+
'/auto': 'Session autopilot: auto-approve routine tools (dangerous still prompts)',
|
|
54
|
+
'/approvals': 'List or edit session approval grants',
|
|
53
55
|
'/revoke': 'Revoke auto-approvals',
|
|
54
56
|
'/resume': 'Resume a previous session',
|
|
55
57
|
'/sessions': 'List resumable sessions',
|
package/src/ui/sub-agent.mjs
CHANGED
|
@@ -53,6 +53,20 @@ export function subAgentIndent(extraDepth = 0) {
|
|
|
53
53
|
*
|
|
54
54
|
* @returns {string} ANSI-styled multi-line block (no trailing newline).
|
|
55
55
|
*/
|
|
56
|
+
/**
|
|
57
|
+
* Reduce a sub-agent query to its human-readable core. Handoff envelopes
|
|
58
|
+
* ([User intent], ## Work Scope, Schema:, Active roots:) are machine
|
|
59
|
+
* context — printing them flooded the transcript with 15+ lines per
|
|
60
|
+
* spawn. Full text stays available via /expand on the recorded card.
|
|
61
|
+
*/
|
|
62
|
+
export function displayQuery(query, max = 140) {
|
|
63
|
+
let s = String(query || '');
|
|
64
|
+
const cut = s.search(/\n\s*(?:\[User intent\]|##\s*Work Scope|Schema:\s*kepler\.|Active roots:)/);
|
|
65
|
+
if (cut >= 0) s = s.slice(0, cut);
|
|
66
|
+
s = s.replace(/^\[Thoroughness:\s*[^\]]*\]\s*/i, '').replace(/\s+/g, ' ').trim();
|
|
67
|
+
return truncate(s, max);
|
|
68
|
+
}
|
|
69
|
+
|
|
56
70
|
export function renderSubAgentOpen({ id, type, query, parentDepth } = {}) {
|
|
57
71
|
const t = type || 'sub-agent';
|
|
58
72
|
const depthBefore = _stack.length;
|
|
@@ -60,10 +74,11 @@ export function renderSubAgentOpen({ id, type, query, parentDepth } = {}) {
|
|
|
60
74
|
|
|
61
75
|
const indent = ' '.repeat(2 + depthBefore * 3);
|
|
62
76
|
const iconChar = SUB_ICONS[t] || icons.subAgent;
|
|
63
|
-
const
|
|
77
|
+
const shown = displayQuery(query);
|
|
78
|
+
const head = `${indent}${iconChar} ${paint.brand.data(t)} ${paint.text.dim(`"${shown}"`)}`;
|
|
64
79
|
const tag1 = paint.text.dim('▸ running');
|
|
65
80
|
|
|
66
|
-
return
|
|
81
|
+
return shown
|
|
67
82
|
? `\n${head} ${tag1}`
|
|
68
83
|
: `\n${indent}${iconChar} ${paint.brand.data(t)} ${tag1}`;
|
|
69
84
|
}
|