@qwen-code/web-shell 0.24.4 → 0.24.5-nightly.20260925.c3a4058a0c

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 (85) hide show
  1. package/README.md +152 -1
  2. package/dist/code-highlighter.js +4 -0
  3. package/dist/codeHighlighter-pfciSYNN.js +89 -0
  4. package/dist/daemon-react-sdk.js +1 -1
  5. package/dist/index.js +49184 -44478
  6. package/dist/sw.js +1 -1
  7. package/dist/{toolNames-Cnaa5VCB.js → toolNames-C6S4xtsA.js} +7018 -6371
  8. package/dist/transcript.js +11334 -10857
  9. package/dist/types/App.d.ts +18 -3
  10. package/dist/types/App.typecheck.d.ts +6 -0
  11. package/dist/types/ManagedAgentWebShell.d.ts +17 -0
  12. package/dist/types/adapters/toolClassification.d.ts +1 -0
  13. package/dist/types/adapters/transcriptToMessages.d.ts +3 -2
  14. package/dist/types/code-highlighter.d.ts +6 -0
  15. package/dist/types/components/BranchPickerPopover.d.ts +3 -1
  16. package/dist/types/components/ChatEditor.d.ts +2 -0
  17. package/dist/types/components/ChatPane.d.ts +5 -3
  18. package/dist/types/components/ConversationSearch.d.ts +18 -0
  19. package/dist/types/components/GlobalTurnNavigation.d.ts +3 -1
  20. package/dist/types/components/MessageList.d.ts +10 -2
  21. package/dist/types/components/MessageTimestamp.d.ts +4 -1
  22. package/dist/types/components/SplitView.d.ts +3 -1
  23. package/dist/types/components/WorkspaceSessionProvider.d.ts +2 -0
  24. package/dist/types/components/artifacts/ArtifactPanel.d.ts +18 -1
  25. package/dist/types/components/artifacts/SideTaskPanel.d.ts +5 -1
  26. package/dist/types/components/artifacts/TrajectoryOverview.d.ts +71 -0
  27. package/dist/types/components/artifacts/TurnCallPromptSelect.d.ts +9 -0
  28. package/dist/types/components/artifacts/TurnCallsPanel.d.ts +38 -0
  29. package/dist/types/components/artifacts/TurnOutputs.d.ts +6 -1
  30. package/dist/types/components/artifacts/loadTurnCalls.d.ts +4 -0
  31. package/dist/types/components/channels/channel-editor-state.d.ts +9 -3
  32. package/dist/types/components/conversation-search-i18n.d.ts +6 -0
  33. package/dist/types/components/dialogs/DeleteSessionDialog.d.ts +9 -1
  34. package/dist/types/components/dialogs/GitDialog.d.ts +6 -2
  35. package/dist/types/components/dialogs/GitWorktreesDialog.d.ts +11 -0
  36. package/dist/types/components/managed/ManagedSessionProgress.d.ts +6 -0
  37. package/dist/types/components/managed/ManagedSessionsPage.d.ts +7 -0
  38. package/dist/types/components/managed/java-managed-agent-client.d.ts +140 -0
  39. package/dist/types/components/managed/java-managed-agent-event-projector.d.ts +5 -0
  40. package/dist/types/components/managed/java-managed-agent-provider.d.ts +8 -0
  41. package/dist/types/components/managed/managed-agent-provider.d.ts +77 -0
  42. package/dist/types/components/managed/managed-session-messages.d.ts +4 -0
  43. package/dist/types/components/managed/managed-session-storage.d.ts +7 -0
  44. package/dist/types/components/managed/use-managed-session.d.ts +12 -0
  45. package/dist/types/components/messages/AuthMessage.d.ts +2 -1
  46. package/dist/types/components/messages/LinkifiedText.d.ts +1 -1
  47. package/dist/types/components/messages/ModelManagementSection.d.ts +3 -2
  48. package/dist/types/components/messages/PlanExecutionView.d.ts +14 -66
  49. package/dist/types/components/messages/SettingsMessage.d.ts +2 -2
  50. package/dist/types/components/messages/ToolFilePreviewButton.d.ts +2 -1
  51. package/dist/types/components/messages/ToolGroup.d.ts +3 -0
  52. package/dist/types/components/messages/codeHighlighter.d.ts +7 -0
  53. package/dist/types/components/messages/taskExecutionIndex.d.ts +80 -0
  54. package/dist/types/components/messages/toolFormatting.d.ts +3 -0
  55. package/dist/types/components/panels/EnvironmentPanel.d.ts +2 -1
  56. package/dist/types/components/sidebar/WebShellSidebar.d.ts +12 -3
  57. package/dist/types/components/sidebar/WorkspaceSection.d.ts +8 -1
  58. package/dist/types/components/workflow/SessionWorkflowCockpit.d.ts +8 -1
  59. package/dist/types/components/workflow/SessionWorkflowInspector.d.ts +8 -1
  60. package/dist/types/components/workflow/session-workflow-model.d.ts +9 -1
  61. package/dist/types/customization.d.ts +9 -1
  62. package/dist/types/daemon/session/actions.d.ts +1 -1
  63. package/dist/types/daemon/session/transcript-page-table.d.ts +1 -1
  64. package/dist/types/daemon/session/turn-navigation-store.d.ts +32 -0
  65. package/dist/types/daemon/session/types.d.ts +3 -1
  66. package/dist/types/hooks/useMessageNavigation.d.ts +12 -0
  67. package/dist/types/hooks/useQueuedPrompts.d.ts +4 -1
  68. package/dist/types/hooks/useTranscriptViewport.d.ts +4 -1
  69. package/dist/types/index.d.ts +17 -1
  70. package/dist/types/live/live-presence.d.ts +14 -0
  71. package/dist/types/live/screen-feed-sampler.d.ts +12 -0
  72. package/dist/types/live/useLiveBrowserHost.d.ts +7 -0
  73. package/dist/types/live/useLiveVoice.d.ts +2 -0
  74. package/dist/types/modelManagement.d.ts +16 -0
  75. package/dist/types/navigation.d.ts +37 -0
  76. package/dist/types/trajectory/buildTimeline.d.ts +67 -0
  77. package/dist/types/trajectory/timelineRange.d.ts +27 -0
  78. package/dist/types/trajectory/transcriptPageLoader.d.ts +4 -2
  79. package/dist/types/trajectory/types.d.ts +3 -3
  80. package/dist/types/trajectory/useTrajectoryWindow.d.ts +55 -17
  81. package/dist/types/turnCallsContext.d.ts +12 -0
  82. package/dist/types/utils/navigationUrl.d.ts +21 -0
  83. package/dist/types/utils/popoverRoom.d.ts +22 -0
  84. package/dist/types/utils/sessionPath.d.ts +1 -0
  85. package/package.json +5 -1
@@ -1,5 +1,13 @@
1
1
  interface DeleteSessionDialogProps {
2
- onDeleted: (sessionIds: string[]) => void;
2
+ /**
3
+ * `attachedSessionId` is the session this client was attached to when the
4
+ * delete was confirmed. The daemon publishes the terminal `session_closed`
5
+ * frame before it answers the delete request, so by the time this fires the
6
+ * caller can no longer read the attachment off the connection (#12619).
7
+ */
8
+ onDeleted: (sessionIds: string[], meta?: {
9
+ attachedSessionId?: string;
10
+ }) => void;
3
11
  onError: (error: unknown) => void;
4
12
  onClose: () => void;
5
13
  workspaceCwd?: string;
@@ -3,12 +3,16 @@
3
3
  * Copyright 2026 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export type GitDialogView = 'diff' | 'log' | 'prs' | 'commit';
7
- export declare function GitDialog({ workspaceCwd, gitCwd, initialView, sessionId, resolveSessionForWorkspace, onClose, }: {
6
+ export type GitDialogView = 'diff' | 'log' | 'prs' | 'worktrees' | 'commit';
7
+ export declare function GitDialog({ workspaceCwd, gitCwd, initialView, sessionId, resolveSessionForWorkspace, onOpenSession, onNewWorktreeSession, onClose, }: {
8
8
  workspaceCwd: string;
9
9
  gitCwd?: string;
10
10
  initialView: GitDialogView;
11
11
  sessionId?: string;
12
12
  resolveSessionForWorkspace?: (cwd: string, forceCreate?: boolean) => Promise<string | undefined>;
13
+ /** Worktrees tab: switch to a session that lives in a worktree. */
14
+ onOpenSession?: (sessionId: string) => void;
15
+ /** Worktrees tab: start a new session in a fresh worktree. */
16
+ onNewWorktreeSession?: () => void;
13
17
  onClose: () => void;
14
18
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare function GitWorktreesContent({ workspaceCwd, onOpenSession, onNewWorktreeSession, onSubtitleChange, }: {
7
+ workspaceCwd: string;
8
+ onOpenSession?: (sessionId: string) => void;
9
+ onNewWorktreeSession?: () => void;
10
+ onSubtitleChange?: (subtitle: string | undefined) => void;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ManagedAgentSessionSummary } from './managed-agent-provider';
2
+ export declare function ManagedSessionProgress({ summary, submitting, loading, }: {
3
+ summary?: ManagedAgentSessionSummary;
4
+ submitting: boolean;
5
+ loading: boolean;
6
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import type { ManagedAgentProvider } from './managed-agent-provider';
2
+ export declare function ManagedSessionsPage({ sessionId, onSelectSession, workspaceCwd, managedAgentProvider, }: {
3
+ sessionId?: string;
4
+ onSelectSession: (sessionId: string | undefined) => void;
5
+ workspaceCwd?: string;
6
+ managedAgentProvider?: ManagedAgentProvider;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,140 @@
1
+ export type JavaAgentDate = number | string;
2
+ export interface JavaAgentTurn {
3
+ turnId: string;
4
+ sessionId: string;
5
+ status: string;
6
+ submittedAt: JavaAgentDate;
7
+ completedAt?: JavaAgentDate;
8
+ errorCode?: string;
9
+ usage?: Record<string, unknown>;
10
+ }
11
+ export interface JavaAgentEnvironment {
12
+ environmentId?: string;
13
+ state?: string;
14
+ errorCode?: string;
15
+ }
16
+ export interface JavaAgentSession {
17
+ sessionId: string;
18
+ title?: string;
19
+ agentId?: string;
20
+ status: string;
21
+ createdAt: JavaAgentDate;
22
+ updatedAt: JavaAgentDate;
23
+ activeTurn?: JavaAgentTurn;
24
+ environment?: JavaAgentEnvironment;
25
+ lastSequence: number;
26
+ }
27
+ export interface JavaAgentEvent {
28
+ sequence: number;
29
+ eventId: string;
30
+ sessionId: string;
31
+ turnId: string;
32
+ itemId?: string;
33
+ type: string;
34
+ createdAt: JavaAgentDate;
35
+ data?: Record<string, unknown>;
36
+ terminal: boolean;
37
+ }
38
+ export interface JavaAgentContentPart {
39
+ partId: string;
40
+ type: 'input_text' | 'output_text' | 'reasoning' | string;
41
+ text: string;
42
+ firstSequence: number;
43
+ lastSequence: number;
44
+ }
45
+ export interface JavaAgentItem {
46
+ itemId: string;
47
+ sessionId: string;
48
+ turnId: string;
49
+ type: 'message' | 'tool_call' | string;
50
+ role?: string;
51
+ status: string;
52
+ content: JavaAgentContentPart[];
53
+ attributes: Record<string, unknown>;
54
+ firstSequence: number;
55
+ lastSequence: number;
56
+ createdAt: JavaAgentDate;
57
+ updatedAt: JavaAgentDate;
58
+ }
59
+ export interface JavaAgentCommandAdmission {
60
+ sessionId: string;
61
+ turnId?: string;
62
+ status: string;
63
+ replayed: boolean;
64
+ }
65
+ export interface JavaAgentCursorPage<T> {
66
+ data: T[];
67
+ nextCursor?: string;
68
+ hasMore: boolean;
69
+ }
70
+ export interface JavaAgentTranscript {
71
+ items?: JavaAgentItem[];
72
+ events: JavaAgentEvent[];
73
+ coveredSequence?: number;
74
+ olderCursor?: string;
75
+ hasMore: boolean;
76
+ lastSequence: number;
77
+ }
78
+ export interface JavaManagedAgentClientOptions {
79
+ baseUrl: string;
80
+ getHeaders?: () => HeadersInit | Promise<HeadersInit>;
81
+ credentials?: RequestCredentials;
82
+ fetch?: typeof fetch;
83
+ }
84
+ export declare class JavaManagedAgentHttpError extends Error {
85
+ readonly status: number;
86
+ readonly code: string;
87
+ constructor(status: number, code: string, message: string);
88
+ }
89
+ export declare class JavaManagedAgentClient {
90
+ private readonly options;
91
+ private readonly baseUrl;
92
+ private readonly fetchImpl;
93
+ private readonly credentials;
94
+ constructor(options: JavaManagedAgentClientOptions);
95
+ listSessions(request: {
96
+ cursor?: string;
97
+ limit?: number;
98
+ }, signal?: AbortSignal): Promise<JavaAgentCursorPage<JavaAgentSession>>;
99
+ getSession(sessionId: string, signal?: AbortSignal): Promise<JavaAgentSession>;
100
+ getTranscript(request: {
101
+ sessionId: string;
102
+ cursor?: string;
103
+ limit?: number;
104
+ }, signal?: AbortSignal): Promise<JavaAgentTranscript>;
105
+ createSession(request: {
106
+ requestId: string;
107
+ idempotencyKey: string;
108
+ agentId: string;
109
+ environmentId?: string;
110
+ title?: string;
111
+ input: Array<{
112
+ type: 'text';
113
+ text: string;
114
+ }>;
115
+ metadata?: Record<string, unknown>;
116
+ }, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
117
+ submitTurn(request: {
118
+ requestId: string;
119
+ idempotencyKey: string;
120
+ sessionId: string;
121
+ input: Array<{
122
+ type: 'text';
123
+ text: string;
124
+ }>;
125
+ metadata?: Record<string, unknown>;
126
+ }, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
127
+ cancelTurn(request: {
128
+ requestId: string;
129
+ idempotencyKey: string;
130
+ sessionId: string;
131
+ turnId: string;
132
+ }, signal?: AbortSignal): Promise<JavaAgentCommandAdmission>;
133
+ streamEvents(request: {
134
+ sessionId: string;
135
+ afterSequence?: number;
136
+ limit?: number;
137
+ }, signal?: AbortSignal): AsyncGenerator<JavaAgentEvent>;
138
+ private post;
139
+ private request;
140
+ }
@@ -0,0 +1,5 @@
1
+ import type { JavaAgentDate, JavaAgentEvent, JavaAgentItem } from './java-managed-agent-client';
2
+ import type { ManagedAgentSessionEvent } from './managed-agent-provider';
3
+ export declare function projectJavaAgentEvent(event: JavaAgentEvent): ManagedAgentSessionEvent | undefined;
4
+ export declare function projectJavaAgentItem(item: JavaAgentItem): ManagedAgentSessionEvent[];
5
+ export declare function toTimestamp(value: JavaAgentDate | undefined): number;
@@ -0,0 +1,8 @@
1
+ import { type JavaManagedAgentClientOptions } from './java-managed-agent-client';
2
+ import type { ManagedAgentProvider } from './managed-agent-provider';
3
+ export interface JavaManagedAgentProviderOptions extends JavaManagedAgentClientOptions {
4
+ agentId?: string;
5
+ environmentId?: string;
6
+ productScope?: string;
7
+ }
8
+ export declare function createJavaManagedAgentProvider(options: JavaManagedAgentProviderOptions): ManagedAgentProvider;
@@ -0,0 +1,77 @@
1
+ export type ManagedAgentSessionPhase = 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
2
+ export type ManagedAgentRuntimeState = 'unknown' | 'starting' | 'ready' | 'failed';
3
+ export interface ManagedAgentSessionSummary {
4
+ sessionId: string;
5
+ activeTurnId?: string;
6
+ title: string;
7
+ workspaceCwd?: string;
8
+ createdAt: number;
9
+ admittedAt: number;
10
+ updatedAt: number;
11
+ phase: ManagedAgentSessionPhase;
12
+ runtimeReady: boolean;
13
+ runtimeState: ManagedAgentRuntimeState;
14
+ capabilities: {
15
+ canSend: boolean;
16
+ canCancel: boolean;
17
+ };
18
+ failure?: {
19
+ code: string;
20
+ message: string;
21
+ };
22
+ }
23
+ export type ManagedAgentSessionEventType = 'accepted' | 'runtime_starting' | 'runtime_ready' | 'runtime_failed' | 'runtime_released' | 'agent_started' | 'assistant_thought' | 'assistant_delta' | 'tool_requested' | 'tool_started' | 'tool_completed' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'stream_gap';
24
+ export interface ManagedAgentSessionEvent {
25
+ id: number;
26
+ at: number;
27
+ type: ManagedAgentSessionEventType;
28
+ sessionId: string;
29
+ turnId: string;
30
+ data?: unknown;
31
+ }
32
+ export interface ManagedAgentSessionTranscript {
33
+ events: ManagedAgentSessionEvent[];
34
+ olderCursor?: string;
35
+ lastEventId: number;
36
+ }
37
+ export interface ManagedAgentTurnAdmission {
38
+ sessionId: string;
39
+ turnId: string;
40
+ }
41
+ export interface ManagedAgentRequestOptions {
42
+ clientId: string;
43
+ signal?: AbortSignal;
44
+ }
45
+ export interface ManagedAgentCommandOptions extends ManagedAgentRequestOptions {
46
+ idempotencyKey: string;
47
+ }
48
+ export interface ManagedAgentProvider {
49
+ readonly kind: 'daemon' | 'java';
50
+ readonly storageKey: string;
51
+ readonly canCancel: boolean;
52
+ readonly acceptsWorkspaceCwd: boolean;
53
+ listSessions(options: ManagedAgentRequestOptions & {
54
+ workspaceCwd?: string;
55
+ limit?: number;
56
+ cursor?: string;
57
+ }): Promise<{
58
+ sessions: ManagedAgentSessionSummary[];
59
+ nextCursor?: string;
60
+ }>;
61
+ getSession(sessionId: string, options: ManagedAgentRequestOptions): Promise<ManagedAgentSessionSummary>;
62
+ getTranscript(sessionId: string, options: ManagedAgentRequestOptions & {
63
+ before?: string;
64
+ limit?: number;
65
+ }): Promise<ManagedAgentSessionTranscript>;
66
+ createSession(request: {
67
+ text: string;
68
+ workspaceCwd?: string;
69
+ }, options: ManagedAgentCommandOptions): Promise<ManagedAgentTurnAdmission>;
70
+ submitPrompt(sessionId: string, request: {
71
+ text: string;
72
+ }, options: ManagedAgentCommandOptions): Promise<ManagedAgentTurnAdmission>;
73
+ cancel(sessionId: string, turnId: string, options: ManagedAgentCommandOptions): Promise<void>;
74
+ subscribeEvents(sessionId: string, options: ManagedAgentRequestOptions & {
75
+ lastEventId?: number;
76
+ }): AsyncIterable<ManagedAgentSessionEvent>;
77
+ }
@@ -0,0 +1,4 @@
1
+ import type { Message } from '../../adapters/types';
2
+ import type { ManagedAgentSessionEvent } from './managed-agent-provider';
3
+ export declare function mergeManagedEvents(current: readonly ManagedAgentSessionEvent[], incoming: readonly ManagedAgentSessionEvent[]): ManagedAgentSessionEvent[];
4
+ export declare function managedEventsToMessages(events: readonly ManagedAgentSessionEvent[], truncatedLabel: string): Message[];
@@ -0,0 +1,7 @@
1
+ export declare function managedRequestId(): string;
2
+ export declare function getManagedClientId(baseUrl: string): string;
3
+ export declare function managedSelectionFromUrl(): {
4
+ open: boolean;
5
+ sessionId?: string;
6
+ };
7
+ export declare function saveManagedSelection(open: boolean, sessionId?: string): void;
@@ -0,0 +1,12 @@
1
+ import type { ManagedAgentProvider, ManagedAgentSessionEvent, ManagedAgentSessionSummary } from './managed-agent-provider';
2
+ export declare function useManagedSession(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined): {
3
+ loadingOlder: boolean;
4
+ loadOlder: () => Promise<void>;
5
+ reload: () => void;
6
+ sessionId?: string;
7
+ summary?: ManagedAgentSessionSummary;
8
+ events: ManagedAgentSessionEvent[];
9
+ olderCursor?: string;
10
+ loading: boolean;
11
+ error?: string;
12
+ };
@@ -1,6 +1,7 @@
1
1
  interface AuthMessageProps {
2
+ allowAdd?: boolean;
2
3
  onMessage: (text: string, type?: 'status' | 'error') => void;
3
4
  onClose: () => void;
4
5
  }
5
- export declare function AuthMessage({ onMessage, onClose }: AuthMessageProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function AuthMessage({ onMessage, onClose, allowAdd, }: AuthMessageProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Plain-text renderer that turns explicit http(s) URLs into anchors. Mirrors
3
- * MarkdownLink's safety (`isSafeHref`) and desktop-shell routing
3
+ * MarkdownLink's safety (`isSafeHref`) and desktop-host routing
4
4
  * (`useExternalLinkOpener`); text without URLs passes through untouched.
5
5
  */
6
6
  export declare const LinkifiedText: import("react").NamedExoticComponent<{
@@ -1,3 +1,4 @@
1
+ import type { WebShellModelManagementOptions } from '../../modelManagement';
1
2
  import type { DaemonModelConfiguration, DaemonModelConfigurationUpdateResult } from '@qwen-code/sdk/daemon';
2
3
  import type { DaemonWorkspaceProviderStatus } from '@qwen-code/web-shell/daemon-react-sdk';
3
4
  export interface ModelDeleteTarget {
@@ -6,7 +7,7 @@ export interface ModelDeleteTarget {
6
7
  modelId: string;
7
8
  baseUrl?: string;
8
9
  }
9
- export interface ModelManagementProps {
10
+ export interface ModelManagementProps extends WebShellModelManagementOptions {
10
11
  providers: DaemonWorkspaceProviderStatus[];
11
12
  configurations?: DaemonModelConfiguration[];
12
13
  onUpdateContextWindow?: (key: string, size: number | null) => Promise<DaemonModelConfigurationUpdateResult>;
@@ -20,4 +21,4 @@ export interface ModelManagementProps {
20
21
  onDeleteModel: (target: ModelDeleteTarget) => void;
21
22
  onAddModel: () => void;
22
23
  }
23
- export declare function ModelManagementSection({ providers, configurations, onUpdateContextWindow, currentModelId, loading, error, busy, onSelectModel, onDeleteModel, onAddModel, }: ModelManagementProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function ModelManagementSection({ allowAdd, allowDelete, providers, configurations, onUpdateContextWindow, currentModelId, loading, error, busy, onSelectModel, onDeleteModel, onAddModel, }: ModelManagementProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,9 @@
1
- import type { DaemonSessionAgentTaskStatus, DaemonSessionTaskStatus } from '@qwen-code/sdk/daemon';
1
+ import type { DaemonSessionTaskStatus } from '@qwen-code/sdk/daemon';
2
2
  import type { ACPToolCall, TodoItem } from '../../adapters/types';
3
- export type PlanNodeStatus = 'running' | 'paused' | 'completed' | 'blocked' | 'in_progress' | 'ready';
3
+ import { type PlanNodeStatus } from './taskExecutionIndex';
4
+ import type { SessionWorkflowProjection } from '../workflow/session-workflow-model';
5
+ export { createTaskExecutionIndex, getActiveAgents, getActiveAgentsFromIndex, getAttentionAgentStatuses, getAttentionAgentTool, getPlanNodeState, getPlanNodeStateFromIndex, nestedAgentToolsForTool, nestedTasksFromIndex, nestedTasksForTool, todoIdOf, } from './taskExecutionIndex';
6
+ export type { PlanNodeStatus, TaskExecutionIndex } from './taskExecutionIndex';
4
7
  /**
5
8
  * Status is carried by a glyph as well as a colour so the graph survives
6
9
  * colour-blindness, high-contrast mode, and a greyscale screenshot. Every
@@ -8,73 +11,18 @@ export type PlanNodeStatus = 'running' | 'paused' | 'completed' | 'blocked' | 'i
8
11
  */
9
12
  export declare const PLAN_STATUS_GLYPH: Record<PlanNodeStatus, string>;
10
13
  export declare function layerPlanTodos(todos: readonly TodoItem[]): TodoItem[][];
11
- export interface TaskExecutionIndex {
12
- rootByToolCallId: ReadonlyMap<string, DaemonSessionAgentTaskStatus>;
13
- childrenByParentId: ReadonlyMap<string, DaemonSessionAgentTaskStatus[]>;
14
- nestedByRootId: Map<string, Array<{
15
- task: DaemonSessionAgentTaskStatus;
16
- depth: number;
17
- }>>;
18
- }
19
- export declare function createTaskExecutionIndex(tasks: readonly DaemonSessionTaskStatus[]): TaskExecutionIndex;
20
- export declare function nestedTasksFromIndex(tool: ACPToolCall, taskIndex: TaskExecutionIndex): Array<{
21
- task: DaemonSessionAgentTaskStatus;
22
- depth: number;
23
- }>;
24
- export declare function nestedTasksForTool(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): Array<{
25
- task: DaemonSessionAgentTaskStatus;
26
- depth: number;
27
- }>;
28
- /**
29
- * Deliberately uncached. Keying on the tool object would be wrong the moment
30
- * a reused object gains a sub-tool — `appendSubTool` mutates `subTools` in
31
- * place — and the only thing standing between that and a stale render is
32
- * `useMessages`' prefix-reuse rule in another module. The callers' own
33
- * derivations are memoized, so the repetition this would remove is bounded to
34
- * a single derivation; a silent wrong subtree is not worth that.
35
- */
36
- export declare function nestedAgentToolsForTool(tool: ACPToolCall): Array<{
37
- tool: ACPToolCall;
38
- depth: number;
39
- }>;
40
- /**
41
- * Same agent-status walk as {@link attentionAgentStatuses}, for callers that
42
- * hold the raw task list instead of a prebuilt index (the cockpit's stats
43
- * strip, which must tally exactly what the attention queue shows).
44
- */
45
- export declare function getAttentionAgentStatuses(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): string[];
46
- /**
47
- * One entry per agent the overview strip reports as active, and the single
48
- * source the workflow inspector summary counts: the live daemon task when
49
- * one exists, otherwise a transcript-derived stand-in for an in-flight tool
50
- * call with no live task (the replay shape). The walk mirrors the node
51
- * badges (executionStatus), so the strip, the badges, and the inspector can
52
- * never contradict each other. An agent observed through BOTH a live task
53
- * and a persisted transcript tool counts once (dedup by toolUseId).
54
- */
55
- export declare function getActiveAgents(tools: readonly ACPToolCall[], tasks: readonly DaemonSessionTaskStatus[]): DaemonSessionAgentTaskStatus[];
56
- /**
57
- * {@link getActiveAgents} for callers that already hold an index. Building the
58
- * index is O(tasks); doing it per todo and per tool — as the workflow
59
- * projection used to — makes the walk O((todos + tools) x tasks) for a result
60
- * that never varies with the todo or the tool.
61
- */
62
- export declare function getActiveAgentsFromIndex(tools: readonly ACPToolCall[], taskIndex: TaskExecutionIndex): DaemonSessionAgentTaskStatus[];
63
- export declare function getPlanNodeStateFromIndex(todo: TodoItem, todosById: ReadonlyMap<string, TodoItem>, tools: readonly ACPToolCall[], taskIndex: TaskExecutionIndex): {
64
- status: PlanNodeStatus;
65
- attention: boolean;
66
- };
67
- export declare function getPlanNodeState(todo: TodoItem, todosById: ReadonlyMap<string, TodoItem>, tools: readonly ACPToolCall[], tasks: readonly DaemonSessionTaskStatus[]): {
68
- status: PlanNodeStatus;
69
- attention: boolean;
70
- };
71
- /** The plan step a tool call was issued for, when it declares one. */
72
- export declare function todoIdOf(tool: ACPToolCall): string | undefined;
73
- export declare function getAttentionAgentTool(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): ACPToolCall | undefined;
74
- export declare function PlanExecutionView({ todos, tools, tasks, onOpenSubagent, hideTitle, selection, showStepDetails, }: {
14
+ export declare function PlanExecutionView({ todos, tools, tasks, projection: sharedProjection, onOpenSubagent, hideTitle, selection, showStepDetails, }: {
75
15
  todos: readonly TodoItem[];
76
16
  tools: readonly ACPToolCall[];
77
17
  tasks: readonly DaemonSessionTaskStatus[];
18
+ /**
19
+ * A host that already derives the workflow projection (the cockpit, which
20
+ * mounts this graph beside the inspector) passes its own, so the whole
21
+ * surface shares one projection — and one task-execution index — per
22
+ * render instead of each component privately rebuilding both. Standalone
23
+ * mounts derive it from `todos` / `tools` / `tasks` here.
24
+ */
25
+ projection?: SessionWorkflowProjection;
78
26
  onOpenSubagent?: (tool: ACPToolCall) => void;
79
27
  /**
80
28
  * Drop the "Plan execution" caption when the host already titles the region.
@@ -15,7 +15,7 @@ interface SettingsMessageProps {
15
15
  chatWidthMode: ChatWidthMode;
16
16
  onChatWidthModeChange: (mode: ChatWidthMode) => void;
17
17
  /** Model list/add/delete/select, rendered inside the Model category. */
18
- modelManagement?: ModelManagementProps;
18
+ modelManagementSectionProps?: ModelManagementProps;
19
19
  /** Browser-local remote computer catalog and connection controls. */
20
20
  connections?: ReactNode;
21
21
  embedded?: boolean;
@@ -45,5 +45,5 @@ export type FlatRow = {
45
45
  localKey: 'chatWidth' | 'browserNotifications';
46
46
  };
47
47
  export declare function nextSettingIdx(rows: FlatRow[], current: number, dir: 1 | -1): number;
48
- export declare function SettingsMessage({ settingsState, presentation, onLanguageChange, onSubDialog, onThemeChange, chatWidthMode, onChatWidthModeChange, modelManagement, connections, embedded, initialCategory, }: SettingsMessageProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function SettingsMessage({ settingsState, presentation, onLanguageChange, onSubDialog, onThemeChange, chatWidthMode, onChatWidthModeChange, modelManagementSectionProps, connections, embedded, initialCategory, }: SettingsMessageProps): import("react/jsx-runtime").JSX.Element;
49
49
  export {};
@@ -1,7 +1,8 @@
1
1
  import type { ACPToolCall } from '../../adapters/types';
2
2
  import type { TurnOutputOpenRequest } from '../artifacts/TurnOutputs';
3
- export declare function ToolFilePreviewButton({ tool, workspaceCwd, onOpen, }: {
3
+ export declare function ToolFilePreviewButton({ tool, workspaceCwd, onOpen, iconOnly, }: {
4
4
  tool: ACPToolCall;
5
5
  workspaceCwd?: string;
6
6
  onOpen?: (request: TurnOutputOpenRequest) => void;
7
+ iconOnly?: boolean;
7
8
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -43,6 +43,9 @@ export declare function getToolHeaderKind(tool: ACPToolCall): ToolHeaderKind;
43
43
  export declare function getActiveTool(tools: ACPToolCall[]): ACPToolCall;
44
44
  export declare function formatToolGroupSummary(tools: ACPToolCall[], t: ReturnType<typeof useI18n>['t'], workspaceCwd?: string, summarizeAgents?: boolean): string;
45
45
  export declare function formatSingleToolSummary(tool: ACPToolCall, t: ReturnType<typeof useI18n>['t'], workspaceCwd?: string): string;
46
+ export declare function ToolSummaryIcon({ tool }: {
47
+ tool: ACPToolCall;
48
+ }): import("react/jsx-runtime").JSX.Element;
46
49
  export declare function isWebFetchToolName(toolName: string): boolean;
47
50
  export declare const ToolLine: import("react").NamedExoticComponent<ToolLineProps>;
48
51
  export declare const ToolGroup: import("react").NamedExoticComponent<ToolGroupProps>;
@@ -23,3 +23,10 @@ export declare function isTooLargeToHighlight(code: string): boolean;
23
23
  export declare function highlightToHtmlSync(code: string, lang: string, theme: string, persist?: boolean): string | null;
24
24
  /** Resets all module-level highlighter state (incl. the HTML cache). Tests only. */
25
25
  export declare function __resetForTesting(): void;
26
+ export interface CodeHighlightRequest {
27
+ code: string;
28
+ language: string;
29
+ theme: 'light' | 'dark';
30
+ }
31
+ /** Uses the same engine and cache as transcript code blocks. Null means plain text. */
32
+ export declare function highlightCode({ code, language, theme, }: CodeHighlightRequest): Promise<string | null>;
@@ -0,0 +1,80 @@
1
+ import type { DaemonSessionAgentTaskStatus, DaemonSessionTaskStatus } from '@qwen-code/sdk/daemon';
2
+ import type { ACPToolCall, TodoItem } from '../../adapters/types';
3
+ /**
4
+ * Shared task-execution lookups for the plan surfaces. Extracted from
5
+ * `PlanExecutionView` so the workflow projection (`session-workflow-model`)
6
+ * and the graph (`PlanExecutionView`) both depend on this module instead of
7
+ * on each other, and so one build of the index can be threaded from the
8
+ * projection into every consumer in a single render.
9
+ */
10
+ export type PlanNodeStatus = 'running' | 'paused' | 'completed' | 'blocked' | 'in_progress' | 'ready';
11
+ export interface TaskExecutionIndex {
12
+ rootByToolCallId: ReadonlyMap<string, DaemonSessionAgentTaskStatus>;
13
+ childrenByParentId: ReadonlyMap<string, DaemonSessionAgentTaskStatus[]>;
14
+ nestedByRootId: Map<string, Array<{
15
+ task: DaemonSessionAgentTaskStatus;
16
+ depth: number;
17
+ }>>;
18
+ }
19
+ export declare function createTaskExecutionIndex(tasks: readonly DaemonSessionTaskStatus[]): TaskExecutionIndex;
20
+ export declare function taskForTool(tool: ACPToolCall, taskIndex: TaskExecutionIndex): DaemonSessionAgentTaskStatus | undefined;
21
+ export declare function executionStatus(tool: ACPToolCall, taskIndex: TaskExecutionIndex): string;
22
+ export declare function nestedTasksFromIndex(tool: ACPToolCall, taskIndex: TaskExecutionIndex): Array<{
23
+ task: DaemonSessionAgentTaskStatus;
24
+ depth: number;
25
+ }>;
26
+ export declare function nestedTasksForTool(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): Array<{
27
+ task: DaemonSessionAgentTaskStatus;
28
+ depth: number;
29
+ }>;
30
+ /**
31
+ * Deliberately uncached. Keying on the tool object would be wrong the moment
32
+ * a reused object gains a sub-tool — `appendSubTool` mutates `subTools` in
33
+ * place — and the only thing standing between that and a stale render is
34
+ * `useMessages`' prefix-reuse rule in another module. The callers' own
35
+ * derivations are memoized, so the repetition this would remove is bounded to
36
+ * a single derivation; a silent wrong subtree is not worth that.
37
+ */
38
+ export declare function nestedAgentToolsForTool(tool: ACPToolCall): Array<{
39
+ tool: ACPToolCall;
40
+ depth: number;
41
+ }>;
42
+ /**
43
+ * Same agent-status walk as {@link attentionAgentStatuses}, for callers that
44
+ * hold the raw task list instead of a prebuilt index (the cockpit's stats
45
+ * strip, which must tally exactly what the attention queue shows).
46
+ */
47
+ export declare function getAttentionAgentStatuses(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): string[];
48
+ /**
49
+ * One entry per agent the overview strip reports as active, and the single
50
+ * source the workflow inspector summary counts: the live daemon task when
51
+ * one exists, otherwise a transcript-derived stand-in for an in-flight tool
52
+ * call with no live task (the replay shape). The walk mirrors the node
53
+ * badges (executionStatus), so the strip, the badges, and the inspector can
54
+ * never contradict each other. An agent observed through BOTH a live task
55
+ * and a persisted transcript tool counts once (dedup by toolUseId).
56
+ */
57
+ export declare function getActiveAgents(tools: readonly ACPToolCall[], tasks: readonly DaemonSessionTaskStatus[]): DaemonSessionAgentTaskStatus[];
58
+ /**
59
+ * {@link getActiveAgents} for callers that already hold an index. Building the
60
+ * index is O(tasks); doing it per todo and per tool — as the workflow
61
+ * projection used to — makes the walk O((todos + tools) x tasks) for a result
62
+ * that never varies with the todo or the tool.
63
+ */
64
+ export declare function getActiveAgentsFromIndex(tools: readonly ACPToolCall[], taskIndex: TaskExecutionIndex): DaemonSessionAgentTaskStatus[];
65
+ export declare function getPlanNodeStateFromIndex(todo: TodoItem, todosById: ReadonlyMap<string, TodoItem>, tools: readonly ACPToolCall[], taskIndex: TaskExecutionIndex): {
66
+ status: PlanNodeStatus;
67
+ attention: boolean;
68
+ };
69
+ export declare function getPlanNodeState(todo: TodoItem, todosById: ReadonlyMap<string, TodoItem>, tools: readonly ACPToolCall[], tasks: readonly DaemonSessionTaskStatus[]): {
70
+ status: PlanNodeStatus;
71
+ attention: boolean;
72
+ };
73
+ /** The plan step a tool call was issued for, when it declares one. */
74
+ export declare function todoIdOf(tool: ACPToolCall): string | undefined;
75
+ /**
76
+ * A clickable stand-in for a live agent task that has no transcript tool
77
+ * call, so the graph's nested execution rows can still open its panel.
78
+ */
79
+ export declare function toolForNestedTask(task: DaemonSessionAgentTaskStatus): ACPToolCall | undefined;
80
+ export declare function getAttentionAgentTool(tool: ACPToolCall, tasks: readonly DaemonSessionTaskStatus[]): ACPToolCall | undefined;
@@ -20,6 +20,7 @@ export declare function formatToolDisplayName(toolName: string): string;
20
20
  */
21
21
  export declare function localizeToolDisplayName(toolName: string, t: (key: string, vars?: Record<string, string | number>) => string): string;
22
22
  export declare function isAskUserQuestionToolName(toolName: string): boolean;
23
+ export declare function isAdvisorToolName(toolName: string): boolean;
23
24
  export declare function isCompletedAskUserQuestion(tool: ACPToolCall): boolean;
24
25
  export declare function getQuestionAnswerResult(tool: ACPToolCall): {
25
26
  text: string;
@@ -33,6 +34,7 @@ export declare function getToolDescription(tool: ACPToolCall, workspaceCwd?: str
33
34
  export declare function getToolSummaryDescription(tool: ACPToolCall, workspaceCwd?: string): string;
34
35
  export declare function getShellToolSemanticDescription(tool: ACPToolCall): string;
35
36
  export declare function extractText(tool: ACPToolCall): string | null;
37
+ export declare function getAdvisorDisplayText(tool: ACPToolCall): string | null;
36
38
  export declare function getToolResultSummary(tool: ACPToolCall): string;
37
39
  /**
38
40
  * Like every other is*ToolName helper, normalizes case so callers can pass
@@ -61,3 +63,4 @@ export declare function isDefaultAgentType(agentType: string): boolean;
61
63
  export declare function localizeAgentTypeName(agentType: string, t: (key: string, vars?: Record<string, string | number>) => string): string;
62
64
  export declare function getAgentDescription(agent: ACPToolCall): string;
63
65
  export declare function getAgentCurrentToolHint(agent: ACPToolCall, t: (key: string, vars?: Record<string, string | number>) => string): string;
66
+ export declare function extractRawOutputText(rawOutput: unknown): string | null;
@@ -26,6 +26,7 @@ interface EnvironmentPanelProps {
26
26
  items?: readonly WebShellEnvironmentPanelItem[];
27
27
  onOpenGitDiff?: () => void;
28
28
  onOpenGitCommit?: () => void;
29
+ onOpenGitWorktrees?: () => void;
29
30
  onOpenGitLog?: () => void;
30
31
  onOpenAgent?: (task: DaemonSessionAgentTaskStatus) => void;
31
32
  onOpenAgentWorkflow?: () => void;
@@ -42,5 +43,5 @@ export type EnvironmentAgentTask = DaemonSessionAgentTaskStatus & {
42
43
  color?: string;
43
44
  lineageState?: 'complete' | 'orphaned' | 'cycle';
44
45
  };
45
- export declare function EnvironmentPanel({ sources, onOpenSource, retrySourceRegistration, floating, hidden, workspaceCwd, gitWorkspaceCwd, gitCwd, branch, gitStatus, tasks, agentTasks, attachments, attachmentsLoading, attachmentsError, onRetryAttachments, artifacts, artifactsLoading, items, onOpenGitDiff, onOpenGitCommit, onOpenGitLog, onOpenAgent, onOpenAgentWorkflow, onOpenTask, onReadImage, onImagePreview, onAttachmentPreview, onAttachmentPreviewError, onOpenArtifact, onDismiss, }: EnvironmentPanelProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function EnvironmentPanel({ sources, onOpenSource, retrySourceRegistration, floating, hidden, workspaceCwd, gitWorkspaceCwd, gitCwd, branch, gitStatus, tasks, agentTasks, attachments, attachmentsLoading, attachmentsError, onRetryAttachments, artifacts, artifactsLoading, items, onOpenGitDiff, onOpenGitCommit, onOpenGitWorktrees, onOpenGitLog, onOpenAgent, onOpenAgentWorkflow, onOpenTask, onReadImage, onImagePreview, onAttachmentPreview, onAttachmentPreviewError, onOpenArtifact, onDismiss, }: EnvironmentPanelProps): import("react/jsx-runtime").JSX.Element;
46
47
  export {};