@qwen-code/web-shell 0.26.4 → 0.26.5-nightly.20261101.7b4b353750
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 +1 -1
- package/dist/{PierreFilePreview-CVoJL-kD.js → PierreFilePreview-Bv9TGp1f.js} +1 -1
- package/dist/{SpreadsheetPreview-CPSqOai5.js → SpreadsheetPreview-DS68HfFp.js} +2 -2
- package/dist/{WorkspaceFileBrowser-IuQcqNWd.js → WorkspaceFileBrowser-DvLZSVTe.js} +2 -2
- package/dist/{agents-route-BBfOMyJ5.js → agents-route-DSGTFqET.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-DyFoZ0bq.js → index-B_wpcKAs.js} +57067 -55147
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +10323 -10088
- package/dist/types/App.d.ts +1 -1
- package/dist/types/completions/slashCompletion.d.ts +1 -1
- package/dist/types/components/ChatEditor.d.ts +6 -2
- package/dist/types/components/MessageItem.d.ts +3 -0
- package/dist/types/components/MessageList.d.ts +3 -1
- package/dist/types/components/SplitView.d.ts +1 -1
- package/dist/types/components/WebShellTranscript.d.ts +1 -1
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +4 -2
- package/dist/types/components/artifacts/ContextUsagePanel.d.ts +3 -2
- package/dist/types/components/artifacts/readContextInstructionFile.d.ts +22 -0
- package/dist/types/components/composer/AddMenu.d.ts +3 -1
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +113 -20
- package/dist/types/components/managed/java-managed-agent-client.d.ts +1 -0
- package/dist/types/components/managed/managed-agent-provider.d.ts +3 -1
- package/dist/types/components/managed/managed-session-export.d.ts +1 -0
- package/dist/types/components/managed/managed-session-messages.d.ts +1 -1
- package/dist/types/components/messages/ContextUsageMessage.d.ts +4 -2
- package/dist/types/components/messages/SystemMessage.d.ts +3 -0
- package/dist/types/components/messages/tools/DiffView.d.ts +6 -0
- package/dist/types/components/plugins/PluginManagerPage.d.ts +2 -1
- package/dist/types/components/plugins/manager-page.d.ts +1 -0
- package/dist/types/components/sidebar/ActivityView.d.ts +41 -0
- package/dist/types/components/sidebar/SidebarSectionHeader.d.ts +7 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +7 -3
- package/dist/types/components/sidebar/activity-messages.d.ts +4 -0
- package/dist/types/components/sidebar/activity-model.d.ts +34 -0
- package/dist/types/components/sidebar/pinned-session-order.d.ts +2 -0
- package/dist/types/components/sidebar/use-activity-catalog.d.ts +31 -0
- package/dist/types/components/workflow-mode-control-state.d.ts +32 -0
- package/dist/types/components/workflow-mode-messages.d.ts +18 -0
- package/dist/types/daemon/index.d.ts +1 -1
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +9 -0
- package/dist/types/daemon/session/actions.d.ts +2 -1
- package/dist/types/daemon/session/index.d.ts +1 -1
- package/dist/types/daemon/session/mappers.d.ts +6 -0
- package/dist/types/daemon/session/session-config-sync.d.ts +22 -0
- package/dist/types/daemon/session/types.d.ts +17 -1
- package/dist/types/daemon-react-sdk.d.ts +1 -1
- package/dist/types/extensions/inputHighlight.d.ts +3 -2
- package/dist/types/hooks/useMcpAppMessages.d.ts +9 -10
- package/dist/types/hooks/useOtherWorkspaceSessions.d.ts +29 -0
- package/dist/types/hooks/useScopedSessions.d.ts +5 -0
- package/dist/types/i18n.d.ts +1 -1
- package/dist/types/mcpAppHostContext.d.ts +19 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
- package/dist/types/utils/composerTasks.d.ts +7 -0
- package/dist/types/utils/standalone-session-routing.d.ts +20 -1
- package/dist/{useDaemonMidTurnInjected-BpWZTnoN.js → useDaemonMidTurnInjected-CZfHzDlj.js} +6858 -6383
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ export interface WebShellSidebarFooterOptions {
|
|
|
33
33
|
export declare const DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
|
|
34
34
|
export declare const DESKTOP_DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
|
|
35
35
|
export declare const DEFAULT_PRIMARY_NAV_ITEMS: readonly WebShellSidebarPrimaryNavItem[];
|
|
36
|
-
export type WebShellSidebarSessionActionItem = 'details' | 'rename' | 'group' | 'export' | 'delete' | 'pin' | 'archive';
|
|
36
|
+
export type WebShellSidebarSessionActionItem = 'details' | 'rename' | 'group' | 'export' | 'delete' | 'pin' | 'split' | 'archive';
|
|
37
37
|
/** Subset of action items that have working inline (hover-button) handlers. */
|
|
38
38
|
export type WebShellSidebarSessionInlineActionItem = 'pin' | 'rename' | 'export' | 'delete';
|
|
39
39
|
export interface WebShellSidebarSessionActionsOptions {
|
|
@@ -46,9 +46,10 @@ export interface WebShellSidebarSessionActionsOptions {
|
|
|
46
46
|
* archive a session.
|
|
47
47
|
* Only items that also pass their built-in visibility condition are rendered.
|
|
48
48
|
* Only items with working inline handlers are accepted
|
|
49
|
-
* (details/group/archive are dropdown-only).
|
|
49
|
+
* (details/group/archive/split are dropdown-only).
|
|
50
50
|
* Recent sessions use dedicated Pin and Archive buttons instead of this
|
|
51
51
|
* layout; the items policy still controls whether those actions are enabled.
|
|
52
|
+
* Archived rows use Export and Restore inline, independently of this option.
|
|
52
53
|
*/
|
|
53
54
|
inlineItems?: readonly WebShellSidebarSessionInlineActionItem[];
|
|
54
55
|
}
|
|
@@ -91,6 +92,8 @@ interface WebShellSidebarProps {
|
|
|
91
92
|
/** Opens the Workspaces overview panel (table of registered workspaces). */
|
|
92
93
|
onOpenWorkspacesOverview?: () => void;
|
|
93
94
|
onOpenSplitView: () => void;
|
|
95
|
+
onAddSessionToSplitView?: (sessionId: string) => void;
|
|
96
|
+
splitSessionIds?: readonly string[];
|
|
94
97
|
/** Whether to offer the in-window split view (large screens only). */
|
|
95
98
|
canOpenSplitView?: boolean;
|
|
96
99
|
onNewSession: (workspaceCwd?: string) => Promise<boolean> | boolean;
|
|
@@ -103,6 +106,7 @@ interface WebShellSidebarProps {
|
|
|
103
106
|
*/
|
|
104
107
|
onOpenHostSession?: (origin: string, sessionId: string, workspaceCwd?: string) => void;
|
|
105
108
|
onSelectCurrentSession?: () => void;
|
|
109
|
+
onSessionArchived?: (sessionId: string, workspaceCwd: string) => void;
|
|
106
110
|
onSessionRenameConfirmed?: (workspaceCwd: string | undefined, sessionId: string, displayName: string) => void;
|
|
107
111
|
/**
|
|
108
112
|
* `attachedSessionId` is the session this client was attached to when the
|
|
@@ -181,4 +185,4 @@ interface WebShellSidebarProps {
|
|
|
181
185
|
onLoadStandaloneSession?: (sessionId: string, displayName?: string) => Promise<void> | void;
|
|
182
186
|
onStandaloneNotice?: (message: string) => void;
|
|
183
187
|
}
|
|
184
|
-
export declare function WebShellSidebar({ collapsed, layout, activePage, containerWidth, onOpenHome, onCollapsedChange, onOpenSettings, canOpenSettings, onOpenAgents, onOpenPlugins, onOpenChannels, onOpenLive, onLiveVoiceSlotChange, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenPrWatches, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onOpenHostSession, onSelectCurrentSession, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, sessionContent, sessionHeader, managedWorkspaces, managedArchivedSessions, archivedSessionsTarget, onSearchQueryChange, currentSessionActive, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
188
|
+
export declare function WebShellSidebar({ collapsed, layout, activePage, containerWidth, onOpenHome, onCollapsedChange, onOpenSettings, canOpenSettings, onOpenAgents, onOpenPlugins, onOpenChannels, onOpenLive, onLiveVoiceSlotChange, onOpenManagedSessions, onOpenDaemonStatus, onOpenScheduledTasks, onOpenPrWatches, onOpenWorkflows, onOpenGoals, onOpenSessions, canOpenSessionsOverview, onOpenWorkspacesOverview, onOpenSplitView, onAddSessionToSplitView, splitSessionIds, canOpenSplitView, onNewSession, onNewStandaloneSession, onLoadSession, onOpenHostSession, onSelectCurrentSession, onSessionArchived, onSessionRenameConfirmed, onSessionsDeleted, onError, theme, onThemeChange, mobileOpen, onMobileClose, selectedWorkspaceCwd, onSelectWorkspace, onOpenGitDiff, onOpenCommit, onOpenAddWorkspace, workspaces: providedWorkspaces, lockedWorkspaceCwd, lockedWorkspace: lockedWorkspaceOptions, branding, primaryNav: primaryNavOptions, sessionContent, sessionHeader, managedWorkspaces, managedArchivedSessions, archivedSessionsTarget, onSearchQueryChange, currentSessionActive, showSessionSourceSwitch, showLive, hideProjectHeader, sessionActions: sessionActionsOptions, footer, workspaceOverview, onOpenWorkspaceManagement, onNewWorktreeSession, projectFeaturesEnabled, onLoadStandaloneSession, onStandaloneNotice, }: WebShellSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
|
|
2
|
+
export interface ActivityEntry {
|
|
3
|
+
key: string;
|
|
4
|
+
session: DaemonSessionSummary;
|
|
5
|
+
unread?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type ActivityState = 'input' | 'approval' | 'error' | 'unread' | 'active' | 'idle';
|
|
8
|
+
export interface ActivityPreferences {
|
|
9
|
+
priority: boolean;
|
|
10
|
+
pinned: boolean;
|
|
11
|
+
scheduled: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_ACTIVITY_PREFERENCES: ActivityPreferences;
|
|
14
|
+
export interface ActivitySnapshot {
|
|
15
|
+
activatedAt: number;
|
|
16
|
+
priorityKeys: string[];
|
|
17
|
+
recentTimes: ReadonlyMap<string, number>;
|
|
18
|
+
}
|
|
19
|
+
export declare function activityRecency({ session }: ActivityEntry): number;
|
|
20
|
+
export declare function isActivityUnread(entry: ActivityEntry): boolean;
|
|
21
|
+
export declare function activityState(entry: ActivityEntry): ActivityState;
|
|
22
|
+
export declare function activityNeedsAttention(entry: ActivityEntry): boolean;
|
|
23
|
+
export declare function isActivityEligible(entry: ActivityEntry, preferences: ActivityPreferences): boolean;
|
|
24
|
+
export declare function openActivitySnapshot(entries: ActivityEntry[], preferences: ActivityPreferences, now?: number): ActivitySnapshot;
|
|
25
|
+
export declare function updateActivitySnapshot(snapshot: ActivitySnapshot, entries: ActivityEntry[], preferences: ActivityPreferences): ActivitySnapshot;
|
|
26
|
+
export declare function clearReadActivitySnapshot(snapshot: ActivitySnapshot, entries: ActivityEntry[], preferences: ActivityPreferences): ActivitySnapshot;
|
|
27
|
+
export declare function selectActivitySections(snapshot: ActivitySnapshot, entries: ActivityEntry[], preferences: ActivityPreferences): {
|
|
28
|
+
priority: ActivityEntry[];
|
|
29
|
+
pinned: ActivityEntry[];
|
|
30
|
+
recent: {
|
|
31
|
+
dayStart: number;
|
|
32
|
+
entries: ActivityEntry[];
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DaemonClient, DaemonEvent } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import type { ActivityEntry } from './activity-model';
|
|
3
|
+
export declare function activityKey(workspaceCwd: string, sessionId: string): string;
|
|
4
|
+
export declare function activityPreview(events: readonly DaemonEvent[]): string | undefined;
|
|
5
|
+
export declare function activityBatch<T, R>(items: readonly T[], run: (item: T) => Promise<R>): Promise<PromiseSettledResult<R>[]>;
|
|
6
|
+
interface ActivityCatalogOptions {
|
|
7
|
+
client: DaemonClient;
|
|
8
|
+
workspaceCwds: readonly string[];
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
open: boolean;
|
|
11
|
+
liveStateEnabled: boolean;
|
|
12
|
+
currentKey?: string;
|
|
13
|
+
onArchivedCurrent: (entry: ActivityEntry) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useActivityCatalog({ client, workspaceCwds, enabled, open, liveStateEnabled, currentKey, onArchivedCurrent, }: ActivityCatalogOptions): {
|
|
16
|
+
entries: ActivityEntry[];
|
|
17
|
+
loading: boolean;
|
|
18
|
+
unavailable: boolean;
|
|
19
|
+
hasMore: boolean;
|
|
20
|
+
archive: (items: ActivityEntry[]) => Promise<{
|
|
21
|
+
succeeded: ActivityEntry[];
|
|
22
|
+
failed: number;
|
|
23
|
+
}>;
|
|
24
|
+
undo: (items: ActivityEntry[]) => Promise<{
|
|
25
|
+
succeeded: ActivityEntry[];
|
|
26
|
+
failed: number;
|
|
27
|
+
}>;
|
|
28
|
+
loadPreview: (entry: ActivityEntry) => Promise<string | undefined>;
|
|
29
|
+
retry: () => void;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DaemonWorkflowMode, DaemonWorkflowModeStatus } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
|
+
import type { WebShellLanguage } from '../i18n';
|
|
3
|
+
export interface WorkflowModeControlOptions {
|
|
4
|
+
workflowMode?: DaemonWorkflowMode;
|
|
5
|
+
workflowModeStatus?: DaemonWorkflowModeStatus;
|
|
6
|
+
workflowModePending?: boolean;
|
|
7
|
+
onWorkflowModeChange?: (requested: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function getWorkflowModeControlState({ workflowMode, workflowModeStatus: status, workflowModePending: pending, onWorkflowModeChange, }: WorkflowModeControlOptions, language: WebShellLanguage): {
|
|
10
|
+
mode: DaemonWorkflowMode | undefined;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
description: string;
|
|
13
|
+
messages: {
|
|
14
|
+
label: string;
|
|
15
|
+
details: string;
|
|
16
|
+
unbound: string;
|
|
17
|
+
updating: string;
|
|
18
|
+
syncing: string;
|
|
19
|
+
unknown: string;
|
|
20
|
+
on: string;
|
|
21
|
+
off: string;
|
|
22
|
+
onUnavailable: string;
|
|
23
|
+
unavailable: string;
|
|
24
|
+
initializing: string;
|
|
25
|
+
workflowUnavailable: string;
|
|
26
|
+
unsupported: string;
|
|
27
|
+
nextTurn: string;
|
|
28
|
+
updateFailed: string;
|
|
29
|
+
};
|
|
30
|
+
status: "unknown" | "ready" | "unbound" | "syncing";
|
|
31
|
+
pending: boolean;
|
|
32
|
+
} | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WebShellLanguage } from '../i18n';
|
|
2
|
+
export declare function getWorkflowModeMessages(language: WebShellLanguage): {
|
|
3
|
+
label: string;
|
|
4
|
+
details: string;
|
|
5
|
+
unbound: string;
|
|
6
|
+
updating: string;
|
|
7
|
+
syncing: string;
|
|
8
|
+
unknown: string;
|
|
9
|
+
on: string;
|
|
10
|
+
off: string;
|
|
11
|
+
onUnavailable: string;
|
|
12
|
+
unavailable: string;
|
|
13
|
+
initializing: string;
|
|
14
|
+
workflowUnavailable: string;
|
|
15
|
+
unsupported: string;
|
|
16
|
+
nextTurn: string;
|
|
17
|
+
updateFailed: string;
|
|
18
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export { DaemonSessionProvider, useDaemonActions, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonSessionOwnerGuard, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, useDaemonWorkspaceEventSignals, extractDaemonTodosFromToolBlock, hasDaemonActiveTodos, isDaemonSubAgentToolBlock, parseDaemonTodoItemsFromEntries, selectDaemonActiveTodoList, selectDaemonLatestTodoList, selectDaemonPendingPermissions, selectDaemonSubAgentToolBlocks, selectDaemonStreamingState, selectDaemonTodoLists, selectDaemonTranscriptStreamingState, isMissingSessionHttpStatus, toDaemonPromptContent, } from './session/index.js';
|
|
7
|
-
export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTranscriptHistory, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, HistoricalTranscriptPage, HistoricalTranscriptRange, TranscriptBoundary, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonStreamingState, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './session/index.js';
|
|
7
|
+
export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTranscriptHistory, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, HistoricalTranscriptPage, HistoricalTranscriptRange, TranscriptBoundary, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonStreamingState, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './session/index.js';
|
|
8
8
|
export { DaemonWorkspaceProvider, useDaemonWorkspace, useDaemonWorkspaceActions, useOptionalDaemonWorkspace, useDaemonAgents, useDaemonAuth, useDaemonChannels, useDaemonDiagnostics, useDaemonFiles, useDaemonGlob, useDaemonMcp, useDaemonMemory, useDaemonResource, useDaemonSessions, useDaemonSkills, useDaemonStatusReport, useDaemonUsageDashboard, useDaemonTools, useDaemonSettings, useDaemonProviders, } from './workspace/index.js';
|
|
9
9
|
export type { DaemonDirectoryEntry, DaemonDirectoryListing, DaemonFileStat, DaemonGlobOptions, DaemonGlobResult, DaemonGoal, DaemonGoalList, DaemonAutofixPrWatch, DaemonAutofixPrWatchList, DaemonScheduledTask, DaemonScheduledTaskGateStatus, DaemonScheduledTaskRun, DaemonCreateScheduledTaskRequest, DaemonUpdateScheduledTaskRequest, DaemonResourceOptions, DaemonChannelPairingActions, DaemonChannelsResource, DaemonStatusReportOptions, DaemonUsageDashboardOptions, DaemonWorkspaceActions, DaemonWorkspaceContextValue, DaemonWorkspaceProviderProps, DaemonWorkspaceStatus, ResourceResult, ResourceState, } from './workspace/index.js';
|
|
10
10
|
export { useDaemonFollowupSuggestion, type UseDaemonFollowupSuggestionReturn, } from './useDaemonFollowupSuggestion.js';
|
|
@@ -44,3 +44,12 @@ export declare function useDaemonSessionNotices(): {
|
|
|
44
44
|
dismissNotice(id: string): void;
|
|
45
45
|
clearNotices(): void;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* The daemon answers 409 `{ code: 'session_archived' }` for every active-route
|
|
49
|
+
* load/resume/attach of an archived session. A plain 409 (for example a
|
|
50
|
+
* session-writer conflict) stays retriable: that conflict can clear on its own.
|
|
51
|
+
* An archived session will not, so retrying loops forever on an empty
|
|
52
|
+
* transcript — treat the error as terminal and park with a visible error
|
|
53
|
+
* instead of reconnecting.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isSessionArchivedHttpError(error: unknown): boolean;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { Dispatch, SetStateAction } from 'react';
|
|
7
7
|
import type { McpAppGeneratedUiInvalidation } from '../../mcpAppHostContext.js';
|
|
8
8
|
import type { DaemonClient, DaemonSessionClient, CreateSessionRequest, DaemonTranscriptStore, DaemonCapabilities } from '@qwen-code/sdk/daemon';
|
|
9
|
+
import { type SessionConfigSyncMap } from './session-config-sync.js';
|
|
9
10
|
import { type TimerRef } from '../timing.js';
|
|
10
11
|
import type { ActivePrompt, AddDaemonSessionNotice, DaemonActivePromptState, DaemonConnectionState, DaemonPromptStatus, DaemonSessionActions, SettledPrompt, PendingSessionLoad, DaemonProductSessionContext } from './types.js';
|
|
11
12
|
interface RefBox<T> {
|
|
@@ -29,7 +30,7 @@ export interface CreateDaemonSessionActionsArgs {
|
|
|
29
30
|
settledPromptsRef: RefBox<Map<string, SettledPrompt>>;
|
|
30
31
|
pendingSessionLoadRef: RefBox<PendingSessionLoad | undefined>;
|
|
31
32
|
pendingSessionLoadIdRef: RefBox<number>;
|
|
32
|
-
sessionConfigGeneration:
|
|
33
|
+
sessionConfigGeneration: SessionConfigSyncMap;
|
|
33
34
|
sessionRecoveryGeneration: WeakMap<DaemonSessionClient, number>;
|
|
34
35
|
heartbeatSupportedRef: RefBox<boolean>;
|
|
35
36
|
manualSessionClearRef: RefBox<boolean>;
|
|
@@ -8,7 +8,7 @@ export type { DaemonTranscriptHistory } from './DaemonSessionProvider.js';
|
|
|
8
8
|
export { createDaemonTurnNavigationStore } from './turn-navigation-store.js';
|
|
9
9
|
export type { CreateDaemonTurnNavigationStoreOptions, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, } from './turn-navigation-store.js';
|
|
10
10
|
export type { HistoricalTranscriptPage, HistoricalTranscriptRange, TranscriptBoundary, } from './transcript-page-table.js';
|
|
11
|
-
export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './types.js';
|
|
11
|
+
export type { DaemonCommandInfo, DaemonConnectionState, DaemonConnectionStatus, DaemonModelInfo, DaemonProductSessionContext, DaemonStandaloneConnectionState, DaemonNoticeCategory, DaemonNoticeOperation, DaemonNoticeSeverity, DaemonPromptFile, DaemonPromptImage, DaemonPromptStatus, DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus, DaemonSessionActions, DaemonSessionContextValue, DaemonSessionNotice, DaemonSessionOwnerGuard, DaemonSessionOwnerSnapshot, DaemonSessionProviderProps, DaemonTokenUsage, DaemonTodoItem, DaemonTodoList, DaemonTodoPriority, DaemonTodoStatus, DaemonWorkspaceEventSignals, PendingPromptActionOptions, SendPromptOptions, SubmitPromptOptions, SubmitPromptResult, } from './types.js';
|
|
12
12
|
export { extractDaemonTodosFromToolBlock, hasDaemonActiveTodos, isDaemonSubAgentToolBlock, parseDaemonTodoItemsFromEntries, selectDaemonActiveTodoList, selectDaemonLatestTodoList, selectDaemonPendingPermissions, selectDaemonSubAgentToolBlocks, selectDaemonStreamingState, selectDaemonTodoLists, selectDaemonTranscriptStreamingState, } from './selectors.js';
|
|
13
13
|
export type { DaemonStreamingState } from './selectors.js';
|
|
14
14
|
export { toDaemonPromptContent } from './promptContent.js';
|
|
@@ -18,6 +18,12 @@ export declare function mapSessionContextModels(status: DaemonSessionContextStat
|
|
|
18
18
|
contextWindow?: number;
|
|
19
19
|
} | undefined;
|
|
20
20
|
export declare function mapReasoningControls(configOptions: unknown): DaemonReasoningControls | undefined;
|
|
21
|
+
export declare function mapWorkflowMode(configOptions: unknown): Pick<DaemonConnectionState, 'workflowMode' | 'workflowModeStatus'>;
|
|
22
|
+
export declare function getConfigOptionsUpdate(event: DaemonEvent): {
|
|
23
|
+
configOptions: unknown;
|
|
24
|
+
} | undefined;
|
|
25
|
+
export declare function applyConfigOptions(current: DaemonConnectionState, configOptions: unknown): DaemonConnectionState;
|
|
26
|
+
export declare function applySessionConfigContext(current: DaemonConnectionState, context: DaemonSessionContextStatus): DaemonConnectionState;
|
|
21
27
|
export declare function mapSessionContextReasoning(status: DaemonSessionContextStatus | undefined): DaemonReasoningControls | undefined;
|
|
22
28
|
export declare function mapSupportedCommands(status: DaemonSessionSupportedCommandsStatus | undefined): {
|
|
23
29
|
commands: DaemonCommandInfo[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonSessionClient } from '@qwen-code/sdk/daemon';
|
|
7
|
+
export interface SessionConfigSync {
|
|
8
|
+
generation: number;
|
|
9
|
+
pendingWrites: number;
|
|
10
|
+
readSequence: number;
|
|
11
|
+
refresh?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export type SessionConfigSyncMap = WeakMap<DaemonSessionClient, SessionConfigSync>;
|
|
14
|
+
export declare function getSessionConfigSync(states: SessionConfigSyncMap, session: DaemonSessionClient): SessionConfigSync;
|
|
15
|
+
export declare function resetSessionConfigSync(states: SessionConfigSyncMap, session: DaemonSessionClient): void;
|
|
16
|
+
export declare function observeSessionConfig(states: SessionConfigSyncMap, session: DaemonSessionClient): void;
|
|
17
|
+
export declare function beginSessionConfigRead(states: SessionConfigSyncMap, session: DaemonSessionClient): () => boolean;
|
|
18
|
+
export declare function queueSessionConfigRefresh(states: SessionConfigSyncMap, session: DaemonSessionClient, refresh: () => void): void;
|
|
19
|
+
export declare function beginSessionConfigMutation(states: SessionConfigSyncMap, session: DaemonSessionClient): {
|
|
20
|
+
finish: () => void;
|
|
21
|
+
isCurrent: () => boolean;
|
|
22
|
+
};
|
|
@@ -28,6 +28,13 @@ export interface DaemonStandaloneConnectionState {
|
|
|
28
28
|
creationRecovery?: DaemonStandaloneCreationRecovery;
|
|
29
29
|
errorCode?: string;
|
|
30
30
|
}
|
|
31
|
+
export interface DaemonWorkflowMode {
|
|
32
|
+
requested: boolean;
|
|
33
|
+
available: boolean;
|
|
34
|
+
effective: boolean;
|
|
35
|
+
reason?: string;
|
|
36
|
+
}
|
|
37
|
+
export type DaemonWorkflowModeStatus = 'unbound' | 'unknown' | 'syncing' | 'ready' | 'unsupported';
|
|
31
38
|
export interface DaemonConnectionState {
|
|
32
39
|
status: DaemonConnectionStatus;
|
|
33
40
|
runtimeStopped?: boolean;
|
|
@@ -65,6 +72,9 @@ export interface DaemonConnectionState {
|
|
|
65
72
|
models?: DaemonModelInfo[];
|
|
66
73
|
currentModel?: string;
|
|
67
74
|
reasoning?: DaemonReasoningControls;
|
|
75
|
+
workflowMode?: DaemonWorkflowMode;
|
|
76
|
+
workflowModeStatus?: DaemonWorkflowModeStatus;
|
|
77
|
+
workflowModePending?: boolean;
|
|
68
78
|
currentMode?: string;
|
|
69
79
|
planExecutionMode?: string;
|
|
70
80
|
displayName?: string;
|
|
@@ -94,6 +104,11 @@ export interface DaemonConnectionState {
|
|
|
94
104
|
errorStatus?: number;
|
|
95
105
|
/** True only when the server confirmed the current session is missing. */
|
|
96
106
|
missingSession?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* True while the connection is parked on the daemon's terminal 409
|
|
109
|
+
* `session_archived` answer for the session it tried to load.
|
|
110
|
+
*/
|
|
111
|
+
sessionArchived?: boolean;
|
|
97
112
|
}
|
|
98
113
|
export interface DaemonReasoningControls {
|
|
99
114
|
enabled: boolean;
|
|
@@ -219,7 +234,7 @@ export type DaemonPromptSettledListener = (event: DaemonPromptSettledEvent) => v
|
|
|
219
234
|
export type DaemonPromptSettlementSubscribe = (listener: DaemonPromptSettledListener) => () => void;
|
|
220
235
|
export type DaemonNoticeSeverity = 'info' | 'warning' | 'error';
|
|
221
236
|
export type DaemonNoticeCategory = 'validation' | 'user_action' | 'connection' | 'protocol' | 'lifecycle' | 'system';
|
|
222
|
-
export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
|
|
237
|
+
export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
|
|
223
238
|
export interface DaemonSessionNotice {
|
|
224
239
|
id: string;
|
|
225
240
|
severity: DaemonNoticeSeverity;
|
|
@@ -385,6 +400,7 @@ export interface DaemonSessionActions {
|
|
|
385
400
|
workspaceCwd: string;
|
|
386
401
|
sessionId?: string;
|
|
387
402
|
}) => void | Promise<void>): Promise<void>;
|
|
403
|
+
setWorkflowMode(requested: boolean): Promise<void>;
|
|
388
404
|
setReasoningEffort(value: ReasoningSelection, opts?: {
|
|
389
405
|
persist?: boolean;
|
|
390
406
|
}): Promise<void>;
|
|
@@ -157,7 +157,7 @@ DaemonSessionProviderProps, DaemonTranscriptHistory, DaemonProvisionalTurn, Daem
|
|
|
157
157
|
/** Streaming lifecycle: `'idle' | 'waiting' | 'responding' | 'thinking'`. */
|
|
158
158
|
DaemonStreamingState,
|
|
159
159
|
/** Prompt submission status: `'idle' | 'waiting' | 'streaming'`. */
|
|
160
|
-
DaemonPromptStatus, DaemonReasoningControls,
|
|
160
|
+
DaemonPromptStatus, DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus,
|
|
161
161
|
/** Hook return value for daemon follow-up suggestions. */
|
|
162
162
|
UseDaemonFollowupSuggestionReturn,
|
|
163
163
|
/** Image attachment (base64 data + MIME type) for prompt submission. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ViewPlugin, EditorView } from '@codemirror/view';
|
|
2
2
|
import type { DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
3
3
|
import type { CommandInfo } from '../adapters/types';
|
|
4
|
+
import type { SkillInfo } from '../completions/slashCompletion';
|
|
4
5
|
import type { WebShellLanguage } from '../i18n';
|
|
5
|
-
export declare function buildInputHighlightDecorations(view: EditorView, getCommands: () => CommandInfo[], getLanguage: () => WebShellLanguage): DecorationSet;
|
|
6
|
-
export declare function inputHighlight(getCommands?: () => CommandInfo[], getLanguage?: () => WebShellLanguage): ViewPlugin<{
|
|
6
|
+
export declare function buildInputHighlightDecorations(view: EditorView, getCommands: () => CommandInfo[], getLanguage: () => WebShellLanguage, getSkills?: () => readonly SkillInfo[]): DecorationSet;
|
|
7
|
+
export declare function inputHighlight(getCommands?: () => CommandInfo[], getLanguage?: () => WebShellLanguage, getSkills?: () => readonly SkillInfo[]): ViewPlugin<{
|
|
7
8
|
decorations: DecorationSet;
|
|
8
9
|
update(update: ViewUpdate): void;
|
|
9
10
|
}, undefined>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
|
|
1
2
|
import { type McpAppMessageRequest, type McpAppMessages } from '../mcpAppHostContext';
|
|
2
3
|
import type { DaemonSessionOwnerSnapshot } from '../daemon/session/types';
|
|
4
|
+
import { getTranslator } from '../i18n';
|
|
3
5
|
export interface McpAppPromptSubmission {
|
|
6
|
+
/** Shows the message as a labelled reference in the transcript. */
|
|
7
|
+
inputAnnotations?: DaemonInputAnnotation[];
|
|
4
8
|
signal: AbortSignal;
|
|
5
9
|
isCurrent(): boolean;
|
|
6
10
|
onDispatched(): void;
|
|
@@ -14,6 +18,8 @@ interface MessageHost {
|
|
|
14
18
|
clientId?: string;
|
|
15
19
|
captureOwner(): DaemonSessionOwnerSnapshot;
|
|
16
20
|
submit(text: string, options: McpAppPromptSubmission): Promise<unknown>;
|
|
21
|
+
/** The host's translator; the hook runs outside its I18nProvider. */
|
|
22
|
+
translate?: ReturnType<typeof getTranslator>;
|
|
17
23
|
}
|
|
18
24
|
export declare function useMcpAppMessages(host: MessageHost): {
|
|
19
25
|
context: McpAppMessages | undefined;
|
|
@@ -21,18 +27,11 @@ export declare function useMcpAppMessages(host: MessageHost): {
|
|
|
21
27
|
};
|
|
22
28
|
interface GeneratedUiParameters {
|
|
23
29
|
title: string;
|
|
24
|
-
|
|
25
|
-
id: string;
|
|
26
|
-
value: string;
|
|
27
|
-
checked: boolean;
|
|
28
|
-
}>;
|
|
29
|
-
rejectedEvents: number;
|
|
30
|
+
documentId: string;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* the table folds the message text away, so only the bundled server counts,
|
|
35
|
-
* not any App that claims its resource URI.
|
|
33
|
+
* Recognizes the parameter message the built-in Generated UI App sends for
|
|
34
|
+
* its explicit continue action. Any other message keeps the review dialog.
|
|
36
35
|
*/
|
|
37
36
|
export declare function readGeneratedUiParameters(review: Pick<McpAppMessageRequest, 'requiredFeature' | 'text'>): GeneratedUiParameters | undefined;
|
|
38
37
|
export {};
|
|
@@ -6,6 +6,35 @@
|
|
|
6
6
|
import type { DaemonSessionSummary } from '@qwen-code/sdk/daemon';
|
|
7
7
|
export interface OtherWorkspaceSessionsResult {
|
|
8
8
|
sessions: DaemonSessionSummary[];
|
|
9
|
+
/**
|
|
10
|
+
* True only while a non-primary workspace list is still in flight. A first
|
|
11
|
+
* fetch that failed is settled, not loading — it is reported per-cwd by
|
|
12
|
+
* `notReadyCwds` instead, so a persistently-failing workspace can't pin
|
|
13
|
+
* this forever. Consumers that compare the merged list against live state
|
|
14
|
+
* (for example, pruning panes) must wait for this to be false so a
|
|
15
|
+
* still-loading workspace can't look like a vanished session.
|
|
16
|
+
*/
|
|
17
|
+
loading: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The workspaces the fan-out is actually querying (the daemon's listed
|
|
20
|
+
* non-primary trusted workspaces). Empty while the hook is disabled or the
|
|
21
|
+
* daemon lists none. Consumers that prune panes must reason over this set
|
|
22
|
+
* (plus their own primary page) and never over workspaces the daemon no
|
|
23
|
+
* longer advertises: a pane whose workspace is not here is outside the
|
|
24
|
+
* catalog's coverage, and its absence from the merged list proves nothing.
|
|
25
|
+
*/
|
|
26
|
+
queriedCwds: string[];
|
|
27
|
+
/**
|
|
28
|
+
* The subset of `queriedCwds` where absence can't currently be proven: the
|
|
29
|
+
* page never landed (an errored fetch, a deferred load in a hidden tab),
|
|
30
|
+
* it settled with an error (even while the store still serves a retained
|
|
31
|
+
* page), or it landed but is incomplete (truncated / nextCursor /
|
|
32
|
+
* liveMergeFailed) or stale. A pane whose workspace is here must not be
|
|
33
|
+
* pruned on catalog absence. The set is derived from the live snapshots, so
|
|
34
|
+
* it self-clears: the store re-tries an errored fetch, and a deferred load
|
|
35
|
+
* is scheduled the moment the store becomes active again.
|
|
36
|
+
*/
|
|
37
|
+
notReadyCwds: string[];
|
|
9
38
|
reload: () => Promise<void>;
|
|
10
39
|
}
|
|
11
40
|
export declare function useOtherWorkspaceSessions(enabled?: boolean, pollIntervalMs?: number): OtherWorkspaceSessionsResult;
|
|
@@ -15,6 +15,7 @@ export declare function useScopedSessions(workspaceCwd: string | undefined, opti
|
|
|
15
15
|
sessions: import("@qwen-code/sdk/daemon").DaemonSessionSummary[];
|
|
16
16
|
loading: boolean;
|
|
17
17
|
error: Error | undefined;
|
|
18
|
+
stale: boolean;
|
|
18
19
|
reload: (reloadOptions?: {
|
|
19
20
|
interactive?: boolean;
|
|
20
21
|
}) => Promise<import("@qwen-code/sdk/daemon").DaemonSessionSummary[] | undefined>;
|
|
@@ -51,6 +52,10 @@ export declare function useScopedSessions(workspaceCwd: string | undefined, opti
|
|
|
51
52
|
loading: boolean;
|
|
52
53
|
error: Error | undefined;
|
|
53
54
|
reload: () => Promise<import("@qwen-code/sdk/daemon").DaemonSessionSummary[]>;
|
|
55
|
+
nextCursor: string | undefined;
|
|
56
|
+
liveMergeFailed: boolean;
|
|
57
|
+
truncated: boolean;
|
|
58
|
+
stale: boolean;
|
|
54
59
|
deleteSession: (sessionId: string) => Promise<boolean>;
|
|
55
60
|
deleteSessions: (sessionIds: string[]) => Promise<{
|
|
56
61
|
removed: string[];
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN"];
|
|
2
|
+
export declare const WEB_SHELL_LANGUAGES: readonly ["en", "zh-CN", "ru"];
|
|
3
3
|
export type WebShellLanguage = (typeof WEB_SHELL_LANGUAGES)[number];
|
|
4
4
|
export declare function normalizeLanguage(value: string | undefined | null): WebShellLanguage;
|
|
5
5
|
export declare function languageSettingToWebShellLanguage(value: unknown): WebShellLanguage | undefined;
|
|
@@ -16,13 +16,32 @@ export interface McpAppMessageRequest {
|
|
|
16
16
|
* review, or `failed` when it was refused before or at admission.
|
|
17
17
|
*/
|
|
18
18
|
export declare const MCP_APP_MESSAGE_REVIEW_META = "qwen-code/message-review";
|
|
19
|
+
/** The reason a message failed before the session accepted it. */
|
|
20
|
+
export declare const MCP_APP_MESSAGE_ERROR_META = "qwen-code/message-error";
|
|
19
21
|
export interface McpAppMessageResult {
|
|
20
22
|
isError?: boolean;
|
|
21
23
|
_meta?: {
|
|
22
24
|
[MCP_APP_MESSAGE_REVIEW_META]?: 'cancelled' | 'expired' | 'failed';
|
|
25
|
+
[MCP_APP_MESSAGE_ERROR_META]?: string;
|
|
23
26
|
};
|
|
24
27
|
[key: string]: unknown;
|
|
25
28
|
}
|
|
29
|
+
/** Composer tag kind for values a Generated UI card attaches to a message. */
|
|
30
|
+
export declare const GENERATED_UI_CONTEXT_TAG_KIND = "generated-ui";
|
|
31
|
+
export declare function generatedUiContextTagId(documentId: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Lets the built-in Generated UI attach a card's current values to the
|
|
34
|
+
* user's next message in the session that owns the card.
|
|
35
|
+
*/
|
|
36
|
+
export interface McpAppModelContext {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
attach(context: {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}): void;
|
|
43
|
+
}
|
|
44
|
+
export declare const McpAppModelContextContext: import("react").Context<McpAppModelContext | undefined>;
|
|
26
45
|
export interface McpAppMessages {
|
|
27
46
|
sessionId: string;
|
|
28
47
|
requestMessage(request: McpAppMessageRequest): Promise<McpAppMessageResult>;
|
|
@@ -88,6 +88,7 @@ export declare function useWebShellSessions(options?: WebShellSessionsOptions):
|
|
|
88
88
|
sessions: DaemonSessionSummary[];
|
|
89
89
|
loading: boolean;
|
|
90
90
|
error: Error | undefined;
|
|
91
|
+
stale: boolean;
|
|
91
92
|
reload: (reloadOptions?: {
|
|
92
93
|
interactive?: boolean;
|
|
93
94
|
}) => Promise<DaemonSessionSummary[] | undefined>;
|
|
@@ -14,3 +14,10 @@ import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon'
|
|
|
14
14
|
export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus): task is Exclude<DaemonSessionTaskWithWorkflowStatus, {
|
|
15
15
|
kind: 'agent';
|
|
16
16
|
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the snapshot carries a background agent that is still executing.
|
|
19
|
+
* Paused agents are parked, not active: they stay visible in the environment
|
|
20
|
+
* panel's subagents section, so they must not re-open the footer pill in the
|
|
21
|
+
* shipped entry (which would pin a stale count to parked work).
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasActiveBackgroundAgent(tasks: readonly DaemonSessionTaskWithWorkflowStatus[]): boolean;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
import { type DaemonClient, type DaemonCapabilities } from '@qwen-code/sdk/daemon';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Outcome of classifying one session id for the workspace split view.
|
|
4
|
+
*
|
|
5
|
+
* - `standalone`: the id resolves in the standalone registry, so it is
|
|
6
|
+
* ineligible for a workspace split and is dropped silently.
|
|
7
|
+
* - `workspace`: the id is provably absent from the standalone registry
|
|
8
|
+
* (404 `standalone_session_not_found`), so it belongs to the workspace and
|
|
9
|
+
* is kept.
|
|
10
|
+
* - `failed`: classification could not complete (non-404 error). The id is
|
|
11
|
+
* dropped, but unlike the other two outcomes it is reported separately so
|
|
12
|
+
* the caller can surface the failure instead of opening a partial split
|
|
13
|
+
* silently.
|
|
14
|
+
*/
|
|
15
|
+
export type SplitSessionOutcome = 'standalone' | 'workspace' | 'failed';
|
|
16
|
+
export interface SplitSessionClassification {
|
|
17
|
+
kept: string[];
|
|
18
|
+
transientFailures: string[];
|
|
19
|
+
}
|
|
20
|
+
export type SplitSessionClassifier = (sessionId: string) => Promise<SplitSessionOutcome>;
|
|
21
|
+
export declare function keepWorkspaceSplitSessionIds(client: DaemonClient, capabilities: DaemonCapabilities | undefined, sessionIds: readonly string[], classify?: SplitSessionClassifier): Promise<SplitSessionClassification>;
|