@ashx-j/lunr-dev 0.2.13-dev.5.1 → 0.2.13-dev.8.1
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/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/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/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/anthropic.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/cloudflare-ai-gateway.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/google-vertex.json +1 -1
- package/dist/catalog/providers/google.json +1 -1
- package/dist/catalog/providers/huggingface.json +1 -1
- package/dist/catalog/providers/nvidia.json +1 -1
- package/dist/catalog/providers/openai-codex.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/publication.json +131 -3
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -0
- package/dist/cli/list-models.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 +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +20 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/catalog-cache-scope.d.ts +3 -0
- package/dist/core/catalog-cache-scope.d.ts.map +1 -0
- package/dist/core/catalog-cache-scope.js +12 -0
- package/dist/core/catalog-cache-scope.js.map +1 -0
- package/dist/core/catalog-merge.d.ts +2 -0
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +29 -2
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/catalog-refresh-polling.d.ts +8 -0
- package/dist/core/catalog-refresh-polling.d.ts.map +1 -0
- package/dist/core/catalog-refresh-polling.js +30 -0
- package/dist/core/catalog-refresh-polling.js.map +1 -0
- package/dist/core/codex-catalog.d.ts +3 -0
- package/dist/core/codex-catalog.d.ts.map +1 -0
- package/dist/core/codex-catalog.js +15 -0
- package/dist/core/codex-catalog.js.map +1 -0
- 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/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/live-catalog.d.ts +5 -2
- package/dist/core/live-catalog.d.ts.map +1 -1
- package/dist/core/live-catalog.js +108 -27
- package/dist/core/live-catalog.js.map +1 -1
- 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/model-runtime.d.ts +8 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/official-catalog.d.ts +4 -0
- package/dist/core/official-catalog.d.ts.map +1 -1
- package/dist/core/official-catalog.js +86 -21
- package/dist/core/official-catalog.js.map +1 -1
- package/dist/core/permissions.d.ts +11 -10
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +61 -45
- 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/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +17 -16
- package/dist/core/session-manager.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/swarm.d.ts +0 -31
- package/dist/core/swarm.d.ts.map +1 -1
- package/dist/core/swarm.js +2 -76
- package/dist/core/swarm.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/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 +12 -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/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.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 +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +65 -99
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/startup/interactive-shell.d.ts.map +1 -1
- package/dist/startup/interactive-shell.js +2 -1
- package/dist/startup/interactive-shell.js.map +1 -1
- package/docs/features.md +7 -6
- package/docs/model-catalog.md +29 -0
- package/docs/quickstart.md +3 -2
- package/docs/settings.md +3 -1
- package/docs/termux.md +1 -1
- package/docs/usage.md +2 -1
- package/examples/extensions/subagent/README.md +1 -1
- package/package.json +4 -4
|
@@ -15,15 +15,16 @@ import { parseSkillBlock } from "../../core/agent-session.js";
|
|
|
15
15
|
import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
|
|
16
16
|
import { CACHE_TTL_MS, collectCacheMisses, computeCacheWaste, detectCacheMiss, } from "../../core/cache-stats.js";
|
|
17
17
|
import { formatCatalogRefreshSummary } from "../../core/catalog-merge.js";
|
|
18
|
+
import { startCatalogRefreshPolling } from "../../core/catalog-refresh-polling.js";
|
|
18
19
|
import { computeContextBreakdown } from "../../core/context-breakdown.js";
|
|
19
20
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
20
21
|
import { hasGrokCliXaiAuth } from "../../core/grok-cli-auth.js";
|
|
21
22
|
import { configureHttpDispatcher, formatHttpIdleTimeoutMs } from "../../core/http-dispatcher.js";
|
|
22
23
|
import { detectInjectedPrompt } from "../../core/injected-prompt.js";
|
|
23
24
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
24
|
-
import { applyIncompleteAnswers, describeIncomplete, INCOMPLETE_PROMPT_CAP, parsePositiveInt, } from "../../core/live-catalog.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,13 +38,11 @@ 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
41
|
import { buildSwarmPrompt } from "../../core/swarm.js";
|
|
42
42
|
import { time } from "../../core/timings.js";
|
|
43
43
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
44
44
|
import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
|
|
45
45
|
import { getAllPlanUsageResults, getUsageServiceBridge } from "../../core/usage-service.js";
|
|
46
|
-
import { modelToUserEntry } from "../../core/user-models.js";
|
|
47
46
|
import { markStartupMilestone } from "../../startup/startup-milestones.js";
|
|
48
47
|
import { copyToClipboard, readClipboardText } from "../../utils/clipboard.js";
|
|
49
48
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
@@ -225,6 +224,7 @@ export class InteractiveMode {
|
|
|
225
224
|
keybindings;
|
|
226
225
|
version;
|
|
227
226
|
isInitialized = false;
|
|
227
|
+
stopCatalogRefresh;
|
|
228
228
|
onInputCallback;
|
|
229
229
|
pendingUserInputs = [];
|
|
230
230
|
startupUserInputs = [];
|
|
@@ -617,17 +617,8 @@ export class InteractiveMode {
|
|
|
617
617
|
this.startPlanUsagePolling();
|
|
618
618
|
// lunr: register the permission approval dialog handler so manual mode can prompt.
|
|
619
619
|
registerApprovalHandler(async (req) => {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
// this.swarmMode at turn end, same as an explicit /swarm).
|
|
623
|
-
if (req.kind === "swarm") {
|
|
624
|
-
const resp = await this.showSwarmApprovalDialog(req);
|
|
625
|
-
const decision = typeof resp === "string" ? resp : resp.decision;
|
|
626
|
-
if (decision !== "reject") {
|
|
627
|
-
this.swarmMode = true;
|
|
628
|
-
this.setExtensionStatus("swarm", "swarm");
|
|
629
|
-
}
|
|
630
|
-
return resp;
|
|
620
|
+
if (req.kind === "large-subagent-launch") {
|
|
621
|
+
return this.showLargeSubagentLaunchApprovalDialog(req);
|
|
631
622
|
}
|
|
632
623
|
// lunr: plan approval (present_plan tool). Any approve leaves plan mode —
|
|
633
624
|
// restore runs BEFORE resolving so the model's next tool call already
|
|
@@ -678,6 +669,9 @@ export class InteractiveMode {
|
|
|
678
669
|
this.promptBarrierPromise = this.deferredBuiltinAttachPromise.then(() => {
|
|
679
670
|
time("attachDeferredBuiltins");
|
|
680
671
|
markStartupMilestone("prompt_barrier_open");
|
|
672
|
+
}, () => {
|
|
673
|
+
time("attachDeferredBuiltins");
|
|
674
|
+
markStartupMilestone("prompt_barrier_open");
|
|
681
675
|
});
|
|
682
676
|
// Set up theme file watcher
|
|
683
677
|
onThemeChange(() => {
|
|
@@ -697,6 +691,19 @@ export class InteractiveMode {
|
|
|
697
691
|
const callerMaintenance = startupBenchmark
|
|
698
692
|
? Promise.resolve()
|
|
699
693
|
: this.waitForPromptBarrier().then(() => this.options.deferredMaintenance?.());
|
|
694
|
+
if (!startupBenchmark)
|
|
695
|
+
void this.waitForPromptBarrier().then(() => {
|
|
696
|
+
if (!this.isInitialized)
|
|
697
|
+
return;
|
|
698
|
+
this.stopCatalogRefresh = startCatalogRefreshPolling({
|
|
699
|
+
refresh: (signal) => this.session.modelRuntime.refreshIfStale({ signal }),
|
|
700
|
+
isBusy: () => this.session.isStreaming,
|
|
701
|
+
onUpdate: () => {
|
|
702
|
+
this.session.refreshModelFromRegistry();
|
|
703
|
+
this.footer.invalidate();
|
|
704
|
+
},
|
|
705
|
+
});
|
|
706
|
+
});
|
|
700
707
|
void Promise.allSettled([toolMaintenance, updateMaintenance, providerMaintenance, callerMaintenance]).then(() => {
|
|
701
708
|
markStartupMilestone("deferred_maintenance_idle");
|
|
702
709
|
});
|
|
@@ -1325,17 +1332,15 @@ export class InteractiveMode {
|
|
|
1325
1332
|
this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
|
|
1326
1333
|
}
|
|
1327
1334
|
if (failures.length > 0) {
|
|
1328
|
-
|
|
1335
|
+
this.showError(`Failed to load deferred extensions: ${failures.map(({ name }) => name).join(", ")}`);
|
|
1329
1336
|
}
|
|
1330
|
-
this.deferredBuiltinsAttached = true;
|
|
1331
1337
|
}
|
|
1332
1338
|
catch (error) {
|
|
1333
|
-
this.deferredBuiltinsAttached = false;
|
|
1334
1339
|
const message = error instanceof Error ? error.message : String(error);
|
|
1335
1340
|
this.showError(`Failed to load deferred extensions: ${message}`);
|
|
1336
|
-
throw error;
|
|
1337
1341
|
}
|
|
1338
1342
|
finally {
|
|
1343
|
+
this.deferredBuiltinsAttached = true;
|
|
1339
1344
|
this.setExtensionStatus("deferred-builtins", undefined);
|
|
1340
1345
|
}
|
|
1341
1346
|
}
|
|
@@ -2940,6 +2945,7 @@ export class InteractiveMode {
|
|
|
2940
2945
|
break;
|
|
2941
2946
|
}
|
|
2942
2947
|
case "agent_end":
|
|
2948
|
+
this.session.refreshModelFromRegistry();
|
|
2943
2949
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2944
2950
|
this.ui.terminal.setProgress(false);
|
|
2945
2951
|
}
|
|
@@ -3135,7 +3141,7 @@ export class InteractiveMode {
|
|
|
3135
3141
|
this.chatContainer.addChild(new Spacer(1));
|
|
3136
3142
|
}
|
|
3137
3143
|
const skillBlock = parseSkillBlock(textContent);
|
|
3138
|
-
// lunr: render injected prompts (/
|
|
3144
|
+
// lunr: render injected prompts (/research /goal) collapsed instead
|
|
3139
3145
|
// of dumping the full multi-line prompt body verbatim.
|
|
3140
3146
|
const injected = detectInjectedPrompt(textContent);
|
|
3141
3147
|
if (injected) {
|
|
@@ -3991,6 +3997,10 @@ export class InteractiveMode {
|
|
|
3991
3997
|
clearOnShrink: this.settingsManager.getClearOnShrink(),
|
|
3992
3998
|
showTerminalProgress: this.settingsManager.getShowTerminalProgress(),
|
|
3993
3999
|
modelTiers: this.settingsManager.getModelTiers(),
|
|
4000
|
+
modelInstructions: this.settingsManager.getModelInstructions(),
|
|
4001
|
+
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
4002
|
+
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
4003
|
+
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
3994
4004
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
3995
4005
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
3996
4006
|
searchCurator: getSearchCuratorSetting(),
|
|
@@ -4176,6 +4186,17 @@ export class InteractiveMode {
|
|
|
4176
4186
|
onModelTierThinkingChange: (tier, level) => {
|
|
4177
4187
|
this.settingsManager.setTierThinking(tier, level);
|
|
4178
4188
|
},
|
|
4189
|
+
onModelInstructionsEnabledChange: (enabled) => {
|
|
4190
|
+
this.settingsManager.setModelInstructionsEnabled(enabled);
|
|
4191
|
+
this.session.refreshToolRegistry();
|
|
4192
|
+
},
|
|
4193
|
+
onModelInstructionsModeChange: (mode) => {
|
|
4194
|
+
this.settingsManager.setModelInstructionsMode(mode);
|
|
4195
|
+
this.session.refreshToolRegistry();
|
|
4196
|
+
},
|
|
4197
|
+
onConfirmLargeSubagentLaunchesChange: (enabled) => {
|
|
4198
|
+
this.settingsManager.setConfirmLargeSubagentLaunches(enabled);
|
|
4199
|
+
},
|
|
4179
4200
|
getTierThinkingLevels: (tier) => {
|
|
4180
4201
|
const model = this.resolveModelReference(this.settingsManager.getTierModel(tier));
|
|
4181
4202
|
if (model)
|
|
@@ -4315,40 +4336,9 @@ export class InteractiveMode {
|
|
|
4315
4336
|
this.footer.invalidate();
|
|
4316
4337
|
return;
|
|
4317
4338
|
}
|
|
4318
|
-
|
|
4319
|
-
const
|
|
4320
|
-
const extraDefaults = Math.max(0, incomplete.length - toPrompt.length);
|
|
4321
|
-
const persisted = [];
|
|
4339
|
+
// Discovered metadata stays in its cache, not in user overrides. Enrichment is automatic.
|
|
4340
|
+
const extraDefaults = result.incomplete.length;
|
|
4322
4341
|
const asked = [];
|
|
4323
|
-
let skipRemaining = false;
|
|
4324
|
-
for (const item of toPrompt) {
|
|
4325
|
-
if (skipRemaining) {
|
|
4326
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4327
|
-
continue;
|
|
4328
|
-
}
|
|
4329
|
-
const choice = await this.showExtensionSelector(describeIncomplete(item), [
|
|
4330
|
-
"Enter details",
|
|
4331
|
-
"Use defaults",
|
|
4332
|
-
"Skip remaining",
|
|
4333
|
-
]);
|
|
4334
|
-
asked.push(`${item.provider}/${item.id}`);
|
|
4335
|
-
if (choice === "Skip remaining") {
|
|
4336
|
-
skipRemaining = true;
|
|
4337
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4338
|
-
continue;
|
|
4339
|
-
}
|
|
4340
|
-
if (choice === "Enter details") {
|
|
4341
|
-
const detailed = await this.promptIncompleteModelDetails(item);
|
|
4342
|
-
persisted.push(modelToUserEntry(detailed ?? item.draft));
|
|
4343
|
-
continue;
|
|
4344
|
-
}
|
|
4345
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4346
|
-
}
|
|
4347
|
-
for (const item of incomplete.slice(toPrompt.length)) {
|
|
4348
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4349
|
-
}
|
|
4350
|
-
if (persisted.length > 0)
|
|
4351
|
-
runtime.persistUserModels(persisted);
|
|
4352
4342
|
let ollama;
|
|
4353
4343
|
const runner = this.session.extensionRunner;
|
|
4354
4344
|
const cloudRefresh = globalThis[Symbol.for("@lunr/ollama-cloud-refresh")];
|
|
@@ -4369,53 +4359,26 @@ export class InteractiveMode {
|
|
|
4369
4359
|
evictedUserRows: result.official.evictedUserRows,
|
|
4370
4360
|
}
|
|
4371
4361
|
: undefined,
|
|
4372
|
-
providers:
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4362
|
+
providers: [
|
|
4363
|
+
...result.live.map((entry) => ({
|
|
4364
|
+
id: entry.providerId,
|
|
4365
|
+
status: entry.status,
|
|
4366
|
+
added: entry.added,
|
|
4367
|
+
total: entry.total,
|
|
4368
|
+
error: entry.error,
|
|
4369
|
+
})),
|
|
4370
|
+
...Object.entries(result.official?.errors ?? {}).map(([id, error]) => ({
|
|
4371
|
+
id,
|
|
4372
|
+
status: "error",
|
|
4373
|
+
error,
|
|
4374
|
+
})),
|
|
4375
|
+
],
|
|
4379
4376
|
asked,
|
|
4380
4377
|
extraDefaults,
|
|
4381
4378
|
ollama,
|
|
4382
4379
|
}));
|
|
4383
4380
|
this.footer.invalidate();
|
|
4384
4381
|
}
|
|
4385
|
-
async promptIncompleteModelDetails(item) {
|
|
4386
|
-
const contextInput = await this.showExtensionInput(`${item.provider}/${item.id} — context window:`, String(item.draft.contextWindow || 128000));
|
|
4387
|
-
if (contextInput === undefined)
|
|
4388
|
-
return undefined;
|
|
4389
|
-
const maxTokensInput = await this.showExtensionInput(`${item.provider}/${item.id} — max output tokens:`, String(item.draft.maxTokens || 8192));
|
|
4390
|
-
if (maxTokensInput === undefined)
|
|
4391
|
-
return undefined;
|
|
4392
|
-
const inputChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — input:`, [
|
|
4393
|
-
"text",
|
|
4394
|
-
"text + image",
|
|
4395
|
-
]);
|
|
4396
|
-
if (inputChoice === undefined)
|
|
4397
|
-
return undefined;
|
|
4398
|
-
const reasoningChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — reasoning:`, [
|
|
4399
|
-
"yes",
|
|
4400
|
-
"no",
|
|
4401
|
-
]);
|
|
4402
|
-
if (reasoningChoice === undefined)
|
|
4403
|
-
return undefined;
|
|
4404
|
-
let api = item.draft.api;
|
|
4405
|
-
if (item.availableApis.length > 1) {
|
|
4406
|
-
const apiChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — API protocol:`, item.availableApis.map(String));
|
|
4407
|
-
if (apiChoice === undefined)
|
|
4408
|
-
return undefined;
|
|
4409
|
-
api = apiChoice;
|
|
4410
|
-
}
|
|
4411
|
-
return applyIncompleteAnswers(item.draft, {
|
|
4412
|
-
contextWindow: parsePositiveInt(contextInput, item.draft.contextWindow),
|
|
4413
|
-
maxTokens: parsePositiveInt(maxTokensInput, item.draft.maxTokens),
|
|
4414
|
-
input: inputChoice === "text + image" ? ["text", "image"] : ["text"],
|
|
4415
|
-
reasoning: reasoningChoice === "yes",
|
|
4416
|
-
api,
|
|
4417
|
-
});
|
|
4418
|
-
}
|
|
4419
4382
|
async findExactModelMatch(searchTerm) {
|
|
4420
4383
|
const models = await this.getModelCandidates();
|
|
4421
4384
|
return findExactModelReferenceMatch(searchTerm, models);
|
|
@@ -6193,7 +6156,8 @@ export class InteractiveMode {
|
|
|
6193
6156
|
tools,
|
|
6194
6157
|
messages: this.session.messages,
|
|
6195
6158
|
contextWindow,
|
|
6196
|
-
globalAgentsPath:
|
|
6159
|
+
globalAgentsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
6160
|
+
modelAgentsPath: getModelInstructionsPath(getAgentDir(), model.id),
|
|
6197
6161
|
});
|
|
6198
6162
|
}
|
|
6199
6163
|
handleFastCommand(arg) {
|
|
@@ -6425,20 +6389,20 @@ export class InteractiveMode {
|
|
|
6425
6389
|
});
|
|
6426
6390
|
});
|
|
6427
6391
|
}
|
|
6428
|
-
//
|
|
6429
|
-
//
|
|
6392
|
+
// Approval dialog for one subagent call launching more than two children.
|
|
6393
|
+
// "Reject with feedback" collects a one-line
|
|
6430
6394
|
// reason that becomes the block reason the model sees, so it can adjust the plan.
|
|
6431
|
-
async
|
|
6395
|
+
async showLargeSubagentLaunchApprovalDialog(req) {
|
|
6432
6396
|
return new Promise((resolve) => {
|
|
6433
6397
|
this.showSelector((done) => {
|
|
6434
|
-
const selector = new ExtensionSelectorComponent("
|
|
6398
|
+
const selector = new ExtensionSelectorComponent("Approve large subagent launch?", ["Approve once", "Approve for this session", "Reject", "Reject with feedback"], (option) => {
|
|
6435
6399
|
done();
|
|
6436
6400
|
if (option === "Approve once")
|
|
6437
6401
|
resolve("once");
|
|
6438
6402
|
else if (option === "Approve for this session")
|
|
6439
6403
|
resolve("session");
|
|
6440
6404
|
else if (option === "Reject with feedback") {
|
|
6441
|
-
void this.showExtensionInput("Reject
|
|
6405
|
+
void this.showExtensionInput("Reject large subagent launch", "feedback for the agent (optional)").then((feedback) => {
|
|
6442
6406
|
const trimmed = feedback?.trim();
|
|
6443
6407
|
resolve(trimmed ? { decision: "reject", feedback: trimmed } : "reject");
|
|
6444
6408
|
});
|
|
@@ -6841,6 +6805,8 @@ ${cycleThinkingLevel ? `| \`${cycleThinkingLevel}\` | Cycle thinking level |\n`
|
|
|
6841
6805
|
}
|
|
6842
6806
|
}
|
|
6843
6807
|
stop() {
|
|
6808
|
+
this.stopCatalogRefresh?.();
|
|
6809
|
+
this.stopCatalogRefresh = undefined;
|
|
6844
6810
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
6845
6811
|
this.ui.terminal.setProgress(false);
|
|
6846
6812
|
}
|