@kolisachint/hoocode-agent 0.4.10 → 0.4.12
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 +25 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -0
- package/dist/config.js.map +1 -1
- package/dist/core/lifeguard.d.ts +1 -0
- package/dist/core/lifeguard.d.ts.map +1 -1
- package/dist/core/lifeguard.js +6 -0
- package/dist/core/lifeguard.js.map +1 -1
- package/dist/core/subagent-pool-instance.d.ts +19 -0
- package/dist/core/subagent-pool-instance.d.ts.map +1 -0
- package/dist/core/subagent-pool-instance.js +40 -0
- package/dist/core/subagent-pool-instance.js.map +1 -0
- package/dist/core/subagent-pool.d.ts +18 -6
- package/dist/core/subagent-pool.d.ts.map +1 -1
- package/dist/core/subagent-pool.js +33 -14
- package/dist/core/subagent-pool.js.map +1 -1
- package/dist/core/subagent-result.d.ts +34 -0
- package/dist/core/subagent-result.d.ts.map +1 -0
- package/dist/core/subagent-result.js +89 -0
- package/dist/core/subagent-result.js.map +1 -0
- package/dist/core/subagent.d.ts +6 -46
- package/dist/core/subagent.d.ts.map +1 -1
- package/dist/core/subagent.js +5 -141
- package/dist/core/subagent.js.map +1 -1
- package/dist/core/task-store.d.ts +3 -2
- package/dist/core/task-store.d.ts.map +1 -1
- package/dist/core/task-store.js +3 -2
- package/dist/core/task-store.js.map +1 -1
- package/dist/core/tools/subagent.d.ts +1 -1
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +46 -41
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/task-panel.d.ts +4 -3
- package/dist/modes/interactive/components/task-panel.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-panel.js +52 -21
- package/dist/modes/interactive/components/task-panel.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +38 -6
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +16 -15
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts +2 -0
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +30 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/docs/routing.md +13 -2
- 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
|
@@ -21,7 +21,7 @@ import { BUILT_IN_PROVIDER_DISPLAY_NAMES } from "../../core/provider-display-nam
|
|
|
21
21
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
22
22
|
import { SessionManager } from "../../core/session-manager.js";
|
|
23
23
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
24
|
-
import {
|
|
24
|
+
import { getSubagentPool } from "../../core/subagent-pool-instance.js";
|
|
25
25
|
import { taskStore } from "../../core/task-store.js";
|
|
26
26
|
import { WORDMARK } from "../../core/wordmark.js";
|
|
27
27
|
import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
|
|
@@ -2234,14 +2234,16 @@ export class InteractiveMode {
|
|
|
2234
2234
|
this.ui.requestRender();
|
|
2235
2235
|
}
|
|
2236
2236
|
else if (event.message.role === "user") {
|
|
2237
|
+
// A new user message starts a new turn: retire any finished subagent
|
|
2238
|
+
// tasks from the previous turn. Finished tasks stay visible (with their
|
|
2239
|
+
// final status, tokens, and time) until this point — not the moment they
|
|
2240
|
+
// finish — so their outcome remains glanceable for the whole turn.
|
|
2241
|
+
taskStore.retireFinished();
|
|
2237
2242
|
this.addMessageToChat(event.message);
|
|
2238
2243
|
this.updatePendingMessagesDisplay();
|
|
2239
2244
|
this.ui.requestRender();
|
|
2240
2245
|
}
|
|
2241
2246
|
else if (event.message.role === "assistant") {
|
|
2242
|
-
// Main agent is moving on to its next turn: retire any finished subagent
|
|
2243
|
-
// tasks that were kept visible after a parallel spawn.
|
|
2244
|
-
taskStore.retireFinished();
|
|
2245
2247
|
this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
|
|
2246
2248
|
this.streamingMessage = event.message;
|
|
2247
2249
|
this.chatContainer.addChild(this.streamingComponent);
|
|
@@ -3562,28 +3564,27 @@ export class InteractiveMode {
|
|
|
3562
3564
|
}
|
|
3563
3565
|
this.showStatus(`Spawning ${mode} subagent...`);
|
|
3564
3566
|
try {
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
model: this.session.model ?? undefined,
|
|
3571
|
-
modelRegistry: this.runtimeHost.services.modelRegistry,
|
|
3572
|
-
signal: undefined,
|
|
3567
|
+
const pool = getSubagentPool(this.session.sessionManager.getCwd());
|
|
3568
|
+
const dispatchResult = await pool.dispatch(task, {
|
|
3569
|
+
forceAgent: mode,
|
|
3570
|
+
model: this.session.model?.id,
|
|
3571
|
+
provider: this.session.model?.provider,
|
|
3573
3572
|
});
|
|
3574
|
-
|
|
3573
|
+
const result = dispatchResult.result;
|
|
3574
|
+
const resultData = result?.result_data;
|
|
3575
|
+
if (result?.ok) {
|
|
3575
3576
|
this.showStatus(`${mode} subagent completed`);
|
|
3576
3577
|
// Inject the subagent answer as a custom message so the user can see it in the chat
|
|
3577
3578
|
this.sessionManager.appendMessage({
|
|
3578
3579
|
role: "custom",
|
|
3579
3580
|
customType: "subagent",
|
|
3580
|
-
content:
|
|
3581
|
+
content: resultData?.summary || "(no output)",
|
|
3581
3582
|
display: true,
|
|
3582
3583
|
timestamp: Date.now(),
|
|
3583
3584
|
});
|
|
3584
3585
|
}
|
|
3585
3586
|
else {
|
|
3586
|
-
this.showError(`Subagent (${mode}) failed: ${result
|
|
3587
|
+
this.showError(`Subagent (${mode}) failed: ${result?.error ?? "unknown error"}`);
|
|
3587
3588
|
}
|
|
3588
3589
|
}
|
|
3589
3590
|
catch (error) {
|