zidane 5.1.11 → 5.1.13
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/{agent-D0pXl4CO.d.ts → agent-skiQGYs2.d.ts} +8 -2
- package/dist/agent-skiQGYs2.d.ts.map +1 -0
- package/dist/chat.d.ts +43 -6
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/{index-n4STKh9s.d.ts → index-CjPh6CRE.d.ts} +2 -2
- package/dist/{index-n4STKh9s.d.ts.map → index-CjPh6CRE.d.ts.map} +1 -1
- package/dist/{index-C9A_Ah4R.d.ts → index-YM7SipFz.d.ts} +2 -2
- package/dist/{index-C9A_Ah4R.d.ts.map → index-YM7SipFz.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/{login-CQNaKTLJ.js → login-Cc6Q-Fpu.js} +2 -2
- package/dist/{login-CQNaKTLJ.js.map → login-Cc6Q-Fpu.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/{messages-DiAiNhxA.js → messages-CIkO_aCH.js} +40 -4
- package/dist/messages-CIkO_aCH.js.map +1 -0
- package/dist/{presets-CYNTGGXg.js → presets-Ce79MK4J.js} +2 -2
- package/dist/{presets-CYNTGGXg.js.map → presets-Ce79MK4J.js.map} +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +1 -1
- package/dist/{providers-6bqfXUd1.js → providers-CvriFHFU.js} +27 -8
- package/dist/providers-CvriFHFU.js.map +1 -0
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +2 -2
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-pS4Vt4dl.js → session-DtLD1Sl1.js} +2 -1
- package/dist/{session-pS4Vt4dl.js.map → session-DtLD1Sl1.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/skills.d.ts +2 -2
- package/dist/{tool-formatters-BkbbrFyr.d.ts → tool-formatters-0aOMYbH-.d.ts} +71 -5
- package/dist/tool-formatters-0aOMYbH-.d.ts.map +1 -0
- package/dist/{tools-BoHVy2UM.js → tools-BG2wMa3X.js} +2 -2
- package/dist/{tools-BoHVy2UM.js.map → tools-BG2wMa3X.js.map} +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +1 -1
- package/dist/tui.d.ts +44 -11
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +945 -276
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-BMGp7jXI.js → turn-operations-CDmQ2h-T.js} +490 -55
- package/dist/turn-operations-CDmQ2h-T.js.map +1 -0
- package/dist/types-Bx_F8jet.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/agent-D0pXl4CO.d.ts.map +0 -1
- package/dist/messages-DiAiNhxA.js.map +0 -1
- package/dist/providers-6bqfXUd1.js.map +0 -1
- package/dist/tool-formatters-BkbbrFyr.d.ts.map +0 -1
- package/dist/turn-operations-BMGp7jXI.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as multiEdit, c as grep, i as readFile$1, l as glob, n as createSpawnTool, o as listFiles, r as shell, t as writeFile$1, u as edit } from "./tools-
|
|
1
|
+
import { a as multiEdit, c as grep, i as readFile$1, l as glob, n as createSpawnTool, o as listFiles, r as shell, t as writeFile$1, u as edit } from "./tools-BG2wMa3X.js";
|
|
2
2
|
import { n as toolResultToText } from "./types-Bx_F8jet.js";
|
|
3
3
|
import { r as normalizeMcpServers } from "./mcp-CUt-N8zn.js";
|
|
4
4
|
import { a as discoverSkills } from "./interpolate-BI6ovwag.js";
|
|
5
5
|
import { n as formatTokenUsage } from "./stats-DgOvY7wd.js";
|
|
6
|
-
import { n as definePreset } from "./presets-
|
|
7
|
-
import { i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-
|
|
6
|
+
import { n as definePreset } from "./presets-Ce79MK4J.js";
|
|
7
|
+
import { i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-CvriFHFU.js";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { readdir, stat, writeFile } from "node:fs/promises";
|
|
10
10
|
import { dirname, join, resolve, sep } from "node:path";
|
|
11
|
+
import { getModel, getModels } from "@mariozechner/pi-ai";
|
|
11
12
|
import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
12
13
|
import { homedir } from "node:os";
|
|
13
14
|
import { anthropicOAuthProvider, openaiCodexOAuthProvider } from "@mariozechner/pi-ai/oauth";
|
|
14
|
-
import { getModel, getModels } from "@mariozechner/pi-ai";
|
|
15
15
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
17
|
//#region src/chat/agent-prompt.ts
|
|
@@ -169,6 +169,35 @@ const INTERACTION_GUIDANCE = `# Interacting with the user
|
|
|
169
169
|
- Call \`present_plan\` when you have a concrete proposal that materially changes the workspace and want explicit confirmation before executing.
|
|
170
170
|
- Call \`ask_user\` when clarifying answers materially change the next steps. Batch related questions into one call — every call pauses the conversation.
|
|
171
171
|
- Use both sparingly. Don't ask what you could find out by reading the code.`;
|
|
172
|
+
/**
|
|
173
|
+
* Variant of {@link INTERACTION_GUIDANCE} for the no-interactive-prompts
|
|
174
|
+
* configuration (`Settings.allowInteraction = false`). The two tools are
|
|
175
|
+
* stripped from the agent's tool set; this section tells the model to
|
|
176
|
+
* operate autonomously and surface assumptions / open questions in its
|
|
177
|
+
* final prose message rather than via tool calls.
|
|
178
|
+
*/
|
|
179
|
+
const INTERACTION_GUIDANCE_NO_PROMPTS = `# No interactive prompts
|
|
180
|
+
You don't have \`ask_user\` or \`present_plan\` available — interactive prompts are disabled. When you hit ambiguity, state your assumption in plain prose and proceed. Surface decisions, tradeoffs, and open questions in your final message rather than pausing mid-task.`;
|
|
181
|
+
/**
|
|
182
|
+
* Variant of {@link PLAN_MODE_DOCTRINE} for the no-interactive-prompts
|
|
183
|
+
* configuration. The "Ask" step is removed; "Propose" no longer calls
|
|
184
|
+
* \`present_plan\` and instead instructs the model to write the plan
|
|
185
|
+
* directly in its final message.
|
|
186
|
+
*/
|
|
187
|
+
const PLAN_MODE_DOCTRINE_NO_PROMPTS = `# Plan mode — read-only
|
|
188
|
+
You are in PLAN mode. You can read files, list directories, and search the codebase — but you CANNOT modify files, run shell commands, or spawn subagents. Use this mode to investigate, understand, and design a proposal.
|
|
189
|
+
|
|
190
|
+
## Loop
|
|
191
|
+
1. **Explore** — Read code. Look for existing functions, utilities, and patterns to reuse.
|
|
192
|
+
2. **Propose** — When the plan is ready, write it directly in your final response. Cover what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the change end-to-end.
|
|
193
|
+
|
|
194
|
+
## Good plans
|
|
195
|
+
- Cover what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the change end-to-end.
|
|
196
|
+
- Reference real symbols and line numbers from your exploration.
|
|
197
|
+
- Surface only your recommended approach, not every alternative.
|
|
198
|
+
- Don't pause for clarification — interactive prompts are disabled. When in doubt, state your assumption and proceed.
|
|
199
|
+
|
|
200
|
+
The user will switch to Build mode to execute the plan.`;
|
|
172
201
|
function buildEnvSectionFromOpts(opts) {
|
|
173
202
|
if (!opts.cwd) return null;
|
|
174
203
|
return envSection({
|
|
@@ -191,6 +220,7 @@ function buildEnvSectionFromOpts(opts) {
|
|
|
191
220
|
* every active session.
|
|
192
221
|
*/
|
|
193
222
|
function buildBuildSystem(opts = {}) {
|
|
223
|
+
const interactionGuidance = opts.allowInteraction === false ? INTERACTION_GUIDANCE_NO_PROMPTS : INTERACTION_GUIDANCE;
|
|
194
224
|
return joinPrompt([
|
|
195
225
|
IDENTITY_PREFIX,
|
|
196
226
|
buildEnvSectionFromOpts(opts),
|
|
@@ -199,7 +229,7 @@ function buildBuildSystem(opts = {}) {
|
|
|
199
229
|
TOKEN_DISCIPLINE_DOCTRINE,
|
|
200
230
|
SUBAGENT_GUIDANCE,
|
|
201
231
|
COMMUNICATION_DOCTRINE,
|
|
202
|
-
|
|
232
|
+
interactionGuidance
|
|
203
233
|
]);
|
|
204
234
|
}
|
|
205
235
|
/**
|
|
@@ -208,13 +238,14 @@ function buildBuildSystem(opts = {}) {
|
|
|
208
238
|
* mode) and uses `PLAN_MODE_DOCTRINE` instead of `DOING_TASKS_DOCTRINE`.
|
|
209
239
|
*/
|
|
210
240
|
function buildPlanSystem(opts = {}) {
|
|
241
|
+
const noPrompts = opts.allowInteraction === false;
|
|
211
242
|
return joinPrompt([
|
|
212
243
|
IDENTITY_PREFIX,
|
|
213
244
|
buildEnvSectionFromOpts(opts),
|
|
214
|
-
PLAN_MODE_DOCTRINE,
|
|
245
|
+
noPrompts ? PLAN_MODE_DOCTRINE_NO_PROMPTS : PLAN_MODE_DOCTRINE,
|
|
215
246
|
TOKEN_DISCIPLINE_DOCTRINE,
|
|
216
247
|
COMMUNICATION_DOCTRINE,
|
|
217
|
-
INTERACTION_GUIDANCE
|
|
248
|
+
noPrompts ? INTERACTION_GUIDANCE_NO_PROMPTS : INTERACTION_GUIDANCE
|
|
218
249
|
]);
|
|
219
250
|
}
|
|
220
251
|
function joinPrompt(parts) {
|
|
@@ -973,19 +1004,21 @@ const EMPTY_REFS = Object.freeze([]);
|
|
|
973
1004
|
function useCompletion(input, providers, options = {}) {
|
|
974
1005
|
const { text, cursor } = input;
|
|
975
1006
|
const { maxQueryLength } = options;
|
|
976
|
-
const [
|
|
977
|
-
const
|
|
978
|
-
const a = findActiveTrigger(text, cursor, providers, { maxQueryLength });
|
|
979
|
-
if (!a) return null;
|
|
980
|
-
if (dismissedSignature === `${text.length}:${cursor}`) return null;
|
|
981
|
-
return a;
|
|
982
|
-
}, [
|
|
1007
|
+
const [dismissedTriggerStart, setDismissedTriggerStart] = useState(null);
|
|
1008
|
+
const rawTrigger = useMemo(() => findActiveTrigger(text, cursor, providers, { maxQueryLength }), [
|
|
983
1009
|
text,
|
|
984
1010
|
cursor,
|
|
985
1011
|
providers,
|
|
986
|
-
maxQueryLength
|
|
987
|
-
dismissedSignature
|
|
1012
|
+
maxQueryLength
|
|
988
1013
|
]);
|
|
1014
|
+
const active = useMemo(() => {
|
|
1015
|
+
if (!rawTrigger) return null;
|
|
1016
|
+
if (rawTrigger.span.start === dismissedTriggerStart) return null;
|
|
1017
|
+
return rawTrigger;
|
|
1018
|
+
}, [rawTrigger, dismissedTriggerStart]);
|
|
1019
|
+
useEffect(() => {
|
|
1020
|
+
if (!rawTrigger) setDismissedTriggerStart(null);
|
|
1021
|
+
}, [rawTrigger]);
|
|
989
1022
|
const [items, setItems] = useState([]);
|
|
990
1023
|
const [loading, setLoading] = useState(false);
|
|
991
1024
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
@@ -1043,8 +1076,8 @@ function useCompletion(input, providers, options = {}) {
|
|
|
1043
1076
|
setSelectedIndex((i) => items.length === 0 ? 0 : (i - 1 + items.length) % items.length);
|
|
1044
1077
|
}, [items.length]);
|
|
1045
1078
|
const dismiss = useCallback(() => {
|
|
1046
|
-
|
|
1047
|
-
}, [
|
|
1079
|
+
if (rawTrigger) setDismissedTriggerStart(rawTrigger.span.start);
|
|
1080
|
+
}, [rawTrigger]);
|
|
1048
1081
|
const commit = useCallback(() => {
|
|
1049
1082
|
if (!active || items.length === 0) return null;
|
|
1050
1083
|
const item = items[Math.min(selectedIndex, items.length - 1)];
|
|
@@ -1906,6 +1939,82 @@ function tokenize(s) {
|
|
|
1906
1939
|
while ((match = re.exec(s)) !== null) out.push(match[0]);
|
|
1907
1940
|
return out;
|
|
1908
1941
|
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Apply the payload's hunks against `priorContent` and return the
|
|
1944
|
+
* resulting file body. Mirrors the agent's tool-side semantics:
|
|
1945
|
+
* - `replaceAll === true` → `String.replaceAll`
|
|
1946
|
+
* - otherwise → first-occurrence `String.replace`
|
|
1947
|
+
*
|
|
1948
|
+
* Hunks are applied in order — a `multi_edit` later hunk operates on
|
|
1949
|
+
* the output of the earlier ones, just like the actual tool.
|
|
1950
|
+
*/
|
|
1951
|
+
function applyEditPayload(payload, priorContent) {
|
|
1952
|
+
let out = priorContent;
|
|
1953
|
+
for (const hunk of payload.hunks) out = hunk.replaceAll ? out.replaceAll(hunk.oldString, hunk.newString) : out.replace(hunk.oldString, hunk.newString);
|
|
1954
|
+
return out;
|
|
1955
|
+
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Like `buildUnifiedDiff` but operating against the full file content
|
|
1958
|
+
* so the diff carries *real* file line numbers and configurable
|
|
1959
|
+
* surrounding context.
|
|
1960
|
+
*
|
|
1961
|
+
* Strategy:
|
|
1962
|
+
* 1. Apply the payload to `priorContent` → `newContent`.
|
|
1963
|
+
* 2. Run `computeLineDiff` over the whole file.
|
|
1964
|
+
* 3. Group non-context ops into hunks, padding each with up to
|
|
1965
|
+
* `contextLines` of context above and below. Adjacent hunks
|
|
1966
|
+
* whose context regions touch are merged so we don't emit two
|
|
1967
|
+
* `@@` headers separated by zero context lines.
|
|
1968
|
+
*
|
|
1969
|
+
* The output line numbers in the `@@` header are 1-based and reflect
|
|
1970
|
+
* the change's position in the actual file — what the user expects
|
|
1971
|
+
* when reading a diff alongside their editor.
|
|
1972
|
+
*
|
|
1973
|
+
* For `write_file` creating a new file (priorContent === ''), this
|
|
1974
|
+
* falls back to the same `--- /dev/null` convention as
|
|
1975
|
+
* `buildUnifiedDiff`.
|
|
1976
|
+
*/
|
|
1977
|
+
function buildContextualDiff(payload, priorContent, contextLines = 3) {
|
|
1978
|
+
const newContent = applyEditPayload(payload, priorContent);
|
|
1979
|
+
const isNewFile = priorContent === "";
|
|
1980
|
+
const ops = computeLineDiff(priorContent, newContent);
|
|
1981
|
+
const oldLineFor = [];
|
|
1982
|
+
const newLineFor = [];
|
|
1983
|
+
let ol = 1;
|
|
1984
|
+
let nl = 1;
|
|
1985
|
+
for (const op of ops) {
|
|
1986
|
+
oldLineFor.push(ol);
|
|
1987
|
+
newLineFor.push(nl);
|
|
1988
|
+
if (op.op !== "add") ol++;
|
|
1989
|
+
if (op.op !== "remove") nl++;
|
|
1990
|
+
}
|
|
1991
|
+
const hunks = [];
|
|
1992
|
+
for (let i = 0; i < ops.length; i++) {
|
|
1993
|
+
if (ops[i].op === "context") continue;
|
|
1994
|
+
const start = Math.max(0, i - contextLines);
|
|
1995
|
+
const end = Math.min(ops.length - 1, i + contextLines);
|
|
1996
|
+
const last = hunks[hunks.length - 1];
|
|
1997
|
+
if (last && start <= last[1] + 1) last[1] = Math.max(last[1], end);
|
|
1998
|
+
else hunks.push([start, end]);
|
|
1999
|
+
}
|
|
2000
|
+
if (hunks.length === 0) return "";
|
|
2001
|
+
const parts = [];
|
|
2002
|
+
parts.push(isNewFile ? "--- /dev/null" : `--- a/${payload.path}`);
|
|
2003
|
+
parts.push(`+++ b/${payload.path}`);
|
|
2004
|
+
for (const [start, end] of hunks) {
|
|
2005
|
+
const slice = ops.slice(start, end + 1);
|
|
2006
|
+
const oldCount = slice.filter((l) => l.op !== "add").length;
|
|
2007
|
+
const newCount = slice.filter((l) => l.op !== "remove").length;
|
|
2008
|
+
const oldStart = oldCount === 0 ? Math.max(0, oldLineFor[start] - 1) : oldLineFor[start];
|
|
2009
|
+
const newStart = newCount === 0 ? Math.max(0, newLineFor[start] - 1) : newLineFor[start];
|
|
2010
|
+
parts.push(`@@ -${oldStart},${oldCount} +${newStart},${newCount} @@`);
|
|
2011
|
+
for (const line of slice) {
|
|
2012
|
+
const prefix = line.op === "add" ? "+" : line.op === "remove" ? "-" : " ";
|
|
2013
|
+
parts.push(`${prefix}${line.text}`);
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
return `${parts.join("\n")}\n`;
|
|
2017
|
+
}
|
|
1909
2018
|
function buildUnifiedDiff(payload) {
|
|
1910
2019
|
const parts = [];
|
|
1911
2020
|
const isNewFile = payload.tool === "write_file" && payload.hunks[0]?.oldString === "";
|
|
@@ -2451,6 +2560,16 @@ function lastContextSizeFromTurns(turns, runs = []) {
|
|
|
2451
2560
|
}
|
|
2452
2561
|
return 0;
|
|
2453
2562
|
}
|
|
2563
|
+
/**
|
|
2564
|
+
* Sum provider-reported USD cost across every run in a session. Used to
|
|
2565
|
+
* seed the live cost indicator on session activation. Returns 0 when no
|
|
2566
|
+
* run carries a `cost` (most providers — only OpenRouter reports today).
|
|
2567
|
+
*/
|
|
2568
|
+
function sumRunCosts(runs) {
|
|
2569
|
+
let total = 0;
|
|
2570
|
+
for (const run of runs) if (run.cost) total += run.cost;
|
|
2571
|
+
return total;
|
|
2572
|
+
}
|
|
2454
2573
|
Object.freeze({ projectDb: true });
|
|
2455
2574
|
/**
|
|
2456
2575
|
* Build the absolute path to `~/.{prefix}/config.json` given a user
|
|
@@ -2826,7 +2945,11 @@ function catppuccinTheme(id, label, p) {
|
|
|
2826
2945
|
dim: p.subtext1,
|
|
2827
2946
|
mute: p.overlay0,
|
|
2828
2947
|
border: p.surface1,
|
|
2829
|
-
borderActive: p.overlay0
|
|
2948
|
+
borderActive: p.overlay0,
|
|
2949
|
+
throbber: {
|
|
2950
|
+
from: p.mauve,
|
|
2951
|
+
to: p.pink
|
|
2952
|
+
}
|
|
2830
2953
|
},
|
|
2831
2954
|
select: {
|
|
2832
2955
|
backgroundColor: "transparent",
|
|
@@ -2838,6 +2961,7 @@ function catppuccinTheme(id, label, p) {
|
|
|
2838
2961
|
selectedDescriptionColor: p.subtext0
|
|
2839
2962
|
},
|
|
2840
2963
|
surfaces: {
|
|
2964
|
+
background: p.crust,
|
|
2841
2965
|
modal: p.mantle,
|
|
2842
2966
|
chips: {
|
|
2843
2967
|
default: {
|
|
@@ -2963,6 +3087,191 @@ const CATPPUCCIN_MACCHIATO = catppuccinTheme("catppuccin-macchiato", "Catppuccin
|
|
|
2963
3087
|
const CATPPUCCIN_FRAPPE = catppuccinTheme("catppuccin-frappe", "Catppuccin Frappé", FRAPPE);
|
|
2964
3088
|
const CATPPUCCIN_LATTE = catppuccinTheme("catppuccin-latte", "Catppuccin Latte (light)", LATTE);
|
|
2965
3089
|
//#endregion
|
|
3090
|
+
//#region src/chat/themes/crush.ts
|
|
3091
|
+
const c = {
|
|
3092
|
+
cumin: "#BF976F",
|
|
3093
|
+
bengal: "#FF6E63",
|
|
3094
|
+
sriracha: "#EB4268",
|
|
3095
|
+
coral: "#FF577D",
|
|
3096
|
+
salmon: "#FF7F90",
|
|
3097
|
+
cherry: "#FF388B",
|
|
3098
|
+
cheeky: "#FF79D0",
|
|
3099
|
+
blush: "#FF84FF",
|
|
3100
|
+
dolly: "#FF60FF",
|
|
3101
|
+
pony: "#FF4FBF",
|
|
3102
|
+
mauve: "#D46EFF",
|
|
3103
|
+
hazy: "#8B75FF",
|
|
3104
|
+
charple: "#6B50FF",
|
|
3105
|
+
guppy: "#7272FF",
|
|
3106
|
+
malibu: "#00A4FF",
|
|
3107
|
+
sardine: "#4FBEFE",
|
|
3108
|
+
zinc: "#10B1AE",
|
|
3109
|
+
turtle: "#0ADCD9",
|
|
3110
|
+
guac: "#12C78F",
|
|
3111
|
+
julep: "#00FFB2",
|
|
3112
|
+
bok: "#68FFD6",
|
|
3113
|
+
mustard: "#F5EF34",
|
|
3114
|
+
citron: "#E8FF27",
|
|
3115
|
+
zest: "#E8FE96",
|
|
3116
|
+
pepper: "#201F26",
|
|
3117
|
+
bbq: "#2D2C35",
|
|
3118
|
+
charcoal: "#3A3943",
|
|
3119
|
+
iron: "#4D4C57",
|
|
3120
|
+
oyster: "#605F6B",
|
|
3121
|
+
squid: "#858392",
|
|
3122
|
+
smoke: "#BFBCC8",
|
|
3123
|
+
ash: "#DFDBDD",
|
|
3124
|
+
salt: "#F1EFEF",
|
|
3125
|
+
butter: "#FFFAF1"
|
|
3126
|
+
};
|
|
3127
|
+
const CRUSH_THEME = {
|
|
3128
|
+
id: "crush",
|
|
3129
|
+
label: "Crush (Pantera)",
|
|
3130
|
+
colors: {
|
|
3131
|
+
brand: c.charple,
|
|
3132
|
+
accent: c.bok,
|
|
3133
|
+
model: c.malibu,
|
|
3134
|
+
warn: c.julep,
|
|
3135
|
+
money: c.zest,
|
|
3136
|
+
error: c.sriracha,
|
|
3137
|
+
dim: c.smoke,
|
|
3138
|
+
mute: c.oyster,
|
|
3139
|
+
border: c.charcoal,
|
|
3140
|
+
borderActive: c.charple,
|
|
3141
|
+
throbber: {
|
|
3142
|
+
from: c.charple,
|
|
3143
|
+
to: c.dolly
|
|
3144
|
+
}
|
|
3145
|
+
},
|
|
3146
|
+
select: {
|
|
3147
|
+
backgroundColor: "transparent",
|
|
3148
|
+
focusedBackgroundColor: "transparent",
|
|
3149
|
+
selectedBackgroundColor: "transparent",
|
|
3150
|
+
selectedTextColor: c.charple,
|
|
3151
|
+
textColor: c.smoke,
|
|
3152
|
+
descriptionColor: c.oyster,
|
|
3153
|
+
selectedDescriptionColor: c.squid
|
|
3154
|
+
},
|
|
3155
|
+
surfaces: {
|
|
3156
|
+
background: c.pepper,
|
|
3157
|
+
modal: c.bbq,
|
|
3158
|
+
chips: {
|
|
3159
|
+
default: {
|
|
3160
|
+
bg: c.charple,
|
|
3161
|
+
fg: c.butter
|
|
3162
|
+
},
|
|
3163
|
+
skills: {
|
|
3164
|
+
bg: c.charple,
|
|
3165
|
+
fg: c.butter
|
|
3166
|
+
},
|
|
3167
|
+
files: {
|
|
3168
|
+
bg: c.malibu,
|
|
3169
|
+
fg: c.butter
|
|
3170
|
+
}
|
|
3171
|
+
},
|
|
3172
|
+
selection: c.charcoal,
|
|
3173
|
+
diff: {
|
|
3174
|
+
addBg: "#2b322a",
|
|
3175
|
+
removeBg: "#312929",
|
|
3176
|
+
addContentBg: "#323931",
|
|
3177
|
+
removeContentBg: "#383030",
|
|
3178
|
+
addFg: "#629657",
|
|
3179
|
+
removeFg: "#a45c59"
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
syntax: {
|
|
3183
|
+
"default": { fg: c.smoke },
|
|
3184
|
+
"markup.heading": {
|
|
3185
|
+
fg: c.malibu,
|
|
3186
|
+
bold: true
|
|
3187
|
+
},
|
|
3188
|
+
"markup.heading.1": {
|
|
3189
|
+
fg: c.butter,
|
|
3190
|
+
bg: c.charple,
|
|
3191
|
+
bold: true
|
|
3192
|
+
},
|
|
3193
|
+
"markup.heading.2": {
|
|
3194
|
+
fg: c.malibu,
|
|
3195
|
+
bold: true
|
|
3196
|
+
},
|
|
3197
|
+
"markup.heading.3": {
|
|
3198
|
+
fg: c.malibu,
|
|
3199
|
+
bold: true
|
|
3200
|
+
},
|
|
3201
|
+
"markup.bold": {
|
|
3202
|
+
fg: c.smoke,
|
|
3203
|
+
bold: true
|
|
3204
|
+
},
|
|
3205
|
+
"markup.strong": {
|
|
3206
|
+
fg: c.smoke,
|
|
3207
|
+
bold: true
|
|
3208
|
+
},
|
|
3209
|
+
"markup.italic": {
|
|
3210
|
+
fg: c.smoke,
|
|
3211
|
+
italic: true
|
|
3212
|
+
},
|
|
3213
|
+
"markup.link": {
|
|
3214
|
+
fg: c.guac,
|
|
3215
|
+
bold: true
|
|
3216
|
+
},
|
|
3217
|
+
"markup.link.url": {
|
|
3218
|
+
fg: c.zinc,
|
|
3219
|
+
underline: true
|
|
3220
|
+
},
|
|
3221
|
+
"markup.list": { fg: c.smoke },
|
|
3222
|
+
"markup.raw": {
|
|
3223
|
+
fg: c.coral,
|
|
3224
|
+
bg: c.charcoal
|
|
3225
|
+
},
|
|
3226
|
+
"markup.raw.block": {
|
|
3227
|
+
fg: c.coral,
|
|
3228
|
+
bg: c.charcoal
|
|
3229
|
+
},
|
|
3230
|
+
"markup.quote": { fg: c.smoke },
|
|
3231
|
+
"keyword": { fg: c.malibu },
|
|
3232
|
+
"keyword.import": { fg: c.pony },
|
|
3233
|
+
"keyword.operator": { fg: c.salmon },
|
|
3234
|
+
"string": { fg: c.cumin },
|
|
3235
|
+
"string.escape": { fg: c.bok },
|
|
3236
|
+
"character": { fg: c.cumin },
|
|
3237
|
+
"comment": {
|
|
3238
|
+
fg: c.oyster,
|
|
3239
|
+
italic: true
|
|
3240
|
+
},
|
|
3241
|
+
"number": { fg: c.julep },
|
|
3242
|
+
"boolean": { fg: c.julep },
|
|
3243
|
+
"constant": { fg: c.julep },
|
|
3244
|
+
"constant.builtin": { fg: c.julep },
|
|
3245
|
+
"function": { fg: c.guac },
|
|
3246
|
+
"function.call": { fg: c.guac },
|
|
3247
|
+
"function.method": { fg: c.guac },
|
|
3248
|
+
"function.method.call": { fg: c.guac },
|
|
3249
|
+
"function.builtin": { fg: c.cheeky },
|
|
3250
|
+
"function.macro": { fg: c.bok },
|
|
3251
|
+
"type": { fg: c.guppy },
|
|
3252
|
+
"type.builtin": { fg: c.guppy },
|
|
3253
|
+
"constructor": {
|
|
3254
|
+
fg: c.salt,
|
|
3255
|
+
bold: true
|
|
3256
|
+
},
|
|
3257
|
+
"attribute": { fg: c.hazy },
|
|
3258
|
+
"tag": { fg: c.mauve },
|
|
3259
|
+
"variable": { fg: c.smoke },
|
|
3260
|
+
"variable.builtin": { fg: c.cheeky },
|
|
3261
|
+
"variable.parameter": {
|
|
3262
|
+
fg: c.smoke,
|
|
3263
|
+
italic: true
|
|
3264
|
+
},
|
|
3265
|
+
"variable.member": { fg: c.smoke },
|
|
3266
|
+
"property": { fg: c.smoke },
|
|
3267
|
+
"operator": { fg: c.salmon },
|
|
3268
|
+
"punctuation": { fg: c.squid },
|
|
3269
|
+
"punctuation.bracket": { fg: c.squid },
|
|
3270
|
+
"punctuation.delimiter": { fg: c.squid },
|
|
3271
|
+
"label": { fg: c.malibu }
|
|
3272
|
+
}
|
|
3273
|
+
};
|
|
3274
|
+
//#endregion
|
|
2966
3275
|
//#region src/chat/themes/vaporwave.ts
|
|
2967
3276
|
const PALETTE = {
|
|
2968
3277
|
pink: "#E95378",
|
|
@@ -2985,7 +3294,8 @@ const PALETTE = {
|
|
|
2985
3294
|
comment: "#BBBBBB",
|
|
2986
3295
|
muted: "#6C6F93",
|
|
2987
3296
|
surface: "#2E303E",
|
|
2988
|
-
panel: "#232530"
|
|
3297
|
+
panel: "#232530",
|
|
3298
|
+
bgDeep: "#1a1c26"
|
|
2989
3299
|
};
|
|
2990
3300
|
const VAPORWAVE_THEME = {
|
|
2991
3301
|
id: "vaporwave",
|
|
@@ -2999,7 +3309,11 @@ const VAPORWAVE_THEME = {
|
|
|
2999
3309
|
dim: PALETTE.textDim,
|
|
3000
3310
|
mute: PALETTE.muted,
|
|
3001
3311
|
border: PALETTE.surface,
|
|
3002
|
-
borderActive: PALETTE.muted
|
|
3312
|
+
borderActive: PALETTE.muted,
|
|
3313
|
+
throbber: {
|
|
3314
|
+
from: PALETTE.pink,
|
|
3315
|
+
to: PALETTE.cyan
|
|
3316
|
+
}
|
|
3003
3317
|
},
|
|
3004
3318
|
select: {
|
|
3005
3319
|
backgroundColor: "transparent",
|
|
@@ -3011,6 +3325,7 @@ const VAPORWAVE_THEME = {
|
|
|
3011
3325
|
selectedDescriptionColor: PALETTE.text
|
|
3012
3326
|
},
|
|
3013
3327
|
surfaces: {
|
|
3328
|
+
background: PALETTE.bgDeep,
|
|
3014
3329
|
modal: PALETTE.panel,
|
|
3015
3330
|
chips: {
|
|
3016
3331
|
default: {
|
|
@@ -3166,7 +3481,11 @@ const DEFAULT_COLORS = {
|
|
|
3166
3481
|
dim: "#a3a3ac",
|
|
3167
3482
|
mute: "#525258",
|
|
3168
3483
|
border: "#3c3c41",
|
|
3169
|
-
borderActive: "#1488fc"
|
|
3484
|
+
borderActive: "#1488fc",
|
|
3485
|
+
throbber: {
|
|
3486
|
+
from: "#2ba6ff",
|
|
3487
|
+
to: "#8adaff"
|
|
3488
|
+
}
|
|
3170
3489
|
};
|
|
3171
3490
|
const DEFAULT_THEME = {
|
|
3172
3491
|
id: "default",
|
|
@@ -3182,6 +3501,7 @@ const DEFAULT_THEME = {
|
|
|
3182
3501
|
selectedDescriptionColor: DEFAULT_COLORS.dim
|
|
3183
3502
|
},
|
|
3184
3503
|
surfaces: {
|
|
3504
|
+
background: "#0a0a0c",
|
|
3185
3505
|
modal: "#111114",
|
|
3186
3506
|
chips: {
|
|
3187
3507
|
default: {
|
|
@@ -3314,6 +3634,7 @@ const BUILTIN_THEMES = {
|
|
|
3314
3634
|
[CATPPUCCIN_MACCHIATO.id]: CATPPUCCIN_MACCHIATO,
|
|
3315
3635
|
[CATPPUCCIN_FRAPPE.id]: CATPPUCCIN_FRAPPE,
|
|
3316
3636
|
[CATPPUCCIN_LATTE.id]: CATPPUCCIN_LATTE,
|
|
3637
|
+
[CRUSH_THEME.id]: CRUSH_THEME,
|
|
3317
3638
|
[VAPORWAVE_THEME.id]: VAPORWAVE_THEME
|
|
3318
3639
|
};
|
|
3319
3640
|
/** Resolve a theme id to its full `Theme`, falling back to default on unknown ids. */
|
|
@@ -3336,7 +3657,9 @@ const DEFAULT_SETTINGS = {
|
|
|
3336
3657
|
autoCompact: true,
|
|
3337
3658
|
autoCompactThreshold: .8,
|
|
3338
3659
|
showEditDiffs: true,
|
|
3339
|
-
targetFps: 60
|
|
3660
|
+
targetFps: 60,
|
|
3661
|
+
allowInteraction: true,
|
|
3662
|
+
smoothStreaming: true
|
|
3340
3663
|
};
|
|
3341
3664
|
/**
|
|
3342
3665
|
* Hard-clamp a `targetFps` value to a safe range before handing it to
|
|
@@ -3402,6 +3725,11 @@ const SETTINGS_TOGGLES = [
|
|
|
3402
3725
|
label: "Safe mode",
|
|
3403
3726
|
description: "prompt before each tool call (unless safelisted)"
|
|
3404
3727
|
},
|
|
3728
|
+
{
|
|
3729
|
+
key: "allowInteraction",
|
|
3730
|
+
label: "Interactive prompts",
|
|
3731
|
+
description: "let the agent pause for `ask_user` questions / `present_plan` approvals"
|
|
3732
|
+
},
|
|
3405
3733
|
{
|
|
3406
3734
|
key: "resumeLastSession",
|
|
3407
3735
|
label: "Start from last session",
|
|
@@ -3441,6 +3769,11 @@ const SETTINGS_TOGGLES = [
|
|
|
3441
3769
|
key: "showEditDiffs",
|
|
3442
3770
|
label: "Edit diffs",
|
|
3443
3771
|
description: "render edit / multi_edit / write_file as a unified diff"
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
key: "smoothStreaming",
|
|
3775
|
+
label: "Smooth streaming",
|
|
3776
|
+
description: "drip-feed streamed text character-by-character at a steady cadence (typewriter effect)"
|
|
3444
3777
|
}
|
|
3445
3778
|
];
|
|
3446
3779
|
const SETTINGS_CHOICES = [
|
|
@@ -5527,18 +5860,34 @@ function buildSkillsConfig(opts) {
|
|
|
5527
5860
|
//#endregion
|
|
5528
5861
|
//#region src/chat/streaming.ts
|
|
5529
5862
|
/**
|
|
5530
|
-
*
|
|
5531
|
-
* 60fps renderer target
|
|
5532
|
-
*
|
|
5533
|
-
*
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
*
|
|
5538
|
-
*
|
|
5539
|
-
*
|
|
5540
|
-
|
|
5541
|
-
|
|
5863
|
+
* Tick interval for the continuous drain loop. ~16ms aligns with the
|
|
5864
|
+
* 60fps renderer target so the typewriter cadence reveals 1 portion of
|
|
5865
|
+
* content per paint frame. The bucket-derived `chars-per-tick` decides
|
|
5866
|
+
* how much actually lands per tick — see {@link smoothCharsForTick}.
|
|
5867
|
+
*/
|
|
5868
|
+
const TICK_INTERVAL_MS = 16;
|
|
5869
|
+
/**
|
|
5870
|
+
* Smooth-streaming display rate, in characters per second.
|
|
5871
|
+
*
|
|
5872
|
+
* - {@link SMOOTH_BASE_CPS} — the cap for "calm" streaming, when the
|
|
5873
|
+
* buffer is close to caught-up to the provider. ~200 CPS is a fast
|
|
5874
|
+
* typist's pace; comfortably readable without feeling like a deliberate
|
|
5875
|
+
* typewriter performance.
|
|
5876
|
+
* - {@link SMOOTH_BURST_CPS} — when the buffer has been falling behind
|
|
5877
|
+
* the provider (backlog > {@link SMOOTH_BURST_BACKLOG_CHARS}), the
|
|
5878
|
+
* ticker accelerates to drain ~3x as fast. Keeps the typewriter feel
|
|
5879
|
+
* while preventing the display from lagging multiple seconds behind
|
|
5880
|
+
* the actual response.
|
|
5881
|
+
* - {@link SMOOTH_INSTANT_BACKLOG_CHARS} — failsafe. If the buffer
|
|
5882
|
+
* somehow accumulates >2K chars (paste-heavy responses, model dumping
|
|
5883
|
+
* pre-computed text, etc.) the ticker stops smoothing entirely for
|
|
5884
|
+
* the rest of the drain — better to commit the wall of text now than
|
|
5885
|
+
* to type it out for ten more seconds.
|
|
5886
|
+
*/
|
|
5887
|
+
const SMOOTH_BASE_CPS = 200;
|
|
5888
|
+
const SMOOTH_BURST_CPS = 600;
|
|
5889
|
+
const SMOOTH_BURST_BACKLOG_CHARS = 100;
|
|
5890
|
+
const SMOOTH_INSTANT_BACKLOG_CHARS = 2e3;
|
|
5542
5891
|
const PARENT_OWNER = "parent";
|
|
5543
5892
|
function emptyBucket(owner, depth) {
|
|
5544
5893
|
return {
|
|
@@ -5656,14 +6005,56 @@ function turnContextSize(usage) {
|
|
|
5656
6005
|
if (!usage) return 0;
|
|
5657
6006
|
return (usage.input ?? 0) + (usage.cacheRead ?? 0) + (usage.cacheCreation ?? 0);
|
|
5658
6007
|
}
|
|
5659
|
-
|
|
6008
|
+
/**
|
|
6009
|
+
* Number of characters to drain on the next smooth-mode tick, given the
|
|
6010
|
+
* current backlog of one bucket. Caps at the bucket length (never
|
|
6011
|
+
* over-drains) and bypasses smoothing entirely once the backlog goes
|
|
6012
|
+
* past {@link SMOOTH_INSTANT_BACKLOG_CHARS}.
|
|
6013
|
+
*/
|
|
6014
|
+
function smoothCharsForTick(backlog) {
|
|
6015
|
+
if (backlog <= 0) return 0;
|
|
6016
|
+
if (backlog >= SMOOTH_INSTANT_BACKLOG_CHARS) return backlog;
|
|
6017
|
+
return Math.max(1, Math.min(backlog, Math.ceil((backlog >= SMOOTH_BURST_BACKLOG_CHARS ? SMOOTH_BURST_CPS : SMOOTH_BASE_CPS) * TICK_INTERVAL_MS / 1e3)));
|
|
6018
|
+
}
|
|
6019
|
+
/**
|
|
6020
|
+
* Slice `n` chars off the front of `buf` without splitting a UTF-16
|
|
6021
|
+
* surrogate pair. Most LLM text is ASCII and never trips this; the guard
|
|
6022
|
+
* matters for emoji / extended planes where halving the pair would emit
|
|
6023
|
+
* an isolated half-character.
|
|
6024
|
+
*/
|
|
6025
|
+
function takeChars(buf, n) {
|
|
6026
|
+
if (buf.length <= n) return {
|
|
6027
|
+
taken: buf,
|
|
6028
|
+
rest: ""
|
|
6029
|
+
};
|
|
6030
|
+
let end = n;
|
|
6031
|
+
const last = buf.charCodeAt(end - 1);
|
|
6032
|
+
if (last >= 55296 && last <= 56319 && end < buf.length) end++;
|
|
6033
|
+
return {
|
|
6034
|
+
taken: buf.slice(0, end),
|
|
6035
|
+
rest: buf.slice(end)
|
|
6036
|
+
};
|
|
6037
|
+
}
|
|
6038
|
+
function useStreamBuffer(setEvents, options) {
|
|
5660
6039
|
const bucketsRef = useRef(/* @__PURE__ */ new Map());
|
|
5661
|
-
const
|
|
5662
|
-
const
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
6040
|
+
const tickerRef = useRef(null);
|
|
6041
|
+
const getSmoothRef = useRef(options?.getSmooth);
|
|
6042
|
+
getSmoothRef.current = options?.getSmooth;
|
|
6043
|
+
const stopTicker = useCallback(() => {
|
|
6044
|
+
if (tickerRef.current) {
|
|
6045
|
+
clearInterval(tickerRef.current);
|
|
6046
|
+
tickerRef.current = null;
|
|
5666
6047
|
}
|
|
6048
|
+
}, []);
|
|
6049
|
+
/**
|
|
6050
|
+
* Drain every bucket in full and stop the ticker. Used for turn-boundary
|
|
6051
|
+
* commits (`flush` / `appendImmediate` / `flushAndUpdate`) and teardown
|
|
6052
|
+
* (`reset`). The accompanying `updater` (when provided) runs against the
|
|
6053
|
+
* post-drain event list so consumers can append a synchronous event or
|
|
6054
|
+
* apply a transform in the same `setEvents` call.
|
|
6055
|
+
*/
|
|
6056
|
+
const drainAll = useCallback((updater) => {
|
|
6057
|
+
stopTicker();
|
|
5667
6058
|
const buckets = Array.from(bucketsRef.current.values());
|
|
5668
6059
|
bucketsRef.current.clear();
|
|
5669
6060
|
if (!buckets.some((b) => b.markdown.length > 0 || b.thinking.length > 0) && !updater) return;
|
|
@@ -5672,10 +6063,57 @@ function useStreamBuffer(setEvents) {
|
|
|
5672
6063
|
for (const bucket of buckets) merged = applyBucket(merged, bucket);
|
|
5673
6064
|
return updater ? updater(merged) : merged;
|
|
5674
6065
|
});
|
|
5675
|
-
}, [setEvents]);
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
6066
|
+
}, [setEvents, stopTicker]);
|
|
6067
|
+
/**
|
|
6068
|
+
* One tick of the continuous drain loop. Walks every live bucket and
|
|
6069
|
+
* commits a portion of its content based on the current mode. Stops the
|
|
6070
|
+
* ticker once every bucket is empty.
|
|
6071
|
+
*
|
|
6072
|
+
* `thinking` content always flushes immediately even in smooth mode —
|
|
6073
|
+
* it's an internal-reasoning surface, surfaced for transparency rather
|
|
6074
|
+
* than for reading flow, and users expect it to keep up with the model.
|
|
6075
|
+
*/
|
|
6076
|
+
const tick = useCallback(() => {
|
|
6077
|
+
const smooth = getSmoothRef.current?.() ?? true;
|
|
6078
|
+
const buckets = bucketsRef.current;
|
|
6079
|
+
const portions = [];
|
|
6080
|
+
let stillHasContent = false;
|
|
6081
|
+
for (const bucket of buckets.values()) {
|
|
6082
|
+
const thinking = bucket.thinking;
|
|
6083
|
+
bucket.thinking = "";
|
|
6084
|
+
let taken = "";
|
|
6085
|
+
if (bucket.markdown.length > 0) if (smooth) {
|
|
6086
|
+
const n = smoothCharsForTick(bucket.markdown.length);
|
|
6087
|
+
const result = takeChars(bucket.markdown, n);
|
|
6088
|
+
taken = result.taken;
|
|
6089
|
+
bucket.markdown = result.rest;
|
|
6090
|
+
} else {
|
|
6091
|
+
taken = bucket.markdown;
|
|
6092
|
+
bucket.markdown = "";
|
|
6093
|
+
}
|
|
6094
|
+
if (taken || thinking) portions.push({
|
|
6095
|
+
markdown: taken,
|
|
6096
|
+
thinking,
|
|
6097
|
+
owner: bucket.owner,
|
|
6098
|
+
depth: bucket.depth,
|
|
6099
|
+
turnId: bucket.turnId
|
|
6100
|
+
});
|
|
6101
|
+
if (bucket.markdown.length > 0) stillHasContent = true;
|
|
6102
|
+
}
|
|
6103
|
+
if (portions.length > 0) setEvents((prev) => {
|
|
6104
|
+
let next = prev;
|
|
6105
|
+
for (const portion of portions) next = applyBucket(next, portion);
|
|
6106
|
+
return next;
|
|
6107
|
+
});
|
|
6108
|
+
if (!stillHasContent) stopTicker();
|
|
6109
|
+
}, [setEvents, stopTicker]);
|
|
6110
|
+
const ensureTicker = useCallback(() => {
|
|
6111
|
+
if (tickerRef.current) return;
|
|
6112
|
+
tickerRef.current = setInterval(tick, TICK_INTERVAL_MS);
|
|
6113
|
+
}, [tick]);
|
|
6114
|
+
const flush = useCallback(() => drainAll(), [drainAll]);
|
|
6115
|
+
const flushAndUpdate = useCallback((update) => drainAll(update), [drainAll]);
|
|
6116
|
+
const appendImmediate = useCallback((evt) => drainAll((events) => [...events, evt]), [drainAll]);
|
|
5679
6117
|
const queueStreamDelta = useCallback((kind, delta, source) => {
|
|
5680
6118
|
if (!delta) return;
|
|
5681
6119
|
const owner = source?.childId ?? PARENT_OWNER;
|
|
@@ -5687,15 +6125,12 @@ function useStreamBuffer(setEvents) {
|
|
|
5687
6125
|
}
|
|
5688
6126
|
bucket[kind] += delta;
|
|
5689
6127
|
if (source?.turnId) bucket.turnId = source.turnId;
|
|
5690
|
-
|
|
5691
|
-
}, [
|
|
6128
|
+
ensureTicker();
|
|
6129
|
+
}, [ensureTicker]);
|
|
5692
6130
|
const reset = useCallback(() => {
|
|
5693
|
-
|
|
5694
|
-
clearTimeout(flushTimerRef.current);
|
|
5695
|
-
flushTimerRef.current = null;
|
|
5696
|
-
}
|
|
6131
|
+
stopTicker();
|
|
5697
6132
|
bucketsRef.current.clear();
|
|
5698
|
-
}, []);
|
|
6133
|
+
}, [stopTicker]);
|
|
5699
6134
|
return useMemo(() => ({
|
|
5700
6135
|
queueStreamDelta,
|
|
5701
6136
|
appendImmediate,
|
|
@@ -5849,7 +6284,7 @@ const TOOL_DISPLAY = {
|
|
|
5849
6284
|
}
|
|
5850
6285
|
},
|
|
5851
6286
|
spawn: {
|
|
5852
|
-
displayName: "
|
|
6287
|
+
displayName: "Agent",
|
|
5853
6288
|
format: (input) => {
|
|
5854
6289
|
const task = stringField(input, "task");
|
|
5855
6290
|
if (!task) return null;
|
|
@@ -6102,6 +6537,6 @@ function countNeighbors(turnIds, turnId) {
|
|
|
6102
6537
|
};
|
|
6103
6538
|
}
|
|
6104
6539
|
//#endregion
|
|
6105
|
-
export { getMcpAuthStatus as $,
|
|
6540
|
+
export { getMcpAuthStatus as $, openrouterDescriptor as $n, toolCallPreview as $t, isOnSafelist as A, mergeReferences as An, VAPORWAVE_THEME as At, filterModelCatalog as B, setProviderCredential as Bn, eventsFromTurns as Bt, writeSessionExport as C, uniqueSkillNamesFromReferences as Cn, SettingsProvider as Ct, IMPLICITLY_SAFE_TOOLS as D, applyInsert as Dn, DEFAULT_THEME as Dt, useSafeModeQueue as E, uniqueFilesFromReferences as En, BUILTIN_THEMES as Et, writeProjects as F, applyApiKeyEnv as Fn, ConfigProvider as Ft, parseMcpsFile as G, cerebrasDescriptor as Gn, listSessionMeta as Gt, buildMcpServers as H, BUILTIN_PROVIDERS as Hn, isTurnHighlighted as Ht, splitPromptSegments as I, credentialsPath as In, useConfig as It, mcpCredentialsPath as J, getContextWindow as Jn, saveState as Jt, projectUserPaths as K, credKeyOf as Kn, loadState as Kt, runOAuthLogin as L, readCredentials as Ln, resolveConfig as Lt, projectsFilePath as M, tryOpenBrowser as Mn, CATPPUCCIN_LATTE as Mt, readProjects as N, shouldAutoCompact as Nn, CATPPUCCIN_MACCHIATO as Nt, addToSafelist as O, collectReferences as On, resolveChipColor as Ot, suggestSafelistEntry as P, detectAuth as Pn, CATPPUCCIN_MOCHA as Pt, useMcpAuthState as Q, openaiDescriptor as Qn, titleFromTurns as Qt, supportsOAuth as R, readProviderCredential as Rn, createStateStore as Rt, resolveSessionExportTarget as S, createSkillsCompletionProvider as Sn, SETTINGS_TOGGLES as St, useSafeModeActions as T, createFilesCompletionProvider as Tn, useSettings as Tt, defaultMcpsConfigPaths as U, OUTPUT_RESERVE_TOKENS as Un, isVisible as Ut, indexOfEntry as V, writeCredentials as Vn, isEditErrorResult as Vt, discoverProjectMcps as W, anthropicDescriptor as Wn, lastContextSizeFromTurns as Wt, McpAuthProvider as X, modelSupportsReasoning as Xn, stripSpawnTokensLine as Xt, patchMcpCredential as Y, getModelInfo as Yn, selectableTurnIds as Yt, useMcpAuthDispatch as Z, modelsForDescriptor as Zn, sumRunCosts as Zt, useStreamBuffer as _, mergeKeybindings as _n, SUBAGENT_GUIDANCE as _r, shortId as _t, TOOL_DISPLAY as a, computeLineDiff as an, PLAN_AGENT as ar, createInteractionTools as at, discoverProjectSkills as b, stripJsonComments as bn, buildPlanSystem as br, DEFAULT_SETTINGS as bt, ThemeProvider as c, splitLines as cn, singleAgentRegistry as cr, pendingInteractionsFromTurns as ct, useSurfaces as d, DEFAULT_KEYBINDINGS as dn, DOING_TASKS_DOCTRINE as dr, useInteractionsQueue as dt, toolResultText as en, piIdOf as er, reduceMcpAuth as et, useSyntaxStyles as f, KEYBINDING_DEFS as fn, IDENTITY_PREFIX as fr, cleanTitle as ft, turnContextSize as g, matchesBinding as gn, PLAN_MODE_DOCTRINE_NO_PROMPTS as gr, fmtTokens as gt, finalizeStreamingMarkdownForOwner as h, keybindingsPath as hn, PLAN_MODE_DOCTRINE as hr, compactPath as ht, turnAsText as i, computeInlineDiff as in, DEFAULT_PERSIST_EXCLUDE_TOOLS as ir, buildResumedToolResultsTurn as it, matchesSafelistEntry as j, useCompletion as jn, CATPPUCCIN_FRAPPE as jt, getSafelist as k, findActiveTrigger as kn, resolveTheme as kt, useColors as l, tokenize as ln, ACTIONS_WITH_CARE_DOCTRINE as lr, serializeInteractionResponse as lt, finalizeStreamingMarkdown as m, ensureKeybindingsFile as mn, INTERACTION_GUIDANCE_NO_PROMPTS as mr, ageString as mt, deleteTurnSafely as n, buildContextualDiff as nn, BUILTIN_AGENTS as nr, InteractionsProvider as nt, displayNameFor as o, extractEditPayload as on, accentColor as or, isInteractionTool as ot, useTheme as p, KEYBINDING_DEF_BY_ACTION as pn, INTERACTION_GUIDANCE as pr, generateSessionTitle as pt, createFileMcpCredentialStore as q, effectiveContextWindow as qn, marginTopFor as qt, truncateTurnsAt as r, buildUnifiedDiff as rn, DEFAULT_AGENT_ID as rr, PRESENT_PLAN_TOOL as rt, formatToolCall as s, filetypeFromPath as sn, resolveAgentId as sr, makeRequestInteraction as st, countNeighbors as t, turnSelectionOwnership as tn, BUILD_AGENT as tr, ASK_USER_TOOL as tt, useSelectStyle as u, findGitRoot$1 as un, COMMUNICATION_DOCTRINE as ur, useInteractionsActions as ut, buildSkillsConfig as v, parseBindingSpec as vn, TOKEN_DISCIPLINE_DOCTRINE as vr, listProjectFiles as vt, SafeModeProvider as w, FILES_TRIGGER as wn, clampFps as wt, renderSession as x, SKILLS_TRIGGER as xn, envSection as xr, SETTINGS_CHOICES as xt, defaultSkillScanPaths as y, readKeybindings as yn, buildBuildSystem as yr, useEnabledToggleSet as yt, buildModelCatalog as z, removeProviderCredential as zn, deriveSessionTitle as zt };
|
|
6106
6541
|
|
|
6107
|
-
//# sourceMappingURL=turn-operations-
|
|
6542
|
+
//# sourceMappingURL=turn-operations-CDmQ2h-T.js.map
|