zidane 7.0.32 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/{acp-bBDF-dhy.js → acp-B5UfEhMd.js} +4 -4
- package/dist/{acp-bBDF-dhy.js.map → acp-B5UfEhMd.js.map} +1 -1
- package/dist/acp-cli.js +6 -6
- package/dist/acp.d.ts +2 -2
- package/dist/acp.js +1 -1
- package/dist/{agent-BCG9JcZl.js → agent-_xxElOgH.js} +162 -18
- package/dist/agent-_xxElOgH.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-B4UmPm4H.js → anthropic-DPPs3wjJ.js} +111 -7
- package/dist/anthropic-DPPs3wjJ.js.map +1 -0
- package/dist/{approvals-DkwGBMZ9.js → approvals-u2T19Dc-.js} +275 -88
- package/dist/approvals-u2T19Dc-.js.map +1 -0
- package/dist/{auth-D0BHBb02.js → auth-HRKkOErn.js} +3 -3
- package/dist/{auth-D0BHBb02.js.map → auth-HRKkOErn.js.map} +1 -1
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +8 -8
- package/dist/contexts/daytona.d.ts +3 -3
- package/dist/contexts/docker.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +2 -2
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/{contexts-BSFQVclW.js → contexts-CRE9pw07.js} +544 -17
- package/dist/contexts-CRE9pw07.js.map +1 -0
- package/dist/contexts.d.ts +4 -4
- package/dist/contexts.js +2 -2
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +3 -3
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-B6FkK6ZN.d.ts → index-C37_ppWv.d.ts} +2 -2
- package/dist/index-C37_ppWv.d.ts.map +1 -0
- package/dist/{index-Ogi2CeHf.d.ts → index-D3TTaaQ5.d.ts} +20 -7
- package/dist/index-D3TTaaQ5.d.ts.map +1 -0
- package/dist/{index-CCB05-JZ.d.ts → index-DZhrTn-v.d.ts} +259 -12
- package/dist/index-DZhrTn-v.d.ts.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/{ipc-C10lnS-a.js → ipc-DwauKEE-.js} +3 -3
- package/dist/{ipc-C10lnS-a.js.map → ipc-DwauKEE-.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +3 -3
- package/dist/{types-U-rIVUDw.d.ts → isolation-Kfoof0MM.d.ts} +93 -2
- package/dist/isolation-Kfoof0MM.d.ts.map +1 -0
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/{plugins-B531Tz5b.js → plugins-gbI7SBA6.js} +3 -3
- package/dist/{plugins-B531Tz5b.js.map → plugins-gbI7SBA6.js.map} +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +1 -1
- package/dist/restate.d.ts +2 -2
- package/dist/restate.js +1 -1
- package/dist/{sandbox-CDl9tfTo.d.ts → sandbox-BH0WQkXn.d.ts} +2 -2
- package/dist/{sandbox-CDl9tfTo.d.ts.map → sandbox-BH0WQkXn.d.ts.map} +1 -1
- package/dist/{server--mwNA7oC.js → server-DvPnPSZb.js} +8 -8
- package/dist/{server--mwNA7oC.js.map → server-DvPnPSZb.js.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +7 -0
- package/dist/session/sqlite.js.map +1 -1
- package/dist/{session-CVy-2mAy.js → session-BqRP1hS7.js} +33 -3
- package/dist/session-BqRP1hS7.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/{skills-PJyiSRCp.js → skills-BC3dodWp.js} +2 -2
- package/dist/{skills-PJyiSRCp.js.map → skills-BC3dodWp.js.map} +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/{src-CjkY6fBj.js → src-CkNQKFKr.js} +3 -3
- package/dist/{src-CjkY6fBj.js.map → src-CkNQKFKr.js.map} +1 -1
- package/dist/{tool-formatters-Bu4repDJ.d.ts → tool-formatters-C5s88MUd.d.ts} +2 -2
- package/dist/{tool-formatters-Bu4repDJ.d.ts.map → tool-formatters-C5s88MUd.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-CJCxyVE-.d.ts → transcript-anchors-DxofXw_y.d.ts} +3 -3
- package/dist/transcript-anchors-DxofXw_y.d.ts.map +1 -0
- package/dist/tui.d.ts +21 -28
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +163 -69
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-HX3g3XIc.js → turn-operations-6JDu2ewy.js} +14 -2
- package/dist/{turn-operations-HX3g3XIc.js.map → turn-operations-6JDu2ewy.js.map} +1 -1
- package/dist/{turn-operations-qcv9UFcL.d.ts → turn-operations-BaQnxzhr.d.ts} +14 -4
- package/dist/{turn-operations-qcv9UFcL.d.ts.map → turn-operations-BaQnxzhr.d.ts.map} +1 -1
- package/dist/types-CWgENVLY.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/docs/ARCHITECTURE.md +2 -1
- package/docs/CHAT.md +9 -1
- package/docs/EXECUTION_CONTEXT.md +64 -3
- package/docs/SKILL.md +28 -0
- package/docs/TUI.md +6 -5
- package/package.json +1 -1
- package/dist/agent-BCG9JcZl.js.map +0 -1
- package/dist/anthropic-B4UmPm4H.js.map +0 -1
- package/dist/approvals-DkwGBMZ9.js.map +0 -1
- package/dist/contexts-BSFQVclW.js.map +0 -1
- package/dist/index-B6FkK6ZN.d.ts.map +0 -1
- package/dist/index-CCB05-JZ.d.ts.map +0 -1
- package/dist/index-Ogi2CeHf.d.ts.map +0 -1
- package/dist/session-CVy-2mAy.js.map +0 -1
- package/dist/transcript-anchors-CJCxyVE-.d.ts.map +0 -1
- package/dist/types-U-rIVUDw.d.ts.map +0 -1
package/dist/tui.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { C as estimateRebilledCostUsd } from "./openai-compat-Dy56weK8.js";
|
|
2
2
|
import { n as THINKING_LEVELS } from "./types-CWgENVLY.js";
|
|
3
3
|
import { t as buildContextSegments } from "./context-segments-BrEsRhA0.js";
|
|
4
|
-
import { $ as ExtensionInstallError, $n as effectiveContextWindow, A as buildPostCompactAttachments, Bn as artifactKindLabel, C as rehomePersistedStubs, Cn as parseExtensionScanPathEnv, Ct as basic_default, D as resolvePersistDir, E as resolveMcpWarningsDir, En as setDebugLogSink, Jn as renderArtifactRow, Ln as createExtensionBus, Lt as tailTruncate, M as selectFilesFromSession, Nn as resolveExtensionConfigValue, O as resolveSessionDir, P as compactConversation, Pn as sanitizeExtensionConfigActionPatch, Q as createExtensionPromptBridge, Qn as OUTPUT_RESERVE_TOKENS, T as resolveLegacySessionDir, Tn as createDebugLog, Vt as createModelSearchTool, Xt as artifacts_default, _n as registerExtensionHostModules, an as groupBindings, at as removeInstalledExtension, b as cleanupPersistedSession, bt as composePresets, ct as discoverAndBuildExtensionRegistry, dt as composeExtensionPreset, f as applyCompactSummaryCutoff, fn as resolveExtensionKeybindings, ft as disposeExtensionRegistry, gt as partitionExtensionCatalog, in as formatBindingForDisplay, k as resolveTasksDir, kn as coerceExtensionConfigInput, kt as isSpawnTool, mt as filterRegistryPlugins, nn as KEYBINDING_KEY_COL_WIDTH, on as keybindingsPath, ot as updateInstalledExtension, pt as filterExtensionRegistry, q as summaryToTurn, qn as refreshArtifact, rn as ensureKeybindingsFile, sn as matchesBinding, st as createExtensionHud, t as createAgent, tt as installExtensionFromSpec, vt as createExtensionHostRuntimeBridge, w as resolveLegacyPersistDir, wn as scanExtensionDirectories, xn as inlineLoadedExtension, zt as looksBinary } from "./agent-
|
|
5
|
-
import { D as shouldAutoGenerateTitle, E as generateSessionTitle, F as parseCommandInvocation, M as commandBlocksToContent, P as executeCommand, S as resolveInlineSuggestion, a as loginMcpServer, b as createPathAutocompleteProvider, c as SKILL_EDIT_METADATA_KEY, g as readSkillEditMarker, h as extensionScaffold, j as commandBlockToEvent, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, p as editSessionMetadata, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, x as patchInlineGhost, y as withZidaneSkillEditSkill } from "./src-
|
|
4
|
+
import { $ as ExtensionInstallError, $n as effectiveContextWindow, A as buildPostCompactAttachments, Bn as artifactKindLabel, C as rehomePersistedStubs, Cn as parseExtensionScanPathEnv, Ct as basic_default, D as resolvePersistDir, E as resolveMcpWarningsDir, En as setDebugLogSink, Jn as renderArtifactRow, Ln as createExtensionBus, Lt as tailTruncate, M as selectFilesFromSession, Nn as resolveExtensionConfigValue, O as resolveSessionDir, P as compactConversation, Pn as sanitizeExtensionConfigActionPatch, Q as createExtensionPromptBridge, Qn as OUTPUT_RESERVE_TOKENS, T as resolveLegacySessionDir, Tn as createDebugLog, Vt as createModelSearchTool, Xt as artifacts_default, _n as registerExtensionHostModules, an as groupBindings, at as removeInstalledExtension, b as cleanupPersistedSession, bt as composePresets, ct as discoverAndBuildExtensionRegistry, dt as composeExtensionPreset, f as applyCompactSummaryCutoff, fn as resolveExtensionKeybindings, ft as disposeExtensionRegistry, gt as partitionExtensionCatalog, in as formatBindingForDisplay, k as resolveTasksDir, kn as coerceExtensionConfigInput, kt as isSpawnTool, mt as filterRegistryPlugins, nn as KEYBINDING_KEY_COL_WIDTH, on as keybindingsPath, ot as updateInstalledExtension, pt as filterExtensionRegistry, q as summaryToTurn, qn as refreshArtifact, rn as ensureKeybindingsFile, sn as matchesBinding, st as createExtensionHud, t as createAgent, tt as installExtensionFromSpec, vt as createExtensionHostRuntimeBridge, w as resolveLegacyPersistDir, wn as scanExtensionDirectories, xn as inlineLoadedExtension, zt as looksBinary } from "./agent-_xxElOgH.js";
|
|
5
|
+
import { D as shouldAutoGenerateTitle, E as generateSessionTitle, F as parseCommandInvocation, M as commandBlocksToContent, P as executeCommand, S as resolveInlineSuggestion, a as loginMcpServer, b as createPathAutocompleteProvider, c as SKILL_EDIT_METADATA_KEY, g as readSkillEditMarker, h as extensionScaffold, j as commandBlockToEvent, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, p as editSessionMetadata, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, x as patchInlineGhost, y as withZidaneSkillEditSkill } from "./src-CkNQKFKr.js";
|
|
6
6
|
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
|
+
import { i as killProcessGroup, n as SUPPORTS_PROCESS_GROUPS, r as createProcessContext } from "./contexts-CRE9pw07.js";
|
|
7
8
|
import { n as appendCapped } from "./output-cap-C9zukcCj.js";
|
|
8
|
-
import { i as killProcessGroup, n as SUPPORTS_PROCESS_GROUPS, r as createProcessContext } from "./contexts-BSFQVclW.js";
|
|
9
9
|
import { u as errorMessage } from "./errors-DKiMrOKq.js";
|
|
10
|
-
import { E as buildCatalog, R as findGitRoot, c as SkillInstallError, l as installSkillFromSpec } from "./skills-
|
|
10
|
+
import { E as buildCatalog, R as findGitRoot, c as SkillInstallError, l as installSkillFromSpec } from "./skills-BC3dodWp.js";
|
|
11
11
|
import { i as nextLogLevel, n as filterLogRecords, r as formatLogLine } from "./logs-view-CWG8aUAG.js";
|
|
12
12
|
import { a as createRingBufferSink, c as logFileTimestamp, i as createLoggingHooks, n as createFileSink, o as fanoutSink, r as createLogger } from "./logger--C1VQjwJ.js";
|
|
13
13
|
import { i as sniffImageMediaType } from "./media-sniff-UKijEaiQ.js";
|
|
14
14
|
import { _ as hasAuthorizationHeader, h as McpOAuthProvider, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-CgNd-f3F.js";
|
|
15
15
|
import { replaceDynamicSection, splitSystemPrompt } from "./prompt.js";
|
|
16
|
-
import { a as getExtensionSessionState, c as setExtensionSessionState, i as demoteStaleRunningStatus, o as loadSession, t as createSession } from "./session-
|
|
16
|
+
import { a as getExtensionSessionState, c as setExtensionSessionState, i as demoteStaleRunningStatus, l as withExtensionSession, o as loadSession, t as createSession } from "./session-BqRP1hS7.js";
|
|
17
17
|
import { t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
|
|
18
18
|
import { s as withTimeout } from "./timeout-CjOG2mea.js";
|
|
19
19
|
import { i as installCacheBreakLogger } from "./cache-telemetry-ehVdWsg2.js";
|
|
20
20
|
import { s as resolveCompletionSubmit } from "./completion-core-BRo86R_L.js";
|
|
21
21
|
import { n as JsonRpcRemoteError, t as JsonRpcConnectionClosedError } from "./json-rpc-rSWMUh9b.js";
|
|
22
|
-
import { $ as
|
|
22
|
+
import { $ as providerKeySetChanged, $t as formatRunReceiptLine, A as chunkMarkdownForRender, C as usageTone, Cn as summarizeOutcomes, Dt as selectionAfterTurnRemoval, E as filterModelCatalog, En as createChatsCompletionProvider, Et as selectableTurnIds, F as stripHtmlCommentsOutsideCode, Gt as sessionEventMeta, Ht as sessionDirLabel, I as cacheBreakChip, K as chainPositionOf, Kt as shortSessionId, Lt as isMainSession, M as codeTokenHasClosingFence, N as normalizeMarkdownCodeFences, Nt as SESSION_EVENT_STATUS_STYLE, O as parseCustomModelQuery, Ot as streamEventSearchText, P as splitMarkdownCodeBlocks, Qt as formatRunReceiptCells, R as compactingLabel, S as resetLabel, Sn as stripEditOutcomesAnnotation, St as promptHistoryFromEvents, T as buildModelCatalog, Tt as retagUserPromptEventsFromRefs, U as DAEMON_HEALTH_STYLE, Ut as sessionEventExcerpt, V as streamingLabel, W as buildRunModel, X as pickChainPrimary, Xt as formatCostUsd, Y as filterChainFallbacks, Yt as fitRunReceiptCells, _ as turnContextSize, _t as isEditErrorResult, a as TOOL_DISPLAY, an as buildContextualDiff, b as formatUsagePercent, bn as resolveApprovalForPayload, bt as isVisible, d as finalizeStreamingMarkdown, dn as filetypeFromPath, en as formatTokenCount, et as reorderKeyed, f as finalizeStreamingMarkdownForOwner, fn as previewEditPayload, ft as createCommandsCompletionProvider, g as revealEarlierTranscriptEvents, gn as buildEditOutcomesAnnotation, gt as EDIT_TOOL_NAMES, h as replaceTranscriptTurnEvents, ht as BASH_CALL_ID_PREFIX, i as turnAsText, j as closeDanglingCodeFence, kt as turnSelectionOwnership, lt as createFilesCompletionProvider, mn as summarizeEditPayload, mt as buildLinearRamp, n as deleteTurnSafely, nn as hasRunReceipt, o as displayNameFor, on as buildUnifiedDiff, ot as createSkillsCompletionProvider, p as hiddenEarlierTranscriptCount, pt as blendHsl, q as chainsEqual, qt as truncateTitle, r as truncateTurnsAt, rn as runReceiptFromRun, rt as toggleChainEntry, s as formatToolCall, sn as clipDiffForRender, st as uniqueSkillNamesFromReferences, tt as restoreChainFallbacks, u as capTranscriptEvents, un as extractEditPayload, v as formatBalance, vn as mergeApprovalAndBodyOutcomes, vt as isTurnHighlighted, w as splitPromptSegments, wt as retagUserPromptEvents, x as mostConstrainedWindow, xn as rewriteMultiEditHeader, xt as isVisibleDuringSearch, yn as parseEditOutcomesFromResult, yt as isUserBashEvent, z as liveSessionCost } from "./turn-operations-6JDu2ewy.js";
|
|
23
23
|
import { a as searchHighlightRanges, c as searchSessionHistoryIndexAsync, i as highlightSegments, n as buildSessionSearchIndexAsync, r as filterSessionSearchCatalog, u as searchSessionIndexAsync } from "./history-search-C4bk1Wz_.js";
|
|
24
|
-
import { $ as supportsOAuth, $
|
|
25
|
-
import { E as renderDefaultCallbackPage, T as restoreModelOptions, b as modelSupportsReasoning, c as setPreferredCredential, g as getContextWindow, h as enabledModelOptions, l as setProviderCredential, n as applyApiKeyEnv, t as detectAuth, w as piIdOf, y as modelOptionsFor } from "./auth-
|
|
26
|
-
import { a as connectIpcClient, d as defaultSocketPath, f as ensureDaemonRunning, m as selfDaemonSpawnCommand, o as connectOrSpawnDaemon } from "./server
|
|
24
|
+
import { $ as supportsOAuth, $t as parsePluginScanPathEnv, A as useSafeModeQueue, Ai as listSessionMeta, Ar as chatWindowBehavior, At as useInteractionsActions, Bi as toolResultText, Bn as resolveStoragePaths, Cn as resolveTheme, Ct as createAutomaticInteractionResponse, Di as eventsFromTurns, Dt as makeRequestInteraction, Ei as deriveSessionTitle, Et as isModelInteraction, Fi as serverToolResultSummary, Fn as useDiscovery, Ft as installProviderDiagnosticHook, G as usageChecksOptedOut, Gn as countClaudeSessionFiles, H as fetchAllProviderUsage, Hi as usageByModel, Hn as createArtifactsCompletionProvider, Ht as applyThinkingBindingSetting, Ii as stripSpawnTokensLine, In as useDiscoveryOptional, J as fetchOAuthRedirect, Jn as mcpsWritePath, Jr as TODO_STATUS_GLYPHS, Kn as hasClaudeCodeSetup, Kt as resolveSandboxFromSettings, Li as sumRunCosts, Ln as ConfigProvider, M as addToSafelist, Mi as marginTopFor, Mn as quoteForShell, N as getSafelist, Ni as noticeTurnContent, Nn as createDiscoverySlot, Nr as discoverAgentsMd, O as SafeModeProvider, Oi as getSessionMeta, Ot as pendingInteractionsFromTurns, P as isOnSafelist, Pn as DiscoveryProvider, Q as runOAuthLogin, Qn as dedupMcpServersByName, Qt as discoverProjectPlugins, R as suggestSafelistEntries, Rn as useConfig, Si as createChatTurnsReadTool, Sn as resolveChipColor, St as buildResumedToolResultsTurn, U as fetchProviderUsage, Ut as createMainSession, V as clearProviderUsageCache, Vi as updateToolEventOutcomes, Vr as accentColor, Vt as createBuiltinCommands, W as providerUsageSupported, Wn as useCompletion, Wt as modelChainMetadata, X as redirectUriFromAuthUrl, Xn as upsertMcpServer, Xr as applyTodosSnapshot, Xt as runEndNotice, Yn as removeMcpServer, Z as oauthUsesManualCodePaste, Zn as buildMcpServers, Zt as buildPluginContributions, _ as buildSpawnEndEvent, _n as clampFps, _t as ASK_USER_TOOL, ai as setTodosForRun, an as hintsLength, ar as bootTick, at as subscribeMcpToolsCache, b as defaultSkillScanPaths, bi as envSection, bt as InteractionsProvider, c as useSelectStyle, cr as buildUpdateHint, d as useTheme, dn as DEFAULT_SETTINGS, dt as parentServerName, en as attachMcpWarnLog, er as discoverProjectMcps, f as discoverSystemMd, fn as SETTINGS_CATEGORIES, ft as McpAuthProvider, g as useStreamBuffer, gn as SettingsProvider, gr as useRestartRequired, h as userSystemMdPath, hn as SETTINGS_TOGGLES, ht as getMcpAuthStatus, ii as selectActiveTodos, in as clipHintsToWidth, ji as loadState, jn as parseEditorCommand, jr as groupArtifacts, jt as useInteractionsQueue, k as useSafeModeActions, ki as lastContextSizeFromTurns, l as useSurfaces, ln as listProjectFiles, lr as useUpdateCheck, lt as buildVisibleMcpRows, m as userScopeOverridesLoad, mn as SETTINGS_INPUTS, mt as useMcpAuthState, ni as pruneTodosByRun, nr as tryOpenBrowser, nt as mcpToolsCachePath, o as ThemeProvider, oi as todoProgressLabel, on as truncateTrailing, p as renderSystemMdSeed, pn as SETTINGS_CHOICES, pt as useMcpAuthDispatch, q as formatPathForCwd, qn as importFromClaudeCode, qt as createFileMcpCredentialStore, r as computeTurnAnchors, rn as EMPTY_HINTS, rr as tryRevealPath, rt as refreshMcpToolsCatalog, s as useColors, si as useActiveTodos, sn as buildHints, sr as buildRestartHint, st as useMcpToolToggleMap, ti as pickActiveRunId, tt as loadMcpToolsCache, un as useEnabledToggleSet, ut as indexOfServerRow, v as buildSpawnStartEvent, vi as buildBuildSystem, w as writeSessionExport, wi as compactSummaryEvent, wt as createInteractionTools, x as discoverProjectSkills, xi as chatReferenceTokensForPrompt, xt as PRESENT_PLAN_TOOL, y as buildSkillsConfig, yi as buildPlanSystem, yn as useSettings, yt as HOST_INTERACTION_ID_PREFIX, zi as toolCallPreview, zn as resolveConfig } from "./approvals-u2T19Dc-.js";
|
|
25
|
+
import { E as renderDefaultCallbackPage, T as restoreModelOptions, b as modelSupportsReasoning, c as setPreferredCredential, g as getContextWindow, h as enabledModelOptions, l as setProviderCredential, n as applyApiKeyEnv, t as detectAuth, w as piIdOf, y as modelOptionsFor } from "./auth-HRKkOErn.js";
|
|
26
|
+
import { a as connectIpcClient, d as defaultSocketPath, f as ensureDaemonRunning, m as selfDaemonSpawnCommand, o as connectOrSpawnDaemon } from "./server-DvPnPSZb.js";
|
|
27
27
|
import { createDockerContext } from "./contexts/docker.js";
|
|
28
28
|
import { createTuiStore } from "./session/sqlite.js";
|
|
29
29
|
import { _ as buildVisibleAuthRows, a as editTodo, b as parentProviderKey, c as NOTICE_GLYPH, f as validateMcpForm, g as instructionPreviewLines, h as instructionOriginBadge, i as cycleTodoStatus, l as MCP_TRANSPORTS, m as buildVisibleInstructionRows, n as buildTodoRetryMessage, r as clearTodos, s as removeTodo, t as addTodo, v as indexOfProviderRow, x as selectableSources } from "./todo-edits-Dw2oO2ON.js";
|
|
@@ -31,9 +31,9 @@ import { basename, dirname, join, relative, resolve } from "node:path";
|
|
|
31
31
|
import { Buffer } from "node:buffer";
|
|
32
32
|
import * as fs from "node:fs";
|
|
33
33
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
34
|
+
import { homedir, tmpdir } from "node:os";
|
|
34
35
|
import { readFile, unlink } from "node:fs/promises";
|
|
35
36
|
import { spawn, spawnSync } from "node:child_process";
|
|
36
|
-
import { homedir, tmpdir } from "node:os";
|
|
37
37
|
import { Fzf, byLengthAsc } from "fzf";
|
|
38
38
|
import * as React from "react";
|
|
39
39
|
import { Component, createContext, createElement, memo, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -10517,14 +10517,18 @@ const COMMENT_TEXTAREA_BINDINGS = (() => {
|
|
|
10517
10517
|
* accept/deny only happens through the picker below — same convention
|
|
10518
10518
|
* as `ApprovalBlock`.
|
|
10519
10519
|
*/
|
|
10520
|
-
|
|
10520
|
+
/** Default `abortRun` chord (`KEYBINDING_DEFS`), for callers that don't thread the resolved one. */
|
|
10521
|
+
const DEFAULT_ABORT_HINT = "ctrl+esc";
|
|
10522
|
+
function InteractionBlock({ request, onResolve, abortHint = DEFAULT_ABORT_HINT }) {
|
|
10521
10523
|
if (request.kind === "plan") return /* @__PURE__ */ jsx$1(PlanInteractionBlock, {
|
|
10522
10524
|
request,
|
|
10523
|
-
onResolve
|
|
10525
|
+
onResolve,
|
|
10526
|
+
abortHint
|
|
10524
10527
|
});
|
|
10525
10528
|
return /* @__PURE__ */ jsx$1(QuestionInteractionBlock, {
|
|
10526
10529
|
request,
|
|
10527
|
-
onResolve
|
|
10530
|
+
onResolve,
|
|
10531
|
+
abortHint
|
|
10528
10532
|
});
|
|
10529
10533
|
}
|
|
10530
10534
|
function InteractionShell({ title, maxHeight, minHeight, children }) {
|
|
@@ -10686,7 +10690,7 @@ const PLAN_OPTIONS = [
|
|
|
10686
10690
|
description: "refuse the plan. The agent sees your note and the run stops"
|
|
10687
10691
|
}
|
|
10688
10692
|
];
|
|
10689
|
-
function PlanInteractionBlock({ request, onResolve }) {
|
|
10693
|
+
function PlanInteractionBlock({ request, onResolve, abortHint }) {
|
|
10690
10694
|
const COLOR = useColors();
|
|
10691
10695
|
const focused = useModalAwareFocus();
|
|
10692
10696
|
const [stage, setStage] = useState("pick");
|
|
@@ -10720,7 +10724,7 @@ function PlanInteractionBlock({ request, onResolve }) {
|
|
|
10720
10724
|
});
|
|
10721
10725
|
}, [onResolve, decision]);
|
|
10722
10726
|
if (stage === "comment") return /* @__PURE__ */ jsxs(InteractionShell, {
|
|
10723
|
-
title: ` ${decision === "reject" ? "reject plan" : "revise plan"} ·
|
|
10727
|
+
title: ` ${decision === "reject" ? "reject plan" : "revise plan"} · ${abortHint} to abort run `,
|
|
10724
10728
|
children: [
|
|
10725
10729
|
/* @__PURE__ */ jsxs("text", {
|
|
10726
10730
|
fg: COLOR.dim,
|
|
@@ -10775,7 +10779,7 @@ function PlanInteractionBlock({ request, onResolve }) {
|
|
|
10775
10779
|
]
|
|
10776
10780
|
}, "comment");
|
|
10777
10781
|
return /* @__PURE__ */ jsxs(InteractionShell, {
|
|
10778
|
-
title:
|
|
10782
|
+
title: ` approve plan · ${abortHint} to abort run `,
|
|
10779
10783
|
children: [/* @__PURE__ */ jsx$1("text", {
|
|
10780
10784
|
fg: COLOR.brand,
|
|
10781
10785
|
wrapMode: "word",
|
|
@@ -10916,7 +10920,7 @@ const INSTRUCTIONS_STEP = {
|
|
|
10916
10920
|
placeholder: "anything the agent should know or do differently…",
|
|
10917
10921
|
required: false
|
|
10918
10922
|
};
|
|
10919
|
-
function QuestionInteractionBlock({ request, onResolve }) {
|
|
10923
|
+
function QuestionInteractionBlock({ request, onResolve, abortHint }) {
|
|
10920
10924
|
const COLOR = useColors();
|
|
10921
10925
|
const mdStyle = useMdStyle();
|
|
10922
10926
|
const focused = useModalAwareFocus();
|
|
@@ -10991,7 +10995,7 @@ function QuestionInteractionBlock({ request, onResolve }) {
|
|
|
10991
10995
|
maxRows
|
|
10992
10996
|
]);
|
|
10993
10997
|
return /* @__PURE__ */ jsxs(InteractionShell, {
|
|
10994
|
-
title: activeIndex >= modelQuestions.length ?
|
|
10998
|
+
title: activeIndex >= modelQuestions.length ? ` additional instructions · ↵ to send · ${abortHint} to abort run ` : modelQuestions.length > 1 ? ` answer ${activeIndex + 1}/${modelQuestions.length} · ${abortHint} to abort run ` : ` answer · ${abortHint} to abort run `,
|
|
10995
10999
|
maxHeight: maxRows,
|
|
10996
11000
|
minHeight: Math.min(maxRows, contentRows + 2, Math.max(WIZARD_MIN_ROWS, termRows - 2)),
|
|
10997
11001
|
children: [/* @__PURE__ */ jsxs("scrollbox", {
|
|
@@ -12883,7 +12887,7 @@ const PAGE_JUMP = 6;
|
|
|
12883
12887
|
function SessionsScreen({ sessions, currentId, focusedSessionId, onPick, onCreate, onFocusChange, contentMatches = /* @__PURE__ */ new Map(), contentSearching = false, contentSearchProgress = {
|
|
12884
12888
|
done: 0,
|
|
12885
12889
|
total: 0
|
|
12886
|
-
}, onSearchQueryChange, showAllProjects = false, scopeLabel, presence, showArtifacts = true, onToggleScope, currentProjectRoot, mainSessionId = null }) {
|
|
12890
|
+
}, onSearchQueryChange, showAllProjects = false, scopeLabel, presence, showArtifacts = true, onToggleScope, currentProjectRoot, mainSessionId = null, notice = null }) {
|
|
12887
12891
|
const focused = useModalAwareFocus();
|
|
12888
12892
|
const COLOR = useColors();
|
|
12889
12893
|
const inputRef = useRef(null);
|
|
@@ -13165,7 +13169,11 @@ function SessionsScreen({ sessions, currentId, focusedSessionId, onPick, onCreat
|
|
|
13165
13169
|
height: 1,
|
|
13166
13170
|
flexShrink: 0
|
|
13167
13171
|
},
|
|
13168
|
-
children:
|
|
13172
|
+
children: notice ? /* @__PURE__ */ jsx$1("text", {
|
|
13173
|
+
wrapMode: "none",
|
|
13174
|
+
fg: COLOR.warn,
|
|
13175
|
+
children: notice
|
|
13176
|
+
}) : contentSearching && /* @__PURE__ */ jsx$1(Spinner, { label: `searching conversation history ${contentSearchProgress.done}/${contentSearchProgress.total}` })
|
|
13169
13177
|
})
|
|
13170
13178
|
]
|
|
13171
13179
|
}), /* @__PURE__ */ jsx$1(TitleOverlay, {
|
|
@@ -13456,11 +13464,12 @@ const EMPTY_QUEUED_MESSAGES = [];
|
|
|
13456
13464
|
function shouldRenderTranscriptSearch(searchMode, query) {
|
|
13457
13465
|
return searchMode && query.trim().length > 0;
|
|
13458
13466
|
}
|
|
13459
|
-
function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EMPTY_QUEUED_MESSAGES, queueSelectionIndex = null, queueShortcuts, onEnterQueueFromEmptyPrompt, settings, onSubmit, session, pending, onApproval, pendingInteraction, onInteraction, completionProviders, inlineAutocompleteProviders, onCompletionTab, enterSelectsCompletion, onPopupOpenChange, selectedTurnId, onSelectTurn, onOpenTurn, onOpenSessionEvent, transcriptSearchMode = false, transcriptSearchQuery = "", transcriptSearchEvents = [], transcriptSearchSearching = false, onTranscriptSearchModeChange, onTranscriptSearchQueryChange, onTranscriptSearchNavigate, onTranscriptSearchOpen, onLoadEarlierTranscript, promptTriggerHints, attachImageBinding, editorBinding, sessionDetailsBinding, frameWidth, artifactsAction = null, onDraftChange, remoteDraft, onDraftAttachmentsChange, remoteDraftAttachments, remoteSearchQuery, remoteSuggest, resolveGhostRemote }) {
|
|
13467
|
+
function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EMPTY_QUEUED_MESSAGES, queueSelectionIndex = null, queueShortcuts, onEnterQueueFromEmptyPrompt, settings, onSubmit, session, pending, onApproval, pendingInteraction, onInteraction, completionProviders, inlineAutocompleteProviders, onCompletionTab, enterSelectsCompletion, onPopupOpenChange, selectedTurnId, onSelectTurn, onOpenTurn, onOpenSessionEvent, transcriptSearchMode = false, transcriptSearchQuery = "", transcriptSearchEvents = [], transcriptSearchSearching = false, onTranscriptSearchModeChange, onTranscriptSearchQueryChange, onTranscriptSearchNavigate, onTranscriptSearchOpen, onLoadEarlierTranscript, promptTriggerHints, attachImageBinding, editorBinding, abortBinding, sessionDetailsBinding, frameWidth, artifactsAction = null, onDraftChange, remoteDraft, onDraftAttachmentsChange, remoteDraftAttachments, remoteSearchQuery, remoteSuggest, resolveGhostRemote }) {
|
|
13460
13468
|
const COLOR = useColors();
|
|
13461
13469
|
const SURFACE = useSurfaces();
|
|
13462
13470
|
const titleText = session?.title ?? "New session";
|
|
13463
13471
|
const sessionShortcutKey = formatBindingForDisplay(sessionDetailsBinding);
|
|
13472
|
+
const abortHint = formatBindingForDisplay(abortBinding) || "ctrl+esc";
|
|
13464
13473
|
const showSessionShortcut = !!session && !!sessionShortcutKey && !busy && !pending && !pendingInteraction && settings.uiMode !== "minimal";
|
|
13465
13474
|
const userMessageCount = useMemo(() => events.filter((e) => e.kind === "user-prompt").length, [events]);
|
|
13466
13475
|
const { width: termWidth } = useTerminalDimensions();
|
|
@@ -13594,11 +13603,13 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
|
|
|
13594
13603
|
children: [
|
|
13595
13604
|
approvalPending && /* @__PURE__ */ jsx$1(ApprovalBlock, {
|
|
13596
13605
|
request: approvalPending,
|
|
13597
|
-
onPick: onApproval
|
|
13606
|
+
onPick: onApproval,
|
|
13607
|
+
abortHint
|
|
13598
13608
|
}),
|
|
13599
13609
|
pendingInteraction && !approvalPending && /* @__PURE__ */ jsx$1(InteractionBlock, {
|
|
13600
13610
|
request: pendingInteraction,
|
|
13601
|
-
onResolve: onInteraction
|
|
13611
|
+
onResolve: onInteraction,
|
|
13612
|
+
abortHint
|
|
13602
13613
|
}, pendingInteraction.id),
|
|
13603
13614
|
/* @__PURE__ */ jsxs("box", {
|
|
13604
13615
|
style: {
|
|
@@ -13632,6 +13643,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
|
|
|
13632
13643
|
onEnterQueueFromEmpty: onEnterQueueFromEmptyPrompt,
|
|
13633
13644
|
attachImageBinding,
|
|
13634
13645
|
editorBinding,
|
|
13646
|
+
abortBinding,
|
|
13635
13647
|
suspended: approvalPending != null || pendingInteraction != null,
|
|
13636
13648
|
onDraftChange,
|
|
13637
13649
|
remoteDraft,
|
|
@@ -13707,7 +13719,7 @@ function formatApprovalArgs(input) {
|
|
|
13707
13719
|
* rows, and a `height: options.length` select would overdraw into the
|
|
13708
13720
|
* summary above (the original bug).
|
|
13709
13721
|
*/
|
|
13710
|
-
function ApprovalBlock({ request, onPick }) {
|
|
13722
|
+
function ApprovalBlock({ request, onPick, abortHint }) {
|
|
13711
13723
|
const focused = useModalAwareFocus();
|
|
13712
13724
|
const COLOR = useColors();
|
|
13713
13725
|
const SELECT_THEME = useSelectStyle();
|
|
@@ -13738,7 +13750,7 @@ function ApprovalBlock({ request, onPick }) {
|
|
|
13738
13750
|
}, [request.tool, request.input]);
|
|
13739
13751
|
const height = 3 + options.length;
|
|
13740
13752
|
return /* @__PURE__ */ jsxs("box", {
|
|
13741
|
-
title:
|
|
13753
|
+
title: ` approve tool call · ${abortHint} to abort run `,
|
|
13742
13754
|
style: {
|
|
13743
13755
|
border: true,
|
|
13744
13756
|
borderColor: COLOR.warn,
|
|
@@ -13988,7 +14000,7 @@ const INLINE_GHOST_DEBOUNCE_MS = 120;
|
|
|
13988
14000
|
function isTranscriptSearchExitKey(event, cursorOffset) {
|
|
13989
14001
|
return event.name === "escape" || (event.name === "backspace" || event.name === "delete") && !event.ctrl && !event.meta && !event.shift && cursorOffset === 0;
|
|
13990
14002
|
}
|
|
13991
|
-
function PromptBlock({ userPrompts, onSubmit, completionProviders, inlineAutocompleteProviders, onCompletionTab, enterSelectsCompletion, onPopupOpenChange, searchMode = false, onSearchModeChange, onSearchQueryChange, onSearchNavigate, onSearchOpen, selectMode = null, triggerHints, busy = false, onEnterQueueFromEmpty, attachImageBinding, editorBinding, onDraftChange, remoteDraft, onDraftAttachmentsChange, remoteDraftAttachments, remoteSearchQuery, remoteSuggest, resolveGhostRemote, clipboardReader = readClipboardContent, suspended = false }) {
|
|
14003
|
+
function PromptBlock({ userPrompts, onSubmit, completionProviders, inlineAutocompleteProviders, onCompletionTab, enterSelectsCompletion, onPopupOpenChange, searchMode = false, onSearchModeChange, onSearchQueryChange, onSearchNavigate, onSearchOpen, selectMode = null, triggerHints, busy = false, onEnterQueueFromEmpty, attachImageBinding, editorBinding, abortBinding, onDraftChange, remoteDraft, onDraftAttachmentsChange, remoteDraftAttachments, remoteSearchQuery, remoteSuggest, resolveGhostRemote, clipboardReader = readClipboardContent, suspended = false }) {
|
|
13992
14004
|
const focused = useModalAwareFocus();
|
|
13993
14005
|
const renderer = useRenderer();
|
|
13994
14006
|
const COLOR = useColors();
|
|
@@ -14769,7 +14781,8 @@ function PromptBlock({ userPrompts, onSubmit, completionProviders, inlineAutocom
|
|
|
14769
14781
|
selectMode,
|
|
14770
14782
|
searchMode,
|
|
14771
14783
|
triggerHints,
|
|
14772
|
-
busy
|
|
14784
|
+
busy,
|
|
14785
|
+
abortBinding
|
|
14773
14786
|
})]
|
|
14774
14787
|
})
|
|
14775
14788
|
]
|
|
@@ -14814,24 +14827,26 @@ const PROMPT_HINTS_NORMAL = [
|
|
|
14814
14827
|
* swapped to "queue" — a streaming response means `↵` defers the next
|
|
14815
14828
|
* prompt instead of firing it immediately.
|
|
14816
14829
|
*/
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
]
|
|
14830
|
+
function promptHintsBusy(abortBinding) {
|
|
14831
|
+
return [
|
|
14832
|
+
{
|
|
14833
|
+
key: "↵",
|
|
14834
|
+
label: "queue"
|
|
14835
|
+
},
|
|
14836
|
+
{
|
|
14837
|
+
key: "shift+↵",
|
|
14838
|
+
label: "newline"
|
|
14839
|
+
},
|
|
14840
|
+
{
|
|
14841
|
+
key: "↑↓",
|
|
14842
|
+
label: "history"
|
|
14843
|
+
},
|
|
14844
|
+
...abortBinding ? [{
|
|
14845
|
+
key: formatBindingForDisplay(abortBinding),
|
|
14846
|
+
label: "abort"
|
|
14847
|
+
}] : []
|
|
14848
|
+
];
|
|
14849
|
+
}
|
|
14835
14850
|
/** Conversation search is the message selector with an optional filter. */
|
|
14836
14851
|
const PROMPT_HINTS_SEARCH = [
|
|
14837
14852
|
{
|
|
@@ -14878,11 +14893,12 @@ const PROMPT_HINTS_SELECT_QUEUE = [{
|
|
|
14878
14893
|
* Swaps the hint set based on `selectMode` so the user sees only the
|
|
14879
14894
|
* shortcuts that actually do something in the active mode.
|
|
14880
14895
|
*/
|
|
14881
|
-
function PromptHints({ selectMode, searchMode = false, triggerHints, busy = false }) {
|
|
14896
|
+
function PromptHints({ selectMode, searchMode = false, triggerHints, busy = false, abortBinding }) {
|
|
14882
14897
|
const { settings } = useSettings();
|
|
14883
14898
|
const { width: termWidth } = useTerminalDimensions();
|
|
14884
14899
|
const minimalResting = !selectMode && !searchMode && !busy && settings.uiMode === "minimal";
|
|
14885
|
-
const
|
|
14900
|
+
const busyHints = useMemo(() => promptHintsBusy(abortBinding), [abortBinding]);
|
|
14901
|
+
const primary = searchMode ? PROMPT_HINTS_SEARCH : selectMode === "queue" ? PROMPT_HINTS_SELECT_QUEUE : busy ? busyHints : minimalResting ? EMPTY_HINTS : PROMPT_HINTS_NORMAL;
|
|
14886
14902
|
const hints = useMemo(() => {
|
|
14887
14903
|
const budget = Math.max(0, termWidth - 5);
|
|
14888
14904
|
const tooLongCombined = !!triggerHints && triggerHints.length > 0 && !selectMode && primary.length > 0 && hintsLength(primary) + 3 + hintsLength(triggerHints) > budget;
|
|
@@ -21809,6 +21825,22 @@ function AppShell() {
|
|
|
21809
21825
|
useEffect(() => {
|
|
21810
21826
|
stableToolListRef.current = settings.stableToolList;
|
|
21811
21827
|
}, [settings.stableToolList]);
|
|
21828
|
+
const sandboxSettingsRef = useRef({
|
|
21829
|
+
sandbox: settings.sandbox,
|
|
21830
|
+
sandboxNetwork: settings.sandboxNetwork,
|
|
21831
|
+
sandboxAllowWrite: settings.sandboxAllowWrite
|
|
21832
|
+
});
|
|
21833
|
+
useEffect(() => {
|
|
21834
|
+
sandboxSettingsRef.current = {
|
|
21835
|
+
sandbox: settings.sandbox,
|
|
21836
|
+
sandboxNetwork: settings.sandboxNetwork,
|
|
21837
|
+
sandboxAllowWrite: settings.sandboxAllowWrite
|
|
21838
|
+
};
|
|
21839
|
+
}, [
|
|
21840
|
+
settings.sandbox,
|
|
21841
|
+
settings.sandboxNetwork,
|
|
21842
|
+
settings.sandboxAllowWrite
|
|
21843
|
+
]);
|
|
21812
21844
|
const interactionModeRef = useRef(settings.interactionMode);
|
|
21813
21845
|
useEffect(() => {
|
|
21814
21846
|
interactionModeRef.current = settings.interactionMode;
|
|
@@ -21886,6 +21918,9 @@ function AppShell() {
|
|
|
21886
21918
|
]);
|
|
21887
21919
|
const runCapsRef = useRef(runCaps);
|
|
21888
21920
|
runCapsRef.current = runCaps;
|
|
21921
|
+
useEffect(() => {
|
|
21922
|
+
applyThinkingBindingSetting(settings.thinkingBinding);
|
|
21923
|
+
}, [settings.thinkingBinding]);
|
|
21889
21924
|
/**
|
|
21890
21925
|
* When THIS window's last local run settled, per session — exempts the
|
|
21891
21926
|
* cross-process run guard from refusing our own settle-lagged
|
|
@@ -21930,10 +21965,16 @@ function AppShell() {
|
|
|
21930
21965
|
return;
|
|
21931
21966
|
}
|
|
21932
21967
|
}, []);
|
|
21933
|
-
|
|
21968
|
+
/**
|
|
21969
|
+
* Per-run window knobs: `autoCompact` (settings-driven) plus
|
|
21970
|
+
* `contextWindow` (always, when the catalog knows the model) so the loop's
|
|
21971
|
+
* window-relative wire budgets don't depend on the autocompact toggle.
|
|
21972
|
+
* Shared shape with the GUI/daemon engine via `chatWindowBehavior`.
|
|
21973
|
+
*/
|
|
21974
|
+
const windowBehaviorFor = useCallback((p) => {
|
|
21934
21975
|
const descriptor = providerRegistryRef.current[p.provider.key];
|
|
21935
21976
|
const summarizer = resolveCompactionSummarizer(p);
|
|
21936
|
-
return
|
|
21977
|
+
return chatWindowBehavior({
|
|
21937
21978
|
enabled: autoCompactRef.current,
|
|
21938
21979
|
threshold: autoCompactThresholdRef.current,
|
|
21939
21980
|
rawContextWindow: descriptor ? getContextWindow(descriptor, p.model) : null,
|
|
@@ -22608,6 +22649,16 @@ function AppShell() {
|
|
|
22608
22649
|
queueSelectionIndexRef.current = queueSelectionIndex;
|
|
22609
22650
|
const agentRef = useRef(null);
|
|
22610
22651
|
/**
|
|
22652
|
+
* `<env> Date:` pinned per session activation. The `system:transform`
|
|
22653
|
+
* hook below re-renders the env block every turn; letting it read the
|
|
22654
|
+
* wall clock would rewrite `system` at midnight, and Anthropic binds every
|
|
22655
|
+
* replayed thinking block to the exact system bytes it was produced under
|
|
22656
|
+
* — one date rollover would drop the whole session's reasoning (and the
|
|
22657
|
+
* prompt cache). A session keeps the date it was activated with; the next
|
|
22658
|
+
* activation (new or resumed session) picks up the current day.
|
|
22659
|
+
*/
|
|
22660
|
+
const envDateRef = useRef((/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
22661
|
+
/**
|
|
22611
22662
|
* Daemon runtime controller (experimental, `useDaemon` setting). When
|
|
22612
22663
|
* set, execution lives in the shared daemon and `agentRef` stays null —
|
|
22613
22664
|
* every `agentRef.current?.` consumer degrades soft by construction.
|
|
@@ -23197,7 +23248,8 @@ function AppShell() {
|
|
|
23197
23248
|
const envOpts = {
|
|
23198
23249
|
cwd,
|
|
23199
23250
|
...projectDir !== cwd ? { projectRoot: projectDir } : {},
|
|
23200
|
-
allowInteraction
|
|
23251
|
+
allowInteraction,
|
|
23252
|
+
date: envDateRef.current
|
|
23201
23253
|
};
|
|
23202
23254
|
ctx.system = replaceDynamicSection(ctx.system, envSection(envOpts));
|
|
23203
23255
|
});
|
|
@@ -23636,10 +23688,24 @@ function AppShell() {
|
|
|
23636
23688
|
modelCatalogTools.model_search = createModelSearchTool(catalog);
|
|
23637
23689
|
}
|
|
23638
23690
|
}
|
|
23691
|
+
const sandbox = launch?.context === "docker" ? {
|
|
23692
|
+
isolation: void 0,
|
|
23693
|
+
warning: void 0
|
|
23694
|
+
} : resolveSandboxFromSettings(sandboxSettingsRef.current, actualCwd, { dataDir });
|
|
23639
23695
|
const execution = launch?.context === "docker" ? createDockerContext({
|
|
23640
23696
|
image: launch.image,
|
|
23641
23697
|
cwd: actualCwd
|
|
23642
|
-
}) : createProcessContext({
|
|
23698
|
+
}) : createProcessContext({
|
|
23699
|
+
cwd: actualCwd,
|
|
23700
|
+
...sandbox.isolation ? { isolation: sandbox.isolation } : {}
|
|
23701
|
+
});
|
|
23702
|
+
if (sandbox.warning) emitNotice({
|
|
23703
|
+
severity: "warn",
|
|
23704
|
+
label: "sandbox"
|
|
23705
|
+
}, sandbox.warning, {
|
|
23706
|
+
session,
|
|
23707
|
+
persist: false
|
|
23708
|
+
});
|
|
23643
23709
|
const mergedSkills = {
|
|
23644
23710
|
...skillsConfig,
|
|
23645
23711
|
...composedPreset.skills ?? {}
|
|
@@ -24730,7 +24796,7 @@ function AppShell() {
|
|
|
24730
24796
|
...currentPicked.effort ? { thinking: currentPicked.effort } : {},
|
|
24731
24797
|
...Object.keys(runModelOptions).length > 0 ? { modelOptions: runModelOptions } : {},
|
|
24732
24798
|
behavior: {
|
|
24733
|
-
|
|
24799
|
+
...windowBehaviorFor(currentPicked),
|
|
24734
24800
|
...runCapsRef.current
|
|
24735
24801
|
}
|
|
24736
24802
|
});
|
|
@@ -24756,13 +24822,13 @@ function AppShell() {
|
|
|
24756
24822
|
runningRef.current = false;
|
|
24757
24823
|
wakeForTaskNotificationsRef.current();
|
|
24758
24824
|
}
|
|
24759
|
-
}, [stream,
|
|
24825
|
+
}, [stream, windowBehaviorFor]);
|
|
24760
24826
|
const activateSession = useCallback(async (id, key, opts) => {
|
|
24761
24827
|
const cleanup = teardown();
|
|
24762
24828
|
const activation = connectionRef.current.begin();
|
|
24763
24829
|
await cleanup;
|
|
24764
24830
|
if (!activation.isCurrent()) return;
|
|
24765
|
-
const loaded = id ? await loadSession(store, id) : null;
|
|
24831
|
+
const loaded = id ? await loadSession(store, id, { persistHeal: !(settingsRef.current.useDaemon && !isDaemonDisabledByEnv()) }) : null;
|
|
24766
24832
|
if (!activation.isCurrent()) return;
|
|
24767
24833
|
const freshProfile = loaded ? null : defaultAgentProfile();
|
|
24768
24834
|
const session = loaded ?? await createSession({
|
|
@@ -24793,10 +24859,11 @@ function AppShell() {
|
|
|
24793
24859
|
const useDaemon = settingsRef.current.useDaemon && !isDaemonDisabledByEnv();
|
|
24794
24860
|
if (useDaemon) {
|
|
24795
24861
|
setDaemonHealth("connecting");
|
|
24862
|
+
let seededFresh = false;
|
|
24796
24863
|
await activation.connect({
|
|
24797
24864
|
open: async (attempt) => {
|
|
24798
24865
|
agentRef.current = null;
|
|
24799
|
-
if (!loaded && typeof session.metadata.cwd !== "string") {
|
|
24866
|
+
if (!loaded && !seededFresh && typeof session.metadata.cwd !== "string") {
|
|
24800
24867
|
session.setMeta("cwd", cwdRef.current ?? process.cwd());
|
|
24801
24868
|
await session.save();
|
|
24802
24869
|
if (!attempt.isCurrent()) throw new Error("activation superseded");
|
|
@@ -24812,11 +24879,12 @@ function AppShell() {
|
|
|
24812
24879
|
if (sessionPick.effort && typeof session.metadata.effort !== "string") seedModelViaRpc = true;
|
|
24813
24880
|
} else if (!hasSessionModel(session.metadata) && activePick) seedModelViaRpc = true;
|
|
24814
24881
|
else activePick = null;
|
|
24815
|
-
} else if (activePick) {
|
|
24882
|
+
} else if (activePick && !seededFresh) {
|
|
24816
24883
|
for (const [k, v] of Object.entries(sessionModelMetadata(activePick))) session.setMeta(k, v);
|
|
24817
24884
|
await session.save();
|
|
24818
24885
|
if (!attempt.isCurrent()) throw new Error("activation superseded");
|
|
24819
24886
|
}
|
|
24887
|
+
seededFresh = true;
|
|
24820
24888
|
lastPushedModelRef.current = activePick ? modelPickTuple(activePick) : null;
|
|
24821
24889
|
if (!attempt.isCurrent()) throw new Error("activation superseded");
|
|
24822
24890
|
const sessionId = session.id;
|
|
@@ -25016,7 +25084,7 @@ function AppShell() {
|
|
|
25016
25084
|
notifyTodosChanged();
|
|
25017
25085
|
return;
|
|
25018
25086
|
}
|
|
25019
|
-
loadSession(store, sessionId).then((fresh) => {
|
|
25087
|
+
loadSession(store, sessionId, { persistHeal: false }).then((fresh) => {
|
|
25020
25088
|
if (!attempt.isCurrent() || !fresh || sessionRef.current?.id !== sessionId) return;
|
|
25021
25089
|
if (seq !== todosApplySeqRef.current) return;
|
|
25022
25090
|
applyTodosSnapshot(fresh, snapshot);
|
|
@@ -25141,6 +25209,7 @@ function AppShell() {
|
|
|
25141
25209
|
}
|
|
25142
25210
|
}
|
|
25143
25211
|
lastPushedModelRef.current = primed ? modelPickTuple(primed) : null;
|
|
25212
|
+
envDateRef.current = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
25144
25213
|
agentRef.current = buildAgent(session, key);
|
|
25145
25214
|
activation.localReady();
|
|
25146
25215
|
}
|
|
@@ -25294,13 +25363,32 @@ function AppShell() {
|
|
|
25294
25363
|
stateStore,
|
|
25295
25364
|
refreshAvailableProviders
|
|
25296
25365
|
]);
|
|
25366
|
+
const [sessionsNotice, setSessionsNotice] = useState(null);
|
|
25367
|
+
const localRunBlocksSwitch = useCallback((targetId) => {
|
|
25368
|
+
if (daemonRef.current || !busy) return false;
|
|
25369
|
+
if (targetId !== null && targetId === sessionRef.current?.id) return false;
|
|
25370
|
+
setSessionsNotice(`a run is in progress in this window — ${formatBindingForDisplay(keybindings.abortRun)} to abort it first, or turn on the daemon (${formatBindingForDisplay(keybindings.openSettings)} settings) to keep runs going while you switch`);
|
|
25371
|
+
return true;
|
|
25372
|
+
}, [
|
|
25373
|
+
busy,
|
|
25374
|
+
keybindings.abortRun,
|
|
25375
|
+
keybindings.openSettings
|
|
25376
|
+
]);
|
|
25377
|
+
useEffect(() => {
|
|
25378
|
+
if (screen !== "sessions") setSessionsNotice(null);
|
|
25379
|
+
}, [screen]);
|
|
25297
25380
|
const onCreateSession = useCallback(async () => {
|
|
25298
|
-
if (picked
|
|
25299
|
-
|
|
25381
|
+
if (!picked || localRunBlocksSwitch(null)) return;
|
|
25382
|
+
await activateSession(null, picked.provider.key);
|
|
25383
|
+
}, [
|
|
25384
|
+
picked,
|
|
25385
|
+
activateSession,
|
|
25386
|
+
localRunBlocksSwitch
|
|
25387
|
+
]);
|
|
25300
25388
|
const pendingSessionSwitchRef = useRef(null);
|
|
25301
25389
|
const [sessionSwitchNonce, setSessionSwitchNonce] = useState(0);
|
|
25302
25390
|
const onSwitchSession = useCallback(async (id) => {
|
|
25303
|
-
if (!picked) return;
|
|
25391
|
+
if (!picked || localRunBlocksSwitch(id)) return;
|
|
25304
25392
|
const targetRoot = sessions.find((s) => s.id === id)?.projectRoot;
|
|
25305
25393
|
if (targetRoot && targetRoot !== projectDir) {
|
|
25306
25394
|
pendingSessionSwitchRef.current = {
|
|
@@ -25322,7 +25410,8 @@ function AppShell() {
|
|
|
25322
25410
|
sessions,
|
|
25323
25411
|
projectDir,
|
|
25324
25412
|
setCwd,
|
|
25325
|
-
activateSession
|
|
25413
|
+
activateSession,
|
|
25414
|
+
localRunBlocksSwitch
|
|
25326
25415
|
]);
|
|
25327
25416
|
const orchestrationSeenRef = useRef(settings.orchestration);
|
|
25328
25417
|
useEffect(() => {
|
|
@@ -26086,7 +26175,7 @@ function AppShell() {
|
|
|
26086
26175
|
...picked.effort ? { thinking: picked.effort } : {},
|
|
26087
26176
|
...Object.keys(runModelOptions).length > 0 ? { modelOptions: runModelOptions } : {},
|
|
26088
26177
|
behavior: {
|
|
26089
|
-
|
|
26178
|
+
...windowBehaviorFor(picked),
|
|
26090
26179
|
...runCapsRef.current
|
|
26091
26180
|
}
|
|
26092
26181
|
});
|
|
@@ -26117,7 +26206,7 @@ function AppShell() {
|
|
|
26117
26206
|
}, [
|
|
26118
26207
|
picked,
|
|
26119
26208
|
stream,
|
|
26120
|
-
|
|
26209
|
+
windowBehaviorFor
|
|
26121
26210
|
]);
|
|
26122
26211
|
/**
|
|
26123
26212
|
* Run a `/` command: a workflow whose steps `emit` display-only output
|
|
@@ -26233,7 +26322,7 @@ function AppShell() {
|
|
|
26233
26322
|
...picked.effort ? { thinking: picked.effort } : {},
|
|
26234
26323
|
...Object.keys(runModelOptions).length > 0 ? { modelOptions: runModelOptions } : {},
|
|
26235
26324
|
behavior: {
|
|
26236
|
-
|
|
26325
|
+
...windowBehaviorFor(picked),
|
|
26237
26326
|
...runCapsRef.current
|
|
26238
26327
|
}
|
|
26239
26328
|
});
|
|
@@ -26469,7 +26558,7 @@ function AppShell() {
|
|
|
26469
26558
|
text: ""
|
|
26470
26559
|
});
|
|
26471
26560
|
emitBlock({ text: `\`❯ /${invocation.name}${invocation.args ? ` ${invocation.args}` : ""}\`` });
|
|
26472
|
-
const result = await executeCommand(command, ctx);
|
|
26561
|
+
const result = await withExtensionSession(session, () => executeCommand(command, ctx));
|
|
26473
26562
|
if (result.error) emitNotice({
|
|
26474
26563
|
severity: "error",
|
|
26475
26564
|
label: "command"
|
|
@@ -26497,7 +26586,7 @@ function AppShell() {
|
|
|
26497
26586
|
stream,
|
|
26498
26587
|
cwd,
|
|
26499
26588
|
picked,
|
|
26500
|
-
|
|
26589
|
+
windowBehaviorFor,
|
|
26501
26590
|
providerRegistry,
|
|
26502
26591
|
interactions,
|
|
26503
26592
|
credentialedModelEntries
|
|
@@ -28314,8 +28403,11 @@ function AppShell() {
|
|
|
28314
28403
|
}
|
|
28315
28404
|
return;
|
|
28316
28405
|
}
|
|
28406
|
+
if (matchesBinding(key, keybindings.abortRun)) {
|
|
28407
|
+
if (busy || pendingApproval) onAbort();
|
|
28408
|
+
return;
|
|
28409
|
+
}
|
|
28317
28410
|
if (key.name !== "escape") return;
|
|
28318
|
-
if (busy || pendingApproval) return onAbort();
|
|
28319
28411
|
if (popupOpenRef.current) return;
|
|
28320
28412
|
if (screen === "chat") return onOpenSessions();
|
|
28321
28413
|
if (screen === "sessions") {
|
|
@@ -28550,7 +28642,8 @@ function AppShell() {
|
|
|
28550
28642
|
presence: sessionPresence,
|
|
28551
28643
|
onToggleScope: toggleSessionsScope,
|
|
28552
28644
|
currentProjectRoot: projectDir,
|
|
28553
|
-
mainSessionId: settings.orchestration ? mainSessionId : null
|
|
28645
|
+
mainSessionId: settings.orchestration ? mainSessionId : null,
|
|
28646
|
+
notice: sessionsNotice
|
|
28554
28647
|
}),
|
|
28555
28648
|
screen === "chat" && /* @__PURE__ */ jsxs("box", {
|
|
28556
28649
|
style: {
|
|
@@ -28618,7 +28711,8 @@ function AppShell() {
|
|
|
28618
28711
|
promptTriggerHints,
|
|
28619
28712
|
attachImageBinding: keybindings.attachClipboardImage,
|
|
28620
28713
|
editorBinding: settings.externalEditor ? keybindings.openExternalEditor : void 0,
|
|
28621
|
-
sessionDetailsBinding: keybindings.openSessionDetails
|
|
28714
|
+
sessionDetailsBinding: keybindings.openSessionDetails,
|
|
28715
|
+
abortBinding: keybindings.abortRun
|
|
28622
28716
|
})
|
|
28623
28717
|
}), artifactsPanelVisible && /* @__PURE__ */ jsx$1(ArtifactsPanel, {
|
|
28624
28718
|
load: loadPanelArtifacts,
|