@kolisachint/hoocode-agent 0.4.149 → 0.4.151
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/CHANGELOG.md +29 -0
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +22 -5
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/context-gc.d.ts +5 -0
- package/dist/core/context-gc.d.ts.map +1 -1
- package/dist/core/context-gc.js +19 -18
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +2 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +3 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +13 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +62 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +3 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/tools/read-dedup.d.ts +78 -0
- package/dist/core/tools/read-dedup.d.ts.map +1 -0
- package/dist/core/tools/read-dedup.js +219 -0
- package/dist/core/tools/read-dedup.js.map +1 -0
- package/dist/core/tools/read.d.ts +7 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +18 -2
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +3 -3
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +2 -2
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +46 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +304 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +13 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +24 -4
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +125 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -155,6 +155,8 @@ export class InteractiveMode {
|
|
|
155
155
|
pendingTools = new Map();
|
|
156
156
|
// Tool output expansion state
|
|
157
157
|
toolOutputExpanded = false;
|
|
158
|
+
// Persisted tool-output display level (collapsed / peek / standard).
|
|
159
|
+
toolOutputDisplay = "standard";
|
|
158
160
|
// Thinking block visibility state
|
|
159
161
|
hideThinkingBlock = false;
|
|
160
162
|
// Skill commands: command name -> skill file path
|
|
@@ -403,6 +405,8 @@ export class InteractiveMode {
|
|
|
403
405
|
this.taskPanel.onExitFocus = () => this.teamFocus.exitFocus();
|
|
404
406
|
// Load hide thinking block setting
|
|
405
407
|
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
|
408
|
+
// Load tool-output display level
|
|
409
|
+
this.toolOutputDisplay = this.settingsManager.getToolOutputDisplay();
|
|
406
410
|
// Completion chime: rings the terminal bell when a long turn finishes or the
|
|
407
411
|
// agent blocks awaiting input. Enable is read fresh so a live toggle applies.
|
|
408
412
|
this.chime = new CompletionChime({
|
|
@@ -1669,6 +1673,7 @@ export class InteractiveMode {
|
|
|
1669
1673
|
const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
|
|
1670
1674
|
showImages: this.settingsManager.getShowImages(),
|
|
1671
1675
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
1676
|
+
displayLevel: this.toolOutputDisplay,
|
|
1672
1677
|
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
1673
1678
|
component.setExpanded(this.toolOutputExpanded);
|
|
1674
1679
|
this.chatContainer.addChild(component);
|
|
@@ -1735,6 +1740,7 @@ export class InteractiveMode {
|
|
|
1735
1740
|
component = new ToolExecutionComponent(event.toolName, event.toolCallId, event.args, {
|
|
1736
1741
|
showImages: this.settingsManager.getShowImages(),
|
|
1737
1742
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
1743
|
+
displayLevel: this.toolOutputDisplay,
|
|
1738
1744
|
}, this.getRegisteredToolDefinition(event.toolName), this.ui, this.sessionManager.getCwd());
|
|
1739
1745
|
component.setExpanded(this.toolOutputExpanded);
|
|
1740
1746
|
this.chatContainer.addChild(component);
|
|
@@ -2024,6 +2030,7 @@ export class InteractiveMode {
|
|
|
2024
2030
|
const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
|
|
2025
2031
|
showImages: this.settingsManager.getShowImages(),
|
|
2026
2032
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
2033
|
+
displayLevel: this.toolOutputDisplay,
|
|
2027
2034
|
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
2028
2035
|
component.setExpanded(this.toolOutputExpanded);
|
|
2029
2036
|
this.chatContainer.addChild(component);
|
|
@@ -2418,8 +2425,58 @@ export class InteractiveMode {
|
|
|
2418
2425
|
}
|
|
2419
2426
|
showSettingsSelector() {
|
|
2420
2427
|
this.showSelector((done) => {
|
|
2428
|
+
const disabledToolNames = new Set(this.settingsManager.getDisabledTools());
|
|
2429
|
+
const builtinToolNames = this.session
|
|
2430
|
+
.getAllTools()
|
|
2431
|
+
.filter((t) => t.sourceInfo?.source === "builtin")
|
|
2432
|
+
.map((t) => t.name);
|
|
2433
|
+
// Union so tools disabled at startup (absent from the live registry) still
|
|
2434
|
+
// appear and can be re-enabled for the next session.
|
|
2435
|
+
const toolToggleNames = [...new Set([...builtinToolNames, ...disabledToolNames])].sort();
|
|
2436
|
+
const toolToggles = toolToggleNames.map((name) => ({ name, enabled: !disabledToolNames.has(name) }));
|
|
2437
|
+
const toolGroups = [
|
|
2438
|
+
{
|
|
2439
|
+
id: "web",
|
|
2440
|
+
label: "Web tools",
|
|
2441
|
+
description: "webfetch + websearch (network access).",
|
|
2442
|
+
enabled: this.settingsManager.getEnableWebTools(),
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
id: "browser",
|
|
2446
|
+
label: "Browser tools",
|
|
2447
|
+
description: "browser_run + browser_continue (browsertools engine).",
|
|
2448
|
+
enabled: this.settingsManager.getEnableBrowserTools(),
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
id: "file",
|
|
2452
|
+
label: "Document tools",
|
|
2453
|
+
description: "DocRead/DocEdit/DocWrite + DocScan/DocGrep/DocPeek (filetools binary).",
|
|
2454
|
+
enabled: this.settingsManager.getEnableFileTools(),
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
id: "embsearch",
|
|
2458
|
+
label: "Semantic search",
|
|
2459
|
+
description: "Semantic index layer fused into the always-on search tool.",
|
|
2460
|
+
enabled: this.settingsManager.getEnableEmbsearchTools(),
|
|
2461
|
+
},
|
|
2462
|
+
];
|
|
2463
|
+
const flagDefs = this.session.extensionRunner.getFlags();
|
|
2464
|
+
const flagValues = this.session.extensionRunner.getFlagValues();
|
|
2465
|
+
const flags = [...flagDefs.values()].map((flag) => ({
|
|
2466
|
+
name: flag.name,
|
|
2467
|
+
description: flag.description,
|
|
2468
|
+
type: flag.type,
|
|
2469
|
+
value: flagValues.get(flag.name) ?? flag.default ?? (flag.type === "boolean" ? false : ""),
|
|
2470
|
+
}));
|
|
2421
2471
|
const selector = new SettingsSelectorComponent({
|
|
2422
2472
|
autoCompact: this.session.autoCompactionEnabled,
|
|
2473
|
+
tools: toolToggles,
|
|
2474
|
+
toolGroups,
|
|
2475
|
+
flags,
|
|
2476
|
+
toolOutputDisplay: this.toolOutputDisplay,
|
|
2477
|
+
toolOutputMaxBytes: this.settingsManager.getToolOutputMaxBytes(),
|
|
2478
|
+
toolOutputMaxLines: this.settingsManager.getToolOutputMaxLines(),
|
|
2479
|
+
contextGc: this.settingsManager.getContextGcEnabled(),
|
|
2423
2480
|
showImages: this.settingsManager.getShowImages(),
|
|
2424
2481
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
2425
2482
|
autoResizeImages: this.settingsManager.getImageAutoResize(),
|
|
@@ -2449,6 +2506,74 @@ export class InteractiveMode {
|
|
|
2449
2506
|
this.session.setAutoCompactionEnabled(enabled);
|
|
2450
2507
|
this.footer.setAutoCompactEnabled(enabled);
|
|
2451
2508
|
},
|
|
2509
|
+
onToolEnabledChange: (name, enabled) => {
|
|
2510
|
+
// Persist for future sessions (feeds the startup denylist).
|
|
2511
|
+
const disabled = new Set(this.settingsManager.getDisabledTools());
|
|
2512
|
+
if (enabled) {
|
|
2513
|
+
disabled.delete(name);
|
|
2514
|
+
}
|
|
2515
|
+
else {
|
|
2516
|
+
disabled.add(name);
|
|
2517
|
+
}
|
|
2518
|
+
this.settingsManager.setDisabledTools([...disabled]);
|
|
2519
|
+
// Apply live for the current session. Re-enabling only works for
|
|
2520
|
+
// tools still in the registry (i.e. not removed at startup); tools
|
|
2521
|
+
// disabled before launch take effect on the next session.
|
|
2522
|
+
const active = new Set(this.session.getActiveToolNames());
|
|
2523
|
+
if (enabled) {
|
|
2524
|
+
if (this.session.getToolDefinition(name)) {
|
|
2525
|
+
active.add(name);
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
else {
|
|
2529
|
+
active.delete(name);
|
|
2530
|
+
}
|
|
2531
|
+
this.session.setActiveToolsByName([...active]);
|
|
2532
|
+
this.footerDataProvider.setSubagentEnabled(this.session.getActiveToolNames().includes("Task"));
|
|
2533
|
+
},
|
|
2534
|
+
onToolGroupChange: (id, enabled) => {
|
|
2535
|
+
// Master switches for tool availability. These gate tool creation at
|
|
2536
|
+
// session build, so they persist and take effect on the next session.
|
|
2537
|
+
switch (id) {
|
|
2538
|
+
case "web":
|
|
2539
|
+
this.settingsManager.setEnableWebTools(enabled);
|
|
2540
|
+
break;
|
|
2541
|
+
case "browser":
|
|
2542
|
+
this.settingsManager.setEnableBrowserTools(enabled);
|
|
2543
|
+
break;
|
|
2544
|
+
case "file":
|
|
2545
|
+
this.settingsManager.setEnableFileTools(enabled);
|
|
2546
|
+
break;
|
|
2547
|
+
case "embsearch":
|
|
2548
|
+
this.settingsManager.setEnableEmbsearchTools(enabled);
|
|
2549
|
+
break;
|
|
2550
|
+
}
|
|
2551
|
+
},
|
|
2552
|
+
onToolOutputDisplayChange: (level) => {
|
|
2553
|
+
this.toolOutputDisplay = level;
|
|
2554
|
+
this.settingsManager.setToolOutputDisplay(level);
|
|
2555
|
+
for (const child of this.chatContainer.children) {
|
|
2556
|
+
if (child instanceof ToolExecutionComponent) {
|
|
2557
|
+
child.setDisplayLevel(level);
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
this.ui.requestRender();
|
|
2561
|
+
},
|
|
2562
|
+
onToolOutputMaxBytesChange: (bytes) => {
|
|
2563
|
+
this.settingsManager.setToolOutputMaxBytes(bytes);
|
|
2564
|
+
},
|
|
2565
|
+
onToolOutputMaxLinesChange: (lines) => {
|
|
2566
|
+
this.settingsManager.setToolOutputMaxLines(lines);
|
|
2567
|
+
},
|
|
2568
|
+
onContextGcChange: (enabled) => {
|
|
2569
|
+
this.settingsManager.setContextGcEnabled(enabled);
|
|
2570
|
+
},
|
|
2571
|
+
onFlagChange: (name, value) => {
|
|
2572
|
+
// Persist for future launches; apply live best-effort (extensions
|
|
2573
|
+
// that read a flag only at load time pick it up on next launch).
|
|
2574
|
+
this.settingsManager.setFlagOverride(name, value);
|
|
2575
|
+
this.session.extensionRunner.setFlagValue(name, value);
|
|
2576
|
+
},
|
|
2452
2577
|
onShowImagesChange: (enabled) => {
|
|
2453
2578
|
this.settingsManager.setShowImages(enabled);
|
|
2454
2579
|
for (const child of this.chatContainer.children) {
|