pi-namespace-patch 1.6.0-namespace.1 → 1.6.1-namespace.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/CHANGELOG.md +65 -0
- package/README.md +4 -4
- package/dist/bundle/chunks/anthropic-messages-NVZIQUC2.js +3 -0
- package/dist/bundle/chunks/azure-openai-responses-NLMT4M2I.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +5 -5
- package/dist/bundle/chunks/{chunk-NRY4NBZW.js → chunk-254Q5KJY.js} +2 -2
- package/dist/bundle/chunks/chunk-2BKJ4UF2.js +6 -0
- package/dist/bundle/chunks/{chunk-YOWSKVK7.js → chunk-5QZEKD66.js} +1 -1
- package/dist/bundle/chunks/chunk-ASV47SSA.js +2 -0
- package/dist/bundle/chunks/chunk-DPMEYYP2.js +20 -0
- package/dist/bundle/chunks/{chunk-EVSO24NP.js → chunk-DQUOASJG.js} +1 -1
- package/dist/bundle/chunks/{chunk-XGGZYFNG.js → chunk-ESCXDUHA.js} +2 -2
- package/dist/bundle/chunks/chunk-FZUFSFVS.js +44 -0
- package/dist/bundle/chunks/{chunk-X26YOAEH.js → chunk-GH2VPQ2P.js} +6 -5
- package/dist/bundle/chunks/{chunk-NRLRGOCX.js → chunk-HID5BUPP.js} +1 -1
- package/dist/bundle/chunks/chunk-HRA5GXRL.js +9 -0
- package/dist/bundle/chunks/{chunk-Q5VBELS7.js → chunk-HXTNJVK4.js} +58 -63
- package/dist/bundle/chunks/chunk-JIUMJLB6.js +16 -0
- package/dist/bundle/chunks/{chunk-I6HYYNH6.js → chunk-O5MXS5TI.js} +1 -1
- package/dist/bundle/chunks/chunk-OVXT2WQH.js +2 -0
- package/dist/bundle/chunks/chunk-QQT7J23Q.js +30 -0
- package/dist/bundle/chunks/{chunk-P5E5VM2N.js → chunk-S6XQ4444.js} +1 -1
- package/dist/bundle/chunks/chunk-TRIUHDLU.js +2 -0
- package/dist/bundle/chunks/{chunk-E6LJTZYC.js → chunk-VUZTGLGT.js} +1 -1
- package/dist/bundle/chunks/chunk-WLFBMTZ5.js +14 -0
- package/dist/bundle/chunks/{cli-SAXJLJPC.js → cli-IFNPONCI.js} +1 -1
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-K5LZ2XIM.js +2 -0
- package/dist/bundle/chunks/{easter-egg-3d-7CBVPJQ3.js → easter-egg-3d-JQSUSCKG.js} +1 -1
- package/dist/bundle/chunks/{execute-XDNPBEMU.js → execute-GM225T4M.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-JMDVNM52.js +2 -0
- package/dist/bundle/chunks/google-vertex-RO3RU6D4.js +2 -0
- package/dist/bundle/chunks/{llama-cpp-classify-XXZYF3RR.js → llama-cpp-classify-V63YXBKJ.js} +2 -2
- package/dist/bundle/chunks/mistral-conversations-5QQ525XP.js +4 -0
- package/dist/bundle/chunks/openai-codex-responses-3OSG4LCA.js +2 -0
- package/dist/bundle/chunks/{openai-completions-4IC6AGTR.js → openai-completions-CDC7XEM5.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-LZ2RLVRX.js → openai-decisions-QKZUXNGS.js} +1 -1
- package/dist/bundle/chunks/openai-responses-3TUDNSSR.js +4 -0
- package/dist/bundle/chunks/openrouter-images-WOQ26ANM.js +2 -0
- package/dist/bundle/chunks/pi-decision-DNF2KAXD.js +2 -0
- package/dist/bundle/chunks/pi-messages-PQC5SMWL.js +2 -0
- package/dist/bundle/chunks/{runtime-F3SXQONS.js → runtime-T6TR2GDO.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-Z5B3PAXZ.js +2 -0
- package/dist/bundle/chunks/virtual-modules-SNXUCAHU.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js +6 -6
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +3 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +17 -23
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +7 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +3 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +24 -13
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +2 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +9 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/messages.d.ts +4 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +10 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +6 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +1 -0
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +2 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +4 -0
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +10 -6
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +6 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +6 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +23 -8
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +16 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +23 -4
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/tools/bash.d.ts +3 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +24 -9
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +16 -4
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +47 -41
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +9 -3
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +11 -5
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +3 -13
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +3 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +1 -9
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +8 -124
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +2 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -3
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +3 -5
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +15 -45
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +13 -4
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +13 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +10 -9
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +56 -35
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +13 -3
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +45 -34
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
- package/dist/modes/interactive/program-status-reporter.js +4 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js +9 -1
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +1 -4
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +13 -13
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -4
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +10 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/clipboard.js +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/output-files.d.ts +20 -4
- package/dist/utils/output-files.d.ts.map +1 -1
- package/dist/utils/output-files.js +37 -2
- package/dist/utils/output-files.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +56 -7
- package/dist/utils/shell.js.map +1 -1
- package/docs/cli.md +1 -1
- package/docs/codemode.md +6 -4
- package/docs/extensions.md +14 -4
- package/docs/llama-cpp.md +3 -3
- package/docs/message-types.md +1 -0
- package/docs/models-configuration.md +10 -2
- package/docs/models.md +28 -10
- package/docs/providers.md +3 -3
- package/docs/rpc-commands.md +1 -1
- package/docs/settings.md +4 -1
- package/docs/shell-aliases.md +1 -1
- package/docs/windows.md +2 -1
- package/examples/extensions/subagent/index.ts +3 -2
- package/examples/rpc-extension-ui.ts +8 -7
- package/package.json +6 -6
- package/schemas/models.schema.json +2 -2
- package/schemas/settings.schema.json +30 -5
- package/dist/bundle/chunks/anthropic-messages-WAFIHSF7.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-EB4MRIM4.js +0 -2
- package/dist/bundle/chunks/chunk-EEBRZED2.js +0 -44
- package/dist/bundle/chunks/chunk-F7LEMV2T.js +0 -2
- package/dist/bundle/chunks/chunk-ILDLA2JW.js +0 -9
- package/dist/bundle/chunks/chunk-NV3NPOPF.js +0 -20
- package/dist/bundle/chunks/chunk-PMRZO46Y.js +0 -2
- package/dist/bundle/chunks/chunk-RCNEHRMW.js +0 -2
- package/dist/bundle/chunks/chunk-WIVXJPHQ.js +0 -30
- package/dist/bundle/chunks/chunk-X6RQRO3L.js +0 -16
- package/dist/bundle/chunks/chunk-Y55SJART.js +0 -13
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-AMCR7QEI.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-43M4N5LK.js +0 -2
- package/dist/bundle/chunks/google-vertex-2B3PASK2.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-E3D5ZQKB.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-MSQDSDUR.js +0 -10
- package/dist/bundle/chunks/openai-responses-MCO3BHCC.js +0 -4
- package/dist/bundle/chunks/openrouter-images-SHUJ3VSG.js +0 -2
- package/dist/bundle/chunks/pi-messages-NIKOQ4O7.js +0 -8
- package/dist/bundle/chunks/typesafe-system-one-R2CDUWNO.js +0 -2
- package/dist/bundle/chunks/virtual-modules-C2UILCKW.js +0 -2
|
@@ -91,7 +91,7 @@ import { UserMessageSelectorComponent } from "./components/user-message-selector
|
|
|
91
91
|
import { editInExternalEditor } from "./external-editor.js";
|
|
92
92
|
import { refreshModelCatalogs } from "./model-catalog-refresh.js";
|
|
93
93
|
import { getModelSearchText } from "./model-search.js";
|
|
94
|
-
import { ProgramStatusReporter } from "./program-status-reporter.js";
|
|
94
|
+
import { dialogBlockedStatus, ProgramStatusReporter } from "./program-status-reporter.js";
|
|
95
95
|
import { shareSession } from "./session-share.js";
|
|
96
96
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, onThemeChange, SYSTEM_THEME_NAME, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
97
97
|
import { InteractiveThemeController } from "./theme/theme-controller.js";
|
|
@@ -2244,8 +2244,14 @@ export class InteractiveMode {
|
|
|
2244
2244
|
setHeader: (factory) => this.setExtensionHeader(factory),
|
|
2245
2245
|
setTitle: (title) => this.ui.terminal.setTitle(title),
|
|
2246
2246
|
custom: (factory, options) => this.showExtensionCustom(factory, options),
|
|
2247
|
-
pasteToEditor: (text) =>
|
|
2248
|
-
|
|
2247
|
+
pasteToEditor: (text) => {
|
|
2248
|
+
this.editor.handleInput(`\x1b[200~${text}\x1b[201~`);
|
|
2249
|
+
this.ui.requestRender();
|
|
2250
|
+
},
|
|
2251
|
+
setEditorText: (text) => {
|
|
2252
|
+
this.editor.setText(text);
|
|
2253
|
+
this.ui.requestRender();
|
|
2254
|
+
},
|
|
2249
2255
|
getEditorText: () => this.editor.getExpandedText?.() ?? this.editor.getText(),
|
|
2250
2256
|
editor: (title, prefill) => this.showExtensionEditor(title, prefill),
|
|
2251
2257
|
addAutocompleteProvider: (factory) => {
|
|
@@ -2307,7 +2313,7 @@ export class InteractiveMode {
|
|
|
2307
2313
|
/**
|
|
2308
2314
|
* Show a selector for extensions.
|
|
2309
2315
|
*/
|
|
2310
|
-
showExtensionSelector(title, options, opts
|
|
2316
|
+
showExtensionSelector(title, options, opts) {
|
|
2311
2317
|
return new Promise((resolve) => {
|
|
2312
2318
|
if (opts?.signal?.aborted) {
|
|
2313
2319
|
resolve(undefined);
|
|
@@ -2322,16 +2328,16 @@ export class InteractiveMode {
|
|
|
2322
2328
|
const onAbort = () => finish(undefined);
|
|
2323
2329
|
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2324
2330
|
const selector = new ExtensionSelectorComponent(title, options, (option) => finish(option), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() });
|
|
2325
|
-
this.pushExtensionDialog(selector,
|
|
2331
|
+
this.pushExtensionDialog(selector, dialogBlockedStatus(opts?.blockedKind ?? "question", title));
|
|
2326
2332
|
});
|
|
2327
2333
|
}
|
|
2328
2334
|
/**
|
|
2329
2335
|
* Show a confirmation dialog for extensions.
|
|
2330
2336
|
*/
|
|
2331
2337
|
async showExtensionConfirm(title, message, opts) {
|
|
2332
|
-
const result = await this.showExtensionSelector(`${title}\n${message}`, ["Yes", "No"],
|
|
2333
|
-
|
|
2334
|
-
|
|
2338
|
+
const result = await this.showExtensionSelector(`${title}\n${message}`, ["Yes", "No"], {
|
|
2339
|
+
...opts,
|
|
2340
|
+
blockedKind: opts?.blockedKind ?? "permission",
|
|
2335
2341
|
});
|
|
2336
2342
|
return result === "Yes";
|
|
2337
2343
|
}
|
|
@@ -2358,7 +2364,7 @@ export class InteractiveMode {
|
|
|
2358
2364
|
const onAbort = () => finish(undefined);
|
|
2359
2365
|
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2360
2366
|
const input = new ExtensionInputComponent(title, placeholder, (value) => finish(value), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout });
|
|
2361
|
-
this.pushExtensionDialog(input,
|
|
2367
|
+
this.pushExtensionDialog(input, dialogBlockedStatus(opts?.blockedKind ?? "question", title));
|
|
2362
2368
|
});
|
|
2363
2369
|
}
|
|
2364
2370
|
/**
|
|
@@ -2371,7 +2377,7 @@ export class InteractiveMode {
|
|
|
2371
2377
|
resolve(value);
|
|
2372
2378
|
};
|
|
2373
2379
|
const editor = new ExtensionEditorComponent(this.ui, this.keybindings, title, prefill, (value) => finish(value), () => finish(undefined), undefined, this.settingsManager.getExternalEditorCommand());
|
|
2374
|
-
this.pushExtensionDialog(editor,
|
|
2380
|
+
this.pushExtensionDialog(editor, dialogBlockedStatus("question", title));
|
|
2375
2381
|
});
|
|
2376
2382
|
}
|
|
2377
2383
|
/**
|
|
@@ -3319,7 +3325,8 @@ export class InteractiveMode {
|
|
|
3319
3325
|
if (message.output) {
|
|
3320
3326
|
component.appendOutput(message.output);
|
|
3321
3327
|
}
|
|
3322
|
-
component.setComplete(message.exitCode, message.cancelled, message.truncated ? { truncated: true } : undefined, message.fullOutputPath);
|
|
3328
|
+
component.setComplete(message.exitCode, message.cancelled, message.truncated ? { truncated: true } : undefined, message.fullOutputPath, message.fullOutputError);
|
|
3329
|
+
component.setExpanded(this.toolOutputExpanded);
|
|
3323
3330
|
this.chatContainer.addChild(component);
|
|
3324
3331
|
break;
|
|
3325
3332
|
}
|
|
@@ -3396,7 +3403,7 @@ export class InteractiveMode {
|
|
|
3396
3403
|
const renderedPendingTools = new Map();
|
|
3397
3404
|
// Cache misses are not persisted, unlike successful cache-warming usage.
|
|
3398
3405
|
// Re-derive them and inject them after the assistant messages that paid for them.
|
|
3399
|
-
const cacheMisses = this.settingsManager.
|
|
3406
|
+
const cacheMisses = this.settingsManager.getNotices().cacheMisses
|
|
3400
3407
|
? collectCacheMisses(this.sessionManager.getEntries(), this.session.modelRuntime)
|
|
3401
3408
|
: new Map();
|
|
3402
3409
|
if (options.updateFooter) {
|
|
@@ -3509,7 +3516,7 @@ export class InteractiveMode {
|
|
|
3509
3516
|
this.renderSessionItems(items, messageMeta, options);
|
|
3510
3517
|
}
|
|
3511
3518
|
addCacheWarmingUsage(entry) {
|
|
3512
|
-
if (!this.settingsManager.
|
|
3519
|
+
if (!this.settingsManager.getNotices().cacheWarming)
|
|
3513
3520
|
return;
|
|
3514
3521
|
// Back-to-back warms collapse into one line with the cumulative cost.
|
|
3515
3522
|
const previous = this.cacheWarmingNotice;
|
|
@@ -3529,7 +3536,7 @@ export class InteractiveMode {
|
|
|
3529
3536
|
* from persisted summary usage and is not stored as a separate session entry.
|
|
3530
3537
|
*/
|
|
3531
3538
|
addCompactionCostNotice(notice) {
|
|
3532
|
-
if (!this.settingsManager.
|
|
3539
|
+
if (!this.settingsManager.getNotices().compactionCosts)
|
|
3533
3540
|
return;
|
|
3534
3541
|
const { usage } = notice;
|
|
3535
3542
|
const tokens = usage.input + usage.output + usage.cacheRead + usage.cacheWrite;
|
|
@@ -3539,7 +3546,7 @@ export class InteractiveMode {
|
|
|
3539
3546
|
this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0));
|
|
3540
3547
|
}
|
|
3541
3548
|
maybeShowThinkingDropNotice(message) {
|
|
3542
|
-
if (!this.settingsManager.
|
|
3549
|
+
if (!this.settingsManager.getNotices().reasoningDrops)
|
|
3543
3550
|
return;
|
|
3544
3551
|
const dropped = getDroppedReasoning(message);
|
|
3545
3552
|
if (!dropped)
|
|
@@ -3569,7 +3576,7 @@ export class InteractiveMode {
|
|
|
3569
3576
|
* a model switch, or an idle gap past the cache TTL.
|
|
3570
3577
|
*/
|
|
3571
3578
|
maybeShowCacheMissNotice(message) {
|
|
3572
|
-
if (!this.settingsManager.
|
|
3579
|
+
if (!this.settingsManager.getNotices().cacheMisses)
|
|
3573
3580
|
return;
|
|
3574
3581
|
// Entries don't contain `message` yet: message_end fires before persistence.
|
|
3575
3582
|
const miss = detectCacheMiss(this.sessionManager.getEntries(), message, this.session.modelRuntime);
|
|
@@ -3674,6 +3681,7 @@ export class InteractiveMode {
|
|
|
3674
3681
|
await this.ui.terminal.drainInput(1000);
|
|
3675
3682
|
this.stop();
|
|
3676
3683
|
await flushStdout();
|
|
3684
|
+
killTrackedDetachedChildren();
|
|
3677
3685
|
process.exit(0);
|
|
3678
3686
|
}
|
|
3679
3687
|
// Interactive quit (Ctrl+D, Ctrl+C, /quit, extension shutdown()). Stop the
|
|
@@ -3691,6 +3699,9 @@ export class InteractiveMode {
|
|
|
3691
3699
|
process.stdout.write(`${chalk.dim("To resume this session:")}\n${resumeCommand}\n`);
|
|
3692
3700
|
}
|
|
3693
3701
|
await flushStdout();
|
|
3702
|
+
// dispose() only starts killing a running `!` command, which on Windows loses the race with
|
|
3703
|
+
// exit. After the last await, so it also catches a shell spawned after the abort.
|
|
3704
|
+
killTrackedDetachedChildren();
|
|
3694
3705
|
process.exit(0);
|
|
3695
3706
|
}
|
|
3696
3707
|
emergencyTerminalExit() {
|
|
@@ -3753,10 +3764,7 @@ export class InteractiveMode {
|
|
|
3753
3764
|
}
|
|
3754
3765
|
registerSignalHandlers() {
|
|
3755
3766
|
this.unregisterSignalHandlers();
|
|
3756
|
-
const signals = ["SIGTERM"];
|
|
3757
|
-
if (process.platform !== "win32") {
|
|
3758
|
-
signals.push("SIGHUP");
|
|
3759
|
-
}
|
|
3767
|
+
const signals = ["SIGTERM", "SIGHUP"];
|
|
3760
3768
|
for (const signal of signals) {
|
|
3761
3769
|
const handler = () => {
|
|
3762
3770
|
// SIGHUP no longer hard-exits: graceful shutdown emits session_shutdown
|
|
@@ -4255,7 +4263,6 @@ export class InteractiveMode {
|
|
|
4255
4263
|
doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
|
|
4256
4264
|
treeFilterMode: this.settingsManager.getTreeFilterMode(),
|
|
4257
4265
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
4258
|
-
showCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),
|
|
4259
4266
|
defaultProjectTrust: this.settingsManager.getDefaultProjectTrust(),
|
|
4260
4267
|
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
|
4261
4268
|
outputPad: this.settingsManager.getOutputPad(),
|
|
@@ -4269,6 +4276,7 @@ export class InteractiveMode {
|
|
|
4269
4276
|
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
4270
4277
|
fullscreenWheelScrollLines: this.settingsManager.getFullscreenWheelScrollLines(),
|
|
4271
4278
|
warnings: this.settingsManager.getWarnings(),
|
|
4279
|
+
notices: this.settingsManager.getNotices(),
|
|
4272
4280
|
}, {
|
|
4273
4281
|
onAutoCompactChange: (enabled) => {
|
|
4274
4282
|
this.session.setAutoCompactionEnabled(enabled);
|
|
@@ -4358,10 +4366,6 @@ export class InteractiveMode {
|
|
|
4358
4366
|
this.chatContainer.invalidate();
|
|
4359
4367
|
this.ui.requestRender();
|
|
4360
4368
|
},
|
|
4361
|
-
onShowCacheMissNoticesChange: (shown) => {
|
|
4362
|
-
this.settingsManager.setShowCacheMissNotices(shown);
|
|
4363
|
-
this.rebuildChatFromMessages();
|
|
4364
|
-
},
|
|
4365
4369
|
onCollapseChangelogChange: (collapsed) => {
|
|
4366
4370
|
this.settingsManager.setCollapseChangelog(collapsed);
|
|
4367
4371
|
},
|
|
@@ -4451,6 +4455,11 @@ export class InteractiveMode {
|
|
|
4451
4455
|
onWarningsChange: (warnings) => {
|
|
4452
4456
|
this.settingsManager.setWarnings(warnings);
|
|
4453
4457
|
},
|
|
4458
|
+
onNoticeChange: (key, shown) => {
|
|
4459
|
+
this.settingsManager.setNotice(key, shown);
|
|
4460
|
+
// Cache miss, cache warming and compaction notices are derived when the transcript renders.
|
|
4461
|
+
this.rebuildChatFromMessages();
|
|
4462
|
+
},
|
|
4454
4463
|
onCancel: () => {
|
|
4455
4464
|
done();
|
|
4456
4465
|
this.ui.requestRender();
|
|
@@ -5024,12 +5033,14 @@ export class InteractiveMode {
|
|
|
5024
5033
|
const options = [];
|
|
5025
5034
|
for (const provider of this.session.modelRuntime.getProviders()) {
|
|
5026
5035
|
const authStatus = this.session.modelRuntime.getProviderAuthStatus(provider.id);
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5036
|
+
let status;
|
|
5037
|
+
if (authStatus.configured) {
|
|
5038
|
+
const type = this.session.modelRuntime.isUsingOAuth(provider.id) ? "oauth" : "api_key";
|
|
5039
|
+
status = { kind: "configured", type, source: authStatus.label ?? authStatus.source };
|
|
5040
|
+
}
|
|
5041
|
+
else if (authStatus.source === "stored") {
|
|
5042
|
+
status = { kind: "unresolved" };
|
|
5043
|
+
}
|
|
5033
5044
|
const subscription = provider.auth.oauth?.isSubscription === true;
|
|
5034
5045
|
if ((!authType || authType === "oauth") && provider.auth.oauth) {
|
|
5035
5046
|
options.push({
|
|
@@ -5063,7 +5074,7 @@ export class InteractiveMode {
|
|
|
5063
5074
|
id: providerId,
|
|
5064
5075
|
name: provider?.name ?? providerId,
|
|
5065
5076
|
authType: type,
|
|
5066
|
-
status: { type, source: "stored credential" },
|
|
5077
|
+
status: { kind: "configured", type, source: "stored credential" },
|
|
5067
5078
|
subscription: provider?.auth.oauth?.isSubscription === true,
|
|
5068
5079
|
};
|
|
5069
5080
|
})
|
|
@@ -6080,7 +6091,7 @@ export class InteractiveMode {
|
|
|
6080
6091
|
if (result.output) {
|
|
6081
6092
|
this.bashComponent.appendOutput(result.output);
|
|
6082
6093
|
}
|
|
6083
|
-
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath);
|
|
6094
|
+
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath, result.fullOutputError);
|
|
6084
6095
|
// Record the result in session
|
|
6085
6096
|
this.session.recordBashResult(command, result, { excludeFromContext });
|
|
6086
6097
|
this.bashComponent = undefined;
|
|
@@ -6109,7 +6120,7 @@ export class InteractiveMode {
|
|
|
6109
6120
|
}
|
|
6110
6121
|
}, { excludeFromContext, operations: eventResult?.operations });
|
|
6111
6122
|
if (this.bashComponent) {
|
|
6112
|
-
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath);
|
|
6123
|
+
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath, result.fullOutputError);
|
|
6113
6124
|
}
|
|
6114
6125
|
}
|
|
6115
6126
|
catch (error) {
|