zidane 6.3.4 → 6.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/{acp-IgXPptYr.js → acp-Xkhrpx8r.js} +4 -4
  2. package/dist/{acp-IgXPptYr.js.map → acp-Xkhrpx8r.js.map} +1 -1
  3. package/dist/acp-cli.js +6 -6
  4. package/dist/acp.d.ts +2 -2
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-BJuiohV_.js → agent-xjMzFclr.js} +236 -23
  7. package/dist/{agent-BJuiohV_.js.map → agent-xjMzFclr.js.map} +1 -1
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/{anthropic-Drd3842n.js → anthropic-BN0iPMox.js} +20 -5
  11. package/dist/anthropic-BN0iPMox.js.map +1 -0
  12. package/dist/{auth-WkdClN2Y.js → auth-Dptb8U5J.js} +10 -5
  13. package/dist/auth-Dptb8U5J.js.map +1 -0
  14. package/dist/chat/pure.d.ts +3 -3
  15. package/dist/chat.d.ts +4 -4
  16. package/dist/chat.d.ts.map +1 -1
  17. package/dist/chat.js +3 -3
  18. package/dist/{context-transport-DAjjzK_x.js → context-transport-O-oQHwhP.js} +3 -3
  19. package/dist/{context-transport-DAjjzK_x.js.map → context-transport-O-oQHwhP.js.map} +1 -1
  20. package/dist/contexts/daytona.d.ts +3 -3
  21. package/dist/contexts/docker.d.ts +1 -1
  22. package/dist/contexts/e2b.d.ts +2 -2
  23. package/dist/contexts/sandbox.d.ts +1 -1
  24. package/dist/contexts-DWVt7MvF.js.map +1 -1
  25. package/dist/contexts.d.ts +3 -3
  26. package/dist/eval.d.ts +1 -1
  27. package/dist/eval.js +1 -1
  28. package/dist/extensions.d.ts +1 -1
  29. package/dist/extensions.js +1 -1
  30. package/dist/headless.d.ts +1 -1
  31. package/dist/headless.js +3 -3
  32. package/dist/{index-B9jSo84a.d.ts → index-C8TwH34B.d.ts} +2 -2
  33. package/dist/index-C8TwH34B.d.ts.map +1 -0
  34. package/dist/{index-D-DPqXxU.d.ts → index-DTIe4e1R.d.ts} +268 -10
  35. package/dist/index-DTIe4e1R.d.ts.map +1 -0
  36. package/dist/index.d.ts +5 -5
  37. package/dist/index.js +9 -9
  38. package/dist/{login-ClSY8pN6.js → login-DZHMF7Gl.js} +2 -2
  39. package/dist/{login-ClSY8pN6.js.map → login-DZHMF7Gl.js.map} +1 -1
  40. package/dist/{mcp-UIBc81Zm.js → mcp-B5iXOceC.js} +3 -3
  41. package/dist/{mcp-UIBc81Zm.js.map → mcp-B5iXOceC.js.map} +1 -1
  42. package/dist/mcp.d.ts +1 -1
  43. package/dist/mcp.js +1 -1
  44. package/dist/{messages-B-Zt-_Oz.js → messages-DoHRwMw-.js} +2 -2
  45. package/dist/{messages-B-Zt-_Oz.js.map → messages-DoHRwMw-.js.map} +1 -1
  46. package/dist/{openai-compat-BF1pSB_F.js → openai-compat-Bf9uMTMa.js} +60 -3
  47. package/dist/openai-compat-Bf9uMTMa.js.map +1 -0
  48. package/dist/output/stream-json.d.ts +1 -1
  49. package/dist/output/terminal.d.ts +1 -1
  50. package/dist/presets.d.ts +1 -1
  51. package/dist/presets.js +1 -1
  52. package/dist/providers/anthropic.d.ts +1 -1
  53. package/dist/providers/anthropic.js +1 -1
  54. package/dist/providers/arcee.d.ts +1 -1
  55. package/dist/providers/arcee.js +1 -1
  56. package/dist/providers/baseten.d.ts +1 -1
  57. package/dist/providers/baseten.js +4 -2
  58. package/dist/providers/baseten.js.map +1 -1
  59. package/dist/providers/cerebras.d.ts +1 -1
  60. package/dist/providers/cerebras.js +1 -1
  61. package/dist/providers/local.d.ts +1 -1
  62. package/dist/providers/local.js +1 -1
  63. package/dist/providers/openai-compat.d.ts +1 -1
  64. package/dist/providers/openai-compat.js +1 -1
  65. package/dist/providers/openai.d.ts +1 -1
  66. package/dist/providers/openai.js +2 -2
  67. package/dist/providers/openrouter.d.ts +1 -1
  68. package/dist/providers/openrouter.js +3 -1
  69. package/dist/providers/openrouter.js.map +1 -1
  70. package/dist/providers/xai.d.ts +1 -1
  71. package/dist/providers/xai.js +1 -1
  72. package/dist/{providers-C-lh3sVD.js → providers-BlaXBUwd.js} +3 -3
  73. package/dist/{providers-C-lh3sVD.js.map → providers-BlaXBUwd.js.map} +1 -1
  74. package/dist/providers.d.ts +2 -2
  75. package/dist/providers.js +5 -5
  76. package/dist/restate.d.ts +2 -2
  77. package/dist/{sandbox-DqwpKX18.d.ts → sandbox-DLY6uah7.d.ts} +2 -2
  78. package/dist/{sandbox-DqwpKX18.d.ts.map → sandbox-DLY6uah7.d.ts.map} +1 -1
  79. package/dist/session/sqlite.d.ts +1 -1
  80. package/dist/{session-BE9_p0sN.js → session-Bdk31kA5.js} +2 -2
  81. package/dist/{session-BE9_p0sN.js.map → session-Bdk31kA5.js.map} +1 -1
  82. package/dist/session.d.ts +1 -1
  83. package/dist/session.js +2 -2
  84. package/dist/skills.d.ts +1 -1
  85. package/dist/{stdio-e45MhlYy.js → stdio-BsB0QEE9.js} +2 -2
  86. package/dist/{stdio-e45MhlYy.js.map → stdio-BsB0QEE9.js.map} +1 -1
  87. package/dist/{stdio-loader-Bkrs9e8t.js → stdio-loader-p7qCIzPS.js} +2 -2
  88. package/dist/{stdio-loader-Bkrs9e8t.js.map → stdio-loader-p7qCIzPS.js.map} +1 -1
  89. package/dist/{tool-formatters-BX9TaWAr.d.ts → tool-formatters-B_dGfYqT.d.ts} +2 -2
  90. package/dist/{tool-formatters-BX9TaWAr.d.ts.map → tool-formatters-B_dGfYqT.d.ts.map} +1 -1
  91. package/dist/tools/fetch-url.d.ts +1 -1
  92. package/dist/tools/web-search.d.ts +1 -1
  93. package/dist/tools.d.ts +1 -1
  94. package/dist/tools.js +1 -1
  95. package/dist/{transcript-anchors-9LKsM0OZ.js → transcript-anchors-Bsmm4435.js} +68 -28
  96. package/dist/transcript-anchors-Bsmm4435.js.map +1 -0
  97. package/dist/{transcript-anchors-BpCQElT6.d.ts → transcript-anchors-CqxIlrhv.d.ts} +15 -6
  98. package/dist/transcript-anchors-CqxIlrhv.d.ts.map +1 -0
  99. package/dist/tui.d.ts +22 -6
  100. package/dist/tui.d.ts.map +1 -1
  101. package/dist/tui.js +214 -211
  102. package/dist/tui.js.map +1 -1
  103. package/dist/{turn-operations-C_bn9UmE.d.ts → turn-operations-D7JhuW_X.d.ts} +3 -3
  104. package/dist/{turn-operations-C_bn9UmE.d.ts.map → turn-operations-D7JhuW_X.d.ts.map} +1 -1
  105. package/dist/types-BIarq1qE.js.map +1 -1
  106. package/dist/{types-DdZMQxfT.d.ts → types-M2DauK2D.d.ts} +2 -2
  107. package/dist/{types-DdZMQxfT.d.ts.map → types-M2DauK2D.d.ts.map} +1 -1
  108. package/dist/types.d.ts +3 -3
  109. package/dist/{xai-CLqZQdcj.js → xai-BI4KgCGS.js} +2 -2
  110. package/dist/{xai-CLqZQdcj.js.map → xai-BI4KgCGS.js.map} +1 -1
  111. package/docs/ARCHITECTURE.md +29 -1
  112. package/docs/CHAT.md +1 -1
  113. package/docs/RUN_IN_BACKGROUND.md +2 -2
  114. package/docs/SKILL.md +1 -1
  115. package/docs/TUI.md +1 -1
  116. package/package.json +1 -1
  117. package/dist/anthropic-Drd3842n.js.map +0 -1
  118. package/dist/auth-WkdClN2Y.js.map +0 -1
  119. package/dist/index-B9jSo84a.d.ts.map +0 -1
  120. package/dist/index-D-DPqXxU.d.ts.map +0 -1
  121. package/dist/openai-compat-BF1pSB_F.js.map +0 -1
  122. package/dist/transcript-anchors-9LKsM0OZ.js.map +0 -1
  123. package/dist/transcript-anchors-BpCQElT6.d.ts.map +0 -1
package/dist/tui.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as InteractionsProvider, $t as countClaudeSessionFiles, A as runOAuthLogin, Bt as ConfigProvider, Cn as discoverAgentsMd, Cr as toolCallPreview, Ct as clampFps, D as formatPathForCwd, Dt as resolveChipColor, Er as usageByModel, F as refreshMcpToolsCatalog, Gt as chainPositionOf, H as indexOfServerRow, Ht as resolveConfig, It as createDiscoverySlot, J as useMcpAuthDispatch, Jt as providerKeySetChanged, Kt as chainsEqual, L as subscribeMcpToolsCache, Ln as TODO_STATUS_GLYPHS, Lt as DiscoveryProvider, N as loadMcpToolsCache, O as fetchOAuthRedirect, Ot as resolveTheme, P as mcpToolsCachePath, Q as ASK_USER_TOOL, Qt as useCompletion, Rt as useDiscovery, Sn as chatAutoCompactBehavior, St as SettingsProvider, T as suggestSafelistEntries, Tr as updateToolEventOutcomes, U as parentServerName, Ut as resolveStoragePaths, V as buildVisibleMcpRows, Vt as useConfig, W as createFileMcpCredentialStore, Wn as pruneTodosByRun, Wt as buildRunModel, X as getMcpAuthStatus, Y as useMcpAuthState, Yt as restoreChainFallbacks, Zt as toggleChainEntry, _ as useSafeModeQueue, _r as marginTopFor, _t as DEFAULT_SETTINGS, a as useSurfaces, an as buildMcpServers, ar as buildPlanSystem, at as pendingInteractionsFromTurns, b as getSafelist, br as stripSpawnTokensLine, bt as SETTINGS_INPUTS, c as useStreamBuffer, cr as createChatTurnsReadTool, ct as useInteractionsQueue, d as discoverProjectSkills, dn as bootTick, dt as hintsLength, en as hasClaudeCodeSetup, et as PRESENT_PLAN_TOOL, fn as buildUpdateHint, fr as deriveSessionTitle, ft as truncateTrailing, g as useSafeModeActions, gr as loadState, gt as useEnabledToggleSet, h as SafeModeProvider, hr as listSessionMeta, ht as listProjectFiles, i as useSelectStyle, in as upsertMcpServer, ir as buildBuildSystem, it as makeRequestInteraction, j as supportsOAuth, jn as accentColor, k as oauthUsesManualCodePaste, l as buildSkillsConfig, ln as tryOpenBrowser, lt as EMPTY_HINTS, m as writeSessionExport, mr as lastContextSizeFromTurns, n as ThemeProvider, nn as mcpsWritePath, nt as createInteractionTools, or as envSection, pn as useUpdateCheck, pr as eventsFromTurns, pt as buildHints, q as McpAuthProvider, qn as useActiveTodos, qt as filterChainFallbacks, r as useColors, rn as removeMcpServer, s as useTheme, sn as discoverProjectMcps, sr as chatReferenceTokensForPrompt, st as useInteractionsActions, t as computeTurnAnchors, tn as importFromClaudeCode, tt as buildResumedToolResultsTurn, u as defaultSkillScanPaths, ur as compactSummaryEvent, ut as clipHintsToWidth, vt as SETTINGS_CATEGORIES, wr as toolResultText, wt as useSettings, x as isOnSafelist, xr as sumRunCosts, xt as SETTINGS_TOGGLES, y as addToSafelist, yr as serverToolResultSummary, yt as SETTINGS_CHOICES, z as useMcpToolToggleMap, zt as useDiscoveryOptional } from "./transcript-anchors-9LKsM0OZ.js";
2
- import { $t as registerExtensionHostModules, Et as looksBinary, G as installExtensionFromSpec, Gt as keybindingsPath, H as createExtensionPromptBridge, Ht as ensureKeybindingsFile, Kt as matchesBinding, L as summaryToTurn, Ot as createModelSearchTool, Q as discoverAndBuildExtensionRegistry, S as selectFilesFromSession, U as ExtensionInstallError, Ut as formatBindingForDisplay, Vt as KEYBINDING_KEY_COL_WIDTH, Wt as groupBindings, X as updateInstalledExtension, Y as removeInstalledExtension, Z as createExtensionHud, Zt as resolveExtensionKeybindings, _ as resolveMcpWarningsDir, _n as OUTPUT_RESERVE_TOKENS, _t as isSpawnTool, an as parseExtensionScanPathEnv, at as partitionExtensionCatalog, b as buildPostCompactAttachments, c as applyCompactSummaryCutoff, dt as basic_default, g as rehomePersistedStubs, ln as coerceExtensionConfigInput, m as cleanupPersistedSession, mn as sanitizeExtensionConfigActionPatch, nt as disposeExtensionRegistry, on as scanExtensionDirectories, ot as createExtensionHostRuntimeBridge, pn as resolveExtensionConfigValue, rn as inlineLoadedExtension, rt as filterExtensionRegistry, t as createAgent, tt as composeExtensionPreset, v as resolvePersistDir, vn as effectiveContextWindow, w as compactConversation, wt as tailTruncate, y as resolveTasksDir } from "./agent-BJuiohV_.js";
1
+ import { $ as InteractionsProvider, $t as countClaudeSessionFiles, A as runOAuthLogin, Bt as ConfigProvider, Cn as discoverAgentsMd, Cr as toolCallPreview, Ct as clampFps, D as formatPathForCwd, Dt as resolveChipColor, Er as usageByModel, F as refreshMcpToolsCatalog, Gt as chainPositionOf, H as indexOfServerRow, Ht as resolveConfig, It as createDiscoverySlot, J as useMcpAuthDispatch, Jt as providerKeySetChanged, Kt as chainsEqual, L as subscribeMcpToolsCache, Ln as TODO_STATUS_GLYPHS, Lt as DiscoveryProvider, N as loadMcpToolsCache, O as fetchOAuthRedirect, Ot as resolveTheme, P as mcpToolsCachePath, Q as ASK_USER_TOOL, Qt as useCompletion, Rt as useDiscovery, Sn as chatAutoCompactBehavior, St as SettingsProvider, T as suggestSafelistEntries, Tr as updateToolEventOutcomes, U as parentServerName, Ut as resolveStoragePaths, V as buildVisibleMcpRows, Vt as useConfig, W as createFileMcpCredentialStore, Wn as pruneTodosByRun, Wt as buildRunModel, X as getMcpAuthStatus, Y as useMcpAuthState, Yt as restoreChainFallbacks, Zt as toggleChainEntry, _ as useSafeModeQueue, _r as marginTopFor, _t as DEFAULT_SETTINGS, a as useSurfaces, an as buildMcpServers, ar as buildPlanSystem, at as pendingInteractionsFromTurns, b as getSafelist, br as stripSpawnTokensLine, bt as SETTINGS_INPUTS, c as useStreamBuffer, cr as createChatTurnsReadTool, ct as useInteractionsQueue, d as discoverProjectSkills, dn as bootTick, dt as hintsLength, en as hasClaudeCodeSetup, et as PRESENT_PLAN_TOOL, fn as buildUpdateHint, fr as deriveSessionTitle, ft as truncateTrailing, g as useSafeModeActions, gr as loadState, gt as useEnabledToggleSet, h as SafeModeProvider, hr as listSessionMeta, ht as listProjectFiles, i as useSelectStyle, in as upsertMcpServer, ir as buildBuildSystem, it as makeRequestInteraction, j as supportsOAuth, jn as accentColor, k as oauthUsesManualCodePaste, l as buildSkillsConfig, ln as tryOpenBrowser, lt as EMPTY_HINTS, m as writeSessionExport, mr as lastContextSizeFromTurns, n as ThemeProvider, nn as mcpsWritePath, nt as createInteractionTools, or as envSection, pn as useUpdateCheck, pr as eventsFromTurns, pt as buildHints, q as McpAuthProvider, qn as useActiveTodos, qt as filterChainFallbacks, r as useColors, rn as removeMcpServer, s as useTheme, sn as discoverProjectMcps, sr as chatReferenceTokensForPrompt, st as useInteractionsActions, t as computeTurnAnchors, tn as importFromClaudeCode, tt as buildResumedToolResultsTurn, u as defaultSkillScanPaths, ur as compactSummaryEvent, ut as clipHintsToWidth, vt as SETTINGS_CATEGORIES, wr as toolResultText, wt as useSettings, x as isOnSafelist, xr as sumRunCosts, xt as SETTINGS_TOGGLES, y as addToSafelist, yr as serverToolResultSummary, yt as SETTINGS_CHOICES, z as useMcpToolToggleMap, zt as useDiscoveryOptional } from "./transcript-anchors-Bsmm4435.js";
2
+ import { $ as removeInstalledExtension, At as looksBinary, C as resolveTasksDir, E as selectFilesFromSession, Gt as KEYBINDING_KEY_COL_WIDTH, Jt as groupBindings, K as createExtensionPromptBridge, Kt as ensureKeybindingsFile, Mt as createModelSearchTool, O as compactConversation, Ot as tailTruncate, S as resolveSessionDir, Sn as effectiveContextWindow, V as summaryToTurn, Xt as matchesBinding, Y as installExtensionFromSpec, Yt as keybindingsPath, _ as rehomePersistedStubs, _n as resolveExtensionConfigValue, at as composeExtensionPreset, b as resolveMcpWarningsDir, c as applyCompactSummaryCutoff, et as updateInstalledExtension, ht as basic_default, ln as parseExtensionScanPathEnv, lt as partitionExtensionCatalog, m as cleanupPersistedSession, nt as discoverAndBuildExtensionRegistry, ot as disposeExtensionRegistry, pn as coerceExtensionConfigInput, q as ExtensionInstallError, qt as formatBindingForDisplay, rn as registerExtensionHostModules, sn as inlineLoadedExtension, st as filterExtensionRegistry, t as createAgent, tn as resolveExtensionKeybindings, tt as createExtensionHud, un as scanExtensionDirectories, ut as createExtensionHostRuntimeBridge, v as resolveLegacyPersistDir, vn as sanitizeExtensionConfigActionPatch, w as buildPostCompactAttachments, x as resolvePersistDir, xn as OUTPUT_RESERVE_TOKENS, xt as isSpawnTool, y as resolveLegacySessionDir } from "./agent-xjMzFclr.js";
3
3
  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";
4
4
  import { n as appendCapped } from "./output-cap-C9zukcCj.js";
5
5
  import { i as killProcessGroup, n as SUPPORTS_PROCESS_GROUPS, r as createProcessContext } from "./contexts-DWVt7MvF.js";
@@ -7,18 +7,18 @@ import { l as errorMessage } from "./errors-DJUxZg9b.js";
7
7
  import { M as findGitRoot } from "./resolve-BPTA1RpX.js";
8
8
  import { a as createRingBufferSink, i as createLoggingHooks, l as logFileTimestamp, n as createFileSink, o as fanoutSink, r as createLogger, s as formatLogLine, t as consoleSink } from "./logger-DBX9uYOw.js";
9
9
  import { i as sniffImageMediaType } from "./media-sniff-UKijEaiQ.js";
10
- import { g as hasAuthorizationHeader, m as McpOAuthProvider, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-UIBc81Zm.js";
11
- import { x as estimateRebilledCostUsd } from "./openai-compat-BF1pSB_F.js";
10
+ import { g as hasAuthorizationHeader, m as McpOAuthProvider, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-B5iXOceC.js";
11
+ import { C as estimateRebilledCostUsd } from "./openai-compat-Bf9uMTMa.js";
12
12
  import { replaceDynamicSection } from "./prompt.js";
13
- import { a as getExtensionSessionState, c as setExtensionSessionState, i as demoteStaleRunningStatus, o as loadSession, t as createSession } from "./session-BE9_p0sN.js";
13
+ import { a as getExtensionSessionState, c as setExtensionSessionState, i as demoteStaleRunningStatus, o as loadSession, t as createSession } from "./session-Bdk31kA5.js";
14
14
  import { n as flattenTurns, r as formatTokenUsage, t as effectiveInputFromTurn } from "./stats-DAKBEKjc.js";
15
15
  import { o as withTimeout } from "./timeout-BDetbuN6.js";
16
16
  import { i as installCacheBreakLogger } from "./cache-telemetry-ehVdWsg2.js";
17
17
  import { a as generateStructuredData, c as shouldAutoGenerateTitle, f as commandBlockToEvent, g as parseCommandInvocation, h as executeCommand, n as patchInlineGhost, p as commandBlocksToContent, r as resolveInlineSuggestion, s as generateSessionTitle, t as createPathAutocompleteProvider } from "./inline-autocomplete-DC2cxprN.js";
18
18
  import { s as resolveCompletionSubmit } from "./completion-core-BRo86R_L.js";
19
19
  import { i as installSkillFromSpec, r as SkillInstallError } from "./skills-C7eIjWYm.js";
20
- import { a as ZIDANE_EXTENSION_SKILL_NAME, d as extensionScaffold, f as readSkillEditMarker, h as withZidaneSkillEditSkill, i as SKILL_EDIT_METADATA_KEY, l as editSessionMetadata, m as withZidaneExtensionSkill, o as ZIDANE_SKILL_EDIT_SKILL_NAME, t as loginMcpServer, u as extensionDirForCwd } from "./login-ClSY8pN6.js";
21
- import { C as restoreModelOptions, S as piIdOf, _ as modelOptionsFor, m as getContextWindow, p as enabledModelOptions, s as setProviderCredential, t as detectAuth, v as modelSupportsReasoning, w as renderDefaultCallbackPage } from "./auth-WkdClN2Y.js";
20
+ import { a as ZIDANE_EXTENSION_SKILL_NAME, d as extensionScaffold, f as readSkillEditMarker, h as withZidaneSkillEditSkill, i as SKILL_EDIT_METADATA_KEY, l as editSessionMetadata, m as withZidaneExtensionSkill, o as ZIDANE_SKILL_EDIT_SKILL_NAME, t as loginMcpServer, u as extensionDirForCwd } from "./login-DZHMF7Gl.js";
21
+ import { C as restoreModelOptions, S as piIdOf, _ as modelOptionsFor, m as getContextWindow, p as enabledModelOptions, s as setProviderCredential, t as detectAuth, v as modelSupportsReasoning, w as renderDefaultCallbackPage } from "./auth-Dptb8U5J.js";
22
22
  import { createDockerContext } from "./contexts/docker.js";
23
23
  import { createTuiStore } from "./session/sqlite.js";
24
24
  import { $ as clipDiffForRender, B as isTurnHighlighted, C as chunkMarkdownForRender, E as stripHtmlCommentsOutsideCode, F as blendHsl, G as retagUserPromptEvents, H as isVisible, I as buildLinearRamp, J as streamEventSearchText, K as selectableTurnIds, L as BASH_CALL_ID_PREFIX, O as createSkillsCompletionProvider, P as createCommandsCompletionProvider, Q as buildUnifiedDiff, R as EDIT_TOOL_NAMES, T as splitMarkdownCodeBlocks, U as isVisibleDuringSearch, V as isUserBashEvent, W as promptHistoryFromEvents, Y as turnSelectionOwnership, Z as buildContextualDiff, _ as turnContextSize, a as TOOL_DISPLAY, b as filterModelCatalog, ct as buildEditOutcomesAnnotation, d as finalizeStreamingMarkdown, dt as parseEditOutcomesFromResult, f as finalizeStreamingMarkdownForOwner, ft as resolveApprovalForPayload, g as revealEarlierTranscriptEvents, h as replaceTranscriptTurnEvents, ht as summarizeOutcomes, i as turnAsText, it as previewEditPayload, j as createFilesCompletionProvider, k as uniqueSkillNamesFromReferences, mt as stripEditOutcomesAnnotation, n as deleteTurnSafely, nt as extractEditPayload, o as displayNameFor, ot as summarizeEditPayload, p as hiddenEarlierTranscriptCount, pt as rewriteMultiEditHeader, q as selectionAfterTurnRemoval, r as truncateTurnsAt, rt as filetypeFromPath, s as formatToolCall, u as capTranscriptEvents, ut as mergeApprovalAndBodyOutcomes, v as splitPromptSegments, vt as createChatsCompletionProvider, w as normalizeMarkdownCodeFences, y as buildModelCatalog, z as isEditErrorResult } from "./turn-operations-CBdrdYiF.js";
@@ -233,17 +233,43 @@ function inCheckboxZone(event, startCol, width = 4) {
233
233
  const col = event.x - target.x;
234
234
  return col >= startCol && col < startCol + width;
235
235
  }
236
+ /**
237
+ * True when a click on a compound hint landed on its SECONDARY chord —
238
+ * `extra.key` or `extra.label` (e.g. the `/l medium fast` run inside
239
+ * `ctrl+m/l claude-opus-4-8 medium fast`). Same coordinate technique as
240
+ * {@link inCheckboxZone}: the hint must stay ONE `<text>` renderable
241
+ * because {@link hintSpans} interleaves primary and secondary spans
242
+ * (`key`, `extra.key`, ` label`, ` extra.label`), so the zones can only
243
+ * be told apart by glyph column.
244
+ *
245
+ * The leading space before `label` belongs to the primary zone; line 0 is
246
+ * pinned so a wrapped continuation line reads as primary. Degrades to
247
+ * `false` (primary semantics) when the target's geometry is unavailable.
248
+ */
249
+ function inHintExtraZone(event, hint) {
250
+ if (!hint.extra) return false;
251
+ const target = event.target;
252
+ if (!target || typeof target.x !== "number" || typeof target.y !== "number") return false;
253
+ if (event.y - target.y !== 0) return false;
254
+ const col = event.x - target.x;
255
+ const keyLen = hint.key === "" ? 0 : hint.key.length;
256
+ const extraKeyEnd = keyLen + hint.extra.key.length;
257
+ if (col >= keyLen && col < extraKeyEnd) return true;
258
+ return col >= extraKeyEnd + (hint.key === "" ? 0 : 1) + hint.label.length;
259
+ }
236
260
  /** Spans for one hint's text content — shared by hover and rest states. */
237
261
  function hintSpans(hint, COLOR, hovered) {
238
- const keyColor = hovered ? COLOR.accent : hint.keyColor ?? COLOR.warn;
239
- const labelColor = hovered ? COLOR.accent : hint.labelColor ?? COLOR.dim;
262
+ const primaryHover = hovered === "primary";
263
+ const extraHover = hovered === "extra";
264
+ const keyColor = primaryHover ? COLOR.accent : hint.keyColor ?? COLOR.warn;
265
+ const labelColor = primaryHover ? COLOR.accent : hint.labelColor ?? COLOR.dim;
240
266
  return /* @__PURE__ */ jsxs(Fragment, { children: [
241
267
  hint.key !== "" && /* @__PURE__ */ jsx$1("span", {
242
268
  fg: keyColor,
243
269
  children: hint.key
244
270
  }),
245
271
  hint.extra && /* @__PURE__ */ jsx$1("span", {
246
- fg: hovered ? COLOR.accent : hint.extra.keyColor ?? COLOR.mute,
272
+ fg: extraHover ? COLOR.accent : hint.extra.keyColor ?? COLOR.mute,
247
273
  children: hint.extra.key
248
274
  }),
249
275
  /* @__PURE__ */ jsx$1("span", {
@@ -251,33 +277,58 @@ function hintSpans(hint, COLOR, hovered) {
251
277
  children: hint.key === "" ? hint.label : ` ${hint.label}`
252
278
  }),
253
279
  hint.extra && /* @__PURE__ */ jsx$1("span", {
254
- fg: hovered ? COLOR.accent : hint.extra.labelColor ?? COLOR.dim,
280
+ fg: extraHover ? COLOR.accent : hint.extra.labelColor ?? COLOR.dim,
255
281
  children: ` ${hint.extra.label}`
256
282
  })
257
283
  ] });
258
284
  }
259
285
  /**
286
+ * Hover zone for a pointer event, or `null` when the zone under the
287
+ * pointer has no key to dispatch (an inert half must not light up).
288
+ * Split out so the render surface stays declarative and the mapping is
289
+ * testable without a renderer.
290
+ */
291
+ function hoverZoneFor(event, hint, clickable) {
292
+ if ((inHintExtraZone(event, hint) ? "extra" : "primary") === "extra") return clickable.extra ? "extra" : null;
293
+ return clickable.primary ? "primary" : null;
294
+ }
295
+ /**
260
296
  * One hint as its own `<text>` renderable — clickable when its key spec
261
297
  * parses, hover-highlighted in the theme accent. Non-parseable hints
262
298
  * render identically but inert, so decorative chips cost nothing.
299
+ *
300
+ * A compound hint (`ctrl+m/l gpt-5 high fast`) carries TWO targets in the
301
+ * one renderable: the primary pair dispatches `hint.key`, the secondary
302
+ * chord + label dispatch `extra.keySpec`. Both click and hover resolve the
303
+ * zone by glyph column ({@link inHintExtraZone}), so hovering the model id
304
+ * highlights only the model id.
263
305
  */
264
306
  function ClickableHint({ hint }) {
265
307
  const COLOR = useColors();
266
308
  const renderer = useRenderer();
267
- const [hovered, setHovered] = useState(false);
268
- if (!(parseHintKeySpec(hint.key) !== null)) return /* @__PURE__ */ jsx$1("text", {
309
+ const [hovered, setHovered] = useState(null);
310
+ const primaryClickable = parseHintKeySpec(hint.key) !== null;
311
+ const extraSpec = hint.extra ? hint.extra.keySpec ?? hint.extra.key : null;
312
+ const extraClickable = extraSpec !== null && parseHintKeySpec(extraSpec) !== null;
313
+ if (!primaryClickable && !extraClickable) return /* @__PURE__ */ jsx$1("text", {
269
314
  selectable: false,
270
- children: hintSpans(hint, COLOR, false)
315
+ children: hintSpans(hint, COLOR, null)
271
316
  });
317
+ const clickable = {
318
+ primary: primaryClickable,
319
+ extra: extraClickable
320
+ };
272
321
  return /* @__PURE__ */ jsx$1("text", {
273
322
  selectable: false,
274
323
  onMouseDown: (event) => {
275
324
  event.stopPropagation();
276
325
  event.preventDefault();
277
- dispatchHintKey(renderer, hint.key);
326
+ if (extraClickable && inHintExtraZone(event, hint)) dispatchHintKey(renderer, extraSpec);
327
+ else if (primaryClickable) dispatchHintKey(renderer, hint.key);
278
328
  },
279
- onMouseOver: () => setHovered(true),
280
- onMouseOut: () => setHovered(false),
329
+ onMouseOver: (event) => setHovered(hoverZoneFor(event, hint, clickable)),
330
+ onMouseMove: (event) => setHovered(hoverZoneFor(event, hint, clickable)),
331
+ onMouseOut: () => setHovered(null),
281
332
  children: hintSpans(hint, COLOR, hovered)
282
333
  });
283
334
  }
@@ -2280,7 +2331,8 @@ function StatusSpinner({ color }) {
2280
2331
  });
2281
2332
  }
2282
2333
  /**
2283
- * Bordered container for one run of subagent events. The box's border +
2334
+ * Bordered container for one subagent's events inside a run — concurrent
2335
+ * siblings each get their own box (see {@link partitionTranscript}). The box's border +
2284
2336
  * left padding give the visual "this is a subagent" affordance, so events
2285
2337
  * inside render with `depthOffset: 1` — a direct child of the parent
2286
2338
  * (depth 1) sits flush against the box's inner padding rather than being
@@ -2857,18 +2909,21 @@ function partitionTranscript(events, settings, searchReveal) {
2857
2909
  const groupKeys = settings.groupToolCalls && searchReveal === void 0 ? computeToolGroupKeys(visible) : null;
2858
2910
  const groups = /* @__PURE__ */ new Map();
2859
2911
  const items = [];
2860
- let run = [];
2912
+ let lanes = /* @__PURE__ */ new Map();
2861
2913
  let runPrevious;
2862
2914
  const flush = () => {
2863
- if (run.length > 0) {
2915
+ if (lanes.size === 0) return;
2916
+ let previous = runPrevious;
2917
+ for (const lane of lanes.values()) {
2864
2918
  items.push({
2865
2919
  kind: "child-run",
2866
- events: run,
2867
- previous: runPrevious
2920
+ events: lane,
2921
+ previous
2868
2922
  });
2869
- run = [];
2870
- runPrevious = void 0;
2923
+ previous = lane[lane.length - 1];
2871
2924
  }
2925
+ lanes = /* @__PURE__ */ new Map();
2926
+ runPrevious = void 0;
2872
2927
  };
2873
2928
  for (let i = 0; i < visible.length; i++) {
2874
2929
  const event = visible[i];
@@ -2890,8 +2945,10 @@ function partitionTranscript(events, settings, searchReveal) {
2890
2945
  continue;
2891
2946
  }
2892
2947
  if (!settings.hideSubagentOutput && isChild(event)) {
2893
- if (run.length === 0) runPrevious = visible[i - 1];
2894
- run.push(event);
2948
+ if (lanes.size === 0) runPrevious = visible[i - 1];
2949
+ const lane = lanes.get(event.childId ?? "");
2950
+ if (lane) lane.push(event);
2951
+ else lanes.set(event.childId ?? "", [event]);
2895
2952
  } else {
2896
2953
  flush();
2897
2954
  items.push({
@@ -8444,8 +8501,10 @@ const COMMENT_TEXTAREA_BINDINGS = (() => {
8444
8501
  * doesn't differentiate at this layer). Two surfaces driven off the
8445
8502
  * request's discriminator:
8446
8503
  *
8447
- * - `plan` → renders the title + markdown body + (optional) step list,
8448
- * then a 3-option decision picker. Reject and revise can flow into a
8504
+ * - `plan` → renders the title + a 3-option decision picker. The plan
8505
+ * BODY is not here — it lives in {@link PlanReviewPanel}, which the
8506
+ * host mounts in the content/transcript slot; the two pair (panel
8507
+ * above, this block below). Reject and revise can flow into a
8449
8508
  * comment textarea for free-text feedback before final submit.
8450
8509
  *
8451
8510
  * - `question` → renders the question text, then a choice picker
@@ -8481,49 +8540,102 @@ function InteractionShell({ title, maxHeight, children }) {
8481
8540
  children
8482
8541
  });
8483
8542
  }
8484
- /** Number of plan-body lines rendered inline in the collapsed preview. */
8485
- const PLAN_BODY_MAX_LINES = 8;
8486
- const PLAN_PREVIEW_MIN_COLUMNS = 20;
8487
8543
  /**
8488
- * Cap the plan picker at ~60% of the terminal when the user expands a
8489
- * long plan, so the transcript above stays readable. The inner scrollbox
8490
- * handles overflow so the full plan is reachable before committing — the
8491
- * decision picker stays pinned below the scrollable region.
8544
+ * The plan BODY half of plan review — pairs with {@link InteractionBlock}
8545
+ * (which renders only the title + decision picker for `plan` requests).
8546
+ * The chat screen hides the Transcript (same `visible: false` pattern as
8547
+ * the file-edit approval modal) and mounts this panel in its place, so
8548
+ * the plan body gets the full conversation area: always expanded, one
8549
+ * scrollbox, no preview/collapse state. Hosts embedding these standalone
8550
+ * must mount BOTH — the picker alone shows a plan the user cannot read.
8492
8551
  */
8493
- const PLAN_EXPANDED_MAX_HEIGHT = "60%";
8494
- function estimatedVisualRows(line, columns) {
8495
- if (line.length === 0) return 1;
8496
- return Math.max(1, Math.ceil(line.length / columns));
8497
- }
8498
- function buildPlanPreview(plan, columns) {
8499
- const width = Math.max(PLAN_PREVIEW_MIN_COLUMNS, Math.floor(columns));
8500
- const lines = plan.split("\n");
8501
- const preview = [];
8502
- let usedRows = 0;
8503
- for (let i = 0; i < lines.length; i++) {
8504
- const line = lines[i] ?? "";
8505
- const rows = estimatedVisualRows(line, width);
8506
- if (usedRows + rows <= PLAN_BODY_MAX_LINES) {
8507
- preview.push(line);
8508
- usedRows += rows;
8509
- continue;
8510
- }
8511
- const remainingRows = Math.max(0, PLAN_BODY_MAX_LINES - usedRows);
8512
- if (remainingRows > 0) {
8513
- const maxChars = Math.max(1, remainingRows * width);
8514
- preview.push(line.length > maxChars ? line.slice(0, maxChars).trimEnd() : line);
8515
- }
8516
- return {
8517
- previewText: preview.join("\n"),
8518
- overflow: true,
8519
- hiddenLineCount: lines.length - i - 1
8520
- };
8521
- }
8522
- return {
8523
- previewText: plan,
8524
- overflow: false,
8525
- hiddenLineCount: 0
8526
- };
8552
+ function PlanReviewPanel({ request }) {
8553
+ const COLOR = useColors();
8554
+ const mdStyle = useMdStyle();
8555
+ const focused = useModalAwareFocus();
8556
+ const scrollboxRef = useRef(null);
8557
+ const { title, plan, steps } = request.payload;
8558
+ useKeyboard((key) => {
8559
+ if (!focused) return;
8560
+ if (key.ctrl || key.meta || key.option || key.shift) return;
8561
+ if (key.name !== "pageup" && key.name !== "pagedown") return;
8562
+ const sb = scrollboxRef.current;
8563
+ if (!sb) return;
8564
+ const page = Math.max(1, sb.viewport.height - 1);
8565
+ sb.scrollBy({
8566
+ x: 0,
8567
+ y: key.name === "pageup" ? -page : page
8568
+ });
8569
+ });
8570
+ return /* @__PURE__ */ jsxs("box", {
8571
+ title: " plan ",
8572
+ style: {
8573
+ border: true,
8574
+ borderColor: COLOR.warn,
8575
+ paddingLeft: 1,
8576
+ paddingRight: 1,
8577
+ flexGrow: 1,
8578
+ flexDirection: "column"
8579
+ },
8580
+ children: [
8581
+ /* @__PURE__ */ jsx$1("text", {
8582
+ fg: COLOR.brand,
8583
+ wrapMode: "word",
8584
+ style: { flexShrink: 0 },
8585
+ children: title
8586
+ }),
8587
+ /* @__PURE__ */ jsxs("scrollbox", {
8588
+ ref: scrollboxRef,
8589
+ focusable: false,
8590
+ style: {
8591
+ flexGrow: 1,
8592
+ flexShrink: 1,
8593
+ marginTop: 1
8594
+ },
8595
+ children: [/* @__PURE__ */ jsx$1("markdown", {
8596
+ content: plan,
8597
+ syntaxStyle: mdStyle,
8598
+ streaming: false,
8599
+ internalBlockMode: "coalesced",
8600
+ fg: COLOR.dim
8601
+ }), steps && steps.length > 0 && /* @__PURE__ */ jsxs("box", {
8602
+ style: {
8603
+ flexDirection: "column",
8604
+ marginTop: 1
8605
+ },
8606
+ children: [/* @__PURE__ */ jsx$1("text", {
8607
+ fg: COLOR.mute,
8608
+ children: "steps:"
8609
+ }), steps.map((step, i) => /* @__PURE__ */ jsxs("text", {
8610
+ fg: COLOR.dim,
8611
+ wrapMode: "word",
8612
+ children: [
8613
+ /* @__PURE__ */ jsx$1("span", {
8614
+ fg: COLOR.warn,
8615
+ children: ` ${i + 1}. `
8616
+ }),
8617
+ /* @__PURE__ */ jsx$1("span", {
8618
+ fg: COLOR.brand,
8619
+ children: step.title
8620
+ }),
8621
+ step.description && /* @__PURE__ */ jsx$1("span", {
8622
+ fg: COLOR.mute,
8623
+ children: ` · ${step.description}`
8624
+ })
8625
+ ]
8626
+ }, step.id))]
8627
+ })]
8628
+ }),
8629
+ /* @__PURE__ */ jsxs("text", {
8630
+ fg: COLOR.mute,
8631
+ style: { flexShrink: 0 },
8632
+ children: [/* @__PURE__ */ jsx$1("span", {
8633
+ fg: COLOR.warn,
8634
+ children: "pgup/pgdn"
8635
+ }), " or mouse wheel to scroll"]
8636
+ })
8637
+ ]
8638
+ });
8527
8639
  }
8528
8640
  const PLAN_OPTIONS = [
8529
8641
  {
@@ -8544,41 +8656,17 @@ const PLAN_OPTIONS = [
8544
8656
  ];
8545
8657
  function PlanInteractionBlock({ request, onResolve }) {
8546
8658
  const COLOR = useColors();
8547
- const mdStyle = useMdStyle();
8548
8659
  const focused = useModalAwareFocus();
8549
- const { width: terminalWidth } = useTerminalDimensions();
8550
8660
  const [stage, setStage] = useState("pick");
8551
8661
  const [decision, setDecision] = useState(null);
8552
- const [expanded, setExpanded] = useState(false);
8553
8662
  const textareaRef = useRef(null);
8554
- const scrollboxRef = useRef(null);
8555
- const { title, plan, steps } = request.payload;
8556
- const { previewText, overflow, hiddenLineCount } = useMemo(() => {
8557
- return buildPlanPreview(plan, terminalWidth - 8);
8558
- }, [plan, terminalWidth]);
8663
+ const { title } = request.payload;
8559
8664
  useKeyboard((key) => {
8560
8665
  if (!focused) return;
8561
8666
  if (key.ctrl || key.meta || key.option) return;
8562
- if (key.name === "tab") {
8563
- if (key.shift) {
8564
- if (stage !== "comment") return;
8565
- setStage("pick");
8566
- return;
8567
- }
8568
- if (stage !== "pick" || !overflow) return;
8569
- setExpanded((e) => !e);
8570
- return;
8571
- }
8572
- if (key.shift) return;
8573
- if (key.name !== "pageup" && key.name !== "pagedown") return;
8574
- if (stage !== "pick" || !expanded) return;
8575
- const sb = scrollboxRef.current;
8576
- if (!sb) return;
8577
- const page = Math.max(1, sb.viewport.height - 1);
8578
- sb.scrollBy({
8579
- x: 0,
8580
- y: key.name === "pageup" ? -page : page
8581
- });
8667
+ if (key.name !== "tab" || !key.shift) return;
8668
+ if (stage !== "comment") return;
8669
+ setStage("pick");
8582
8670
  });
8583
8671
  const onPick = useCallback((value) => {
8584
8672
  if (value === "approve") {
@@ -8654,109 +8742,17 @@ function PlanInteractionBlock({ request, onResolve }) {
8654
8742
  })
8655
8743
  ]
8656
8744
  }, "comment");
8657
- const stepsBlock = steps && steps.length > 0 ? /* @__PURE__ */ jsxs("box", {
8658
- style: {
8659
- flexDirection: "column",
8660
- marginTop: 1
8661
- },
8662
- children: [/* @__PURE__ */ jsx$1("text", {
8663
- fg: COLOR.mute,
8664
- children: "steps:"
8665
- }), steps.map((step, i) => /* @__PURE__ */ jsxs("text", {
8666
- fg: COLOR.dim,
8667
- wrapMode: "word",
8668
- children: [
8669
- /* @__PURE__ */ jsx$1("span", {
8670
- fg: COLOR.warn,
8671
- children: ` ${i + 1}. `
8672
- }),
8673
- /* @__PURE__ */ jsx$1("span", {
8674
- fg: COLOR.brand,
8675
- children: step.title
8676
- }),
8677
- step.description && /* @__PURE__ */ jsx$1("span", {
8678
- fg: COLOR.mute,
8679
- children: ` — ${step.description}`
8680
- })
8681
- ]
8682
- }, step.id))]
8683
- }) : null;
8684
8745
  return /* @__PURE__ */ jsxs(InteractionShell, {
8685
8746
  title: " approve plan · esc to abort run ",
8686
- maxHeight: expanded ? PLAN_EXPANDED_MAX_HEIGHT : void 0,
8687
- children: [
8688
- /* @__PURE__ */ jsx$1("text", {
8689
- fg: COLOR.brand,
8690
- wrapMode: "none",
8691
- style: { flexShrink: 0 },
8692
- children: title
8693
- }),
8694
- expanded ? /* @__PURE__ */ jsxs("scrollbox", {
8695
- ref: scrollboxRef,
8696
- focusable: false,
8697
- style: {
8698
- flexGrow: 1,
8699
- flexShrink: 1,
8700
- marginTop: 1,
8701
- marginBottom: 1
8702
- },
8703
- children: [/* @__PURE__ */ jsx$1("markdown", {
8704
- content: plan,
8705
- syntaxStyle: mdStyle,
8706
- streaming: false,
8707
- internalBlockMode: "coalesced",
8708
- fg: COLOR.dim
8709
- }), stepsBlock]
8710
- }) : /* @__PURE__ */ jsxs("box", {
8711
- style: {
8712
- flexDirection: "column",
8713
- marginTop: 1,
8714
- marginBottom: 1
8715
- },
8716
- children: [
8717
- /* @__PURE__ */ jsx$1("markdown", {
8718
- content: previewText,
8719
- syntaxStyle: mdStyle,
8720
- streaming: false,
8721
- internalBlockMode: "coalesced",
8722
- fg: COLOR.dim
8723
- }),
8724
- overflow && /* @__PURE__ */ jsxs("text", {
8725
- fg: COLOR.mute,
8726
- wrapMode: "word",
8727
- children: [
8728
- hiddenLineCount > 0 ? `… ${hiddenLineCount} more line${hiddenLineCount === 1 ? "" : "s"} · ` : "… more content · ",
8729
- /* @__PURE__ */ jsx$1("span", {
8730
- fg: COLOR.warn,
8731
- children: "↹"
8732
- }),
8733
- " to expand and scroll"
8734
- ]
8735
- }),
8736
- stepsBlock
8737
- ]
8738
- }),
8739
- expanded && /* @__PURE__ */ jsxs("text", {
8740
- fg: COLOR.mute,
8741
- style: { flexShrink: 0 },
8742
- children: [
8743
- /* @__PURE__ */ jsx$1("span", {
8744
- fg: COLOR.warn,
8745
- children: "↹"
8746
- }),
8747
- " to collapse · ",
8748
- /* @__PURE__ */ jsx$1("span", {
8749
- fg: COLOR.warn,
8750
- children: "pgup/pgdn"
8751
- }),
8752
- " to scroll"
8753
- ]
8754
- }),
8755
- /* @__PURE__ */ jsx$1(OptionList, {
8756
- items: PLAN_OPTIONS,
8757
- onPick
8758
- })
8759
- ]
8747
+ children: [/* @__PURE__ */ jsx$1("text", {
8748
+ fg: COLOR.brand,
8749
+ wrapMode: "word",
8750
+ style: { flexShrink: 0 },
8751
+ children: title
8752
+ }), /* @__PURE__ */ jsx$1(OptionList, {
8753
+ items: PLAN_OPTIONS,
8754
+ onPick
8755
+ })]
8760
8756
  }, "pick");
8761
8757
  }
8762
8758
  /**
@@ -11208,6 +11204,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
11208
11204
  onPopupOpenChange?.(open);
11209
11205
  }, [onPopupOpenChange]);
11210
11206
  const fileEditPending = pending && isFileEditTool(pending.tool) ? pending : null;
11207
+ const planPending = !pending && pendingInteraction?.kind === "plan" ? pendingInteraction : null;
11211
11208
  const modal = useModal();
11212
11209
  useEffect(() => {
11213
11210
  if (!fileEditPending) return;
@@ -11226,7 +11223,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
11226
11223
  borderColor: COLOR.border,
11227
11224
  flexGrow: 1,
11228
11225
  flexDirection: "column",
11229
- visible: !fileEditPending
11226
+ visible: !fileEditPending && !planPending
11230
11227
  },
11231
11228
  children: /* @__PURE__ */ jsx$1(Transcript, {
11232
11229
  events: displayedEvents,
@@ -11246,7 +11243,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
11246
11243
  flexShrink: 0,
11247
11244
  backgroundColor: SURFACE.background
11248
11245
  },
11249
- children: [!fileEditPending && /* @__PURE__ */ jsx$1("box", { style: {
11246
+ children: [!fileEditPending && !planPending && /* @__PURE__ */ jsx$1("box", { style: {
11250
11247
  height: 1,
11251
11248
  marginTop: -1,
11252
11249
  marginLeft: 1,
@@ -11257,6 +11254,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
11257
11254
  flexShrink: 0
11258
11255
  } }), /* @__PURE__ */ jsx$1(ExtensionStatusLine, {})]
11259
11256
  }),
11257
+ planPending && /* @__PURE__ */ jsx$1(PlanReviewPanel, { request: planPending }, planPending.id),
11260
11258
  fileEditPending && /* @__PURE__ */ jsx$1(FileEditApprovalModal, {
11261
11259
  request: fileEditPending,
11262
11260
  onDecide: onApproval
@@ -11273,7 +11271,7 @@ function ChatScreen({ cwd, events, busy, compacting = false, queuedMessages = EM
11273
11271
  }) : pendingInteraction ? /* @__PURE__ */ jsx$1(InteractionBlock, {
11274
11272
  request: pendingInteraction,
11275
11273
  onResolve: onInteraction
11276
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [
11274
+ }, pendingInteraction.id) : /* @__PURE__ */ jsxs(Fragment, { children: [
11277
11275
  queuedMessages.length > 0 && !completionPopupOpen && /* @__PURE__ */ jsx$1(QueuedMessagesBlock, {
11278
11276
  messages: queuedMessages,
11279
11277
  selectionIndex: queueSelectionIndex,
@@ -22170,13 +22168,19 @@ function AppShell() {
22170
22168
  store,
22171
22169
  ...source.projectRoot ? { projectRoot: source.projectRoot } : {}
22172
22170
  });
22173
- const rehomed = await rehomePersistedStubs(slice, resolvePersistDir({
22171
+ const forkPersistDir = resolvePersistDir({
22172
+ userDir: cacheDir,
22173
+ sessionId: fork.id
22174
+ });
22175
+ let rehomed = await rehomePersistedStubs(slice, resolvePersistDir({
22174
22176
  userDir: cacheDir,
22175
22177
  sessionId: source.id
22176
- }), resolvePersistDir({
22178
+ }), forkPersistDir);
22179
+ const legacyPersistDir = resolveLegacyPersistDir({
22177
22180
  userDir: cacheDir,
22178
- sessionId: fork.id
22179
- }));
22181
+ sessionId: source.id
22182
+ });
22183
+ if (legacyPersistDir !== void 0) rehomed = await rehomePersistedStubs(rehomed, legacyPersistDir, forkPersistDir);
22180
22184
  fork.setTurns(rehomed);
22181
22185
  fork.setRuns(inheritedRuns);
22182
22186
  try {
@@ -22275,18 +22279,17 @@ function AppShell() {
22275
22279
  debugLog("delete session failed", err);
22276
22280
  return;
22277
22281
  }
22278
- cleanupPersistedSession(resolvePersistDir({
22282
+ cleanupPersistedSession(resolveSessionDir({
22279
22283
  userDir: cacheDir,
22280
22284
  sessionId: id
22281
22285
  }));
22282
- cleanupPersistedSession(resolveTasksDir({
22286
+ for (const stale of [resolveLegacyPersistDir({
22283
22287
  userDir: cacheDir,
22284
22288
  sessionId: id
22285
- }));
22286
- cleanupPersistedSession(resolveMcpWarningsDir({
22289
+ }), resolveLegacySessionDir({
22287
22290
  userDir: cacheDir,
22288
22291
  sessionId: id
22289
- }));
22292
+ })]) if (stale !== void 0) cleanupPersistedSession(stale);
22290
22293
  const wasCurrent = id === currentSession?.id;
22291
22294
  if (wasCurrent) {
22292
22295
  await teardown();
@@ -24690,6 +24693,6 @@ async function runTui(options = {}) {
24690
24693
  process.exit(0);
24691
24694
  }
24692
24695
  //#endregion
24693
- export { AgentPickerModal, App, AuthScreen, ChatScreen, CompletionPopup, EffortPickerModal, ExtensionRenderersProvider, ExtensionsSettingsModal, Footer, InteractionBlock, McpsSettingsModal, Modal, ModalRoot, ModelOptionsPickerModal, ModelPickerModal, SessionDetailsModal, SessionsScreen, SettingsModal, SkillsSettingsModal, Spinner, StatusSpinner, TOOL_DISPLAY, TitleOverlay, ToggleListModal, Transcript, TurnDetailsModal, accentColor, buildMdStyle, clipHintsToWidth, computeTurnAnchors, displayNameFor, formatToolCall, hintsLength, isEditErrorResult, isTurnHighlighted, isVisible, marginTopFor, onInputSubmit, registerTuiHostModules, renderHintSpans, runTui, selectableTurnIds, splitMarkdownCodeBlocks, splitPromptSegments, truncateTrailing, turnSelectionOwnership, useExtensionRenderers, useMdStyle, useModal, useModalAwareFocus, useRowVisible, useSessionState };
24696
+ export { AgentPickerModal, App, AuthScreen, ChatScreen, CompletionPopup, EffortPickerModal, ExtensionRenderersProvider, ExtensionsSettingsModal, Footer, InteractionBlock, McpsSettingsModal, Modal, ModalRoot, ModelOptionsPickerModal, ModelPickerModal, PlanReviewPanel, SessionDetailsModal, SessionsScreen, SettingsModal, SkillsSettingsModal, Spinner, StatusSpinner, TOOL_DISPLAY, TitleOverlay, ToggleListModal, Transcript, TurnDetailsModal, accentColor, buildMdStyle, clipHintsToWidth, computeTurnAnchors, displayNameFor, formatToolCall, hintsLength, isEditErrorResult, isTurnHighlighted, isVisible, marginTopFor, onInputSubmit, registerTuiHostModules, renderHintSpans, runTui, selectableTurnIds, splitMarkdownCodeBlocks, splitPromptSegments, truncateTrailing, turnSelectionOwnership, useExtensionRenderers, useMdStyle, useModal, useModalAwareFocus, useRowVisible, useSessionState };
24694
24697
 
24695
24698
  //# sourceMappingURL=tui.js.map