zidane 6.2.13 → 6.2.14

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.
@@ -1,4 +1,4 @@
1
1
  import { $c as CompletionProvider, Ad as ContextCategory, Dd as ContextBreakdownContributionContext, Ed as ContextBreakdown, Fd as ContextItem, Id as ContextMcpGroup, Ld as ContextSnapshot, Md as ContextExactCounts, Nd as ContextExtensionRow, Od as ContextBreakdownContributor, Pd as ContextExtensionSection, Qc as CompletionItem, Rd as ContextUsageSplit, Xc as ActiveTrigger, Zc as CompletionContext, al as mergeReferences, el as CompletionReference, il as findActiveTrigger, jd as ContextCategoryId, kd as ContextBreakdownOptions, nl as applyInsert, rl as collectReferences, zd as buildContextBreakdown } from "../index-l0wehkWU.js";
2
- import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, I as splitLines, J as SKILLS_TRIGGER, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId } from "../turn-operations-CjkgQKmR.js";
3
- import { A as turnSelectionOwnership, D as isTurnHighlighted, E as isEditErrorResult, O as isVisible, T as EDIT_TOOL_NAMES, _ as splitMarkdownCodeBlocks, a as formatToolCall, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, k as selectableTurnIds, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog } from "../tool-formatters-BSwVkSX2.js";
4
- export { type ActiveTrigger, CHATS_TRIGGER, type CatalogEntry, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type DiffLine, type DiffOp, EDIT_TOOL_NAMES, type EditHunkSummary, type EditSummary, FILES_TRIGGER, type HunkResolution, type InlineDiff, type InlineSegment, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type PreviewResult, type PromptSegment, type PromptSegmentRef, SKILLS_TRIGGER, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type ToolDisplayMeta, type ToolFormatLine, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, indexOfEntry, isEditErrorResult, isTurnHighlighted, isVisible, mergeReferences, normalizeMarkdownCodeFences, previewEditPayload, previewLine, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
2
+ import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, I as splitLines, J as SKILLS_TRIGGER, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId } from "../turn-operations-sE-Sli9H.js";
3
+ import { $ as turnSelectionOwnership, A as highlightSegments, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, I as searchSessionIndexAsync, J as isEditErrorResult, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, X as isVisible, Y as isTurnHighlighted, Z as selectableTurnIds, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, q as EDIT_TOOL_NAMES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "../tool-formatters-DdgS-xE2.js";
4
+ export { type ActiveTrigger, CHATS_TRIGGER, type CatalogEntry, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type DiffLine, type DiffOp, EDIT_TOOL_NAMES, type EditHunkSummary, type EditSummary, FILES_TRIGGER, type HighlightRange, type HighlightSegment, type HunkResolution, type IndexedSearchTurn, type InlineDiff, type InlineSegment, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type PreviewResult, type PromptSegment, type PromptSegmentRef, SKILLS_TRIGGER, type SearchExcerpt, type SearchSessionResult, type SearchTurnResult, type SessionHistoryMatch, type SessionSearchExcerpt, type SessionSearchIndex, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type ToolDisplayMeta, type ToolFormatLine, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, highlightSegments, indexOfEntry, isEditErrorResult, isTurnHighlighted, isVisible, mergeReferences, normalizeMarkdownCodeFences, previewEditPayload, previewLine, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
package/dist/chat/pure.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { t as buildContextBreakdown } from "../context-breakdown-Dzo25N45.js";
2
2
  import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, n as compactPath, o as formatTaskStatus, r as fmtCost, s as formatTaskSummary, t as ageString } from "../format-BF745pLL.js";
3
3
  import { a as mergeReferences, n as collectReferences, r as findActiveTrigger, t as applyInsert } from "../completion-core-BRo86R_L.js";
4
- import { A as blendHsl, B as turnSelectionOwnership, D as FILES_TRIGGER, E as uniqueSkillNamesFromReferences, F as isTurnHighlighted, G as computeInlineDiff, H as buildContextualDiff, J as filetypeFromPath, K as computeLineDiff, L as isVisible, N as EDIT_TOOL_NAMES, O as createFilesCompletionProvider, P as isEditErrorResult, Q as tokenize, S as splitMarkdownCodeBlocks, T as createSkillsCompletionProvider, U as buildUnifiedDiff, V as applyEditPayload, X as splitLines, Y as previewEditPayload, Z as summarizeEditPayload, _ as filterModelCatalog, a as TOOL_DISPLAY, b as chunkMarkdownForRender, c as MAX_TRANSCRIPT_EVENTS, ct as chatReferenceTokensFromText, d as finalizeStreamingMarkdown, f as finalizeStreamingMarkdownForOwner, g as buildModelCatalog, h as splitPromptSegments, i as turnAsText, j as buildLinearRamp, k as uniqueFilesFromReferences, l as TRANSCRIPT_TRIM_TO_EVENTS, lt as createChatsCompletionProvider, m as turnContextSize, n as deleteTurnSafely, o as displayNameFor, ot as summarizeOutcomes, q as extractEditPayload, r as truncateTurnsAt, s as formatToolCall, st as CHATS_TRIGGER, t as countNeighbors, u as capTranscriptEvents, ut as uniqueChatIdsFromReferences, v as indexOfEntry, w as SKILLS_TRIGGER, x as normalizeMarkdownCodeFences, y as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, z as selectableTurnIds } from "../turn-operations-CXjRaltC.js";
5
- export { CHATS_TRIGGER, EDIT_TOOL_NAMES, FILES_TRIGGER, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, SKILLS_TRIGGER, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, indexOfEntry, isEditErrorResult, isTurnHighlighted, isVisible, mergeReferences, normalizeMarkdownCodeFences, previewEditPayload, previewLine, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
4
+ import { $ as extractEditPayload, A as FILES_TRIGGER, B as isVisible, C as chunkMarkdownForRender, D as SKILLS_TRIGGER, I as EDIT_TOOL_NAMES, J as buildContextualDiff, K as turnSelectionOwnership, L as isEditErrorResult, M as uniqueFilesFromReferences, N as blendHsl, O as createSkillsCompletionProvider, P as buildLinearRamp, Q as computeLineDiff, R as isTurnHighlighted, S as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, T as splitMarkdownCodeBlocks, U as selectableTurnIds, Y as buildUnifiedDiff, Z as computeInlineDiff, _ as turnContextSize, a as TOOL_DISPLAY, b as filterModelCatalog, c as MAX_TRANSCRIPT_EVENTS, d as finalizeStreamingMarkdown, et as filetypeFromPath, f as finalizeStreamingMarkdownForOwner, ft as summarizeOutcomes, gt as uniqueChatIdsFromReferences, ht as createChatsCompletionProvider, i as turnAsText, it as tokenize, j as createFilesCompletionProvider, k as uniqueSkillNamesFromReferences, l as TRANSCRIPT_TRIM_TO_EVENTS, mt as chatReferenceTokensFromText, n as deleteTurnSafely, nt as splitLines, o as displayNameFor, pt as CHATS_TRIGGER, q as applyEditPayload, r as truncateTurnsAt, rt as summarizeEditPayload, s as formatToolCall, t as countNeighbors, tt as previewEditPayload, u as capTranscriptEvents, v as splitPromptSegments, w as normalizeMarkdownCodeFences, x as indexOfEntry, y as buildModelCatalog } from "../turn-operations-CokV32wf.js";
5
+ import { a as searchHighlightRanges, c as searchSessionHistoryIndexAsync, d as searchSessionTurns, f as searchTurns, i as highlightSegments, l as searchSessionIndex, n as buildSessionSearchIndexAsync, o as searchSessionHistory, p as searchableTurnText, r as filterSessionSearchCatalog, s as searchSessionHistoryIndex, t as buildSessionSearchIndex, u as searchSessionIndexAsync } from "../history-search-C4bk1Wz_.js";
6
+ export { CHATS_TRIGGER, EDIT_TOOL_NAMES, FILES_TRIGGER, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, SKILLS_TRIGGER, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, highlightSegments, indexOfEntry, isEditErrorResult, isTurnHighlighted, isVisible, mergeReferences, normalizeMarkdownCodeFences, previewEditPayload, previewLine, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
package/dist/chat.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { $c as CompletionProvider, $l as useInteractionsQueue, $u as ProviderKey, Ac as ChipColor, Ad as ContextCategory, Al as InteractionsProvider, Ao as ExtensionSessionStateSurface, Au as EditDiffDisplay, Bc as resolveTheme, Bl as QuestionPayload, Bu as StreamEvent, Ca as scanExtensionDirectories, Cd as OUTPUT_RESERVE_TOKENS, Cl as ASK_USER_TOOL, Co as ExtensionPaths, Cu as DEFAULT_AGENT_ID, Dd as ContextBreakdownContributionContext, Dl as InteractionRequest, Do as ExtensionRegistry, Du as accentColor, Ed as ContextBreakdown, El as CreateInteractionToolsOptions, Eo as ExtensionProviderMiddleware, Eu as PLAN_AGENT, Fc as Theme, Fd as ContextItem, Fi as AgentHookMap, Fl as PlanRequest, Fo as ExtensionToolCatalogTransform, Fu as Owner, Gc as patchInlineGhost, Gi as buildExtensionRegistry, Gl as TextQuestion, Gu as chainsEqual, H as McpCredentialStore, Hc as InlineAutocompleteProvider, Hi as BuildExtensionRegistryOptions, Hl as QuestionResponse, Hu as ModelChainEntry, Ic as ThemeColors, Id as ContextMcpGroup, Ii as AgentHooks, Il as PlanResponse, Iu as Picked, Jc as CompletionState, Ji as filterExtensionRegistry, Jl as isInteractionTool, Jo as TuiContributions, Ju as restoreChainFallbacks, Kc as resolveInlineSuggestion, Ki as composeExtensionPreset, Kl as buildResumedToolResultsTurn, Ko as GuiContributions, Ku as filterChainFallbacks, Lc as ThemeSelect, Ld as ContextSnapshot, Ll as PlanStep, Lu as Screen, Mc as DEFAULT_THEME, Md as ContextExactCounts, Ml as PendingInteractionEntry, Mo as ExtensionSource, Mu as EditOutcome, Nc as SyntaxStyles, Nd as ContextExtensionRow, Nl as PlanDecision, No as ExtensionStorageScope, Nu as EditOutcomeKind, Od as ContextBreakdownContributor, Ol as InteractionResponse, Oo as ExtensionRunTransform, Ou as resolveAgentId, Pc as SyntaxTokenStyle, Pd as ContextExtensionSection, Pl as PlanPayload, Po as ExtensionStorageSurface, Pu as EditPayload, Qc as CompletionItem, Ql as useInteractionsActions, Qu as ProviderAuth, Rc as ThemeSurfaces, Rd as ContextUsageSplit, Rl as Question, Ru as SessionMeta, Sd as AutoCompactInput, Sl as parseCommandInvocation, So as ExtensionOrderedContribution, Su as BUILTIN_AGENTS, Td as shouldAutoCompact, Tf as SessionTurn, Tl as ConfirmQuestion, Tu as DEFAULT_PERSIST_EXCLUDE_TOOLS, Uc as InlineGhost, Ul as QuestionType, Uu as buildRunModel, V as McpCredentialEntry, Vc as InlineAutocompleteContext, Vl as QuestionRequest, Vo as ExtensionToolResultMetadataRegistration, Vu as ToolCallDisplay, Wc as createPathAutocompleteProvider, Wd as AutoCompact, Wi as buildExtensionPreset, Wl as SelectQuestion, Wu as chainPositionOf, Xc as ActiveTrigger, Xi as partitionExtensionCatalog, Xl as pendingInteractionsFromTurns, Xu as toggleChainEntry, Yc as useCompletion, Yi as mergeContributions, Yl as makeRequestInteraction, Yu as sanitizeModelChain, Zc as CompletionContext, Zl as serializeInteractionResponse, Zp as Provider, Zu as AuthMethod, _d as openrouterDescriptor, _l as CommandStep, _o as ExtensionKeybindingDispatchContext, ac as SourcedScanPath, ad as ProviderDescriptor, al as mergeReferences, ao as ExtensionBehaviorTransform, ap as SkillConfig, ba as inlineLoadedExtension, bd as AUTO_COMPACT_MIN_GROWTH_FRACTION, bi as generateStructuredData, bl as commandSteps, bo as ExtensionModal, bu as AgentRegistry, cd as credKeyOf, cl as CommandAgentResult, dd as getModelInfo, dp as Session, ed as detectAuth, el as CompletionReference, fd as localDescriptor, fo as ExtensionDefinition, gd as openaiDescriptor, go as ExtensionKeybinding, hd as modelsForDescriptor, hp as SessionStore, id as ModelOption, il as findActiveTrigger, io as ExtensionApiVersion, jc as ChipColorMap, jd as ContextCategoryId, jl as PRESENT_PLAN_TOOL, jo as ExtensionSkillPolicy, ju as EditHunk, ka as defineExtension, kc as BUILTIN_THEMES, kd as ContextBreakdownOptions, kl as InteractionsActions, ko as ExtensionRuntimeEnv, ku as singleAgentRegistry, ld as enabledModelOptions, lo as ExtensionContributions, lp as SkillsConfig, md as modelSupportsReasoning, ml as CommandOutputBlock, mo as ExtensionGuiPanel, nd as CustomField, nl as applyInsert, od as anthropicDescriptor, oo as ExtensionCapability, pd as modelOptionsFor, pl as CommandInvocation, po as ExtensionFooterHint, qc as tokenEndingAtCursor, qf as ToolDef, qi as disposeExtensionRegistry, ql as createInteractionTools, qo as LoadedExtension, qu as providerKeySetChanged, rd as ModelInfo, rf as McpToolSchema, rl as collectReferences, ro as EMPTY_EXTENSION_REGISTRY, sd as cerebrasDescriptor, sl as Command, so as ExtensionContext, t as Preset, td as BUILTIN_PROVIDERS, tf as McpServerConfig, ud as getContextWindow, ul as CommandExecution, va as defaultExtensionScanPaths, vd as piIdOf, vl as CommandStepContext, vo as ExtensionManifest, vu as AgentAccent, wd as effectiveContextWindow, wl as AnswerValue, wo as ExtensionPermission, wu as DEFAULT_BUDGET_EXCLUDE_TOOLS, xd as AutoCompactDecision, xl as executeCommand, xu as BUILD_AGENT, ya as discoverExtensions, yd as restoreModelOptions, yi as GenerateStructuredDataOptions, yl as CommandStepFn, yo as ExtensionMcpConfigTransform, yu as AgentProfile, zc as resolveChipColor, zd as buildContextBreakdown, zl as QuestionChoice, zu as Settings } from "./index-l0wehkWU.js";
2
2
  import { $ as KEYBINDING_KEY_COL_WIDTH, A as resolveStorageDirs, B as loadState, C as ResolvedPaths, D as StorageDirs, E as ResolveStorageDirsOptions, F as createStateStore, G as titleFromTurns, H as saveState, I as deriveSessionTitle, J as updateToolEventOutcomes, K as toolCallPreview, L as eventsFromTurns, M as StateStoreApi, N as TuiState, O as StorageMode, P as compactSummaryEvent, Q as KEYBINDING_DEF_BY_ACTION, R as lastContextSizeFromTurns, S as ResolvedConfig, T as resolveStoragePaths, U as stripSpawnTokensLine, V as marginTopFor, W as sumRunCosts, X as DEFAULT_KEYBINDINGS, Y as usageByModel, Z as KEYBINDING_DEFS, _ as discoverProjectMcps, _t as EMPTY_HINTS, a as SessionExportTarget, at as ResolvedExtensionKeybinding, b as ChatOptions, bt as hintsLength, c as writeSessionExport, ct as groupBindings, d as useEnabledToggleSet, dt as mergeKeybindings, et as KeyAction, f as DiscoveredMcp, ft as parseBindingSpec, g as defaultMcpsConfigPaths, gt as stripJsonComments, h as buildMcpServers, ht as resolveExtensionKeybindings, i as SessionExportFormat, it as ParsedBinding, j as ModelUsageSummary, k as StorageSlot, l as EnabledAllowlistKey, lt as keybindingsPath, m as DiscoveryResult, mt as readKeybindingsRaw, n as computeTurnAnchors, nt as KeyBindingSection, o as renderSession, ot as ensureKeybindingsFile, p as DiscoveryError, pt as readKeybindings, q as toolResultText, r as SessionExportAnchor, rt as KeyBindings, s as resolveSessionExportTarget, st as formatBindingForDisplay, t as TranscriptItem, tt as KeyBindingDef, u as EnabledToggleSet, ut as matchesBinding, v as parseMcpsFile, vt as Hint, w as resolveConfig, x as ProviderRegistry, xt as truncateTrailing, y as AutoUpdateConfig, yt as clipHintsToWidth, z as listSessionMeta } from "./transcript-anchors-DKjXpQ0h.js";
3
- import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, B as buildEditOutcomesAnnotation, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, G as rewriteMultiEditHeader, H as mergeApprovalAndBodyOutcomes, I as splitLines, J as SKILLS_TRIGGER, K as stripEditOutcomesAnnotation, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, U as parseEditOutcomesFromResult, V as maskToOutcomeKinds, W as resolveApprovalForPayload, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, et as FileEntry, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, nt as listProjectFiles, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, tt as ListProjectFilesOptions, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId, z as ResolvedApproval } from "./turn-operations-CjkgQKmR.js";
4
- import { A as turnSelectionOwnership, C as useSafeModeActions, D as isTurnHighlighted, E as isEditErrorResult, O as isVisible, S as SafeModeProvider, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as RequestApproval, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, k as selectableTurnIds, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog, v as ApprovalDecision, w as useSafeModeQueue, x as SafeModeActions, y as ApprovalRequest } from "./tool-formatters-BSwVkSX2.js";
3
+ import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, B as buildEditOutcomesAnnotation, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, G as rewriteMultiEditHeader, H as mergeApprovalAndBodyOutcomes, I as splitLines, J as SKILLS_TRIGGER, K as stripEditOutcomesAnnotation, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, U as parseEditOutcomesFromResult, V as maskToOutcomeKinds, W as resolveApprovalForPayload, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, et as FileEntry, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, nt as listProjectFiles, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, tt as ListProjectFilesOptions, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId, z as ResolvedApproval } from "./turn-operations-sE-Sli9H.js";
4
+ import { $ as turnSelectionOwnership, A as highlightSegments, B as ApprovalDecision, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, G as useSafeModeActions, H as RequestApproval, I as searchSessionIndexAsync, J as isEditErrorResult, K as useSafeModeQueue, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, Q as selectionAfterTurnRemoval, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, U as SafeModeActions, V as ApprovalRequest, W as SafeModeProvider, X as isVisible, Y as isTurnHighlighted, Z as selectableTurnIds, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "./tool-formatters-DdgS-xE2.js";
5
5
  import { Hookable } from "hookable";
6
6
  import { spawn } from "node:child_process";
7
7
  import { OAuthCredentials, OAuthDeviceCodeInfo, OAuthPrompt, OAuthPrompt as OAuthPrompt$1, OAuthSelectPrompt } from "@earendil-works/pi-ai/oauth";
@@ -2413,5 +2413,5 @@ declare function renderActiveTodoAnchor(todos: readonly TodoItem[], options?: Ac
2413
2413
  */
2414
2414
  declare function createActiveTodoAnchorHooks(options?: ActiveTodoAnchorOptions): AgentHookMap;
2415
2415
  //#endregion
2416
- export { ACTIONS_WITH_CARE_DOCTRINE, ASK_USER_TOOL, AUTO_COMPACT_MIN_GROWTH_FRACTION, type ActiveTodoAnchorOptions, type ActiveTodosState, type ActiveTrigger, type AgentAccent, type AgentProfile, type AgentRegistry, type AgentsMdFile, type AgentsMdResult, type AnswerValue, type ApiKeyCredential, type ApprovalDecision, type ApprovalRequest, type AuthMethod, type AutoCompactDecision, type AutoCompactInput, type AutoUpdateConfig, BUILD_AGENT, BUILTIN_AGENTS, BUILTIN_PROVIDERS, BUILTIN_THEMES, type BooleanSettingKey, type BuildExtensionRegistryOptions, type BuildHintsOptions, type BuildSystemOptions, type BuildUpdateHintOptions, CATPPUCCIN_FRAPPE, CATPPUCCIN_LATTE, CATPPUCCIN_MACCHIATO, CATPPUCCIN_MOCHA, CHATS_TRIGGER, COMMUNICATION_DOCTRINE, type CachedMcpToolList, type CatalogEntry, type ChatOptions, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type ChatTurnsReadToolOptions, type CheckForUpdateOptions, type ChipColor, type ChipColorMap, type Command, type CommandAgentResult, type CommandExecution, type CommandInvocation, type CommandOutputBlock, type CommandStep, type CommandStepContext, type CommandStepFn, type Commit, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type CompletionState, ConfigProvider, type ConfirmQuestion, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type CreateInteractionToolsOptions, type CreateTodoToolsOptions, type CredentialsFile, type CustomField, DEFAULT_AGENT_ID, DEFAULT_BUDGET_EXCLUDE_TOOLS, DEFAULT_KEYBINDINGS, DEFAULT_PERSIST_EXCLUDE_TOOLS, DEFAULT_SETTINGS, DEFAULT_THEME, DOING_TASKS_DOCTRINE, type DetectPackageManagerOptions, type DiffLine, type DiffOp, type DiscoverAgentsMdOptions, type DiscoveredMcp, type DiscoveryContextValue, type DiscoveryError, DiscoveryProvider, type DiscoveryResult, type DiscoverySlot, type DiscoverySlotOptions, EMPTY_EXTENSION_REGISTRY, EMPTY_HINTS, type EditDiffDisplay, type EditHunk, type EditHunkSummary, type EditOutcome, type EditOutcomeKind, type EditPayload, type EditSummary, type EnabledAllowlistKey, type EnabledToggleSet, type EnvSectionOptions, type ExtensionApiVersion, type ExtensionBehaviorTransform, type ExtensionCapability, type ExtensionContext, type ExtensionContributions, type ExtensionDefinition, type ExtensionFooterHint, type ExtensionGuiPanel, type ExtensionKeybinding, type ExtensionKeybindingDispatchContext, type ExtensionManifest, type ExtensionMcpConfigTransform, type ExtensionModal, type ExtensionOrderedContribution, type ExtensionPaths, type ExtensionPermission, type ExtensionProviderMiddleware, type ExtensionRegistry, type ExtensionRunTransform, type ExtensionRuntimeEnv, type ExtensionSessionStateSurface, type ExtensionSkillPolicy, type ExtensionSource, type ExtensionStorageScope, type ExtensionStorageSurface, type ExtensionToolCatalogTransform, type ExtensionToolResultMetadataRegistration, FILES_TRIGGER, type FetchOAuthRedirectResult, type FileEntry, GRUVBOX_DARK, GRUVBOX_LIGHT, type GenerateSessionTitleOptions, type GenerateStructuredDataOptions, type GuiContributions, type Hint, type HunkResolution, IDENTITY_PREFIX, IMPLICITLY_SAFE_TOOLS, INTERACTION_GUIDANCE, INTERACTION_GUIDANCE_NO_PROMPTS, type InPlaceUpdateResult, type InlineAutocompleteContext, type InlineAutocompleteProvider, type InlineDiff, type InlineGhost, type InlineSegment, type InteractionRequest, type InteractionResponse, type InteractionsActions, InteractionsProvider, KEYBINDING_DEFS, KEYBINDING_DEF_BY_ACTION, KEYBINDING_KEY_COL_WIDTH, type KeyAction, type KeyBindingDef, type KeyBindingSection, type KeyBindings, type ListProjectFilesOptions, type LoadedExtension, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type McpAuthEvent, McpAuthProvider, type McpAuthStateMap, type McpAuthStatus, type McpToolToggleSet, type McpToolsCache, type ModelChainEntry, type ModelInfo, type ModelOption, type ModelUsageSummary, type OAuthCredential, type OAuthFlowOptions, type OAuthPrompt, OUTPUT_RESERVE_TOKENS, type Owner, PLAN_AGENT, PLAN_MODE_DOCTRINE, PLAN_MODE_DOCTRINE_NO_PROMPTS, PRESENT_PLAN_TOOL, type PackageManagerCommand, type PackageManagerId, type ParsedBinding, type PendingInteractionEntry, type PerformInPlaceUpdateOptions, type PerformSelfUpdateOptions, type Picked, type PlanDecision, type PlanPayload, type PlanRequest, type PlanResponse, type PlanStep, type PlatformTarballOptions, type PreviewResult, type ProjectEntry, type ProjectUserPath, type ProjectsFile, type PromptSegment, type PromptSegmentRef, type ProviderAuth, type ProviderCredential, type ProviderDescriptor, type ProviderKey, type ProviderRegistry, type Question, type QuestionChoice, type QuestionPayload, type QuestionRequest, type QuestionResponse, type QuestionType, type RequestApproval, type ResolveStorageDirsOptions, type ResolvedApproval, type ResolvedConfig, type ResolvedExtensionKeybinding, type ResolvedPaths, type RunUpdateCommandOptions, type RunUpdateCommandResult, SETTINGS_CATEGORIES, SETTINGS_CHOICES, SETTINGS_INPUTS, SETTINGS_TOGGLES, SKILLS_TRIGGER, SUBAGENT_GUIDANCE, type SafeModeActions, SafeModeProvider, type Screen, type SelectQuestion, type SelfUpdateResult, type SessionExportAnchor, type SessionExportFormat, type SessionExportTarget, type SessionMeta, type Settings, type SettingsCategory, type SettingsCategoryDescriptor, type SettingsChoice, type SettingsInput, SettingsProvider, type SettingsToggle, type StateStoreApi, type StorageDirs, type StorageMode, type StorageSlot, type StreamBuffer, type StreamEvent, type StreamSource, type StringSettingKey, type SyntaxStyles, type SyntaxTokenStyle, TODOREAD_TOOL, TODOS_METADATA_KEY, TODOWRITE_TOOL, TODO_STATUS_GLYPHS, TODO_WRITE_COUNTS_METADATA_KEY, TOKEN_DISCIPLINE_DOCTRINE, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type TextQuestion, type Theme, type ThemeColors, ThemeProvider, type ThemeSelect, type ThemeSurfaces, type TodoItem, type TodoStatus, type TodoTally, type TodosBag, type ToolCallDisplay, type ToolDisplayMeta, type ToolFormatLine, type TranscriptItem, type TuiContributions, type TuiState, type UpdateStatus, type UseUpdateCheckOptions, VAPORWAVE_THEME, type VisibleMcpRow, type Walk, accentColor, addToSafelist, ageString, anthropicDescriptor, applyApiKeyEnv, applyEditPayload, applyInsert, blendHsl, bootProfileEnabled, bootTick, buildBuildSystem, buildContextBreakdown, buildContextualDiff, buildEditOutcomesAnnotation, buildExtensionPreset, buildExtensionRegistry, buildHints, buildLinearRamp, buildMcpServers, buildModelCatalog, buildPlanSystem, buildResumedToolResultsTurn, buildRunModel, buildSkillsConfig, buildToolToggle, buildUnifiedDiff, buildUpdateHint, buildVisibleMcpRows, capTranscriptEvents, cerebrasDescriptor, chainPositionOf, chainsEqual, chatAutoCompactBehavior, chatReferenceTokensForPrompt, chatReferenceTokensFromText, checkForUpdate, chunkMarkdownForRender, cleanTitle, clearMcpToolsCache, clipHintsToWidth, collectReferences, commandSteps, compactPath, compactSummaryEvent, compareSemver, composeExtensionPreset, computeInlineDiff, computeLineDiff, computeTurnAnchors, countNeighbors, createActiveTodoAnchorHooks, createChatTurnsReadTool, createChatsCompletionProvider, createDiscoverySlot, createFileMcpCredentialStore, createFilesCompletionProvider, createInteractionTools, createPathAutocompleteProvider, createSkillsCompletionProvider, createStateStore, createTodoTools, credKeyOf, credentialsPath, defaultExtensionScanPaths, defaultMcpsConfigPaths, defaultSkillScanPaths, defineExtension, deleteTurnSafely, deriveSessionTitle, detectAuth, detectLibc, detectPackageManager, discoverAgentsMd, discoverExtensions, discoverProjectMcps, discoverProjectSkills, displayNameFor, disposeExtensionRegistry, effectiveContextWindow, enabledModelOptions, ensureKeybindingsFile, envSection, eventsFromTurns, executeCommand, extractEditPayload, fetchOAuthRedirect, filetypeFromPath, filterChainFallbacks, filterExtensionRegistry, filterModelCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, findGitRoot, fmtCost, fmtTokens, formatBindingForDisplay, formatDuration, formatPathForCwd, formatTaskStatus, formatTaskSummary, formatToolCall, generateSessionTitle, generateStructuredData, getArchivedTodosForRun, getContextWindow, getMcpAuthStatus, getModelInfo, getSafelist, getTodosForRun, groupBindings, hintsLength, indexOfEntry, indexOfServerRow, inlineLoadedExtension, isEditErrorResult, isInteractionTool, isOnSafelist, isTodoTool, isTurnHighlighted, isVisible, keybindingsPath, lastContextSizeFromTurns, listProjectFiles, listSessionMeta, loadMcpToolsCache, loadState, localDescriptor, makeRequestInteraction, marginTopFor, maskToOutcomeKinds, matchesBinding, matchesSafelistEntry, mcpCredentialsPath, mcpToolsCachePath, mergeApprovalAndBodyOutcomes, mergeContributions, mergeKeybindings, mergeReferences, modelOptionsFor, modelSupportsReasoning, modelsForDescriptor, normalizeMarkdownCodeFences, oauthUsesManualCodePaste, openaiDescriptor, openrouterDescriptor, parentServerName, parseBindingSpec, parseCommandInvocation, parseEditOutcomesFromResult, parseMcpsFile, parseSemver, partitionExtensionCatalog, patchInlineGhost, patchMcpCredential, pendingInteractionsFromTurns, performInPlaceSelfUpdate, performSelfUpdate, piIdOf, pickActiveRunId, previewEditPayload, previewLine, projectUserPaths, projectsFilePath, providerKeySetChanged, pruneTodosByRun, readCredentials, readKeybindings, readKeybindingsRaw, readProjects, readProviderCredential, reduceMcpAuth, refreshMcpToolsCatalog, removeProviderCredential, renderActiveTodoAnchor, renderAgentsMdBlock, renderSession, resolveAgentId, resolveApprovalForPayload, resolveChipColor, resolveConfig, resolveExtensionKeybindings, resolveInlineSuggestion, resolvePlatformPackage, resolveSessionExportTarget, resolveStorageDirs, resolveStoragePaths, resolveTheme, restoreChainFallbacks, restoreModelOptions, rewriteMultiEditHeader, runOAuthLogin, runUpdateCommand, sanitizeModelChain, saveMcpToolsCache, saveState, scanExtensionDirectories, selectActiveTodos, selectableTurnIds, serializeInteractionResponse, setProviderCredential, setTodosForRun, shortChord, shortId, shouldAutoCompact, shouldAutoGenerateTitle, singleAgentRegistry, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, stripEditOutcomesAnnotation, stripJsonComments, stripSpawnTokensLine, subscribeMcpToolsCache, suggestSafelistEntries, sumRunCosts, summarizeEditPayload, summarizeOutcomes, supportsOAuth, titleFromTurns, toggleChainEntry, tokenEndingAtCursor, tokenize, toolCallPreview, toolResultText, truncateTrailing, truncateTurnsAt, tryOpenBrowser, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updateToolEventOutcomes, usageByModel, useActiveTodos, useColors, useCompletion, useConfig, useDiscovery, useDiscoveryOptional, useEnabledToggleSet, useInteractionsActions, useInteractionsQueue, useMcpAuthDispatch, useMcpAuthState, useMcpToolToggleMap, useMcpToolToggleSet, useSafeModeActions, useSafeModeQueue, useSelectStyle, useSettings, useStreamBuffer, useSurfaces, useSyntaxStyles, useTheme, useUpdateCheck, writeCredentials, writeProjects, writeSessionExport };
2416
+ export { ACTIONS_WITH_CARE_DOCTRINE, ASK_USER_TOOL, AUTO_COMPACT_MIN_GROWTH_FRACTION, type ActiveTodoAnchorOptions, type ActiveTodosState, type ActiveTrigger, type AgentAccent, type AgentProfile, type AgentRegistry, type AgentsMdFile, type AgentsMdResult, type AnswerValue, type ApiKeyCredential, type ApprovalDecision, type ApprovalRequest, type AuthMethod, type AutoCompactDecision, type AutoCompactInput, type AutoUpdateConfig, BUILD_AGENT, BUILTIN_AGENTS, BUILTIN_PROVIDERS, BUILTIN_THEMES, type BooleanSettingKey, type BuildExtensionRegistryOptions, type BuildHintsOptions, type BuildSystemOptions, type BuildUpdateHintOptions, CATPPUCCIN_FRAPPE, CATPPUCCIN_LATTE, CATPPUCCIN_MACCHIATO, CATPPUCCIN_MOCHA, CHATS_TRIGGER, COMMUNICATION_DOCTRINE, type CachedMcpToolList, type CatalogEntry, type ChatOptions, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type ChatTurnsReadToolOptions, type CheckForUpdateOptions, type ChipColor, type ChipColorMap, type Command, type CommandAgentResult, type CommandExecution, type CommandInvocation, type CommandOutputBlock, type CommandStep, type CommandStepContext, type CommandStepFn, type Commit, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type CompletionState, ConfigProvider, type ConfirmQuestion, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type CreateInteractionToolsOptions, type CreateTodoToolsOptions, type CredentialsFile, type CustomField, DEFAULT_AGENT_ID, DEFAULT_BUDGET_EXCLUDE_TOOLS, DEFAULT_KEYBINDINGS, DEFAULT_PERSIST_EXCLUDE_TOOLS, DEFAULT_SETTINGS, DEFAULT_THEME, DOING_TASKS_DOCTRINE, type DetectPackageManagerOptions, type DiffLine, type DiffOp, type DiscoverAgentsMdOptions, type DiscoveredMcp, type DiscoveryContextValue, type DiscoveryError, DiscoveryProvider, type DiscoveryResult, type DiscoverySlot, type DiscoverySlotOptions, EMPTY_EXTENSION_REGISTRY, EMPTY_HINTS, type EditDiffDisplay, type EditHunk, type EditHunkSummary, type EditOutcome, type EditOutcomeKind, type EditPayload, type EditSummary, type EnabledAllowlistKey, type EnabledToggleSet, type EnvSectionOptions, type ExtensionApiVersion, type ExtensionBehaviorTransform, type ExtensionCapability, type ExtensionContext, type ExtensionContributions, type ExtensionDefinition, type ExtensionFooterHint, type ExtensionGuiPanel, type ExtensionKeybinding, type ExtensionKeybindingDispatchContext, type ExtensionManifest, type ExtensionMcpConfigTransform, type ExtensionModal, type ExtensionOrderedContribution, type ExtensionPaths, type ExtensionPermission, type ExtensionProviderMiddleware, type ExtensionRegistry, type ExtensionRunTransform, type ExtensionRuntimeEnv, type ExtensionSessionStateSurface, type ExtensionSkillPolicy, type ExtensionSource, type ExtensionStorageScope, type ExtensionStorageSurface, type ExtensionToolCatalogTransform, type ExtensionToolResultMetadataRegistration, FILES_TRIGGER, type FetchOAuthRedirectResult, type FileEntry, GRUVBOX_DARK, GRUVBOX_LIGHT, type GenerateSessionTitleOptions, type GenerateStructuredDataOptions, type GuiContributions, type HighlightRange, type HighlightSegment, type Hint, type HunkResolution, IDENTITY_PREFIX, IMPLICITLY_SAFE_TOOLS, INTERACTION_GUIDANCE, INTERACTION_GUIDANCE_NO_PROMPTS, type InPlaceUpdateResult, type IndexedSearchTurn, type InlineAutocompleteContext, type InlineAutocompleteProvider, type InlineDiff, type InlineGhost, type InlineSegment, type InteractionRequest, type InteractionResponse, type InteractionsActions, InteractionsProvider, KEYBINDING_DEFS, KEYBINDING_DEF_BY_ACTION, KEYBINDING_KEY_COL_WIDTH, type KeyAction, type KeyBindingDef, type KeyBindingSection, type KeyBindings, type ListProjectFilesOptions, type LoadedExtension, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type McpAuthEvent, McpAuthProvider, type McpAuthStateMap, type McpAuthStatus, type McpToolToggleSet, type McpToolsCache, type ModelChainEntry, type ModelInfo, type ModelOption, type ModelUsageSummary, type OAuthCredential, type OAuthFlowOptions, type OAuthPrompt, OUTPUT_RESERVE_TOKENS, type Owner, PLAN_AGENT, PLAN_MODE_DOCTRINE, PLAN_MODE_DOCTRINE_NO_PROMPTS, PRESENT_PLAN_TOOL, type PackageManagerCommand, type PackageManagerId, type ParsedBinding, type PendingInteractionEntry, type PerformInPlaceUpdateOptions, type PerformSelfUpdateOptions, type Picked, type PlanDecision, type PlanPayload, type PlanRequest, type PlanResponse, type PlanStep, type PlatformTarballOptions, type PreviewResult, type ProjectEntry, type ProjectUserPath, type ProjectsFile, type PromptSegment, type PromptSegmentRef, type ProviderAuth, type ProviderCredential, type ProviderDescriptor, type ProviderKey, type ProviderRegistry, type Question, type QuestionChoice, type QuestionPayload, type QuestionRequest, type QuestionResponse, type QuestionType, type RequestApproval, type ResolveStorageDirsOptions, type ResolvedApproval, type ResolvedConfig, type ResolvedExtensionKeybinding, type ResolvedPaths, type RunUpdateCommandOptions, type RunUpdateCommandResult, SETTINGS_CATEGORIES, SETTINGS_CHOICES, SETTINGS_INPUTS, SETTINGS_TOGGLES, SKILLS_TRIGGER, SUBAGENT_GUIDANCE, type SafeModeActions, SafeModeProvider, type Screen, type SearchExcerpt, type SearchSessionResult, type SearchTurnResult, type SelectQuestion, type SelfUpdateResult, type SessionExportAnchor, type SessionExportFormat, type SessionExportTarget, type SessionHistoryMatch, type SessionMeta, type SessionSearchExcerpt, type SessionSearchIndex, type Settings, type SettingsCategory, type SettingsCategoryDescriptor, type SettingsChoice, type SettingsInput, SettingsProvider, type SettingsToggle, type StateStoreApi, type StorageDirs, type StorageMode, type StorageSlot, type StreamBuffer, type StreamEvent, type StreamSource, type StringSettingKey, type SyntaxStyles, type SyntaxTokenStyle, TODOREAD_TOOL, TODOS_METADATA_KEY, TODOWRITE_TOOL, TODO_STATUS_GLYPHS, TODO_WRITE_COUNTS_METADATA_KEY, TOKEN_DISCIPLINE_DOCTRINE, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type TextQuestion, type Theme, type ThemeColors, ThemeProvider, type ThemeSelect, type ThemeSurfaces, type TodoItem, type TodoStatus, type TodoTally, type TodosBag, type ToolCallDisplay, type ToolDisplayMeta, type ToolFormatLine, type TranscriptItem, type TuiContributions, type TuiState, type UpdateStatus, type UseUpdateCheckOptions, VAPORWAVE_THEME, type VisibleMcpRow, type Walk, accentColor, addToSafelist, ageString, anthropicDescriptor, applyApiKeyEnv, applyEditPayload, applyInsert, blendHsl, bootProfileEnabled, bootTick, buildBuildSystem, buildContextBreakdown, buildContextualDiff, buildEditOutcomesAnnotation, buildExtensionPreset, buildExtensionRegistry, buildHints, buildLinearRamp, buildMcpServers, buildModelCatalog, buildPlanSystem, buildResumedToolResultsTurn, buildRunModel, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildSkillsConfig, buildToolToggle, buildUnifiedDiff, buildUpdateHint, buildVisibleMcpRows, capTranscriptEvents, cerebrasDescriptor, chainPositionOf, chainsEqual, chatAutoCompactBehavior, chatReferenceTokensForPrompt, chatReferenceTokensFromText, checkForUpdate, chunkMarkdownForRender, cleanTitle, clearMcpToolsCache, clipHintsToWidth, collectReferences, commandSteps, compactPath, compactSummaryEvent, compareSemver, composeExtensionPreset, computeInlineDiff, computeLineDiff, computeTurnAnchors, countNeighbors, createActiveTodoAnchorHooks, createChatTurnsReadTool, createChatsCompletionProvider, createDiscoverySlot, createFileMcpCredentialStore, createFilesCompletionProvider, createInteractionTools, createPathAutocompleteProvider, createSkillsCompletionProvider, createStateStore, createTodoTools, credKeyOf, credentialsPath, defaultExtensionScanPaths, defaultMcpsConfigPaths, defaultSkillScanPaths, defineExtension, deleteTurnSafely, deriveSessionTitle, detectAuth, detectLibc, detectPackageManager, discoverAgentsMd, discoverExtensions, discoverProjectMcps, discoverProjectSkills, displayNameFor, disposeExtensionRegistry, effectiveContextWindow, enabledModelOptions, ensureKeybindingsFile, envSection, eventsFromTurns, executeCommand, extractEditPayload, fetchOAuthRedirect, filetypeFromPath, filterChainFallbacks, filterExtensionRegistry, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, findGitRoot, fmtCost, fmtTokens, formatBindingForDisplay, formatDuration, formatPathForCwd, formatTaskStatus, formatTaskSummary, formatToolCall, generateSessionTitle, generateStructuredData, getArchivedTodosForRun, getContextWindow, getMcpAuthStatus, getModelInfo, getSafelist, getTodosForRun, groupBindings, highlightSegments, hintsLength, indexOfEntry, indexOfServerRow, inlineLoadedExtension, isEditErrorResult, isInteractionTool, isOnSafelist, isTodoTool, isTurnHighlighted, isVisible, keybindingsPath, lastContextSizeFromTurns, listProjectFiles, listSessionMeta, loadMcpToolsCache, loadState, localDescriptor, makeRequestInteraction, marginTopFor, maskToOutcomeKinds, matchesBinding, matchesSafelistEntry, mcpCredentialsPath, mcpToolsCachePath, mergeApprovalAndBodyOutcomes, mergeContributions, mergeKeybindings, mergeReferences, modelOptionsFor, modelSupportsReasoning, modelsForDescriptor, normalizeMarkdownCodeFences, oauthUsesManualCodePaste, openaiDescriptor, openrouterDescriptor, parentServerName, parseBindingSpec, parseCommandInvocation, parseEditOutcomesFromResult, parseMcpsFile, parseSemver, partitionExtensionCatalog, patchInlineGhost, patchMcpCredential, pendingInteractionsFromTurns, performInPlaceSelfUpdate, performSelfUpdate, piIdOf, pickActiveRunId, previewEditPayload, previewLine, projectUserPaths, projectsFilePath, providerKeySetChanged, pruneTodosByRun, readCredentials, readKeybindings, readKeybindingsRaw, readProjects, readProviderCredential, reduceMcpAuth, refreshMcpToolsCatalog, removeProviderCredential, renderActiveTodoAnchor, renderAgentsMdBlock, renderSession, resolveAgentId, resolveApprovalForPayload, resolveChipColor, resolveConfig, resolveExtensionKeybindings, resolveInlineSuggestion, resolvePlatformPackage, resolveSessionExportTarget, resolveStorageDirs, resolveStoragePaths, resolveTheme, restoreChainFallbacks, restoreModelOptions, rewriteMultiEditHeader, runOAuthLogin, runUpdateCommand, sanitizeModelChain, saveMcpToolsCache, saveState, scanExtensionDirectories, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectActiveTodos, selectableTurnIds, selectionAfterTurnRemoval, serializeInteractionResponse, setProviderCredential, setTodosForRun, shortChord, shortId, shouldAutoCompact, shouldAutoGenerateTitle, singleAgentRegistry, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, stripEditOutcomesAnnotation, stripJsonComments, stripSpawnTokensLine, subscribeMcpToolsCache, suggestSafelistEntries, sumRunCosts, summarizeEditPayload, summarizeOutcomes, supportsOAuth, titleFromTurns, toggleChainEntry, tokenEndingAtCursor, tokenize, toolCallPreview, toolResultText, truncateTrailing, truncateTurnsAt, tryOpenBrowser, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updateToolEventOutcomes, usageByModel, useActiveTodos, useColors, useCompletion, useConfig, useDiscovery, useDiscoveryOptional, useEnabledToggleSet, useInteractionsActions, useInteractionsQueue, useMcpAuthDispatch, useMcpAuthState, useMcpToolToggleMap, useMcpToolToggleSet, useSafeModeActions, useSafeModeQueue, useSelectStyle, useSettings, useStreamBuffer, useSurfaces, useSyntaxStyles, useTheme, useUpdateCheck, writeCredentials, writeProjects, writeSessionExport };
2417
2417
  //# sourceMappingURL=chat.d.ts.map
package/dist/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as useMcpAuthState, $n as buildPlanSystem, $t as restoreChainFallbacks, A as runOAuthLogin, An as TODOWRITE_TOOL, At as DEFAULT_THEME, B as saveMcpToolsCache, Bn as setTodosForRun, Bt as createDiscoverySlot, C as projectsFilePath, Cn as DEFAULT_PERSIST_EXCLUDE_TOOLS, Ct as SETTINGS_CHOICES, D as formatPathForCwd, Dn as singleAgentRegistry, E as writeProjects, En as resolveAgentId, Et as SettingsProvider, F as parseMcpsFile, Fn as getTodosForRun, Ft as GRUVBOX_LIGHT, G as buildVisibleMcpRows, Gn as IDENTITY_PREFIX, Gt as useConfig, H as buildToolToggle, Hn as ACTIONS_WITH_CARE_DOCTRINE, Ht as useDiscovery, I as clearMcpToolsCache, In as isTodoTool, It as CATPPUCCIN_FRAPPE, J as createFileMcpCredentialStore, Jn as PLAN_MODE_DOCTRINE, Jt as buildRunModel, K as indexOfServerRow, Kn as INTERACTION_GUIDANCE, Kt as resolveConfig, L as loadMcpToolsCache, Ln as pickActiveRunId, Lt as CATPPUCCIN_LATTE, M as buildMcpServers, Mn as TODO_WRITE_COUNTS_METADATA_KEY, Mt as resolveTheme, N as defaultMcpsConfigPaths, Nn as createTodoTools, Nt as VAPORWAVE_THEME, O as fetchOAuthRedirect, On as TODOREAD_TOOL, Ot as useSettings, P as discoverProjectMcps, Pn as getArchivedTodosForRun, Pt as GRUVBOX_DARK, Q as useMcpAuthDispatch, Qn as buildBuildSystem, Qt as providerKeySetChanged, R as mcpToolsCachePath, Rn as pruneTodosByRun, Rt as CATPPUCCIN_MACCHIATO, S as matchesSafelistEntry, Sn as DEFAULT_BUDGET_EXCLUDE_TOOLS, St as SETTINGS_CATEGORIES, T as suggestSafelistEntries, Tn as accentColor, Tt as SETTINGS_TOGGLES, U as useMcpToolToggleMap, Un as COMMUNICATION_DOCTRINE, Ut as useDiscoveryOptional, V as subscribeMcpToolsCache, Vn as useActiveTodos, Vt as DiscoveryProvider, W as useMcpToolToggleSet, Wn as DOING_TASKS_DOCTRINE, Wt as ConfigProvider, X as patchMcpCredential, Xn as SUBAGENT_GUIDANCE, Xt as chainsEqual, Y as mcpCredentialsPath, Yn as PLAN_MODE_DOCTRINE_NO_PROMPTS, Yt as chainPositionOf, Z as McpAuthProvider, Zn as TOKEN_DISCIPLINE_DOCTRINE, Zt as filterChainFallbacks, _ as useSafeModeQueue, _n as discoverAgentsMd, _r as toolCallPreview, _t as buildHints, a as useSurfaces, an as bootTick, ar as createStateStore, at as buildResumedToolResultsTurn, b as getSafelist, bn as BUILTIN_AGENTS, br as usageByModel, bt as useEnabledToggleSet, c as useStreamBuffer, cn as checkForUpdate, cr as lastContextSizeFromTurns, ct as makeRequestInteraction, d as discoverProjectSkills, dn as detectPackageManager, dr as marginTopFor, dt as useInteractionsActions, en as sanitizeModelChain, er as envSection, et as getMcpAuthStatus, f as renderSession, fn as parseSemver, fr as saveState, ft as useInteractionsQueue, g as useSafeModeActions, gn as chatAutoCompactBehavior, gr as titleFromTurns, gt as truncateTrailing, h as SafeModeProvider, hn as resolvePlatformPackage, hr as sumRunCosts, ht as hintsLength, i as useSelectStyle, in as bootProfileEnabled, ir as compactSummaryEvent, it as PRESENT_PLAN_TOOL, j as supportsOAuth, jn as TODO_STATUS_GLYPHS, jt as resolveChipColor, k as oauthUsesManualCodePaste, kn as TODOS_METADATA_KEY, kt as BUILTIN_THEMES, l as buildSkillsConfig, ln as compareSemver, lr as listSessionMeta, lt as pendingInteractionsFromTurns, m as writeSessionExport, mn as performSelfUpdate, mr as stripSpawnTokensLine, mt as clipHintsToWidth, n as ThemeProvider, nn as useCompletion, nr as createChatTurnsReadTool, nt as ASK_USER_TOOL, o as useSyntaxStyles, on as buildUpdateHint, or as deriveSessionTitle, ot as createInteractionTools, p as resolveSessionExportTarget, pn as performInPlaceSelfUpdate, pt as EMPTY_HINTS, q as parentServerName, qn as INTERACTION_GUIDANCE_NO_PROMPTS, qt as resolveStoragePaths, r as useColors, rn as tryOpenBrowser, rt as InteractionsProvider, s as useTheme, sn as useUpdateCheck, sr as eventsFromTurns, st as isInteractionTool, t as computeTurnAnchors, tn as toggleChainEntry, tr as chatReferenceTokensForPrompt, tt as reduceMcpAuth, u as defaultSkillScanPaths, un as detectLibc, ur as loadState, ut as serializeInteractionResponse, v as IMPLICITLY_SAFE_TOOLS, vn as renderAgentsMdBlock, vr as toolResultText, vt as shortChord, w as readProjects, wn as PLAN_AGENT, wt as SETTINGS_INPUTS, x as isOnSafelist, xn as DEFAULT_AGENT_ID, xt as DEFAULT_SETTINGS, y as addToSafelist, yn as BUILD_AGENT, yr as updateToolEventOutcomes, yt as listProjectFiles, z as refreshMcpToolsCatalog, zn as selectActiveTodos, zt as CATPPUCCIN_MOCHA } from "./transcript-anchors-yogJHuBW.js";
1
+ import { $ as useMcpAuthState, $n as buildPlanSystem, $t as restoreChainFallbacks, A as runOAuthLogin, An as TODOWRITE_TOOL, At as DEFAULT_THEME, B as saveMcpToolsCache, Bn as setTodosForRun, Bt as createDiscoverySlot, C as projectsFilePath, Cn as DEFAULT_PERSIST_EXCLUDE_TOOLS, Ct as SETTINGS_CHOICES, D as formatPathForCwd, Dn as singleAgentRegistry, E as writeProjects, En as resolveAgentId, Et as SettingsProvider, F as parseMcpsFile, Fn as getTodosForRun, Ft as GRUVBOX_LIGHT, G as buildVisibleMcpRows, Gn as IDENTITY_PREFIX, Gt as useConfig, H as buildToolToggle, Hn as ACTIONS_WITH_CARE_DOCTRINE, Ht as useDiscovery, I as clearMcpToolsCache, In as isTodoTool, It as CATPPUCCIN_FRAPPE, J as createFileMcpCredentialStore, Jn as PLAN_MODE_DOCTRINE, Jt as buildRunModel, K as indexOfServerRow, Kn as INTERACTION_GUIDANCE, Kt as resolveConfig, L as loadMcpToolsCache, Ln as pickActiveRunId, Lt as CATPPUCCIN_LATTE, M as buildMcpServers, Mn as TODO_WRITE_COUNTS_METADATA_KEY, Mt as resolveTheme, N as defaultMcpsConfigPaths, Nn as createTodoTools, Nt as VAPORWAVE_THEME, O as fetchOAuthRedirect, On as TODOREAD_TOOL, Ot as useSettings, P as discoverProjectMcps, Pn as getArchivedTodosForRun, Pt as GRUVBOX_DARK, Q as useMcpAuthDispatch, Qn as buildBuildSystem, Qt as providerKeySetChanged, R as mcpToolsCachePath, Rn as pruneTodosByRun, Rt as CATPPUCCIN_MACCHIATO, S as matchesSafelistEntry, Sn as DEFAULT_BUDGET_EXCLUDE_TOOLS, St as SETTINGS_CATEGORIES, T as suggestSafelistEntries, Tn as accentColor, Tt as SETTINGS_TOGGLES, U as useMcpToolToggleMap, Un as COMMUNICATION_DOCTRINE, Ut as useDiscoveryOptional, V as subscribeMcpToolsCache, Vn as useActiveTodos, Vt as DiscoveryProvider, W as useMcpToolToggleSet, Wn as DOING_TASKS_DOCTRINE, Wt as ConfigProvider, X as patchMcpCredential, Xn as SUBAGENT_GUIDANCE, Xt as chainsEqual, Y as mcpCredentialsPath, Yn as PLAN_MODE_DOCTRINE_NO_PROMPTS, Yt as chainPositionOf, Z as McpAuthProvider, Zn as TOKEN_DISCIPLINE_DOCTRINE, Zt as filterChainFallbacks, _ as useSafeModeQueue, _n as discoverAgentsMd, _r as toolCallPreview, _t as buildHints, a as useSurfaces, an as bootTick, ar as createStateStore, at as buildResumedToolResultsTurn, b as getSafelist, bn as BUILTIN_AGENTS, br as usageByModel, bt as useEnabledToggleSet, c as useStreamBuffer, cn as checkForUpdate, cr as lastContextSizeFromTurns, ct as makeRequestInteraction, d as discoverProjectSkills, dn as detectPackageManager, dr as marginTopFor, dt as useInteractionsActions, en as sanitizeModelChain, er as envSection, et as getMcpAuthStatus, f as renderSession, fn as parseSemver, fr as saveState, ft as useInteractionsQueue, g as useSafeModeActions, gn as chatAutoCompactBehavior, gr as titleFromTurns, gt as truncateTrailing, h as SafeModeProvider, hn as resolvePlatformPackage, hr as sumRunCosts, ht as hintsLength, i as useSelectStyle, in as bootProfileEnabled, ir as compactSummaryEvent, it as PRESENT_PLAN_TOOL, j as supportsOAuth, jn as TODO_STATUS_GLYPHS, jt as resolveChipColor, k as oauthUsesManualCodePaste, kn as TODOS_METADATA_KEY, kt as BUILTIN_THEMES, l as buildSkillsConfig, ln as compareSemver, lr as listSessionMeta, lt as pendingInteractionsFromTurns, m as writeSessionExport, mn as performSelfUpdate, mr as stripSpawnTokensLine, mt as clipHintsToWidth, n as ThemeProvider, nn as useCompletion, nr as createChatTurnsReadTool, nt as ASK_USER_TOOL, o as useSyntaxStyles, on as buildUpdateHint, or as deriveSessionTitle, ot as createInteractionTools, p as resolveSessionExportTarget, pn as performInPlaceSelfUpdate, pt as EMPTY_HINTS, q as parentServerName, qn as INTERACTION_GUIDANCE_NO_PROMPTS, qt as resolveStoragePaths, r as useColors, rn as tryOpenBrowser, rt as InteractionsProvider, s as useTheme, sn as useUpdateCheck, sr as eventsFromTurns, st as isInteractionTool, t as computeTurnAnchors, tn as toggleChainEntry, tr as chatReferenceTokensForPrompt, tt as reduceMcpAuth, u as defaultSkillScanPaths, un as detectLibc, ur as loadState, ut as serializeInteractionResponse, v as IMPLICITLY_SAFE_TOOLS, vn as renderAgentsMdBlock, vr as toolResultText, vt as shortChord, w as readProjects, wn as PLAN_AGENT, wt as SETTINGS_INPUTS, x as isOnSafelist, xn as DEFAULT_AGENT_ID, xt as DEFAULT_SETTINGS, y as addToSafelist, yn as BUILD_AGENT, yr as updateToolEventOutcomes, yt as listProjectFiles, z as refreshMcpToolsCatalog, zn as selectActiveTodos, zt as CATPPUCCIN_MOCHA } from "./transcript-anchors-DE6D0dNo.js";
2
2
  import { $ as composeExtensionPreset, $t as discoverExtensions, Bt as ensureKeybindingsFile, Ft as resolveStorageDirs, Gt as mergeKeybindings, Ht as groupBindings, It as DEFAULT_KEYBINDINGS, Jt as readKeybindingsRaw, Kt as parseBindingSpec, Lt as KEYBINDING_DEFS, Q as buildExtensionRegistry, Qt as defaultExtensionScanPaths, R as EMPTY_EXTENSION_REGISTRY, Rt as KEYBINDING_DEF_BY_ACTION, Ut as keybindingsPath, Vt as formatBindingForDisplay, Wt as matchesBinding, Xt as stripJsonComments, Yt as resolveExtensionKeybindings, Z as buildExtensionPreset, en as inlineLoadedExtension, et as disposeExtensionRegistry, gn as shouldAutoCompact, hn as effectiveContextWindow, in as defineExtension, mn as OUTPUT_RESERVE_TOKENS, nt as mergeContributions, pn as AUTO_COMPACT_MIN_GROWTH_FRACTION, qt as readKeybindings, rn as scanExtensionDirectories, rt as partitionExtensionCatalog, tt as filterExtensionRegistry, zt as KEYBINDING_KEY_COL_WIDTH } from "./agent-DoEx_WD3.js";
3
3
  import { t as buildContextBreakdown } from "./context-breakdown-Dzo25N45.js";
4
4
  import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, n as compactPath, o as formatTaskStatus, r as fmtCost, s as formatTaskSummary, t as ageString } from "./format-BF745pLL.js";
@@ -7,7 +7,8 @@ import { appendDynamicSection } from "./prompt.js";
7
7
  import { a as generateStructuredData, c as shouldAutoGenerateTitle, g as parseCommandInvocation, h as executeCommand, i as tokenEndingAtCursor, m as commandSteps, n as patchInlineGhost, o as cleanTitle, r as resolveInlineSuggestion, s as generateSessionTitle, t as createPathAutocompleteProvider } from "./inline-autocomplete-BAwBcZtD.js";
8
8
  import { a as mergeReferences, n as collectReferences, r as findActiveTrigger, t as applyInsert } from "./completion-core-BRo86R_L.js";
9
9
  import { C as restoreModelOptions, S as piIdOf, _ as modelOptionsFor, a as readProviderCredential, b as openaiDescriptor, c as writeCredentials, d as cerebrasDescriptor, f as credKeyOf, g as localDescriptor, h as getModelInfo, i as readCredentials, l as BUILTIN_PROVIDERS, m as getContextWindow, n as applyApiKeyEnv, o as removeProviderCredential, p as enabledModelOptions, r as credentialsPath, s as setProviderCredential, t as detectAuth, u as anthropicDescriptor, v as modelSupportsReasoning, x as openrouterDescriptor, y as modelsForDescriptor } from "./auth-Bb479DFB.js";
10
- import { $ as buildEditOutcomesAnnotation, A as blendHsl, B as turnSelectionOwnership, D as FILES_TRIGGER, E as uniqueSkillNamesFromReferences, F as isTurnHighlighted, G as computeInlineDiff, H as buildContextualDiff, J as filetypeFromPath, K as computeLineDiff, L as isVisible, O as createFilesCompletionProvider, P as isEditErrorResult, Q as tokenize, S as splitMarkdownCodeBlocks, T as createSkillsCompletionProvider, U as buildUnifiedDiff, V as applyEditPayload, X as splitLines, Y as previewEditPayload, Z as summarizeEditPayload, _ as filterModelCatalog, a as TOOL_DISPLAY, at as stripEditOutcomesAnnotation, b as chunkMarkdownForRender, c as MAX_TRANSCRIPT_EVENTS, ct as chatReferenceTokensFromText, d as finalizeStreamingMarkdown, et as maskToOutcomeKinds, f as finalizeStreamingMarkdownForOwner, g as buildModelCatalog, h as splitPromptSegments, i as turnAsText, it as rewriteMultiEditHeader, j as buildLinearRamp, k as uniqueFilesFromReferences, l as TRANSCRIPT_TRIM_TO_EVENTS, lt as createChatsCompletionProvider, m as turnContextSize, n as deleteTurnSafely, nt as parseEditOutcomesFromResult, o as displayNameFor, ot as summarizeOutcomes, q as extractEditPayload, r as truncateTurnsAt, rt as resolveApprovalForPayload, s as formatToolCall, st as CHATS_TRIGGER, t as countNeighbors, tt as mergeApprovalAndBodyOutcomes, u as capTranscriptEvents, ut as uniqueChatIdsFromReferences, v as indexOfEntry, w as SKILLS_TRIGGER, x as normalizeMarkdownCodeFences, y as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, z as selectableTurnIds } from "./turn-operations-CXjRaltC.js";
10
+ import { $ as extractEditPayload, A as FILES_TRIGGER, B as isVisible, C as chunkMarkdownForRender, D as SKILLS_TRIGGER, J as buildContextualDiff, K as turnSelectionOwnership, L as isEditErrorResult, M as uniqueFilesFromReferences, N as blendHsl, O as createSkillsCompletionProvider, P as buildLinearRamp, Q as computeLineDiff, R as isTurnHighlighted, S as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, T as splitMarkdownCodeBlocks, U as selectableTurnIds, W as selectionAfterTurnRemoval, Y as buildUnifiedDiff, Z as computeInlineDiff, _ as turnContextSize, a as TOOL_DISPLAY, at as buildEditOutcomesAnnotation, b as filterModelCatalog, c as MAX_TRANSCRIPT_EVENTS, ct as parseEditOutcomesFromResult, d as finalizeStreamingMarkdown, dt as stripEditOutcomesAnnotation, et as filetypeFromPath, f as finalizeStreamingMarkdownForOwner, ft as summarizeOutcomes, gt as uniqueChatIdsFromReferences, ht as createChatsCompletionProvider, i as turnAsText, it as tokenize, j as createFilesCompletionProvider, k as uniqueSkillNamesFromReferences, l as TRANSCRIPT_TRIM_TO_EVENTS, lt as resolveApprovalForPayload, mt as chatReferenceTokensFromText, n as deleteTurnSafely, nt as splitLines, o as displayNameFor, ot as maskToOutcomeKinds, pt as CHATS_TRIGGER, q as applyEditPayload, r as truncateTurnsAt, rt as summarizeEditPayload, s as formatToolCall, st as mergeApprovalAndBodyOutcomes, t as countNeighbors, tt as previewEditPayload, u as capTranscriptEvents, ut as rewriteMultiEditHeader, v as splitPromptSegments, w as normalizeMarkdownCodeFences, x as indexOfEntry, y as buildModelCatalog } from "./turn-operations-CokV32wf.js";
11
+ import { a as searchHighlightRanges, c as searchSessionHistoryIndexAsync, d as searchSessionTurns, f as searchTurns, i as highlightSegments, l as searchSessionIndex, n as buildSessionSearchIndexAsync, o as searchSessionHistory, p as searchableTurnText, r as filterSessionSearchCatalog, s as searchSessionHistoryIndex, t as buildSessionSearchIndex, u as searchSessionIndexAsync } from "./history-search-C4bk1Wz_.js";
11
12
  //#region src/chat/auto-update-cli.ts
12
13
  const UPGRADE_HELP = `Usage: zidane upgrade [options]
13
14
 
@@ -230,6 +231,6 @@ function createActiveTodoAnchorHooks(options = {}) {
230
231
  } };
231
232
  }
232
233
  //#endregion
233
- export { ACTIONS_WITH_CARE_DOCTRINE, ASK_USER_TOOL, AUTO_COMPACT_MIN_GROWTH_FRACTION, BUILD_AGENT, BUILTIN_AGENTS, BUILTIN_PROVIDERS, BUILTIN_THEMES, CATPPUCCIN_FRAPPE, CATPPUCCIN_LATTE, CATPPUCCIN_MACCHIATO, CATPPUCCIN_MOCHA, CHATS_TRIGGER, COMMUNICATION_DOCTRINE, ConfigProvider, DEFAULT_AGENT_ID, DEFAULT_BUDGET_EXCLUDE_TOOLS, DEFAULT_KEYBINDINGS, DEFAULT_PERSIST_EXCLUDE_TOOLS, DEFAULT_SETTINGS, DEFAULT_THEME, DOING_TASKS_DOCTRINE, DiscoveryProvider, EMPTY_EXTENSION_REGISTRY, EMPTY_HINTS, FILES_TRIGGER, GRUVBOX_DARK, GRUVBOX_LIGHT, IDENTITY_PREFIX, IMPLICITLY_SAFE_TOOLS, INTERACTION_GUIDANCE, INTERACTION_GUIDANCE_NO_PROMPTS, InteractionsProvider, KEYBINDING_DEFS, KEYBINDING_DEF_BY_ACTION, KEYBINDING_KEY_COL_WIDTH, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, McpAuthProvider, OUTPUT_RESERVE_TOKENS, PLAN_AGENT, PLAN_MODE_DOCTRINE, PLAN_MODE_DOCTRINE_NO_PROMPTS, PRESENT_PLAN_TOOL, SETTINGS_CATEGORIES, SETTINGS_CHOICES, SETTINGS_INPUTS, SETTINGS_TOGGLES, SKILLS_TRIGGER, SUBAGENT_GUIDANCE, SafeModeProvider, SettingsProvider, TODOREAD_TOOL, TODOS_METADATA_KEY, TODOWRITE_TOOL, TODO_STATUS_GLYPHS, TODO_WRITE_COUNTS_METADATA_KEY, TOKEN_DISCIPLINE_DOCTRINE, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, ThemeProvider, VAPORWAVE_THEME, accentColor, addToSafelist, ageString, anthropicDescriptor, applyApiKeyEnv, applyEditPayload, applyInsert, blendHsl, bootProfileEnabled, bootTick, buildBuildSystem, buildContextBreakdown, buildContextualDiff, buildEditOutcomesAnnotation, buildExtensionPreset, buildExtensionRegistry, buildHints, buildLinearRamp, buildMcpServers, buildModelCatalog, buildPlanSystem, buildResumedToolResultsTurn, buildRunModel, buildSkillsConfig, buildToolToggle, buildUnifiedDiff, buildUpdateHint, buildVisibleMcpRows, capTranscriptEvents, cerebrasDescriptor, chainPositionOf, chainsEqual, chatAutoCompactBehavior, chatReferenceTokensForPrompt, chatReferenceTokensFromText, checkForUpdate, chunkMarkdownForRender, cleanTitle, clearMcpToolsCache, clipHintsToWidth, collectReferences, commandSteps, compactPath, compactSummaryEvent, compareSemver, composeExtensionPreset, computeInlineDiff, computeLineDiff, computeTurnAnchors, countNeighbors, createActiveTodoAnchorHooks, createChatTurnsReadTool, createChatsCompletionProvider, createDiscoverySlot, createFileMcpCredentialStore, createFilesCompletionProvider, createInteractionTools, createPathAutocompleteProvider, createSkillsCompletionProvider, createStateStore, createTodoTools, credKeyOf, credentialsPath, defaultExtensionScanPaths, defaultMcpsConfigPaths, defaultSkillScanPaths, defineExtension, deleteTurnSafely, deriveSessionTitle, detectAuth, detectLibc, detectPackageManager, discoverAgentsMd, discoverExtensions, discoverProjectMcps, discoverProjectSkills, displayNameFor, disposeExtensionRegistry, effectiveContextWindow, enabledModelOptions, ensureKeybindingsFile, envSection, eventsFromTurns, executeCommand, extractEditPayload, fetchOAuthRedirect, filetypeFromPath, filterChainFallbacks, filterExtensionRegistry, filterModelCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, findGitRoot, fmtCost, fmtTokens, formatBindingForDisplay, formatDuration, formatPathForCwd, formatTaskStatus, formatTaskSummary, formatToolCall, generateSessionTitle, generateStructuredData, getArchivedTodosForRun, getContextWindow, getMcpAuthStatus, getModelInfo, getSafelist, getTodosForRun, groupBindings, hintsLength, indexOfEntry, indexOfServerRow, inlineLoadedExtension, isEditErrorResult, isInteractionTool, isOnSafelist, isTodoTool, isTurnHighlighted, isVisible, keybindingsPath, lastContextSizeFromTurns, listProjectFiles, listSessionMeta, loadMcpToolsCache, loadState, localDescriptor, makeRequestInteraction, marginTopFor, maskToOutcomeKinds, matchesBinding, matchesSafelistEntry, mcpCredentialsPath, mcpToolsCachePath, mergeApprovalAndBodyOutcomes, mergeContributions, mergeKeybindings, mergeReferences, modelOptionsFor, modelSupportsReasoning, modelsForDescriptor, normalizeMarkdownCodeFences, oauthUsesManualCodePaste, openaiDescriptor, openrouterDescriptor, parentServerName, parseBindingSpec, parseCommandInvocation, parseEditOutcomesFromResult, parseMcpsFile, parseSemver, partitionExtensionCatalog, patchInlineGhost, patchMcpCredential, pendingInteractionsFromTurns, performInPlaceSelfUpdate, performSelfUpdate, piIdOf, pickActiveRunId, previewEditPayload, previewLine, projectUserPaths, projectsFilePath, providerKeySetChanged, pruneTodosByRun, readCredentials, readKeybindings, readKeybindingsRaw, readProjects, readProviderCredential, reduceMcpAuth, refreshMcpToolsCatalog, removeProviderCredential, renderActiveTodoAnchor, renderAgentsMdBlock, renderSession, resolveAgentId, resolveApprovalForPayload, resolveChipColor, resolveConfig, resolveExtensionKeybindings, resolveInlineSuggestion, resolvePlatformPackage, resolveSessionExportTarget, resolveStorageDirs, resolveStoragePaths, resolveTheme, restoreChainFallbacks, restoreModelOptions, rewriteMultiEditHeader, runOAuthLogin, runUpdateCommand, sanitizeModelChain, saveMcpToolsCache, saveState, scanExtensionDirectories, selectActiveTodos, selectableTurnIds, serializeInteractionResponse, setProviderCredential, setTodosForRun, shortChord, shortId, shouldAutoCompact, shouldAutoGenerateTitle, singleAgentRegistry, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, stripEditOutcomesAnnotation, stripJsonComments, stripSpawnTokensLine, subscribeMcpToolsCache, suggestSafelistEntries, sumRunCosts, summarizeEditPayload, summarizeOutcomes, supportsOAuth, titleFromTurns, toggleChainEntry, tokenEndingAtCursor, tokenize, toolCallPreview, toolResultText, truncateTrailing, truncateTurnsAt, tryOpenBrowser, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updateToolEventOutcomes, usageByModel, useActiveTodos, useColors, useCompletion, useConfig, useDiscovery, useDiscoveryOptional, useEnabledToggleSet, useInteractionsActions, useInteractionsQueue, useMcpAuthDispatch, useMcpAuthState, useMcpToolToggleMap, useMcpToolToggleSet, useSafeModeActions, useSafeModeQueue, useSelectStyle, useSettings, useStreamBuffer, useSurfaces, useSyntaxStyles, useTheme, useUpdateCheck, writeCredentials, writeProjects, writeSessionExport };
234
+ export { ACTIONS_WITH_CARE_DOCTRINE, ASK_USER_TOOL, AUTO_COMPACT_MIN_GROWTH_FRACTION, BUILD_AGENT, BUILTIN_AGENTS, BUILTIN_PROVIDERS, BUILTIN_THEMES, CATPPUCCIN_FRAPPE, CATPPUCCIN_LATTE, CATPPUCCIN_MACCHIATO, CATPPUCCIN_MOCHA, CHATS_TRIGGER, COMMUNICATION_DOCTRINE, ConfigProvider, DEFAULT_AGENT_ID, DEFAULT_BUDGET_EXCLUDE_TOOLS, DEFAULT_KEYBINDINGS, DEFAULT_PERSIST_EXCLUDE_TOOLS, DEFAULT_SETTINGS, DEFAULT_THEME, DOING_TASKS_DOCTRINE, DiscoveryProvider, EMPTY_EXTENSION_REGISTRY, EMPTY_HINTS, FILES_TRIGGER, GRUVBOX_DARK, GRUVBOX_LIGHT, IDENTITY_PREFIX, IMPLICITLY_SAFE_TOOLS, INTERACTION_GUIDANCE, INTERACTION_GUIDANCE_NO_PROMPTS, InteractionsProvider, KEYBINDING_DEFS, KEYBINDING_DEF_BY_ACTION, KEYBINDING_KEY_COL_WIDTH, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, McpAuthProvider, OUTPUT_RESERVE_TOKENS, PLAN_AGENT, PLAN_MODE_DOCTRINE, PLAN_MODE_DOCTRINE_NO_PROMPTS, PRESENT_PLAN_TOOL, SETTINGS_CATEGORIES, SETTINGS_CHOICES, SETTINGS_INPUTS, SETTINGS_TOGGLES, SKILLS_TRIGGER, SUBAGENT_GUIDANCE, SafeModeProvider, SettingsProvider, TODOREAD_TOOL, TODOS_METADATA_KEY, TODOWRITE_TOOL, TODO_STATUS_GLYPHS, TODO_WRITE_COUNTS_METADATA_KEY, TOKEN_DISCIPLINE_DOCTRINE, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, ThemeProvider, VAPORWAVE_THEME, accentColor, addToSafelist, ageString, anthropicDescriptor, applyApiKeyEnv, applyEditPayload, applyInsert, blendHsl, bootProfileEnabled, bootTick, buildBuildSystem, buildContextBreakdown, buildContextualDiff, buildEditOutcomesAnnotation, buildExtensionPreset, buildExtensionRegistry, buildHints, buildLinearRamp, buildMcpServers, buildModelCatalog, buildPlanSystem, buildResumedToolResultsTurn, buildRunModel, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildSkillsConfig, buildToolToggle, buildUnifiedDiff, buildUpdateHint, buildVisibleMcpRows, capTranscriptEvents, cerebrasDescriptor, chainPositionOf, chainsEqual, chatAutoCompactBehavior, chatReferenceTokensForPrompt, chatReferenceTokensFromText, checkForUpdate, chunkMarkdownForRender, cleanTitle, clearMcpToolsCache, clipHintsToWidth, collectReferences, commandSteps, compactPath, compactSummaryEvent, compareSemver, composeExtensionPreset, computeInlineDiff, computeLineDiff, computeTurnAnchors, countNeighbors, createActiveTodoAnchorHooks, createChatTurnsReadTool, createChatsCompletionProvider, createDiscoverySlot, createFileMcpCredentialStore, createFilesCompletionProvider, createInteractionTools, createPathAutocompleteProvider, createSkillsCompletionProvider, createStateStore, createTodoTools, credKeyOf, credentialsPath, defaultExtensionScanPaths, defaultMcpsConfigPaths, defaultSkillScanPaths, defineExtension, deleteTurnSafely, deriveSessionTitle, detectAuth, detectLibc, detectPackageManager, discoverAgentsMd, discoverExtensions, discoverProjectMcps, discoverProjectSkills, displayNameFor, disposeExtensionRegistry, effectiveContextWindow, enabledModelOptions, ensureKeybindingsFile, envSection, eventsFromTurns, executeCommand, extractEditPayload, fetchOAuthRedirect, filetypeFromPath, filterChainFallbacks, filterExtensionRegistry, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, findGitRoot, fmtCost, fmtTokens, formatBindingForDisplay, formatDuration, formatPathForCwd, formatTaskStatus, formatTaskSummary, formatToolCall, generateSessionTitle, generateStructuredData, getArchivedTodosForRun, getContextWindow, getMcpAuthStatus, getModelInfo, getSafelist, getTodosForRun, groupBindings, highlightSegments, hintsLength, indexOfEntry, indexOfServerRow, inlineLoadedExtension, isEditErrorResult, isInteractionTool, isOnSafelist, isTodoTool, isTurnHighlighted, isVisible, keybindingsPath, lastContextSizeFromTurns, listProjectFiles, listSessionMeta, loadMcpToolsCache, loadState, localDescriptor, makeRequestInteraction, marginTopFor, maskToOutcomeKinds, matchesBinding, matchesSafelistEntry, mcpCredentialsPath, mcpToolsCachePath, mergeApprovalAndBodyOutcomes, mergeContributions, mergeKeybindings, mergeReferences, modelOptionsFor, modelSupportsReasoning, modelsForDescriptor, normalizeMarkdownCodeFences, oauthUsesManualCodePaste, openaiDescriptor, openrouterDescriptor, parentServerName, parseBindingSpec, parseCommandInvocation, parseEditOutcomesFromResult, parseMcpsFile, parseSemver, partitionExtensionCatalog, patchInlineGhost, patchMcpCredential, pendingInteractionsFromTurns, performInPlaceSelfUpdate, performSelfUpdate, piIdOf, pickActiveRunId, previewEditPayload, previewLine, projectUserPaths, projectsFilePath, providerKeySetChanged, pruneTodosByRun, readCredentials, readKeybindings, readKeybindingsRaw, readProjects, readProviderCredential, reduceMcpAuth, refreshMcpToolsCatalog, removeProviderCredential, renderActiveTodoAnchor, renderAgentsMdBlock, renderSession, resolveAgentId, resolveApprovalForPayload, resolveChipColor, resolveConfig, resolveExtensionKeybindings, resolveInlineSuggestion, resolvePlatformPackage, resolveSessionExportTarget, resolveStorageDirs, resolveStoragePaths, resolveTheme, restoreChainFallbacks, restoreModelOptions, rewriteMultiEditHeader, runOAuthLogin, runUpdateCommand, sanitizeModelChain, saveMcpToolsCache, saveState, scanExtensionDirectories, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectActiveTodos, selectableTurnIds, selectionAfterTurnRemoval, serializeInteractionResponse, setProviderCredential, setTodosForRun, shortChord, shortId, shouldAutoCompact, shouldAutoGenerateTitle, singleAgentRegistry, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, stripEditOutcomesAnnotation, stripJsonComments, stripSpawnTokensLine, subscribeMcpToolsCache, suggestSafelistEntries, sumRunCosts, summarizeEditPayload, summarizeOutcomes, supportsOAuth, titleFromTurns, toggleChainEntry, tokenEndingAtCursor, tokenize, toolCallPreview, toolResultText, truncateTrailing, truncateTurnsAt, tryOpenBrowser, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updateToolEventOutcomes, usageByModel, useActiveTodos, useColors, useCompletion, useConfig, useDiscovery, useDiscoveryOptional, useEnabledToggleSet, useInteractionsActions, useInteractionsQueue, useMcpAuthDispatch, useMcpAuthState, useMcpToolToggleMap, useMcpToolToggleSet, useSafeModeActions, useSafeModeQueue, useSelectStyle, useSettings, useStreamBuffer, useSurfaces, useSyntaxStyles, useTheme, useUpdateCheck, writeCredentials, writeProjects, writeSessionExport };
234
235
 
235
236
  //# sourceMappingURL=chat.js.map
package/dist/chat.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","names":[],"sources":["../src/chat/auto-update-cli.ts","../src/chat/todo-anchor.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// `zidane upgrade` subcommand — drop-in handler for consumer CLIs.\n//\n// Wraps `checkForUpdate` + `performSelfUpdate` + `performInPlaceSelfUpdate`\n// into a single function the host's `cli.ts` can call. The behavior layers:\n//\n// - no flags → check + run the package manager\n// - `--check` → check only, print the latest version + bail\n// - `--in-place` → skip the PM, download + atomic-rename the binary\n// - `--dry-run` → resolve everything but don't actually swap\n// - `--channel <tag>` → override dist-tag (defaults to `'latest'`)\n// - `--registry <url>`→ override the npm registry URL\n//\n// Pure I/O — writes to stdout/stderr, returns the exit code the caller\n// should pass to `process.exit`. No React, no OpenTUI; safe to call\n// before / instead of `runTui`.\n// ---------------------------------------------------------------------------\n\nimport {\n checkForUpdate,\n compareSemver,\n detectPackageManager,\n performInPlaceSelfUpdate,\n performSelfUpdate,\n resolvePlatformPackage,\n} from './auto-update'\n\nexport interface RunUpdateCommandOptions {\n /** Top-level package the user installs (e.g. `'zidane-tui'`). */\n packageName: string\n /** Inlined at build time. */\n currentVersion: string\n /** Args passed after `upgrade` (typically `process.argv.slice(3)`). */\n argv: readonly string[]\n /** Where to persist the TTL cache. Usually `paths.userDir`. */\n cacheDir?: string\n /** Default channel when `--channel` isn't passed. Defaults to `'latest'`. */\n defaultChannel?: string\n /**\n * Override the platform-package-name prefix used by `--in-place`.\n * Defaults to `'<packageName>-'`, matching the `zidane-tui-<key>` layout.\n */\n platformPackagePrefix?: string\n /** Override registry. Defaults to npmjs. */\n registry?: string\n /** stdout. Defaults to `process.stdout`. */\n stdout?: NodeJS.WritableStream\n /** stderr. Defaults to `process.stderr`. */\n stderr?: NodeJS.WritableStream\n}\n\nexport interface RunUpdateCommandResult {\n exitCode: number\n}\n\nconst UPGRADE_HELP = `Usage: zidane upgrade [options]\n\nUpdate the zidane CLI to the latest release.\n\nOptions:\n --check Print the latest version and exit (no install).\n --in-place Download the platform binary directly from npm\n and atomic-rename over the running binary.\n Skips the package manager. Refused on Volta.\n --dry-run Resolve everything but don't actually install.\n --channel <tag> dist-tag to query (default: latest).\n --registry <url> Override the npm registry.\n --package-manager <pm> Force npm | pnpm | yarn | bun | volta.\n --force Run the install even if we're already on latest,\n or the registry check failed.\n -h, --help Print this help.\n\nEnvironment:\n NO_UPDATE_NOTIFIER Silence the background check (set to \"1\").\n ZIDANE_NO_UPDATE Same, project-specific.\n`\n\n/**\n * Run the `upgrade` subcommand. Exit code contract:\n * - `0` — update succeeded, `--check` reported no update, or `--check`\n * reported an update (informational only).\n * - `1` — update failed (PM exit non-zero, in-place download failed,\n * registry returned non-2xx).\n * - `2` — argv parse error (unknown flag).\n */\nexport async function runUpdateCommand(options: RunUpdateCommandOptions): Promise<RunUpdateCommandResult> {\n const out = options.stdout ?? process.stdout\n const err = options.stderr ?? process.stderr\n const parsed = parseArgs(options.argv)\n if (parsed.kind === 'error') {\n err.write(`zidane upgrade: ${parsed.message}\\n`)\n err.write(UPGRADE_HELP)\n return { exitCode: 2 }\n }\n if (parsed.help) {\n out.write(UPGRADE_HELP)\n return { exitCode: 0 }\n }\n\n const channel = parsed.channel ?? options.defaultChannel ?? 'latest'\n const registry = parsed.registry ?? options.registry\n\n // Always force the check — user typed `upgrade`, env opt-outs shouldn't\n // get in the way.\n const status = await checkForUpdate({\n packageName: options.packageName,\n currentVersion: options.currentVersion,\n channel,\n registry,\n cacheDir: options.cacheDir,\n force: true,\n timeoutMs: 8000,\n })\n\n // `--check` is informational — degrade gracefully on registry errors\n // (offline laptop, restricted proxy) and exit 0 so the user can script\n // around it without quoting tricks.\n if (parsed.check) {\n if (status.source === 'error') {\n err.write(`Could not check \\`${channel}\\` (${status.error ?? 'unknown error'}). Current: v${options.currentVersion}.\\n`)\n return { exitCode: 0 }\n }\n if (!status.latest) {\n err.write(`Could not determine latest version on \\`${channel}\\`. Current: v${options.currentVersion}.\\n`)\n return { exitCode: 0 }\n }\n const cmp = compareSemver(status.latest, options.currentVersion)\n if (cmp > 0)\n out.write(`v${status.latest} is available on \\`${channel}\\` (current: v${options.currentVersion}).\\n`)\n else\n out.write(`Already on v${options.currentVersion} (latest on \\`${channel}\\` is v${status.latest}).\\n`)\n return { exitCode: 0 }\n }\n\n // Install path — a registry error means we don't KNOW if we need an\n // update. Refuse to spawn the PM blindly unless the user explicitly\n // asks via `--force`.\n if (status.source === 'error') {\n err.write(`zidane upgrade: registry check failed (${status.error ?? 'unknown error'})\\n`)\n if (!parsed.force) {\n err.write('Pass --force to attempt the install anyway.\\n')\n return { exitCode: 1 }\n }\n }\n\n if (status.latest && !parsed.force) {\n const cmp = compareSemver(status.latest, options.currentVersion)\n if (cmp <= 0) {\n out.write(`Already on v${options.currentVersion} (latest on \\`${channel}\\` is v${status.latest}).\\n`)\n return { exitCode: 0 }\n }\n }\n\n // ---------------------------------------------------------------------\n // In-place path\n // ---------------------------------------------------------------------\n\n if (parsed.inPlace) {\n const platformPkg = resolvePlatformPackage({\n prefix: options.platformPackagePrefix ?? `${options.packageName}-`,\n })\n if (!platformPkg) {\n err.write(`No prebuilt binary for ${process.platform}/${process.arch}. Run \\`${options.packageName}-upgrade\\` via your package manager instead.\\n`)\n return { exitCode: 1 }\n }\n out.write(`Downloading ${platformPkg}@${channel}…\\n`)\n const result = await performInPlaceSelfUpdate({\n packageName: platformPkg,\n channel,\n registry,\n dryRun: parsed.dryRun,\n })\n if (result.status === 'success') {\n const verb = parsed.dryRun ? 'Would install' : 'Installed'\n out.write(`${verb} v${result.installedVersion} at ${result.binaryPath}.\\n`)\n return { exitCode: 0 }\n }\n err.write(`In-place update failed: ${result.reason ?? 'unknown error'}\\n`)\n if (result.status === 'refused')\n err.write('Falling back to package-manager path (drop --in-place to retry).\\n')\n return { exitCode: 1 }\n }\n\n // ---------------------------------------------------------------------\n // Package-manager path\n // ---------------------------------------------------------------------\n\n const detected = detectPackageManager({ packageName: options.packageName, channel })\n if (detected.note)\n out.write(`${detected.note}\\n`)\n out.write(`Running: ${detected.argv.join(' ')}\\n`)\n if (parsed.dryRun)\n return { exitCode: 0 }\n\n const result = await performSelfUpdate({\n packageName: options.packageName,\n channel,\n packageManager: parsed.packageManager ?? 'auto',\n })\n if (result.spawnError) {\n err.write(`Failed to launch \\`${result.command.argv[0]}\\`: ${result.spawnError}\\n`)\n err.write('Is the package manager installed and on $PATH?\\n')\n return { exitCode: 1 }\n }\n return { exitCode: result.exitCode ?? 1 }\n}\n\n// ---------------------------------------------------------------------------\n// Argv parser — minimal, just enough to drop into the consumer's `cli.ts`.\n// We deliberately don't pull in commander/yargs for a 5-flag surface.\n// ---------------------------------------------------------------------------\n\ntype ParseResult\n = | {\n kind: 'ok'\n check: boolean\n inPlace: boolean\n dryRun: boolean\n force: boolean\n help: boolean\n channel?: string\n registry?: string\n packageManager?: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'volta'\n }\n | { kind: 'error', message: string }\n\nfunction parseArgs(argv: readonly string[]): ParseResult {\n let check = false\n let inPlace = false\n let dryRun = false\n let force = false\n let help = false\n let channel: string | undefined\n let registry: string | undefined\n let packageManager: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'volta' | undefined\n\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i]!\n switch (a) {\n case '--check': check = true; break\n case '--in-place':\n case '--inplace': inPlace = true; break\n case '--dry-run':\n case '--dryrun': dryRun = true; break\n case '--force': force = true; break\n case '-h':\n case '--help': help = true; break\n case '--channel':\n channel = argv[++i]\n if (!channel)\n return { kind: 'error', message: '--channel requires a value' }\n break\n case '--registry':\n registry = argv[++i]\n if (!registry)\n return { kind: 'error', message: '--registry requires a value' }\n break\n case '--package-manager':\n case '--pm': {\n const v = argv[++i]\n if (!v)\n return { kind: 'error', message: '--package-manager requires a value' }\n if (v !== 'npm' && v !== 'pnpm' && v !== 'yarn' && v !== 'bun' && v !== 'volta')\n return { kind: 'error', message: `unknown package manager: ${v}` }\n packageManager = v\n break\n }\n default:\n return { kind: 'error', message: `unknown argument: ${a}` }\n }\n }\n\n return { kind: 'ok', check, inPlace, dryRun, force, help, channel, registry, packageManager }\n}\n","import type { AgentHookMap } from '../agent'\nimport type { TodoItem } from './todos'\nimport { appendDynamicSection } from '../system-prompt'\nimport { selectActiveTodos } from './todos'\n\nexport interface ActiveTodoAnchorOptions {\n enabled?: boolean\n maxItems?: number\n heading?: string\n}\n\nexport function renderActiveTodoAnchor(\n todos: readonly TodoItem[],\n options: ActiveTodoAnchorOptions = {},\n): string {\n if (options.enabled === false || todos.length === 0)\n return ''\n const maxItems = Math.max(1, Math.floor(options.maxItems ?? 6))\n const heading = options.heading ?? 'Active Todo Anchor'\n const visible = todos.slice(0, maxItems)\n const lines = [`# ${heading}`, '<active_todos>']\n for (const item of visible)\n lines.push(`- [${item.status}] ${item.content}`)\n if (todos.length > visible.length)\n lines.push(`- ... ${todos.length - visible.length} more`)\n lines.push('</active_todos>')\n return lines.join('\\n')\n}\n\n/**\n * Optional chat-layer hook that keeps the live `todowrite` list visible in the\n * dynamic system prompt. It reads only live todos, never the archive, so an\n * auto-cleared completed plan is not reintroduced on later turns.\n */\nexport function createActiveTodoAnchorHooks(options: ActiveTodoAnchorOptions = {}): AgentHookMap {\n return {\n 'system:transform': (ctx) => {\n const state = selectActiveTodos(ctx.session)\n const anchor = renderActiveTodoAnchor(state.todos, options)\n if (anchor)\n ctx.system = appendDynamicSection(ctx.system, anchor)\n },\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"chat.js","names":[],"sources":["../src/chat/auto-update-cli.ts","../src/chat/todo-anchor.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// `zidane upgrade` subcommand — drop-in handler for consumer CLIs.\n//\n// Wraps `checkForUpdate` + `performSelfUpdate` + `performInPlaceSelfUpdate`\n// into a single function the host's `cli.ts` can call. The behavior layers:\n//\n// - no flags → check + run the package manager\n// - `--check` → check only, print the latest version + bail\n// - `--in-place` → skip the PM, download + atomic-rename the binary\n// - `--dry-run` → resolve everything but don't actually swap\n// - `--channel <tag>` → override dist-tag (defaults to `'latest'`)\n// - `--registry <url>`→ override the npm registry URL\n//\n// Pure I/O — writes to stdout/stderr, returns the exit code the caller\n// should pass to `process.exit`. No React, no OpenTUI; safe to call\n// before / instead of `runTui`.\n// ---------------------------------------------------------------------------\n\nimport {\n checkForUpdate,\n compareSemver,\n detectPackageManager,\n performInPlaceSelfUpdate,\n performSelfUpdate,\n resolvePlatformPackage,\n} from './auto-update'\n\nexport interface RunUpdateCommandOptions {\n /** Top-level package the user installs (e.g. `'zidane-tui'`). */\n packageName: string\n /** Inlined at build time. */\n currentVersion: string\n /** Args passed after `upgrade` (typically `process.argv.slice(3)`). */\n argv: readonly string[]\n /** Where to persist the TTL cache. Usually `paths.userDir`. */\n cacheDir?: string\n /** Default channel when `--channel` isn't passed. Defaults to `'latest'`. */\n defaultChannel?: string\n /**\n * Override the platform-package-name prefix used by `--in-place`.\n * Defaults to `'<packageName>-'`, matching the `zidane-tui-<key>` layout.\n */\n platformPackagePrefix?: string\n /** Override registry. Defaults to npmjs. */\n registry?: string\n /** stdout. Defaults to `process.stdout`. */\n stdout?: NodeJS.WritableStream\n /** stderr. Defaults to `process.stderr`. */\n stderr?: NodeJS.WritableStream\n}\n\nexport interface RunUpdateCommandResult {\n exitCode: number\n}\n\nconst UPGRADE_HELP = `Usage: zidane upgrade [options]\n\nUpdate the zidane CLI to the latest release.\n\nOptions:\n --check Print the latest version and exit (no install).\n --in-place Download the platform binary directly from npm\n and atomic-rename over the running binary.\n Skips the package manager. Refused on Volta.\n --dry-run Resolve everything but don't actually install.\n --channel <tag> dist-tag to query (default: latest).\n --registry <url> Override the npm registry.\n --package-manager <pm> Force npm | pnpm | yarn | bun | volta.\n --force Run the install even if we're already on latest,\n or the registry check failed.\n -h, --help Print this help.\n\nEnvironment:\n NO_UPDATE_NOTIFIER Silence the background check (set to \"1\").\n ZIDANE_NO_UPDATE Same, project-specific.\n`\n\n/**\n * Run the `upgrade` subcommand. Exit code contract:\n * - `0` — update succeeded, `--check` reported no update, or `--check`\n * reported an update (informational only).\n * - `1` — update failed (PM exit non-zero, in-place download failed,\n * registry returned non-2xx).\n * - `2` — argv parse error (unknown flag).\n */\nexport async function runUpdateCommand(options: RunUpdateCommandOptions): Promise<RunUpdateCommandResult> {\n const out = options.stdout ?? process.stdout\n const err = options.stderr ?? process.stderr\n const parsed = parseArgs(options.argv)\n if (parsed.kind === 'error') {\n err.write(`zidane upgrade: ${parsed.message}\\n`)\n err.write(UPGRADE_HELP)\n return { exitCode: 2 }\n }\n if (parsed.help) {\n out.write(UPGRADE_HELP)\n return { exitCode: 0 }\n }\n\n const channel = parsed.channel ?? options.defaultChannel ?? 'latest'\n const registry = parsed.registry ?? options.registry\n\n // Always force the check — user typed `upgrade`, env opt-outs shouldn't\n // get in the way.\n const status = await checkForUpdate({\n packageName: options.packageName,\n currentVersion: options.currentVersion,\n channel,\n registry,\n cacheDir: options.cacheDir,\n force: true,\n timeoutMs: 8000,\n })\n\n // `--check` is informational — degrade gracefully on registry errors\n // (offline laptop, restricted proxy) and exit 0 so the user can script\n // around it without quoting tricks.\n if (parsed.check) {\n if (status.source === 'error') {\n err.write(`Could not check \\`${channel}\\` (${status.error ?? 'unknown error'}). Current: v${options.currentVersion}.\\n`)\n return { exitCode: 0 }\n }\n if (!status.latest) {\n err.write(`Could not determine latest version on \\`${channel}\\`. Current: v${options.currentVersion}.\\n`)\n return { exitCode: 0 }\n }\n const cmp = compareSemver(status.latest, options.currentVersion)\n if (cmp > 0)\n out.write(`v${status.latest} is available on \\`${channel}\\` (current: v${options.currentVersion}).\\n`)\n else\n out.write(`Already on v${options.currentVersion} (latest on \\`${channel}\\` is v${status.latest}).\\n`)\n return { exitCode: 0 }\n }\n\n // Install path — a registry error means we don't KNOW if we need an\n // update. Refuse to spawn the PM blindly unless the user explicitly\n // asks via `--force`.\n if (status.source === 'error') {\n err.write(`zidane upgrade: registry check failed (${status.error ?? 'unknown error'})\\n`)\n if (!parsed.force) {\n err.write('Pass --force to attempt the install anyway.\\n')\n return { exitCode: 1 }\n }\n }\n\n if (status.latest && !parsed.force) {\n const cmp = compareSemver(status.latest, options.currentVersion)\n if (cmp <= 0) {\n out.write(`Already on v${options.currentVersion} (latest on \\`${channel}\\` is v${status.latest}).\\n`)\n return { exitCode: 0 }\n }\n }\n\n // ---------------------------------------------------------------------\n // In-place path\n // ---------------------------------------------------------------------\n\n if (parsed.inPlace) {\n const platformPkg = resolvePlatformPackage({\n prefix: options.platformPackagePrefix ?? `${options.packageName}-`,\n })\n if (!platformPkg) {\n err.write(`No prebuilt binary for ${process.platform}/${process.arch}. Run \\`${options.packageName}-upgrade\\` via your package manager instead.\\n`)\n return { exitCode: 1 }\n }\n out.write(`Downloading ${platformPkg}@${channel}…\\n`)\n const result = await performInPlaceSelfUpdate({\n packageName: platformPkg,\n channel,\n registry,\n dryRun: parsed.dryRun,\n })\n if (result.status === 'success') {\n const verb = parsed.dryRun ? 'Would install' : 'Installed'\n out.write(`${verb} v${result.installedVersion} at ${result.binaryPath}.\\n`)\n return { exitCode: 0 }\n }\n err.write(`In-place update failed: ${result.reason ?? 'unknown error'}\\n`)\n if (result.status === 'refused')\n err.write('Falling back to package-manager path (drop --in-place to retry).\\n')\n return { exitCode: 1 }\n }\n\n // ---------------------------------------------------------------------\n // Package-manager path\n // ---------------------------------------------------------------------\n\n const detected = detectPackageManager({ packageName: options.packageName, channel })\n if (detected.note)\n out.write(`${detected.note}\\n`)\n out.write(`Running: ${detected.argv.join(' ')}\\n`)\n if (parsed.dryRun)\n return { exitCode: 0 }\n\n const result = await performSelfUpdate({\n packageName: options.packageName,\n channel,\n packageManager: parsed.packageManager ?? 'auto',\n })\n if (result.spawnError) {\n err.write(`Failed to launch \\`${result.command.argv[0]}\\`: ${result.spawnError}\\n`)\n err.write('Is the package manager installed and on $PATH?\\n')\n return { exitCode: 1 }\n }\n return { exitCode: result.exitCode ?? 1 }\n}\n\n// ---------------------------------------------------------------------------\n// Argv parser — minimal, just enough to drop into the consumer's `cli.ts`.\n// We deliberately don't pull in commander/yargs for a 5-flag surface.\n// ---------------------------------------------------------------------------\n\ntype ParseResult\n = | {\n kind: 'ok'\n check: boolean\n inPlace: boolean\n dryRun: boolean\n force: boolean\n help: boolean\n channel?: string\n registry?: string\n packageManager?: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'volta'\n }\n | { kind: 'error', message: string }\n\nfunction parseArgs(argv: readonly string[]): ParseResult {\n let check = false\n let inPlace = false\n let dryRun = false\n let force = false\n let help = false\n let channel: string | undefined\n let registry: string | undefined\n let packageManager: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'volta' | undefined\n\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i]!\n switch (a) {\n case '--check': check = true; break\n case '--in-place':\n case '--inplace': inPlace = true; break\n case '--dry-run':\n case '--dryrun': dryRun = true; break\n case '--force': force = true; break\n case '-h':\n case '--help': help = true; break\n case '--channel':\n channel = argv[++i]\n if (!channel)\n return { kind: 'error', message: '--channel requires a value' }\n break\n case '--registry':\n registry = argv[++i]\n if (!registry)\n return { kind: 'error', message: '--registry requires a value' }\n break\n case '--package-manager':\n case '--pm': {\n const v = argv[++i]\n if (!v)\n return { kind: 'error', message: '--package-manager requires a value' }\n if (v !== 'npm' && v !== 'pnpm' && v !== 'yarn' && v !== 'bun' && v !== 'volta')\n return { kind: 'error', message: `unknown package manager: ${v}` }\n packageManager = v\n break\n }\n default:\n return { kind: 'error', message: `unknown argument: ${a}` }\n }\n }\n\n return { kind: 'ok', check, inPlace, dryRun, force, help, channel, registry, packageManager }\n}\n","import type { AgentHookMap } from '../agent'\nimport type { TodoItem } from './todos'\nimport { appendDynamicSection } from '../system-prompt'\nimport { selectActiveTodos } from './todos'\n\nexport interface ActiveTodoAnchorOptions {\n enabled?: boolean\n maxItems?: number\n heading?: string\n}\n\nexport function renderActiveTodoAnchor(\n todos: readonly TodoItem[],\n options: ActiveTodoAnchorOptions = {},\n): string {\n if (options.enabled === false || todos.length === 0)\n return ''\n const maxItems = Math.max(1, Math.floor(options.maxItems ?? 6))\n const heading = options.heading ?? 'Active Todo Anchor'\n const visible = todos.slice(0, maxItems)\n const lines = [`# ${heading}`, '<active_todos>']\n for (const item of visible)\n lines.push(`- [${item.status}] ${item.content}`)\n if (todos.length > visible.length)\n lines.push(`- ... ${todos.length - visible.length} more`)\n lines.push('</active_todos>')\n return lines.join('\\n')\n}\n\n/**\n * Optional chat-layer hook that keeps the live `todowrite` list visible in the\n * dynamic system prompt. It reads only live todos, never the archive, so an\n * auto-cleared completed plan is not reintroduced on later turns.\n */\nexport function createActiveTodoAnchorHooks(options: ActiveTodoAnchorOptions = {}): AgentHookMap {\n return {\n 'system:transform': (ctx) => {\n const state = selectActiveTodos(ctx.session)\n const anchor = renderActiveTodoAnchor(state.todos, options)\n if (anchor)\n ctx.system = appendDynamicSection(ctx.system, anchor)\n },\n }\n}\n"],"mappings":"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"}