zidane 6.6.0 → 6.6.2
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-EFzMJPxa.js → acp-BQqhozmt.js} +2 -2
- package/dist/{acp-EFzMJPxa.js.map → acp-BQqhozmt.js.map} +1 -1
- package/dist/acp-cli.js +3 -3
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-ut6nQRnI.js → agent-DTxH7RHW.js} +40 -7
- package/dist/agent-DTxH7RHW.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{auth-BaLBiz0r.js → auth-7rv6ZfWk.js} +2 -2
- package/dist/{auth-BaLBiz0r.js.map → auth-7rv6ZfWk.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +88 -5
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-A1qz0l55.d.ts → index-D0O-QO7Z.d.ts} +72 -1
- package/dist/index-D0O-QO7Z.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +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/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-OobhXAK1.d.ts → tool-formatters-NrzD6Fkk.d.ts} +20 -3
- package/dist/{tool-formatters-OobhXAK1.d.ts.map → tool-formatters-NrzD6Fkk.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-ChTtfDdM.js → transcript-anchors-BjH-68k2.js} +661 -37
- package/dist/transcript-anchors-BjH-68k2.js.map +1 -0
- package/dist/{transcript-anchors-0midxNxf.d.ts → transcript-anchors-UhC58Tmj.d.ts} +3 -3
- package/dist/transcript-anchors-UhC58Tmj.d.ts.map +1 -0
- package/dist/tui.d.ts +33 -5
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +864 -193
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-JtKQfSFC.d.ts → turn-operations-Cuc9pwiB.d.ts} +3 -3
- package/dist/{turn-operations-JtKQfSFC.d.ts.map → turn-operations-Cuc9pwiB.d.ts.map} +1 -1
- package/dist/{turn-operations-7_Ff7INF.js → turn-operations-mMxDRgLY.js} +65 -3
- package/dist/{turn-operations-7_Ff7INF.js.map → turn-operations-mMxDRgLY.js.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CHAT.md +30 -5
- package/docs/INTERACTIONS.md +11 -0
- package/docs/TUI.md +22 -2
- package/package.json +1 -1
- package/dist/agent-ut6nQRnI.js.map +0 -1
- package/dist/index-A1qz0l55.d.ts.map +0 -1
- package/dist/transcript-anchors-0midxNxf.d.ts.map +0 -1
- package/dist/transcript-anchors-ChTtfDdM.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Al as CompletionReference, Bh as TurnUsage, Ed as StreamEvent, Rl as Command, _d as EditOutcome, bh as SessionTurn, fg as SkillConfig, jh as ToolResultContent, kl as CompletionProvider, xd as Owner, yd as EditPayload } from "./index-
|
|
2
|
-
import { B as ApprovalDecision } from "./tool-formatters-
|
|
1
|
+
import { Al as CompletionReference, Bh as TurnUsage, Ed as StreamEvent, Rl as Command, _d as EditOutcome, bh as SessionTurn, fg as SkillConfig, jh as ToolResultContent, kl as CompletionProvider, xd as Owner, yd as EditPayload } from "./index-D0O-QO7Z.js";
|
|
2
|
+
import { B as ApprovalDecision } from "./tool-formatters-NrzD6Fkk.js";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/color-gradient.d.ts
|
|
5
5
|
/**
|
|
@@ -684,4 +684,4 @@ declare function countNeighbors(turnIds: readonly string[], turnId: string): {
|
|
|
684
684
|
} | null;
|
|
685
685
|
//#endregion
|
|
686
686
|
export { uniqueFilesFromReferences as $, buildUnifiedDiff as A, buildEditOutcomesAnnotation as B, EditSummary as C, PreviewResult as D, InlineSegment as E, previewEditPayload as F, rewriteMultiEditHeader as G, mergeApprovalAndBodyOutcomes as H, splitLines as I, SKILLS_TRIGGER as J, stripEditOutcomesAnnotation as K, summarizeEditPayload as L, computeLineDiff as M, extractEditPayload as N, applyEditPayload as O, filetypeFromPath as P, createFilesCompletionProvider as Q, tokenize as R, EditHunkSummary as S, InlineDiff as T, parseEditOutcomesFromResult as U, maskToOutcomeKinds as V, resolveApprovalForPayload as W, uniqueSkillNamesFromReferences as X, createSkillsCompletionProvider as Y, FILES_TRIGGER as Z, formatTaskSummary as _, MAX_TRANSCRIPT_EVENTS as a, CHATS_TRIGGER as at, DiffLine as b, finalizeStreamingMarkdown as c, ChatReferenceScope as ct, ageString as d, uniqueChatIdsFromReferences as dt, FileEntry as et, compactPath as f, blendHsl as ft, formatTaskStatus as g, formatDuration as h, turnAsText as i, createCommandsCompletionProvider as it, computeInlineDiff as j, buildContextualDiff as k, finalizeStreamingMarkdownForOwner as l, chatReferenceTokensFromText as lt, fmtTokens as m, deleteTurnSafely as n, listProjectFiles as nt, TRANSCRIPT_TRIM_TO_EVENTS as o, ChatReferenceData as ot, fmtCost as p, buildLinearRamp as pt, summarizeOutcomes as q, truncateTurnsAt as r, COMMANDS_TRIGGER as rt, capTranscriptEvents as s, ChatReferenceEntry as st, countNeighbors as t, ListProjectFilesOptions as tt, turnContextSize as u, createChatsCompletionProvider as ut, previewLine as v, HunkResolution as w, DiffOp as x, shortId as y, ResolvedApproval as z };
|
|
687
|
-
//# sourceMappingURL=turn-operations-
|
|
687
|
+
//# sourceMappingURL=turn-operations-Cuc9pwiB.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-operations-
|
|
1
|
+
{"version":3,"file":"turn-operations-Cuc9pwiB.d.ts","names":[],"sources":["../src/chat/color-gradient.ts","../src/chat/completion-chats.ts","../src/chat/completion-commands.ts","../src/chat/files-discovery.ts","../src/chat/completion-files.ts","../src/chat/completion-skills.ts","../src/chat/edit-approval.ts","../src/tools/edit-utils.ts","../src/chat/edit-diff.ts","../src/chat/format.ts","../src/chat/streaming-pure.ts","../src/chat/turn-operations.ts"],"mappings":";;;;;;;;iBAmFgB,QAAA,CAAS,IAAA,UAAc,EAAA,UAAY,CAAA;;;;;;iBAuBnC,eAAA,CAAgB,IAAA,UAAc,EAAA,UAAY,CAAA;;;cCxF7C,aAAA;AAAA,KAKD,kBAAA;AAAA,UAEK,kBAAA;EACf,EAAA;EACA,KAAA;EACA,SAAA;EACA,gBAAA;EACA,QAAA;EACA,WAAA;EACA,SAAA;AAAA;AAAA,UAGe,iBAAA;EACf,KAAA,EAAO,kBAAkB;EACzB,KAAA;AAAA;AAAA,iBAmIc,6BAAA,CAA8B,IAAA;EAC5C,UAAA,iBAA2B,kBAAA;EAC3B,mBAAA,kBA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;AVzEqD;;;;ACxFnE;;;;AAA0B;AAK1B;iBUUgB,eAAA,CAAgB,KAAA,WAAgB,WAAA,IAAe,MAAA,WAAiB,WAAW;;;AVV7D;AAE9B;;;;;;;;;;;;AAOW;AAGX;iBUuBgB,gBAAA,CAAiB,KAAA,WAAgB,WAAA,IAAe,MAAA,WAAiB,WAAW;;;;;;;AVrBrF;AAmIP;iBUtDgB,UAAA,CAAW,IAAiB,EAAX,WAAW;;;;;;iBA+B5B,cAAA,CACd,OAAA,qBACA,MAAA;EACG,MAAA;EAAgB,KAAA;AAAA"}
|
|
@@ -2237,12 +2237,19 @@ function isSpaceOrBreak(ch) {
|
|
|
2237
2237
|
* `modelsFor` is injected (not imported from `./providers`) so the same
|
|
2238
2238
|
* helper works with hosts that supply their own model resolver via
|
|
2239
2239
|
* `ResolvedConfig.modelsFor`.
|
|
2240
|
+
*
|
|
2241
|
+
* `include` guarantees a pair is listed even when the provider stopped
|
|
2242
|
+
* serving it. Persisted picks outlive catalogs (a provider retires an id, a
|
|
2243
|
+
* user typed one by hand), and an entry that isn't in the list can't be
|
|
2244
|
+
* selected away from, and the picker would keep re-persisting it. Synthesized
|
|
2245
|
+
* entries carry `offCatalog: true` and a stub `ModelInfo`.
|
|
2240
2246
|
*/
|
|
2241
2247
|
function buildModelCatalog(opts) {
|
|
2242
2248
|
const entries = [];
|
|
2243
2249
|
for (const provider of opts.providers) {
|
|
2244
2250
|
const models = opts.modelsFor(provider.key);
|
|
2245
|
-
|
|
2251
|
+
const missing = missingIdsFor(provider.key, models, opts.include);
|
|
2252
|
+
if (models.length === 0 && missing.length === 0) continue;
|
|
2246
2253
|
let ordered = models;
|
|
2247
2254
|
if (opts.current?.providerKey === provider.key) {
|
|
2248
2255
|
const idx = models.findIndex((m) => m.id === opts.current?.modelId);
|
|
@@ -2253,6 +2260,19 @@ function buildModelCatalog(opts) {
|
|
|
2253
2260
|
ordered = next;
|
|
2254
2261
|
}
|
|
2255
2262
|
}
|
|
2263
|
+
for (const modelId of missing) {
|
|
2264
|
+
const model = {
|
|
2265
|
+
id: modelId,
|
|
2266
|
+
contextWindow: 0
|
|
2267
|
+
};
|
|
2268
|
+
entries.push({
|
|
2269
|
+
providerKey: provider.key,
|
|
2270
|
+
providerLabel: provider.label,
|
|
2271
|
+
model,
|
|
2272
|
+
offCatalog: true,
|
|
2273
|
+
searchCorpus: buildSearchCorpus(provider, model)
|
|
2274
|
+
});
|
|
2275
|
+
}
|
|
2256
2276
|
for (const model of ordered) entries.push({
|
|
2257
2277
|
providerKey: provider.key,
|
|
2258
2278
|
providerLabel: provider.label,
|
|
@@ -2262,6 +2282,17 @@ function buildModelCatalog(opts) {
|
|
|
2262
2282
|
}
|
|
2263
2283
|
return entries;
|
|
2264
2284
|
}
|
|
2285
|
+
/** Ids `include` asks for on this provider that its own list doesn't serve. */
|
|
2286
|
+
function missingIdsFor(providerKey, models, include) {
|
|
2287
|
+
if (!include || include.length === 0) return [];
|
|
2288
|
+
const served = new Set(models.map((m) => m.id));
|
|
2289
|
+
const out = [];
|
|
2290
|
+
for (const pair of include) {
|
|
2291
|
+
if (pair.providerKey !== providerKey || !pair.modelId || served.has(pair.modelId) || out.includes(pair.modelId)) continue;
|
|
2292
|
+
out.push(pair.modelId);
|
|
2293
|
+
}
|
|
2294
|
+
return out;
|
|
2295
|
+
}
|
|
2265
2296
|
/**
|
|
2266
2297
|
* Filter `catalog` by a user query. Empty / whitespace-only queries
|
|
2267
2298
|
* pass everything through unchanged (`O(1)` short-circuit). Multi-term
|
|
@@ -2287,6 +2318,37 @@ function indexOfEntry(catalog, target) {
|
|
|
2287
2318
|
if (!target) return -1;
|
|
2288
2319
|
return catalog.findIndex((e) => e.providerKey === target.providerKey && e.model.id === target.modelId);
|
|
2289
2320
|
}
|
|
2321
|
+
/**
|
|
2322
|
+
* Read a query that matched nothing as "use this model id anyway".
|
|
2323
|
+
*
|
|
2324
|
+
* A bare id is meaningless without a provider, so the first term is checked
|
|
2325
|
+
* against every provider's key and label (case-insensitive): `xai grok-9` and
|
|
2326
|
+
* `Anthropic claude-next` name their provider explicitly, anything else is
|
|
2327
|
+
* attributed to `fallbackProviderKey` (the picker's current pick). Returns
|
|
2328
|
+
* `null` when nothing usable is left, including when the whole query is just a
|
|
2329
|
+
* provider name.
|
|
2330
|
+
*/
|
|
2331
|
+
function parseCustomModelQuery(query, providers, fallbackProviderKey) {
|
|
2332
|
+
const trimmed = query.trim().replace(/\s+/g, " ");
|
|
2333
|
+
if (!trimmed) return null;
|
|
2334
|
+
const lower = trimmed.toLowerCase();
|
|
2335
|
+
const named = providers.flatMap((p) => [{
|
|
2336
|
+
provider: p,
|
|
2337
|
+
token: p.label.toLowerCase()
|
|
2338
|
+
}, {
|
|
2339
|
+
provider: p,
|
|
2340
|
+
token: p.key.toLowerCase()
|
|
2341
|
+
}]).filter((candidate) => lower.startsWith(`${candidate.token} `)).sort((a, b) => b.token.length - a.token.length)[0];
|
|
2342
|
+
const provider = named?.provider ?? providers.find((p) => p.key === fallbackProviderKey);
|
|
2343
|
+
if (!provider) return null;
|
|
2344
|
+
const modelId = named ? trimmed.slice(named.token.length).trim() : trimmed;
|
|
2345
|
+
if (!modelId) return null;
|
|
2346
|
+
return {
|
|
2347
|
+
providerKey: provider.key,
|
|
2348
|
+
providerLabel: provider.label,
|
|
2349
|
+
modelId
|
|
2350
|
+
};
|
|
2351
|
+
}
|
|
2290
2352
|
function buildSearchCorpus(provider, model) {
|
|
2291
2353
|
return [
|
|
2292
2354
|
provider.key,
|
|
@@ -2938,6 +3000,6 @@ function countNeighbors(turnIds, turnId) {
|
|
|
2938
3000
|
};
|
|
2939
3001
|
}
|
|
2940
3002
|
//#endregion
|
|
2941
|
-
export {
|
|
3003
|
+
export { applyEditPayload as $, SKILLS_TRIGGER as A, BASH_CALL_ID_PREFIX as B, MARKDOWN_RENDER_CHUNK_TARGET_BYTES as C, normalizeMarkdownCodeFences as D, codeTokenHasClosingFence as E, uniqueFilesFromReferences as F, isVisible as G, isEditErrorResult as H, COMMANDS_TRIGGER as I, retagUserPromptEvents as J, isVisibleDuringSearch as K, createCommandsCompletionProvider as L, uniqueSkillNamesFromReferences as M, FILES_TRIGGER as N, splitMarkdownCodeBlocks as O, createFilesCompletionProvider as P, turnSelectionOwnership as Q, blendHsl as R, parseCustomModelQuery as S, uniqueChatIdsFromReferences as St, closeDanglingCodeFence as T, isTurnHighlighted as U, EDIT_TOOL_NAMES as V, isUserBashEvent as W, selectionAfterTurnRemoval as X, selectableTurnIds as Y, streamEventSearchText as Z, turnContextSize as _, stripEditOutcomesAnnotation as _t, TOOL_DISPLAY as a, extractEditPayload as at, filterModelCatalog as b, chatReferenceTokensFromText as bt, MAX_TRANSCRIPT_EVENTS as c, splitLines as ct, finalizeStreamingMarkdown as d, buildEditOutcomesAnnotation as dt, buildContextualDiff as et, finalizeStreamingMarkdownForOwner as f, maskToOutcomeKinds as ft, revealEarlierTranscriptEvents as g, rewriteMultiEditHeader as gt, replaceTranscriptTurnEvents as h, resolveApprovalForPayload as ht, turnAsText as i, computeLineDiff as it, createSkillsCompletionProvider as j, stripHtmlCommentsOutsideCode as k, TRANSCRIPT_TRIM_TO_EVENTS as l, summarizeEditPayload as lt, ownerOf as m, parseEditOutcomesFromResult as mt, deleteTurnSafely as n, clipDiffForRender as nt, displayNameFor as o, filetypeFromPath as ot, hiddenEarlierTranscriptCount as p, mergeApprovalAndBodyOutcomes as pt, promptHistoryFromEvents as q, truncateTurnsAt as r, computeInlineDiff as rt, formatToolCall as s, previewEditPayload as st, countNeighbors as t, buildUnifiedDiff as tt, capTranscriptEvents as u, tokenize as ut, splitPromptSegments as v, summarizeOutcomes as vt, chunkMarkdownForRender as w, indexOfEntry as x, createChatsCompletionProvider as xt, buildModelCatalog as y, CHATS_TRIGGER as yt, buildLinearRamp as z };
|
|
2942
3004
|
|
|
2943
|
-
//# sourceMappingURL=turn-operations-
|
|
3005
|
+
//# sourceMappingURL=turn-operations-mMxDRgLY.js.map
|