zidane 6.3.7 → 6.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-cli.js +2 -2
- package/dist/{acp-CAX3tOEY.js → acp-dthcOo20.js} +3 -3
- package/dist/{acp-CAX3tOEY.js.map → acp-dthcOo20.js.map} +1 -1
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-Emjeo5Ad.js → agent-XcXGROHb.js} +38 -18
- package/dist/agent-XcXGROHb.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +4 -4
- package/dist/chat.js +2 -2
- package/dist/{context-transport-3b0qpM2m.js → context-transport-DIVijS-Z.js} +3 -3
- package/dist/{context-transport-3b0qpM2m.js.map → context-transport-DIVijS-Z.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-DTIe4e1R.d.ts → index-DEqQQ8tN.d.ts} +42 -6
- package/dist/index-DEqQQ8tN.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{login-C41DcRK-.js → login-COaVj9kG.js} +35 -5
- package/dist/{login-C41DcRK-.js.map → login-COaVj9kG.js.map} +1 -1
- package/dist/{mcp-8bEHU4WB.js → mcp-CzUy5luo.js} +3 -3
- package/dist/{mcp-8bEHU4WB.js.map → mcp-CzUy5luo.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/{read-state-CNyeMG7W.js → read-state-Dt7UbVsd.js} +26 -2
- package/dist/read-state-Dt7UbVsd.js.map +1 -0
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-BKFpPNvX.js → stdio-D7Nf908h.js} +2 -2
- package/dist/{stdio-BKFpPNvX.js.map → stdio-D7Nf908h.js.map} +1 -1
- package/dist/{stdio-loader-DFDpBwwI.js → stdio-loader-C3ydQZyZ.js} +2 -2
- package/dist/{stdio-loader-DFDpBwwI.js.map → stdio-loader-C3ydQZyZ.js.map} +1 -1
- package/dist/{tool-formatters-B_dGfYqT.d.ts → tool-formatters-B0y_dlZ-.d.ts} +2 -2
- package/dist/{tool-formatters-B_dGfYqT.d.ts.map → tool-formatters-B0y_dlZ-.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 +2 -2
- package/dist/{transcript-anchors-CqxIlrhv.d.ts → transcript-anchors-B93mTVIi.d.ts} +2 -2
- package/dist/{transcript-anchors-CqxIlrhv.d.ts.map → transcript-anchors-B93mTVIi.d.ts.map} +1 -1
- package/dist/{transcript-anchors-DhBTqTyc.js → transcript-anchors-BeCn35OE.js} +3 -3
- package/dist/{transcript-anchors-DhBTqTyc.js.map → transcript-anchors-BeCn35OE.js.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +52 -8
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-D7JhuW_X.d.ts → turn-operations-B-t6VR01.d.ts} +3 -3
- package/dist/{turn-operations-D7JhuW_X.d.ts.map → turn-operations-B-t6VR01.d.ts.map} +1 -1
- package/dist/types-BIarq1qE.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CHAT.md +1 -1
- package/docs/TUI.md +4 -2
- package/package.json +1 -1
- package/dist/agent-Emjeo5Ad.js.map +0 -1
- package/dist/index-DTIe4e1R.d.ts.map +0 -1
- package/dist/read-state-CNyeMG7W.js.map +0 -1
package/dist/tui.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $p as McpToolSchema, Bl as PlanRequest, Dm as ThinkingLevel, Gu as StreamEvent, Ic as Theme, Lc as ThemeColors, Lo as ExtensionRegistry, Ml as InteractionRequest, Mu as accentColor, Nl as InteractionResponse, So as ExtensionDefinition, Tu as AgentRegistry, Uc as InlineAutocompleteProvider, Uu as SessionMeta, Wa as ExtensionConfigCategory, Wu as Settings, Xp as JsonValue, Yc as CompletionState, Yo as ExtensionToolRendererEntry, Zp as McpServerConfig, bo as ExtensionCustomRenderer, cd as ModelInfo, dh as Session, el as CompletionProvider, fh as SessionData, id as ProviderKey, ih as SkillConfig, ld as ModelOption, no as StoredExtensionConfigItem, qu as ModelChainEntry, rd as ProviderAuth, rs as LoadedExtension, tl as CompletionReference, vu as RingBufferSink, xm as SessionTurn } from "./index-
|
|
2
|
-
import { S as ResolvedConfig, V as marginTopFor, b as ChatOptions, bt as hintsLength, f as DiscoveredMcp, i as SessionExportFormat, l as EnabledAllowlistKey, n as computeTurnAnchors, p as DiscoveryError, rt as KeyBindings, t as TranscriptItem, vt as Hint, xt as truncateTrailing, yt as clipHintsToWidth } from "./transcript-anchors-
|
|
3
|
-
import { B as ApprovalDecision, Q as isVisible, V as ApprovalRequest, X as isTurnHighlighted, Y as isEditErrorResult, _ as splitMarkdownCodeBlocks, a as formatToolCall, c as splitPromptSegments, et as selectableTurnIds, i as displayNameFor, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, nt as turnSelectionOwnership, o as PromptSegment, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, w as SessionHistoryMatch } from "./tool-formatters-
|
|
1
|
+
import { $p as McpToolSchema, Bl as PlanRequest, Dm as ThinkingLevel, Gu as StreamEvent, Ic as Theme, Lc as ThemeColors, Lo as ExtensionRegistry, Ml as InteractionRequest, Mu as accentColor, Nl as InteractionResponse, So as ExtensionDefinition, Tu as AgentRegistry, Uc as InlineAutocompleteProvider, Uu as SessionMeta, Wa as ExtensionConfigCategory, Wu as Settings, Xp as JsonValue, Yc as CompletionState, Yo as ExtensionToolRendererEntry, Zp as McpServerConfig, bo as ExtensionCustomRenderer, cd as ModelInfo, dh as Session, el as CompletionProvider, fh as SessionData, id as ProviderKey, ih as SkillConfig, ld as ModelOption, no as StoredExtensionConfigItem, qu as ModelChainEntry, rd as ProviderAuth, rs as LoadedExtension, tl as CompletionReference, vu as RingBufferSink, xm as SessionTurn } from "./index-DEqQQ8tN.js";
|
|
2
|
+
import { S as ResolvedConfig, V as marginTopFor, b as ChatOptions, bt as hintsLength, f as DiscoveredMcp, i as SessionExportFormat, l as EnabledAllowlistKey, n as computeTurnAnchors, p as DiscoveryError, rt as KeyBindings, t as TranscriptItem, vt as Hint, xt as truncateTrailing, yt as clipHintsToWidth } from "./transcript-anchors-B93mTVIi.js";
|
|
3
|
+
import { B as ApprovalDecision, Q as isVisible, V as ApprovalRequest, X as isTurnHighlighted, Y as isEditErrorResult, _ as splitMarkdownCodeBlocks, a as formatToolCall, c as splitPromptSegments, et as selectableTurnIds, i as displayNameFor, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, nt as turnSelectionOwnership, o as PromptSegment, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, w as SessionHistoryMatch } from "./tool-formatters-B0y_dlZ-.js";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { RGBA, SyntaxStyle } from "@opentui/core";
|
package/dist/tui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as toggleChainEntry, A as redirectUriFromAuthUrl, At as resolveTheme, Bt as useDiscovery, Cr as sumRunCosts, Ct as SETTINGS_TOGGLES, D as formatPathForCwd, Dr as updateToolEventOutcomes, Er as toolResultText, Et as useSettings, F as loadMcpToolsCache, G as parentServerName, Gt as resolveStoragePaths, Ht as ConfigProvider, I as mcpToolsCachePath, Jt as chainsEqual, K as createFileMcpCredentialStore, Kn as pruneTodosByRun, Kt as buildRunModel, L as refreshMcpToolsCatalog, M as runOAuthLogin, N as supportsOAuth, Nn as accentColor, O as fetchOAuthRedirect, Or as usageByModel, Q as getMcpAuthStatus, Rt as createDiscoverySlot, Sr as stripSpawnTokensLine, St as SETTINGS_INPUTS, T as suggestSafelistEntries, Tn as discoverAgentsMd, Tr as toolCallPreview, Tt as clampFps, U as buildVisibleMcpRows, Ut as useConfig, V as useMcpToolToggleMap, Vt as useDiscoveryOptional, W as indexOfServerRow, Wt as resolveConfig, X as useMcpAuthDispatch, Xt as providerKeySetChanged, Y as McpAuthProvider, Yn as useActiveTodos, Yt as filterChainFallbacks, Z as useMcpAuthState, Zt as restoreChainFallbacks, _ as useSafeModeQueue, _r as listSessionMeta, _t as listProjectFiles, a as useSurfaces, an as removeMcpServer, b as getSafelist, bt as SETTINGS_CATEGORIES, c as useStreamBuffer, cr as envSection, d as discoverProjectSkills, dn as tryOpenBrowser, dt as EMPTY_HINTS, en as useCompletion, et as ASK_USER_TOOL, fr as compactSummaryEvent, ft as clipHintsToWidth, g as useSafeModeActions, gr as lastContextSizeFromTurns, h as SafeModeProvider, hn as useUpdateCheck, hr as eventsFromTurns, ht as buildHints, i as useSelectStyle, in as mcpsWritePath, it as createInteractionTools, j as oauthUsesManualCodePaste, kt as resolveChipColor, l as buildSkillsConfig, ln as discoverProjectMcps, lr as chatReferenceTokensForPrompt, lt as useInteractionsActions, m as writeSessionExport, mn as buildUpdateHint, mr as deriveSessionTitle, mt as truncateTrailing, n as ThemeProvider, nn as hasClaudeCodeSetup, nt as PRESENT_PLAN_TOOL, on as upsertMcpServer, or as buildBuildSystem, ot as makeRequestInteraction, pn as bootTick, pt as hintsLength, qt as chainPositionOf, r as useColors, rn as importFromClaudeCode, rt as buildResumedToolResultsTurn, s as useTheme, sn as buildMcpServers, sr as buildPlanSystem, st as pendingInteractionsFromTurns, t as computeTurnAnchors, tn as countClaudeSessionFiles, tt as InteractionsProvider, u as defaultSkillScanPaths, ur as createChatTurnsReadTool, ut as useInteractionsQueue, vr as loadState, vt as useEnabledToggleSet, wn as chatAutoCompactBehavior, wt as SettingsProvider, x as isOnSafelist, xr as serverToolResultSummary, xt as SETTINGS_CHOICES, y as addToSafelist, yr as marginTopFor, yt as DEFAULT_SETTINGS, z as subscribeMcpToolsCache, zn as TODO_STATUS_GLYPHS, zt as DiscoveryProvider } from "./transcript-anchors-
|
|
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-
|
|
1
|
+
import { $t as toggleChainEntry, A as redirectUriFromAuthUrl, At as resolveTheme, Bt as useDiscovery, Cr as sumRunCosts, Ct as SETTINGS_TOGGLES, D as formatPathForCwd, Dr as updateToolEventOutcomes, Er as toolResultText, Et as useSettings, F as loadMcpToolsCache, G as parentServerName, Gt as resolveStoragePaths, Ht as ConfigProvider, I as mcpToolsCachePath, Jt as chainsEqual, K as createFileMcpCredentialStore, Kn as pruneTodosByRun, Kt as buildRunModel, L as refreshMcpToolsCatalog, M as runOAuthLogin, N as supportsOAuth, Nn as accentColor, O as fetchOAuthRedirect, Or as usageByModel, Q as getMcpAuthStatus, Rt as createDiscoverySlot, Sr as stripSpawnTokensLine, St as SETTINGS_INPUTS, T as suggestSafelistEntries, Tn as discoverAgentsMd, Tr as toolCallPreview, Tt as clampFps, U as buildVisibleMcpRows, Ut as useConfig, V as useMcpToolToggleMap, Vt as useDiscoveryOptional, W as indexOfServerRow, Wt as resolveConfig, X as useMcpAuthDispatch, Xt as providerKeySetChanged, Y as McpAuthProvider, Yn as useActiveTodos, Yt as filterChainFallbacks, Z as useMcpAuthState, Zt as restoreChainFallbacks, _ as useSafeModeQueue, _r as listSessionMeta, _t as listProjectFiles, a as useSurfaces, an as removeMcpServer, b as getSafelist, bt as SETTINGS_CATEGORIES, c as useStreamBuffer, cr as envSection, d as discoverProjectSkills, dn as tryOpenBrowser, dt as EMPTY_HINTS, en as useCompletion, et as ASK_USER_TOOL, fr as compactSummaryEvent, ft as clipHintsToWidth, g as useSafeModeActions, gr as lastContextSizeFromTurns, h as SafeModeProvider, hn as useUpdateCheck, hr as eventsFromTurns, ht as buildHints, i as useSelectStyle, in as mcpsWritePath, it as createInteractionTools, j as oauthUsesManualCodePaste, kt as resolveChipColor, l as buildSkillsConfig, ln as discoverProjectMcps, lr as chatReferenceTokensForPrompt, lt as useInteractionsActions, m as writeSessionExport, mn as buildUpdateHint, mr as deriveSessionTitle, mt as truncateTrailing, n as ThemeProvider, nn as hasClaudeCodeSetup, nt as PRESENT_PLAN_TOOL, on as upsertMcpServer, or as buildBuildSystem, ot as makeRequestInteraction, pn as bootTick, pt as hintsLength, qt as chainPositionOf, r as useColors, rn as importFromClaudeCode, rt as buildResumedToolResultsTurn, s as useTheme, sn as buildMcpServers, sr as buildPlanSystem, st as pendingInteractionsFromTurns, t as computeTurnAnchors, tn as countClaudeSessionFiles, tt as InteractionsProvider, u as defaultSkillScanPaths, ur as createChatTurnsReadTool, ut as useInteractionsQueue, vr as loadState, vt as useEnabledToggleSet, wn as chatAutoCompactBehavior, wt as SettingsProvider, x as isOnSafelist, xr as serverToolResultSummary, xt as SETTINGS_CHOICES, y as addToSafelist, yr as marginTopFor, yt as DEFAULT_SETTINGS, z as subscribeMcpToolsCache, zn as TODO_STATUS_GLYPHS, zt as DiscoveryProvider } from "./transcript-anchors-BeCn35OE.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-XcXGROHb.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,7 +7,7 @@ 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-
|
|
10
|
+
import { g as hasAuthorizationHeader, m as McpOAuthProvider, n as connectMcpServers, s as nonOwningMcpView } from "./mcp-CzUy5luo.js";
|
|
11
11
|
import { C as estimateRebilledCostUsd } from "./openai-compat-Bf9uMTMa.js";
|
|
12
12
|
import { replaceDynamicSection } from "./prompt.js";
|
|
13
13
|
import { a as getExtensionSessionState, c as setExtensionSessionState, i as demoteStaleRunningStatus, o as loadSession, t as createSession } from "./session-Bdk31kA5.js";
|
|
@@ -17,7 +17,7 @@ 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-
|
|
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-COaVj9kG.js";
|
|
21
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";
|
|
@@ -9458,6 +9458,26 @@ const COPY_FEEDBACK_MS = 4e3;
|
|
|
9458
9458
|
* carrying a fat `code` + `state` and make a correct paste look corrupt.
|
|
9459
9459
|
*/
|
|
9460
9460
|
const PASTE_MAX_LENGTH = 4096;
|
|
9461
|
+
/** After this long without an authorization URL, spell out the escape route. */
|
|
9462
|
+
const SLOW_START_SECONDS = 8;
|
|
9463
|
+
/**
|
|
9464
|
+
* Seconds elapsed since `active` became true, ticking once a second.
|
|
9465
|
+
* Frozen (and reset) when inactive so the panel doesn't repaint after the
|
|
9466
|
+
* URL lands.
|
|
9467
|
+
*/
|
|
9468
|
+
function useElapsedSeconds(active) {
|
|
9469
|
+
const [seconds, setSeconds] = useState(0);
|
|
9470
|
+
useEffect(() => {
|
|
9471
|
+
if (!active) {
|
|
9472
|
+
setSeconds(0);
|
|
9473
|
+
return;
|
|
9474
|
+
}
|
|
9475
|
+
const started = Date.now();
|
|
9476
|
+
const timer = setInterval(() => setSeconds(Math.floor((Date.now() - started) / 1e3)), 1e3);
|
|
9477
|
+
return () => clearInterval(timer);
|
|
9478
|
+
}, [active]);
|
|
9479
|
+
return seconds;
|
|
9480
|
+
}
|
|
9461
9481
|
/**
|
|
9462
9482
|
* Copy-to-clipboard with a self-clearing "copied" flag. Every copy
|
|
9463
9483
|
* affordance in this module shares it so the timers are cleaned up on
|
|
@@ -9820,7 +9840,8 @@ function McpAuthorizingPanel({ serverName, authUrl, maxLineWidth, chromeWidth, i
|
|
|
9820
9840
|
const COLOR = useColors();
|
|
9821
9841
|
const inputRef = useRef(null);
|
|
9822
9842
|
const [hint, setHint] = useState(null);
|
|
9823
|
-
const
|
|
9843
|
+
const waited = useElapsedSeconds(authUrl === null);
|
|
9844
|
+
const status = hint && hint.tone !== "error" ? hint.text : authUrl === null ? `contacting ${serverName} for an authorization URL… (${waited}s)` : "complete the login in your browser — waiting for the callback…";
|
|
9824
9845
|
const onSubmit = useCallback(() => {
|
|
9825
9846
|
const value = inputRef.current?.value?.trim() ?? "";
|
|
9826
9847
|
if (!value) return;
|
|
@@ -9863,6 +9884,10 @@ function McpAuthorizingPanel({ serverName, authUrl, maxLineWidth, chromeWidth, i
|
|
|
9863
9884
|
},
|
|
9864
9885
|
children: [
|
|
9865
9886
|
/* @__PURE__ */ jsx$1(Spinner, { label: status }),
|
|
9887
|
+
authUrl === null && waited >= SLOW_START_SECONDS && /* @__PURE__ */ jsx$1("text", {
|
|
9888
|
+
fg: COLOR.warn,
|
|
9889
|
+
children: `${serverName} is slow to respond — press esc to cancel and retry, or check the server URL in this list.`
|
|
9890
|
+
}),
|
|
9866
9891
|
authUrl !== null && /* @__PURE__ */ jsx$1(OAuthAuthBlock, {
|
|
9867
9892
|
authUrl,
|
|
9868
9893
|
maxLineWidth: maxLineWidth - 4,
|
|
@@ -22105,11 +22130,26 @@ function AppShell() {
|
|
|
22105
22130
|
signal: ac.signal,
|
|
22106
22131
|
renderCallbackPage: renderDefaultCallbackPage,
|
|
22107
22132
|
hooks: agentRef.current?.hooks,
|
|
22108
|
-
onAuthorizationUrl: (url) =>
|
|
22133
|
+
onAuthorizationUrl: (url) => {
|
|
22134
|
+
dispatchAuth({
|
|
22135
|
+
type: "auth-url",
|
|
22136
|
+
name,
|
|
22137
|
+
url: url.toString()
|
|
22138
|
+
});
|
|
22139
|
+
tryOpenBrowser(url.toString());
|
|
22140
|
+
}
|
|
22141
|
+
});
|
|
22142
|
+
dispatchAuth({
|
|
22143
|
+
type: "auth-success",
|
|
22144
|
+
name
|
|
22109
22145
|
});
|
|
22110
22146
|
rebuildActiveAgent().catch((err) => debugLog("mcp-login: rebuildActiveAgent failed", err));
|
|
22111
22147
|
} catch (err) {
|
|
22112
|
-
if (
|
|
22148
|
+
if (ac.signal.aborted) dispatchAuth({
|
|
22149
|
+
type: "login:cancel",
|
|
22150
|
+
name
|
|
22151
|
+
});
|
|
22152
|
+
else dispatchAuth({
|
|
22113
22153
|
type: "auth-error",
|
|
22114
22154
|
name,
|
|
22115
22155
|
error: errorMessage(err)
|
|
@@ -22142,8 +22182,12 @@ function AppShell() {
|
|
|
22142
22182
|
rebuildActiveAgent
|
|
22143
22183
|
]);
|
|
22144
22184
|
const onCancelLoginMcp = useCallback((name) => {
|
|
22185
|
+
dispatchAuth({
|
|
22186
|
+
type: "login:cancel",
|
|
22187
|
+
name
|
|
22188
|
+
});
|
|
22145
22189
|
mcpLoginAbortsRef.current.get(name)?.abort();
|
|
22146
|
-
}, []);
|
|
22190
|
+
}, [dispatchAuth]);
|
|
22147
22191
|
const onRefreshMcpTools = useCallback(async () => {
|
|
22148
22192
|
const agent = agentRef.current;
|
|
22149
22193
|
if (!agent) return;
|