zidane 6.5.4 → 6.5.6
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/{acp-CIpD8UIw.js → acp-Dm95NwNM.js} +6 -6
- package/dist/{acp-CIpD8UIw.js.map → acp-Dm95NwNM.js.map} +1 -1
- package/dist/acp-cli.js +6 -6
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-8kfGIDb_.js → agent-CcTWL-Z6.js} +231 -167
- package/dist/agent-CcTWL-Z6.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-qaw8XAc9.js → anthropic-DLc_Kw-1.js} +420 -25
- package/dist/anthropic-DLc_Kw-1.js.map +1 -0
- package/dist/{auth-BLy7X1SY.js → auth-BAclQnl3.js} +127 -35
- package/dist/{auth-BLy7X1SY.js.map → auth-BAclQnl3.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +2 -2
- package/dist/chat.d.ts +115 -9
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +8 -8
- package/dist/{context-segments-1mcqSCM3.js → context-segments-CJCtJ9sU.js} +16 -3
- package/dist/{context-segments-1mcqSCM3.js.map → context-segments-CJCtJ9sU.js.map} +1 -1
- package/dist/{context-transport-Bco9Wo0b.js → context-transport-D8yeGdpd.js} +2 -2
- package/dist/{context-transport-Bco9Wo0b.js.map → context-transport-D8yeGdpd.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/daytona.js +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/{errors-BwBxu3zD.js → errors-DKiMrOKq.js} +61 -2
- package/dist/{errors-BwBxu3zD.js.map → errors-DKiMrOKq.js.map} +1 -1
- package/dist/errors.js +2 -2
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{fetch-url-B7aSg6Bp.js → fetch-url-ma-5_p0p.js} +2 -2
- package/dist/{fetch-url-B7aSg6Bp.js.map → fetch-url-ma-5_p0p.js.map} +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-BSNr0OQn.d.ts → index-ZWibV230.d.ts} +100 -28
- package/dist/index-ZWibV230.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -13
- package/dist/{login-D3CKhgbI.js → login-CB23LyI1.js} +3 -3
- package/dist/{login-D3CKhgbI.js.map → login-CB23LyI1.js.map} +1 -1
- package/dist/{mcp-D9fqOQo5.js → mcp-CVtSQTWg.js} +3 -3
- package/dist/{mcp-D9fqOQo5.js.map → mcp-CVtSQTWg.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-C_H9soi5.js → messages-CZMUuKzo.js} +2 -2
- package/dist/{messages-C_H9soi5.js.map → messages-CZMUuKzo.js.map} +1 -1
- package/dist/{oauth-ZebH9NHb.js → oauth-C4GvY_p1.js} +27 -8
- package/dist/oauth-C4GvY_p1.js.map +1 -0
- package/dist/{openai-compat-CnHeo4Lz.js → openai-compat-BoTi-9fd.js} +9 -4
- package/dist/openai-compat-BoTi-9fd.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/{plugins-2PMTVcp-.js → plugins-onDvTHEm.js} +2 -2
- package/dist/{plugins-2PMTVcp-.js.map → plugins-onDvTHEm.js.map} +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +4 -4
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +2 -2
- package/dist/{providers-Bxs-XHir.js → providers-CmhdtD7w.js} +3 -3
- package/dist/{providers-Bxs-XHir.js.map → providers-CmhdtD7w.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +2 -2
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.js +1 -1
- package/dist/{session-VpLrNaFQ.js → session-CyRLSsVa.js} +2 -2
- package/dist/{session-VpLrNaFQ.js.map → session-CyRLSsVa.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/{skills-Cp9vnBwd.js → skills-BMGH_KK1.js} +2 -2
- package/dist/{skills-Cp9vnBwd.js.map → skills-BMGH_KK1.js.map} +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/{timeout-BDetbuN6.js → timeout-CjOG2mea.js} +29 -2
- package/dist/timeout-CjOG2mea.js.map +1 -0
- package/dist/timeout-DEaqslLO.d.ts.map +1 -1
- package/dist/{tool-formatters-BfKqWm5N.d.ts → tool-formatters-D3wSS2zz.d.ts} +2 -2
- package/dist/{tool-formatters-BfKqWm5N.d.ts.map → tool-formatters-D3wSS2zz.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/fetch-url.js +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.js +2 -2
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-Bv8HQ3S2.js → transcript-anchors-D-Yuimif.js} +177 -63
- package/dist/transcript-anchors-D-Yuimif.js.map +1 -0
- package/dist/{transcript-anchors-CNqDbrc9.d.ts → transcript-anchors-llwMrLRG.d.ts} +2 -2
- package/dist/{transcript-anchors-CNqDbrc9.d.ts.map → transcript-anchors-llwMrLRG.d.ts.map} +1 -1
- package/dist/tui.d.ts +24 -29
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +964 -244
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-iGu5J08j.js → turn-operations-7_Ff7INF.js} +2 -2
- package/dist/{turn-operations-iGu5J08j.js.map → turn-operations-7_Ff7INF.js.map} +1 -1
- package/dist/{turn-operations-CnIpcenJ.d.ts → turn-operations-C_XvfBU3.d.ts} +3 -3
- package/dist/{turn-operations-CnIpcenJ.d.ts.map → turn-operations-C_XvfBU3.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/docs/CHAT.md +1 -1
- package/docs/TUI.md +4 -4
- package/package.json +2 -1
- package/dist/agent-8kfGIDb_.js.map +0 -1
- package/dist/anthropic-qaw8XAc9.js.map +0 -1
- package/dist/index-BSNr0OQn.d.ts.map +0 -1
- package/dist/oauth-ZebH9NHb.js.map +0 -1
- package/dist/openai-compat-CnHeo4Lz.js.map +0 -1
- package/dist/timeout-BDetbuN6.js.map +0 -1
- package/dist/transcript-anchors-Bv8HQ3S2.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.js";
|
|
2
2
|
import { l as toolResultToText } from "./types-BIarq1qE.js";
|
|
3
|
-
import { Ct as waitTask, Ft as readFile$1, Gt as edit, Lt as multiEdit, Nt as shell, Tt as createSpawnTool, Ut as grep, Vt as listFiles, Wt as glob, Y as EMPTY_EXTENSION_REGISTRY, _t as composePresets, an as readKeybindingsRaw, b as migrateSessionArtifactDirs, jt as shellKill, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, vt as definePreset, xt as writeFile$1 } from "./agent-
|
|
3
|
+
import { Ct as waitTask, Ft as readFile$1, Gt as edit, Lt as multiEdit, Nt as shell, Tt as createSpawnTool, Ut as grep, Vt as listFiles, Wt as glob, Y as EMPTY_EXTENSION_REGISTRY, _t as composePresets, an as readKeybindingsRaw, b as migrateSessionArtifactDirs, jt as shellKill, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, vt as definePreset, xt as writeFile$1 } from "./agent-CcTWL-Z6.js";
|
|
4
4
|
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId } from "./format-BF745pLL.js";
|
|
5
|
-
import { u as errorMessage } from "./errors-
|
|
6
|
-
import { R as projectUserPaths, x as discoverSkills, z as findGitRoot$1 } from "./skills-
|
|
5
|
+
import { u as errorMessage } from "./errors-DKiMrOKq.js";
|
|
6
|
+
import { R as projectUserPaths, x as discoverSkills, z as findGitRoot$1 } from "./skills-BMGH_KK1.js";
|
|
7
7
|
import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
|
|
8
|
-
import { p as resolveStorageDirs } from "./plugins-
|
|
9
|
-
import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-
|
|
8
|
+
import { p as resolveStorageDirs } from "./plugins-onDvTHEm.js";
|
|
9
|
+
import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-CVtSQTWg.js";
|
|
10
10
|
import { joinSystemPrompt } from "./prompt.js";
|
|
11
11
|
import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
12
12
|
import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions, t as applyInsert } from "./completion-core-BRo86R_L.js";
|
|
13
|
-
import { r as fetchUrl } from "./fetch-url-
|
|
13
|
+
import { r as fetchUrl } from "./fetch-url-ma-5_p0p.js";
|
|
14
14
|
import { webSearch } from "./tools/web-search.js";
|
|
15
|
-
import {
|
|
16
|
-
import { C as chunkMarkdownForRender, it as extractEditPayload, m as ownerOf, pt as parseEditOutcomesFromResult, u as capTranscriptEvents, yt as chatReferenceTokensFromText } from "./turn-operations-
|
|
15
|
+
import { T as restoreModelOptions, b as modelSupportsReasoning, d as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, x as modelsForDescriptor } from "./auth-BAclQnl3.js";
|
|
16
|
+
import { C as chunkMarkdownForRender, it as extractEditPayload, m as ownerOf, pt as parseEditOutcomesFromResult, u as capTranscriptEvents, yt as chatReferenceTokensFromText } from "./turn-operations-7_Ff7INF.js";
|
|
17
17
|
import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
18
18
|
import { Buffer } from "node:buffer";
|
|
19
19
|
import { chmodSync, closeSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -1142,7 +1142,7 @@ const INTERACTION_GUIDANCE_PLAN = `# Interacting with the user
|
|
|
1142
1142
|
- Don't ask what the code can tell you.`;
|
|
1143
1143
|
/**
|
|
1144
1144
|
* Variant of {@link INTERACTION_GUIDANCE} for the no-interactive-prompts
|
|
1145
|
-
* configuration (`Settings.
|
|
1145
|
+
* configuration (`Settings.interactionMode = 'disabled'`). The two tools are
|
|
1146
1146
|
* stripped from the agent's tool set; this section tells the model to
|
|
1147
1147
|
* operate autonomously and surface assumptions / open questions in its
|
|
1148
1148
|
* final prose message rather than via tool calls.
|
|
@@ -1326,8 +1326,16 @@ function getTodosForRun(session, runId) {
|
|
|
1326
1326
|
* clearing the live list (whether explicitly or via the tool's auto-
|
|
1327
1327
|
* clear) preserves the "last shown" snapshot so UI surfaces can keep
|
|
1328
1328
|
* rendering what was just completed. See {@link getArchivedTodosForRun}.
|
|
1329
|
+
*
|
|
1330
|
+
* `opts.clearArchive` opts OUT of that preservation, and exists because the
|
|
1331
|
+
* archive is only the right answer for the AUTO-CLEAR path. UI surfaces render
|
|
1332
|
+
* `todos.length > 0 ? todos : archive`, so a user who deletes every todo would
|
|
1333
|
+
* otherwise watch the archive fall straight back into view with the same items
|
|
1334
|
+
* — a destructive action they confirmed, with no visible effect, and the footer
|
|
1335
|
+
* chip still counting the list they just deleted. Pass it for user-initiated
|
|
1336
|
+
* writes; leave it off for the tool.
|
|
1329
1337
|
*/
|
|
1330
|
-
function setTodosForRun(session, runId, items) {
|
|
1338
|
+
function setTodosForRun(session, runId, items, opts = {}) {
|
|
1331
1339
|
const bag = readTodosBag(session);
|
|
1332
1340
|
const normalized = items.map(normalizeItem);
|
|
1333
1341
|
const subagent = isSubagentRun(session, runId);
|
|
@@ -1346,6 +1354,14 @@ function setTodosForRun(session, runId, items) {
|
|
|
1346
1354
|
archive.byRun = archiveByRun;
|
|
1347
1355
|
} else archive.session = normalized;
|
|
1348
1356
|
bag.archive = archive;
|
|
1357
|
+
} else if (opts.clearArchive) {
|
|
1358
|
+
const archive = { ...bag.archive ?? {} };
|
|
1359
|
+
if (subagent) {
|
|
1360
|
+
const archiveByRun = { ...archive.byRun ?? {} };
|
|
1361
|
+
delete archiveByRun[runId];
|
|
1362
|
+
archive.byRun = archiveByRun;
|
|
1363
|
+
} else delete archive.session;
|
|
1364
|
+
bag.archive = archive;
|
|
1349
1365
|
}
|
|
1350
1366
|
writeTodosBag(session, bag);
|
|
1351
1367
|
}
|
|
@@ -1846,6 +1862,29 @@ function selectActiveTodos(session) {
|
|
|
1846
1862
|
};
|
|
1847
1863
|
}
|
|
1848
1864
|
/**
|
|
1865
|
+
* Progress label for the footer chip: `"2/5"`, or `null` when there is nothing
|
|
1866
|
+
* to advertise.
|
|
1867
|
+
*
|
|
1868
|
+
* The chip replaced a full-width bar that printed the in-progress todo's TITLE
|
|
1869
|
+
* above the prompt. Titles are model-authored and arbitrarily long, so the bar
|
|
1870
|
+
* had to truncate, reflow with terminal width, and still told you nothing you
|
|
1871
|
+
* couldn't get by opening the list. A position reads at a glance and costs a
|
|
1872
|
+
* fixed handful of columns in a row that's already scanned for shortcuts.
|
|
1873
|
+
*
|
|
1874
|
+
* The numerator is the POSITION of the in-progress item — the direct
|
|
1875
|
+
* replacement for "which one is live". With nothing in progress (list finished,
|
|
1876
|
+
* or the archive is on screen) it falls back to the completed count, so a done
|
|
1877
|
+
* list reads `5/5` rather than `0/5`.
|
|
1878
|
+
*
|
|
1879
|
+
* Pure and renderer-agnostic, so the GUI and the tests can both use it.
|
|
1880
|
+
*/
|
|
1881
|
+
function todoProgressLabel(state) {
|
|
1882
|
+
const display = state.todos.length > 0 ? state.todos : state.archive;
|
|
1883
|
+
if (display.length === 0) return null;
|
|
1884
|
+
const activeIndex = state.inProgress ? display.findIndex((t) => t.id === state.inProgress.id) : -1;
|
|
1885
|
+
return `${activeIndex >= 0 ? activeIndex + 1 : state.tally.completed}/${display.length}`;
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1849
1888
|
* React hook — active-todos state for the supplied session. Recomputes
|
|
1850
1889
|
* on every parent re-render; the work is O(runs + todos), both bounded
|
|
1851
1890
|
* by small constants in practice.
|
|
@@ -5089,34 +5128,14 @@ function userOnlyPaths(dirs) {
|
|
|
5089
5128
|
storageMode: dirs.mode
|
|
5090
5129
|
};
|
|
5091
5130
|
}
|
|
5092
|
-
/**
|
|
5093
|
-
* Migrate legacy `state.json` settings shapes forward. Pre-5.x persisted
|
|
5094
|
-
* `showToolCalls: boolean` controlled whether `↳ <tool>` lines rendered;
|
|
5095
|
-
* 5.x replaces that with a 3-way `toolCallDisplay: 'hidden' | 'formatted'
|
|
5096
|
-
* | 'full'` choice that adds a per-tool clean summary and a JSON debug
|
|
5097
|
-
* view alongside the existing "show / hide" behavior.
|
|
5098
|
-
*
|
|
5099
|
-
* Mapping (only when the new key is absent — never overwrite a user's
|
|
5100
|
-
* explicit modern choice):
|
|
5101
|
-
*
|
|
5102
|
-
* showToolCalls: true → toolCallDisplay: 'formatted'
|
|
5103
|
-
* showToolCalls: false → toolCallDisplay: 'hidden'
|
|
5104
|
-
*
|
|
5105
|
-
* The legacy key is dropped from the returned object so the in-memory
|
|
5106
|
-
* Settings shape stays clean; persisted state still carries it until
|
|
5107
|
-
* the next save overwrites the file, which is harmless (extra fields
|
|
5108
|
-
* round-trip through JSON without consequence).
|
|
5109
|
-
*/
|
|
5131
|
+
/** Migrate legacy `state.json` settings without overriding modern keys. */
|
|
5110
5132
|
function migrateLegacySettings(loaded) {
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
};
|
|
5118
|
-
}
|
|
5119
|
-
return loaded;
|
|
5133
|
+
const migrated = { ...loaded };
|
|
5134
|
+
if ("allowInteraction" in migrated && !("interactionMode" in migrated)) migrated.interactionMode = migrated.allowInteraction === false ? "disabled" : "ask";
|
|
5135
|
+
delete migrated.allowInteraction;
|
|
5136
|
+
if ("showToolCalls" in migrated && !("toolCallDisplay" in migrated)) migrated.toolCallDisplay = migrated.showToolCalls === false ? "hidden" : "formatted";
|
|
5137
|
+
delete migrated.showToolCalls;
|
|
5138
|
+
return migrated;
|
|
5120
5139
|
}
|
|
5121
5140
|
/** Tri-state parse for env-var bools — explicit `undefined` keeps absence from forcing a default. */
|
|
5122
5141
|
function parseEnvFlag(raw) {
|
|
@@ -6549,7 +6568,7 @@ const DEFAULT_SETTINGS = {
|
|
|
6549
6568
|
compactionModel: "",
|
|
6550
6569
|
targetFps: 60,
|
|
6551
6570
|
mouseInteractions: true,
|
|
6552
|
-
|
|
6571
|
+
interactionMode: "ask",
|
|
6553
6572
|
smoothStreaming: true,
|
|
6554
6573
|
fileLogging: false,
|
|
6555
6574
|
showTodoIndicator: true,
|
|
@@ -6645,12 +6664,6 @@ const SETTINGS_TOGGLES = [
|
|
|
6645
6664
|
label: "Safe mode",
|
|
6646
6665
|
description: "prompt before each tool call (unless safelisted)"
|
|
6647
6666
|
},
|
|
6648
|
-
{
|
|
6649
|
-
category: "agent",
|
|
6650
|
-
key: "allowInteraction",
|
|
6651
|
-
label: "Interactive prompts",
|
|
6652
|
-
description: "let the agent pause for `ask_user` questions / `present_plan` approvals"
|
|
6653
|
-
},
|
|
6654
6667
|
{
|
|
6655
6668
|
category: "agent",
|
|
6656
6669
|
key: "resumeLastSession",
|
|
@@ -6781,7 +6794,7 @@ const SETTINGS_TOGGLES = [
|
|
|
6781
6794
|
category: "ui",
|
|
6782
6795
|
key: "showTodoIndicator",
|
|
6783
6796
|
label: "Todo indicator",
|
|
6784
|
-
description: "show the
|
|
6797
|
+
description: "show the `n/total todos` chip in the footer (ctrl+t opens the list regardless)"
|
|
6785
6798
|
},
|
|
6786
6799
|
{
|
|
6787
6800
|
category: "ui",
|
|
@@ -6803,6 +6816,26 @@ const SETTINGS_TOGGLES = [
|
|
|
6803
6816
|
}
|
|
6804
6817
|
];
|
|
6805
6818
|
const SETTINGS_CHOICES = [
|
|
6819
|
+
{
|
|
6820
|
+
category: "agent",
|
|
6821
|
+
key: "interactionMode",
|
|
6822
|
+
label: "Interaction mode",
|
|
6823
|
+
description: "ask normally, skip UI with repository-aware automatic responses, or disable interaction tools",
|
|
6824
|
+
options: [
|
|
6825
|
+
{
|
|
6826
|
+
value: "ask",
|
|
6827
|
+
label: "Ask normally"
|
|
6828
|
+
},
|
|
6829
|
+
{
|
|
6830
|
+
value: "skip",
|
|
6831
|
+
label: "Skip interactions"
|
|
6832
|
+
},
|
|
6833
|
+
{
|
|
6834
|
+
value: "disabled",
|
|
6835
|
+
label: "Disable tools"
|
|
6836
|
+
}
|
|
6837
|
+
]
|
|
6838
|
+
},
|
|
6806
6839
|
{
|
|
6807
6840
|
category: "agent",
|
|
6808
6841
|
key: "autoCompactThreshold",
|
|
@@ -7453,8 +7486,13 @@ function toEntries(paths, source, maxFiles) {
|
|
|
7453
7486
|
* effort picker as a discoverable, in-place affordance.
|
|
7454
7487
|
*/
|
|
7455
7488
|
function buildHints(options) {
|
|
7456
|
-
const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, updateHint, cacheBreakHint = null, sessionsScopeAll } = options;
|
|
7457
|
-
|
|
7489
|
+
const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, todoProgress, updateHint, cacheBreakHint = null, sessionsScopeAll } = options;
|
|
7490
|
+
const todosChip = todoProgress !== null ? {
|
|
7491
|
+
key: keybindings.openTodos,
|
|
7492
|
+
label: `${todoProgress} todos`
|
|
7493
|
+
} : null;
|
|
7494
|
+
const withTodos = (hints) => todosChip ? [...hints, todosChip] : hints;
|
|
7495
|
+
if (pending) return withTodos([
|
|
7458
7496
|
{
|
|
7459
7497
|
key: "↑↓",
|
|
7460
7498
|
label: "navigate"
|
|
@@ -7467,8 +7505,8 @@ function buildHints(options) {
|
|
|
7467
7505
|
key: "esc",
|
|
7468
7506
|
label: "abort run"
|
|
7469
7507
|
}
|
|
7470
|
-
];
|
|
7471
|
-
if (pendingInteractionLive) return [
|
|
7508
|
+
]);
|
|
7509
|
+
if (pendingInteractionLive) return withTodos([
|
|
7472
7510
|
{
|
|
7473
7511
|
key: "↑↓",
|
|
7474
7512
|
label: "navigate"
|
|
@@ -7481,8 +7519,8 @@ function buildHints(options) {
|
|
|
7481
7519
|
key: "esc",
|
|
7482
7520
|
label: "abort run"
|
|
7483
7521
|
}
|
|
7484
|
-
];
|
|
7485
|
-
if (pendingInteractionResumed) return [
|
|
7522
|
+
]);
|
|
7523
|
+
if (pendingInteractionResumed) return withTodos([
|
|
7486
7524
|
{
|
|
7487
7525
|
key: "↑↓",
|
|
7488
7526
|
label: "navigate"
|
|
@@ -7495,7 +7533,7 @@ function buildHints(options) {
|
|
|
7495
7533
|
key: "esc",
|
|
7496
7534
|
label: "leave for later"
|
|
7497
7535
|
}
|
|
7498
|
-
];
|
|
7536
|
+
]);
|
|
7499
7537
|
if (busy) {
|
|
7500
7538
|
const baseBusyHints = [];
|
|
7501
7539
|
if (inFlightToolCount > 0) baseBusyHints.push({
|
|
@@ -7506,7 +7544,7 @@ function buildHints(options) {
|
|
|
7506
7544
|
key: "esc",
|
|
7507
7545
|
label: "abort"
|
|
7508
7546
|
});
|
|
7509
|
-
return baseBusyHints;
|
|
7547
|
+
return withTodos(baseBusyHints);
|
|
7510
7548
|
}
|
|
7511
7549
|
if (screen === "auth") return [
|
|
7512
7550
|
{
|
|
@@ -7591,6 +7629,7 @@ function buildHints(options) {
|
|
|
7591
7629
|
}] : [],
|
|
7592
7630
|
...modelHint ? [modelHint] : [],
|
|
7593
7631
|
...skillsChip ? [skillsChip] : [],
|
|
7632
|
+
...todosChip ? [todosChip] : [],
|
|
7594
7633
|
...cancelTaskChip ? [cancelTaskChip] : [],
|
|
7595
7634
|
...currentSession ? [{
|
|
7596
7635
|
key: keybindings.openSessionDetails,
|
|
@@ -7693,14 +7732,80 @@ const ASK_USER_TOOL = "ask_user";
|
|
|
7693
7732
|
function isInteractionTool(name) {
|
|
7694
7733
|
return name === "present_plan" || name === "ask_user";
|
|
7695
7734
|
}
|
|
7735
|
+
const AUTOMATIC_INTERACTION_INSTRUCTION = "Automatic mode is enabled. Make the best choice from the repository and current task, then continue without asking for this input again.";
|
|
7736
|
+
/**
|
|
7737
|
+
* Id prefix for interactions the HOST synthesizes — slash commands and
|
|
7738
|
+
* extension `ctx.interaction.*` share the prompt slot with the tools but
|
|
7739
|
+
* never pass through {@link createInteractionTools}. Model-originated
|
|
7740
|
+
* requests carry the provider's `tool_call.id` instead. Naming only:
|
|
7741
|
+
* origin policy reads {@link BaseRequest.origin}, never the id.
|
|
7742
|
+
*/
|
|
7743
|
+
const HOST_INTERACTION_ID_PREFIX = "command_";
|
|
7744
|
+
/**
|
|
7745
|
+
* Whether a queued request came from a model tool call. Automatic mode
|
|
7746
|
+
* answers on the model's behalf, so it must leave host-originated prompts
|
|
7747
|
+
* alone: their consumer is local code awaiting a real decision, with no
|
|
7748
|
+
* model on the other end to act on an instruction sentence.
|
|
7749
|
+
*/
|
|
7750
|
+
function isModelInteraction(request) {
|
|
7751
|
+
return request.origin === "model";
|
|
7752
|
+
}
|
|
7753
|
+
/**
|
|
7754
|
+
* Stand-in for a free-text answer nobody typed. Deliberately NOT the
|
|
7755
|
+
* instruction sentence: {@link serializeInteractionResponse} already leads
|
|
7756
|
+
* the envelope with it once, so repeating it per answer only restates the
|
|
7757
|
+
* same disclosure — four times over on a three-question form.
|
|
7758
|
+
*/
|
|
7759
|
+
const AUTOMATIC_FREE_TEXT_ANSWER = "(no answer, automatic mode)";
|
|
7760
|
+
/**
|
|
7761
|
+
* Automatic answer for one question, in the shape its `type` promises:
|
|
7762
|
+
* `confirm` declares a boolean and `select` declares one of its own choice
|
|
7763
|
+
* ids, so a free-text placeholder would be out of contract there.
|
|
7764
|
+
*
|
|
7765
|
+
* These are defaults, not decisions — nobody chose them. The response
|
|
7766
|
+
* carries `automatic: true` so the model reads them as such and overrides
|
|
7767
|
+
* whatever doesn't fit; see {@link serializeInteractionResponse}.
|
|
7768
|
+
*/
|
|
7769
|
+
function automaticAnswerFor(question) {
|
|
7770
|
+
switch (question.type) {
|
|
7771
|
+
case "confirm": return true;
|
|
7772
|
+
case "select": {
|
|
7773
|
+
const picked = question.choices[0]?.id ?? "";
|
|
7774
|
+
return question.multi ? picked ? [picked] : [] : picked;
|
|
7775
|
+
}
|
|
7776
|
+
default: return AUTOMATIC_FREE_TEXT_ANSWER;
|
|
7777
|
+
}
|
|
7778
|
+
}
|
|
7779
|
+
/** Build the deterministic response used when the host skips interaction UI. */
|
|
7780
|
+
function createAutomaticInteractionResponse(request) {
|
|
7781
|
+
if (request.kind === "plan") return {
|
|
7782
|
+
kind: "plan",
|
|
7783
|
+
decision: "approve",
|
|
7784
|
+
automatic: true
|
|
7785
|
+
};
|
|
7786
|
+
const answers = {};
|
|
7787
|
+
for (const question of request.payload.questions) answers[question.id] = automaticAnswerFor(question);
|
|
7788
|
+
return {
|
|
7789
|
+
kind: "question",
|
|
7790
|
+
answers,
|
|
7791
|
+
automatic: true
|
|
7792
|
+
};
|
|
7793
|
+
}
|
|
7696
7794
|
/**
|
|
7697
7795
|
* Format an {@link InteractionResponse} as the tool_result content. JSON
|
|
7698
7796
|
* keeps the envelope parseable and explicit. Empty fields are stripped so
|
|
7699
7797
|
* the model doesn't waste tokens reading absent values.
|
|
7700
7798
|
*/
|
|
7701
7799
|
function serializeInteractionResponse(response) {
|
|
7800
|
+
const automatic = response.automatic ? {
|
|
7801
|
+
automatic: true,
|
|
7802
|
+
note: AUTOMATIC_INTERACTION_INSTRUCTION
|
|
7803
|
+
} : {};
|
|
7702
7804
|
if (response.kind === "plan") {
|
|
7703
|
-
const body = {
|
|
7805
|
+
const body = {
|
|
7806
|
+
...automatic,
|
|
7807
|
+
decision: response.decision
|
|
7808
|
+
};
|
|
7704
7809
|
if (response.comment && response.comment.trim().length > 0) body.comment = response.comment.trim();
|
|
7705
7810
|
return JSON.stringify(body);
|
|
7706
7811
|
}
|
|
@@ -7713,7 +7818,10 @@ function serializeInteractionResponse(response) {
|
|
|
7713
7818
|
const picked = value.map((v) => String(v).trim()).filter((v) => v.length > 0);
|
|
7714
7819
|
if (picked.length > 0) answers[id] = picked;
|
|
7715
7820
|
}
|
|
7716
|
-
return JSON.stringify({
|
|
7821
|
+
return JSON.stringify({
|
|
7822
|
+
...automatic,
|
|
7823
|
+
answers
|
|
7824
|
+
});
|
|
7717
7825
|
}
|
|
7718
7826
|
/**
|
|
7719
7827
|
* Build a protocol-valid user `SessionTurn` that closes a batch of
|
|
@@ -7777,6 +7885,7 @@ function pendingInteractionsFromTurns(turns) {
|
|
|
7777
7885
|
if (!payload) continue;
|
|
7778
7886
|
pending.push({
|
|
7779
7887
|
id: call.callId,
|
|
7888
|
+
origin: "model",
|
|
7780
7889
|
kind: "plan",
|
|
7781
7890
|
tool: PRESENT_PLAN_TOOL,
|
|
7782
7891
|
payload,
|
|
@@ -7789,6 +7898,7 @@ function pendingInteractionsFromTurns(turns) {
|
|
|
7789
7898
|
if (!payload) continue;
|
|
7790
7899
|
pending.push({
|
|
7791
7900
|
id: call.callId,
|
|
7901
|
+
origin: "model",
|
|
7792
7902
|
kind: "question",
|
|
7793
7903
|
tool: ASK_USER_TOOL,
|
|
7794
7904
|
payload,
|
|
@@ -7937,7 +8047,7 @@ function createInteractionTools(opts) {
|
|
|
7937
8047
|
}
|
|
7938
8048
|
const PLAN_DESCRIPTION = "Present a multi-step plan to the user for approval BEFORE executing it. Use this when you have a concrete proposal that materially changes the workspace and want explicit confirmation. The user can approve, reject, or request revisions; revisions come back as a comment alongside a `revise` decision.";
|
|
7939
8049
|
const QUESTION_DESCRIPTION = "Ask the user one or more clarifying questions and pause until they answer. Batch related questions into a single call instead of asking one at a time — every call pauses the conversation. Each question carries a `type`: `text` (single line), `textarea` (multi-line), `select` (one of `choices`), or `confirm` (yes/no). Use sparingly: only when explicit user input materially changes the next steps.";
|
|
7940
|
-
function createPlanTool({ requestInteraction }) {
|
|
8050
|
+
function createPlanTool({ requestInteraction, shouldSkipInteractions }) {
|
|
7941
8051
|
return {
|
|
7942
8052
|
spec: {
|
|
7943
8053
|
name: PRESENT_PLAN_TOOL,
|
|
@@ -7973,21 +8083,23 @@ function createPlanTool({ requestInteraction }) {
|
|
|
7973
8083
|
async execute(input, ctx) {
|
|
7974
8084
|
const payload = parsePlanPayload(input);
|
|
7975
8085
|
if (!payload) throw new Error("present_plan: invalid input — expected non-empty `title` and `plan` strings.");
|
|
7976
|
-
const
|
|
8086
|
+
const request = {
|
|
7977
8087
|
id: ctx.callId,
|
|
8088
|
+
origin: "model",
|
|
7978
8089
|
kind: "plan",
|
|
7979
8090
|
tool: PRESENT_PLAN_TOOL,
|
|
7980
8091
|
payload,
|
|
7981
8092
|
...ctx.runId ? { runId: ctx.runId } : {},
|
|
7982
8093
|
turnId: ctx.turnId,
|
|
7983
8094
|
createdAt: Date.now()
|
|
7984
|
-
}
|
|
8095
|
+
};
|
|
8096
|
+
const response = shouldSkipInteractions?.() ? createAutomaticInteractionResponse(request) : await requestInteraction(request);
|
|
7985
8097
|
if (response.kind !== "plan") throw new Error(`present_plan: unexpected response kind "${response.kind}".`);
|
|
7986
8098
|
return serializeInteractionResponse(response);
|
|
7987
8099
|
}
|
|
7988
8100
|
};
|
|
7989
8101
|
}
|
|
7990
|
-
function createQuestionTool({ requestInteraction }) {
|
|
8102
|
+
function createQuestionTool({ requestInteraction, shouldSkipInteractions }) {
|
|
7991
8103
|
return {
|
|
7992
8104
|
spec: {
|
|
7993
8105
|
name: ASK_USER_TOOL,
|
|
@@ -8076,15 +8188,17 @@ function createQuestionTool({ requestInteraction }) {
|
|
|
8076
8188
|
async execute(input, ctx) {
|
|
8077
8189
|
const payload = parseQuestionPayload(input);
|
|
8078
8190
|
if (!payload) throw new Error("ask_user: invalid input — expected a non-empty `questions` array.");
|
|
8079
|
-
const
|
|
8191
|
+
const request = {
|
|
8080
8192
|
id: ctx.callId,
|
|
8193
|
+
origin: "model",
|
|
8081
8194
|
kind: "question",
|
|
8082
8195
|
tool: ASK_USER_TOOL,
|
|
8083
8196
|
payload,
|
|
8084
8197
|
...ctx.runId ? { runId: ctx.runId } : {},
|
|
8085
8198
|
turnId: ctx.turnId,
|
|
8086
8199
|
createdAt: Date.now()
|
|
8087
|
-
}
|
|
8200
|
+
};
|
|
8201
|
+
const response = shouldSkipInteractions?.() ? createAutomaticInteractionResponse(request) : await requestInteraction(request);
|
|
8088
8202
|
if (response.kind !== "question") throw new Error(`ask_user: unexpected response kind "${response.kind}".`);
|
|
8089
8203
|
return serializeInteractionResponse(response);
|
|
8090
8204
|
}
|
|
@@ -10436,6 +10550,6 @@ function computeTurnAnchors(items) {
|
|
|
10436
10550
|
};
|
|
10437
10551
|
}
|
|
10438
10552
|
//#endregion
|
|
10439
|
-
export { McpAuthProvider as $,
|
|
10553
|
+
export { McpAuthProvider as $, isTodoTool as $n, resolveStoragePaths as $t, writeProjects as A, performInPlaceSelfUpdate as An, saveState as Ar, SETTINGS_INPUTS as At, mcpToolsCachePath as B, DEFAULT_PERSIST_EXCLUDE_TOOLS as Bn, GRUVBOX_DARK as Bt, addToSafelist as C, buildUpdateHint as Cn, createStateStore as Cr, buildHints as Ct, projectsFilePath as D, detectLibc as Dn, listSessionMeta as Dr, DEFAULT_SETTINGS as Dt, matchesSafelistEntry as E, compareSemver as En, lastContextSizeFromTurns as Er, useEnabledToggleSet as Et, oauthUsesManualCodePaste as F, renderAgentsMdBlock as Fn, toolCallPreview as Fr, BUILTIN_THEMES as Ft, useMcpToolToggleMap as G, TODOREAD_TOOL as Gn, CATPPUCCIN_MOCHA as Gt, saveMcpToolsCache as H, accentColor as Hn, CATPPUCCIN_FRAPPE as Ht, runOAuthLogin as I, BUILD_AGENT as In, toolResultText as Ir, DEFAULT_THEME as It, indexOfServerRow as J, TODO_STATUS_GLYPHS as Jn, useDiscovery as Jt, useMcpToolToggleSet as K, TODOS_METADATA_KEY as Kn, createDiscoverySlot as Kt, supportsOAuth as L, BUILTIN_AGENTS as Ln, updateToolEventOutcomes as Lr, resolveChipColor as Lt, fetchOAuthRedirect as M, resolvePlatformPackage as Mn, stripSpawnTokensLine as Mr, SettingsProvider as Mt, normalizeRedirectPaste as N, chatAutoCompactBehavior as Nn, sumRunCosts as Nr, clampFps as Nt, readProjects as O, detectPackageManager as On, loadState as Or, SETTINGS_CATEGORIES as Ot, redirectUriFromAuthUrl as P, discoverAgentsMd as Pn, titleFromTurns as Pr, useSettings as Pt, patchMcpCredential as Q, getTodosForRun as Qn, resolveConfig as Qt, clearMcpToolsCache as R, DEFAULT_AGENT_ID as Rn, usageByModel as Rr, resolveTheme as Rt, IMPLICITLY_SAFE_TOOLS as S, bootTick as Sn, compactSummaryEvent as Sr, truncateTrailing as St, isOnSafelist as T, checkForUpdate as Tn, eventsFromTurns as Tr, listProjectFiles as Tt, subscribeMcpToolsCache as U, resolveAgentId as Un, CATPPUCCIN_LATTE as Ut, refreshMcpToolsCatalog as V, PLAN_AGENT as Vn, GRUVBOX_LIGHT as Vt, buildToolToggle as W, singleAgentRegistry as Wn, CATPPUCCIN_MACCHIATO as Wt, createFileMcpCredentialStore as X, createTodoTools as Xn, ConfigProvider as Xt, parentServerName as Y, TODO_WRITE_COUNTS_METADATA_KEY as Yn, useDiscoveryOptional as Yt, mcpCredentialsPath as Z, getArchivedTodosForRun as Zn, useConfig as Zt, resolveSessionExportTarget as _, defaultMcpsConfigPaths as _n, buildPlanSystem as _r, useInteractionsActions as _t, useSurfaces as a, restoreChainFallbacks as an, useActiveTodos as ar, AUTOMATIC_INTERACTION_INSTRUCTION as at, useSafeModeActions as b, tryOpenBrowser as bn, createChatTurnsReadTool as br, clipHintsToWidth as bt, discoverSystemMd as c, useCompletion as cn, DOING_TASKS_DOCTRINE as cr, PRESENT_PLAN_TOOL as ct, userSystemMdPath as d, importFromClaudeCode as dn, INTERACTION_GUIDANCE_NO_PROMPTS as dr, createInteractionTools as dt, buildRunModel as en, pickActiveRunId as er, useMcpAuthDispatch as et, useStreamBuffer as f, mcpsWritePath as fn, PLAN_MODE_DOCTRINE as fr, isInteractionTool as ft, renderSession as g, dedupMcpServersByName as gn, buildBuildSystem as gr, serializeInteractionResponse as gt, discoverProjectSkills as h, buildMcpServers as hn, TOKEN_DISCIPLINE_DOCTRINE as hr, pendingInteractionsFromTurns as ht, useSelectStyle as i, providerKeySetChanged as in, todoProgressLabel as ir, ASK_USER_TOOL as it, formatPathForCwd as j, performSelfUpdate as jn, serverToolResultSummary as jr, SETTINGS_TOGGLES as jt, suggestSafelistEntries as k, parseSemver as kn, marginTopFor as kr, SETTINGS_CHOICES as kt, renderSystemMdSeed as l, countClaudeSessionFiles as ln, IDENTITY_PREFIX as lr, buildResumedToolResultsTurn as lt, defaultSkillScanPaths as m, upsertMcpServer as mn, SUBAGENT_GUIDANCE as mr, makeRequestInteraction as mt, ThemeProvider as n, chainsEqual as nn, selectActiveTodos as nr, getMcpAuthStatus as nt, useSyntaxStyles as o, sanitizeModelChain as on, ACTIONS_WITH_CARE_DOCTRINE as or, HOST_INTERACTION_ID_PREFIX as ot, buildSkillsConfig as p, removeMcpServer as pn, PLAN_MODE_DOCTRINE_NO_PROMPTS as pr, isModelInteraction as pt, buildVisibleMcpRows as q, TODOWRITE_TOOL as qn, DiscoveryProvider as qt, useColors as r, filterChainFallbacks as rn, setTodosForRun as rr, reduceMcpAuth as rt, useTheme as s, toggleChainEntry as sn, COMMUNICATION_DOCTRINE as sr, InteractionsProvider as st, computeTurnAnchors as t, chainPositionOf as tn, pruneTodosByRun as tr, useMcpAuthState as tt, userScopeOverridesLoad as u, hasClaudeCodeSetup as un, INTERACTION_GUIDANCE as ur, createAutomaticInteractionResponse as ut, writeSessionExport as v, discoverProjectMcps as vn, envSection as vr, useInteractionsQueue as vt, getSafelist as w, useUpdateCheck as wn, deriveSessionTitle as wr, shortChord as wt, useSafeModeQueue as x, bootProfileEnabled as xn, DEFAULT_SESSION_TITLE as xr, hintsLength as xt, SafeModeProvider as y, parseMcpsFile as yn, chatReferenceTokensForPrompt as yr, EMPTY_HINTS as yt, loadMcpToolsCache as z, DEFAULT_BUDGET_EXCLUDE_TOOLS as zn, VAPORWAVE_THEME as zt };
|
|
10440
10554
|
|
|
10441
|
-
//# sourceMappingURL=transcript-anchors-
|
|
10555
|
+
//# sourceMappingURL=transcript-anchors-D-Yuimif.js.map
|