@ashx-j/lunr 0.2.14 → 0.2.16
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 +24 -1
- package/README.md +4 -4
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +4 -4
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +2 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-settings-tools.d.ts +4 -0
- package/dist/builtin-extensions/lunr-settings-tools.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-settings-tools.js +120 -0
- package/dist/builtin-extensions/lunr-settings-tools.js.map +1 -0
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.d.ts +2 -2
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.js +3 -3
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +5 -11
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +12 -15
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +3 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +14 -27
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +6 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +6 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.js +4 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js +3 -35
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +5 -12
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +14 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +28 -22
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +9 -4
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +4 -7
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts +3 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js +7 -6
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +6 -4
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +15 -10
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +75 -43
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +5 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +7 -2
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +5 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +68 -10
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/context-breakdown.d.ts +2 -0
- package/dist/core/context-breakdown.d.ts.map +1 -1
- package/dist/core/context-breakdown.js +6 -2
- package/dist/core/context-breakdown.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/injected-prompt.d.ts +3 -3
- package/dist/core/injected-prompt.d.ts.map +1 -1
- package/dist/core/injected-prompt.js +2 -7
- package/dist/core/injected-prompt.js.map +1 -1
- package/dist/core/large-subagent-launch.d.ts +13 -0
- package/dist/core/large-subagent-launch.d.ts.map +1 -0
- package/dist/core/large-subagent-launch.js +54 -0
- package/dist/core/large-subagent-launch.js.map +1 -0
- package/dist/core/model-instructions.d.ts +24 -0
- package/dist/core/model-instructions.d.ts.map +1 -0
- package/dist/core/model-instructions.js +123 -0
- package/dist/core/model-instructions.js.map +1 -0
- package/dist/core/permissions.d.ts +10 -11
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +107 -40
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +10 -1
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/resource-loader.d.ts +3 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +13 -4
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-bridges.d.ts +4 -0
- package/dist/core/runtime-bridges.d.ts.map +1 -0
- package/dist/core/runtime-bridges.js +16 -0
- package/dist/core/runtime-bridges.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.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 +32 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-tools-bridge.d.ts +35 -0
- package/dist/core/settings-tools-bridge.d.ts.map +1 -0
- package/dist/core/settings-tools-bridge.js +56 -0
- package/dist/core/settings-tools-bridge.js.map +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +3 -2
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +4 -3
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +1 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +3 -2
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/router.d.ts +1 -1
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +1 -1
- package/dist/gateway/router.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -9
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +4 -0
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.d.ts +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.js +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +8 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +61 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -3
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +45 -54
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/compaction.md +5 -3
- package/docs/features.md +7 -7
- package/docs/quickstart.md +2 -1
- package/docs/settings.md +3 -1
- package/docs/termux.md +1 -1
- package/docs/usage.md +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -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/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
- package/dist/core/swarm.d.ts +0 -54
- package/dist/core/swarm.d.ts.map +0 -1
- package/dist/core/swarm.js +0 -119
- package/dist/core/swarm.js.map +0 -1
|
@@ -24,6 +24,7 @@ import { detectInjectedPrompt } from "../../core/injected-prompt.js";
|
|
|
24
24
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
25
25
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
26
26
|
import { isValidProviderBaseUrl, parseModelIds, slugifyProviderId, upsertCustomProvider, } from "../../core/model-config-writer.js";
|
|
27
|
+
import { getGlobalInstructionsPath, getModelInstructionsPath } from "../../core/model-instructions.js";
|
|
27
28
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScope } from "../../core/model-resolver.js";
|
|
28
29
|
import { refreshModelCandidatesForInit } from "../../core/model-runtime.js";
|
|
29
30
|
import { getModelTiersBridge } from "../../core/model-tiers.js";
|
|
@@ -37,8 +38,6 @@ import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/sea
|
|
|
37
38
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
38
39
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
39
40
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
40
|
-
// lunr: moved to core/swarm.ts so the gateway can reuse it.
|
|
41
|
-
import { buildSwarmPrompt } from "../../core/swarm.js";
|
|
42
41
|
import { time } from "../../core/timings.js";
|
|
43
42
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
44
43
|
import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
|
|
@@ -272,8 +271,6 @@ export class InteractiveMode {
|
|
|
272
271
|
signalCleanupHandlers = [];
|
|
273
272
|
// Track if editor is in bash mode (text starts with !)
|
|
274
273
|
isBashMode = false;
|
|
275
|
-
// Track whether a /swarm orchestration turn is in flight (footer status)
|
|
276
|
-
swarmMode = false;
|
|
277
274
|
// lunr: mode in effect before the current plan stretch. Used by approve / `/plan off`
|
|
278
275
|
// / `/plan <text>` to leave plan. Shift+Tab and `/mode` pick the destination themselves.
|
|
279
276
|
previousPermissionMode;
|
|
@@ -291,6 +288,7 @@ export class InteractiveMode {
|
|
|
291
288
|
pendingBashComponents = [];
|
|
292
289
|
// Auto-compaction state
|
|
293
290
|
autoCompactionEscapeHandler;
|
|
291
|
+
pendingCompactionRender;
|
|
294
292
|
// Auto-retry state
|
|
295
293
|
retryEscapeHandler;
|
|
296
294
|
// Messages queued while compaction is running
|
|
@@ -606,17 +604,8 @@ export class InteractiveMode {
|
|
|
606
604
|
this.startPlanUsagePolling();
|
|
607
605
|
// lunr: register the permission approval dialog handler so manual mode can prompt.
|
|
608
606
|
registerApprovalHandler(async (req) => {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
// this.swarmMode at turn end, same as an explicit /swarm).
|
|
612
|
-
if (req.kind === "swarm") {
|
|
613
|
-
const resp = await this.showSwarmApprovalDialog(req);
|
|
614
|
-
const decision = typeof resp === "string" ? resp : resp.decision;
|
|
615
|
-
if (decision !== "reject") {
|
|
616
|
-
this.swarmMode = true;
|
|
617
|
-
this.setExtensionStatus("swarm", "swarm");
|
|
618
|
-
}
|
|
619
|
-
return resp;
|
|
607
|
+
if (req.kind === "large-subagent-launch") {
|
|
608
|
+
return this.showLargeSubagentLaunchApprovalDialog(req);
|
|
620
609
|
}
|
|
621
610
|
// lunr: plan approval (present_plan tool). Any approve leaves plan mode —
|
|
622
611
|
// restore runs BEFORE resolving so the model's next tool call already
|
|
@@ -1494,6 +1483,7 @@ export class InteractiveMode {
|
|
|
1494
1483
|
this.chatContainer.clear();
|
|
1495
1484
|
this.pendingMessagesContainer.clear();
|
|
1496
1485
|
this.compactionQueuedMessages = [];
|
|
1486
|
+
this.pendingCompactionRender = undefined;
|
|
1497
1487
|
this.stopSmoothStreaming();
|
|
1498
1488
|
this.streamingComponent = undefined;
|
|
1499
1489
|
this.streamingMessage = undefined;
|
|
@@ -2559,12 +2549,6 @@ export class InteractiveMode {
|
|
|
2559
2549
|
await this.handleInitCommand();
|
|
2560
2550
|
return;
|
|
2561
2551
|
}
|
|
2562
|
-
if (text === "/swarm" || text.startsWith("/swarm ")) {
|
|
2563
|
-
const task = text.startsWith("/swarm ") ? text.slice(7).trim() : "";
|
|
2564
|
-
this.editor.setText("");
|
|
2565
|
-
await this.handleSwarmCommand(task);
|
|
2566
|
-
return;
|
|
2567
|
-
}
|
|
2568
2552
|
if (text === "/debug") {
|
|
2569
2553
|
this.handleDebugCommand();
|
|
2570
2554
|
this.editor.setText("");
|
|
@@ -2962,16 +2946,17 @@ export class InteractiveMode {
|
|
|
2962
2946
|
this.streamingMessage = undefined;
|
|
2963
2947
|
}
|
|
2964
2948
|
this.pendingTools.clear();
|
|
2965
|
-
if (this.swarmMode) {
|
|
2966
|
-
this.swarmMode = false;
|
|
2967
|
-
this.setExtensionStatus("swarm", undefined);
|
|
2968
|
-
}
|
|
2969
2949
|
this.maybeAutoNameSession();
|
|
2970
2950
|
// lunr: capture tree-scope changes at turn boundary (bash side-effects).
|
|
2971
2951
|
captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId());
|
|
2972
2952
|
this.ui.requestRender();
|
|
2973
2953
|
break;
|
|
2974
2954
|
case "agent_settled":
|
|
2955
|
+
if (this.pendingCompactionRender) {
|
|
2956
|
+
const result = this.pendingCompactionRender;
|
|
2957
|
+
this.pendingCompactionRender = undefined;
|
|
2958
|
+
this.renderCompactionResult(result);
|
|
2959
|
+
}
|
|
2975
2960
|
await this.checkShutdownRequested();
|
|
2976
2961
|
break;
|
|
2977
2962
|
case "compaction_start": {
|
|
@@ -3005,10 +2990,12 @@ export class InteractiveMode {
|
|
|
3005
2990
|
}
|
|
3006
2991
|
}
|
|
3007
2992
|
else if (event.result) {
|
|
3008
|
-
this.
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
2993
|
+
if (this.session.isIdle) {
|
|
2994
|
+
this.renderCompactionResult(event.result);
|
|
2995
|
+
}
|
|
2996
|
+
else {
|
|
2997
|
+
this.pendingCompactionRender = event.result;
|
|
2998
|
+
}
|
|
3012
2999
|
}
|
|
3013
3000
|
else if (event.errorMessage) {
|
|
3014
3001
|
if (event.reason === "manual") {
|
|
@@ -3146,7 +3133,7 @@ export class InteractiveMode {
|
|
|
3146
3133
|
this.chatContainer.addChild(new Spacer(1));
|
|
3147
3134
|
}
|
|
3148
3135
|
const skillBlock = parseSkillBlock(textContent);
|
|
3149
|
-
// lunr: render injected prompts (/
|
|
3136
|
+
// lunr: render injected prompts (/research /goal) collapsed instead
|
|
3150
3137
|
// of dumping the full multi-line prompt body verbatim.
|
|
3151
3138
|
const injected = detectInjectedPrompt(textContent);
|
|
3152
3139
|
if (injected) {
|
|
@@ -3862,6 +3849,12 @@ export class InteractiveMode {
|
|
|
3862
3849
|
const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
|
|
3863
3850
|
return !!extensionRunner.getCommand(commandName);
|
|
3864
3851
|
}
|
|
3852
|
+
renderCompactionResult(result) {
|
|
3853
|
+
this.chatContainer.clear();
|
|
3854
|
+
this.rebuildChatFromMessages();
|
|
3855
|
+
this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
|
|
3856
|
+
this.footer.invalidate();
|
|
3857
|
+
}
|
|
3865
3858
|
async flushCompactionQueue(options) {
|
|
3866
3859
|
if (this.compactionQueuedMessages.length === 0) {
|
|
3867
3860
|
return;
|
|
@@ -3998,6 +3991,10 @@ export class InteractiveMode {
|
|
|
3998
3991
|
clearOnShrink: this.settingsManager.getClearOnShrink(),
|
|
3999
3992
|
showTerminalProgress: this.settingsManager.getShowTerminalProgress(),
|
|
4000
3993
|
modelTiers: this.settingsManager.getModelTiers(),
|
|
3994
|
+
modelInstructions: this.settingsManager.getModelInstructions(),
|
|
3995
|
+
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
3996
|
+
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
3997
|
+
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
4001
3998
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
4002
3999
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
4003
4000
|
searchCurator: getSearchCuratorSetting(),
|
|
@@ -4183,6 +4180,17 @@ export class InteractiveMode {
|
|
|
4183
4180
|
onModelTierThinkingChange: (tier, level) => {
|
|
4184
4181
|
this.settingsManager.setTierThinking(tier, level);
|
|
4185
4182
|
},
|
|
4183
|
+
onModelInstructionsEnabledChange: (enabled) => {
|
|
4184
|
+
this.settingsManager.setModelInstructionsEnabled(enabled);
|
|
4185
|
+
this.session.refreshToolRegistry();
|
|
4186
|
+
},
|
|
4187
|
+
onModelInstructionsModeChange: (mode) => {
|
|
4188
|
+
this.settingsManager.setModelInstructionsMode(mode);
|
|
4189
|
+
this.session.refreshToolRegistry();
|
|
4190
|
+
},
|
|
4191
|
+
onConfirmLargeSubagentLaunchesChange: (enabled) => {
|
|
4192
|
+
this.settingsManager.setConfirmLargeSubagentLaunches(enabled);
|
|
4193
|
+
},
|
|
4186
4194
|
getTierThinkingLevels: (tier) => {
|
|
4187
4195
|
const model = this.resolveModelReference(this.settingsManager.getTierModel(tier));
|
|
4188
4196
|
if (model)
|
|
@@ -5585,24 +5593,6 @@ export class InteractiveMode {
|
|
|
5585
5593
|
await this.sendUserMessageAfterDeferredBuiltins(prompt);
|
|
5586
5594
|
this.showStatus("AGENTS.md is being generated — run /reload when it finishes to load it into context.");
|
|
5587
5595
|
}
|
|
5588
|
-
async handleSwarmCommand(task) {
|
|
5589
|
-
if (task.length === 0) {
|
|
5590
|
-
if (this.swarmMode) {
|
|
5591
|
-
this.showStatus("Swarm mode is active — run /subagents-fleet to monitor the fleet.");
|
|
5592
|
-
}
|
|
5593
|
-
else {
|
|
5594
|
-
this.showStatus("Usage: /swarm <task> — decomposes the task across parallel subagents. Monitor with /subagents-fleet.");
|
|
5595
|
-
}
|
|
5596
|
-
return;
|
|
5597
|
-
}
|
|
5598
|
-
if (this.session.isStreaming) {
|
|
5599
|
-
this.showWarning("Wait for the current response to finish before running /swarm.");
|
|
5600
|
-
return;
|
|
5601
|
-
}
|
|
5602
|
-
this.swarmMode = true;
|
|
5603
|
-
this.setExtensionStatus("swarm", "swarm");
|
|
5604
|
-
await this.sendUserMessageAfterDeferredBuiltins(buildSwarmPrompt(task));
|
|
5605
|
-
}
|
|
5606
5596
|
// lunr: /undo and /edit rewind the same session via navigateTree (no fork).
|
|
5607
5597
|
// /undo leaves the editor alone; /edit pastes the undone user text. /redo
|
|
5608
5598
|
// pops the previous leaf and navigates back.
|
|
@@ -6142,7 +6132,8 @@ export class InteractiveMode {
|
|
|
6142
6132
|
tools,
|
|
6143
6133
|
messages: this.session.messages,
|
|
6144
6134
|
contextWindow,
|
|
6145
|
-
globalAgentsPath:
|
|
6135
|
+
globalAgentsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
6136
|
+
modelAgentsPath: getModelInstructionsPath(getAgentDir(), model.id),
|
|
6146
6137
|
});
|
|
6147
6138
|
}
|
|
6148
6139
|
handleFastCommand(arg) {
|
|
@@ -6374,20 +6365,20 @@ export class InteractiveMode {
|
|
|
6374
6365
|
});
|
|
6375
6366
|
});
|
|
6376
6367
|
}
|
|
6377
|
-
//
|
|
6378
|
-
//
|
|
6368
|
+
// Approval dialog for one subagent call launching more than two children.
|
|
6369
|
+
// "Reject with feedback" collects a one-line
|
|
6379
6370
|
// reason that becomes the block reason the model sees, so it can adjust the plan.
|
|
6380
|
-
async
|
|
6371
|
+
async showLargeSubagentLaunchApprovalDialog(req) {
|
|
6381
6372
|
return new Promise((resolve) => {
|
|
6382
6373
|
this.showSelector((done) => {
|
|
6383
|
-
const selector = new ExtensionSelectorComponent("
|
|
6374
|
+
const selector = new ExtensionSelectorComponent("Approve large subagent launch?", ["Approve once", "Approve for this session", "Reject", "Reject with feedback"], (option) => {
|
|
6384
6375
|
done();
|
|
6385
6376
|
if (option === "Approve once")
|
|
6386
6377
|
resolve("once");
|
|
6387
6378
|
else if (option === "Approve for this session")
|
|
6388
6379
|
resolve("session");
|
|
6389
6380
|
else if (option === "Reject with feedback") {
|
|
6390
|
-
void this.showExtensionInput("Reject
|
|
6381
|
+
void this.showExtensionInput("Reject large subagent launch", "feedback for the agent (optional)").then((feedback) => {
|
|
6391
6382
|
const trimmed = feedback?.trim();
|
|
6392
6383
|
resolve(trimmed ? { decision: "reject", feedback: trimmed } : "reject");
|
|
6393
6384
|
});
|