@qwen-code/web-shell 0.27.4 → 0.28.1-preview.0

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 (115) hide show
  1. package/dist/{PierreFilePreview-BMd8Nqyr.js → PierreFilePreview-Dotc6rOk.js} +1 -1
  2. package/dist/{SpreadsheetPreview-MnZX4z-A.js → SpreadsheetPreview-B9SWjSd8.js} +11 -11
  3. package/dist/{WorkspaceFileBrowser-CvJS8MdL.js → WorkspaceFileBrowser-Ckvcjlmo.js} +2 -2
  4. package/dist/agents-route-B5k1PKCM.js +1746 -0
  5. package/dist/daemon-react-sdk.js +1 -1
  6. package/dist/{index-ENe4NzKy.js → index-Plc_8yWQ.js} +69233 -66803
  7. package/dist/index.js +3 -3
  8. package/dist/sw.js +1 -1
  9. package/dist/transcript.js +10422 -10169
  10. package/dist/types/adapters/messageTypes.d.ts +3 -0
  11. package/dist/types/adapters/toolClassification.d.ts +2 -1
  12. package/dist/types/browser-notifications/messages.d.ts +1 -0
  13. package/dist/types/browser-notifications/messages.transcript-stub.d.ts +1 -0
  14. package/dist/types/chat-core/capabilities.d.ts +3 -0
  15. package/dist/types/chat-core/contract.d.ts +106 -0
  16. package/dist/types/chat-core/intent.d.ts +8 -0
  17. package/dist/types/components/BranchPickerPopover.d.ts +11 -1
  18. package/dist/types/components/ChatContextHeader.d.ts +5 -1
  19. package/dist/types/components/ChatEditor.d.ts +4 -0
  20. package/dist/types/components/ComposerTaskChips.d.ts +2 -0
  21. package/dist/types/components/GoalStatusStrip.d.ts +14 -2
  22. package/dist/types/components/LocalFilesControl.d.ts +40 -1
  23. package/dist/types/components/ManagedLocalFilesControl.d.ts +3 -1
  24. package/dist/types/components/MessageItem.d.ts +2 -0
  25. package/dist/types/components/MessageList.d.ts +1 -0
  26. package/dist/types/components/ReportedArtifactRegistration.d.ts +25 -0
  27. package/dist/types/components/ToastHost.d.ts +27 -1
  28. package/dist/types/components/artifacts/ArtifactPanel.d.ts +23 -2
  29. package/dist/types/components/artifacts/ChangeOverviewPanel.d.ts +4 -0
  30. package/dist/types/components/artifacts/change-overview.d.ts +95 -0
  31. package/dist/types/components/artifacts/files-messages.d.ts +33 -0
  32. package/dist/types/components/artifacts/files-messages.transcript-stub.d.ts +1 -0
  33. package/dist/types/components/artifacts/token-usage-messages.d.ts +1 -0
  34. package/dist/types/components/artifacts/token-usage-messages.transcript-stub.d.ts +1 -0
  35. package/dist/types/components/artifacts/useChangeOverview.d.ts +21 -0
  36. package/dist/types/components/channels/channel-events-messages.d.ts +1 -0
  37. package/dist/types/components/dialogs/GoalsDialog.d.ts +2 -1
  38. package/dist/types/components/managed/chat-capabilities.d.ts +5 -0
  39. package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
  40. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +167 -167
  41. package/dist/types/components/managed/managed-extension-messages.d.ts +1 -0
  42. package/dist/types/components/managed/managed-lifecycle-messages.d.ts +40 -0
  43. package/dist/types/components/managed/managed-lifecycle-messages.transcript-stub.d.ts +1 -0
  44. package/dist/types/components/managed/managed-mcp-messages.d.ts +1 -0
  45. package/dist/types/components/managed/managed-mcp-messages.transcript-stub.d.ts +1 -0
  46. package/dist/types/components/managed/managed-recovery-messages.d.ts +1 -0
  47. package/dist/types/components/managed/managed-task-messages.d.ts +1 -0
  48. package/dist/types/components/managed/managed-task-messages.transcript-stub.d.ts +1 -0
  49. package/dist/types/components/managed/managed-workspace-messages.d.ts +1 -0
  50. package/dist/types/components/managed/managed-workspace-messages.transcript-stub.d.ts +1 -0
  51. package/dist/types/components/message-deletion-messages.d.ts +1 -0
  52. package/dist/types/components/message-deletion-messages.transcript-stub.d.ts +1 -0
  53. package/dist/types/components/messages/AssistantMessage.d.ts +2 -0
  54. package/dist/types/components/messages/BtwMessage.d.ts +6 -0
  55. package/dist/types/components/messages/HookStatistics.d.ts +4 -0
  56. package/dist/types/components/messages/HookStatistics.transcript-stub.d.ts +4 -0
  57. package/dist/types/components/messages/hook-statistics-context.d.ts +13 -0
  58. package/dist/types/components/messages/hook-statistics-turns.d.ts +3 -0
  59. package/dist/types/components/messages/session-link.d.ts +1 -0
  60. package/dist/types/components/panels/EnvironmentPanel.d.ts +7 -1
  61. package/dist/types/components/sidebar/ActivityDateSessions.d.ts +22 -0
  62. package/dist/types/components/sidebar/SessionGroupSection.d.ts +4 -2
  63. package/dist/types/components/sidebar/SessionSortMenu.d.ts +15 -1
  64. package/dist/types/components/sidebar/activity-messages.d.ts +1 -0
  65. package/dist/types/components/sidebar/activity-model.d.ts +1 -1
  66. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +13 -5
  67. package/dist/types/components/workspace-agents/messages.d.ts +1 -0
  68. package/dist/types/components/workspace-agents/messages.transcript-stub.d.ts +1 -0
  69. package/dist/types/customization.d.ts +10 -2
  70. package/dist/types/daemon/chat-capabilities.d.ts +3 -0
  71. package/dist/types/daemon/session/types.d.ts +19 -2
  72. package/dist/types/hooks/useComposerCore.d.ts +18 -0
  73. package/dist/types/hooks/useSessionArtifacts.d.ts +1 -2
  74. package/dist/types/i18n-ru-part1.d.ts +1 -0
  75. package/dist/types/i18n-ru-part1.transcript-stub.d.ts +12 -0
  76. package/dist/types/i18n-ru-part2.d.ts +1 -0
  77. package/dist/types/i18n-ru-part2.transcript-stub.d.ts +12 -0
  78. package/dist/types/i18n-ru-part3.d.ts +1 -0
  79. package/dist/types/i18n-ru-part3.transcript-stub.d.ts +12 -0
  80. package/dist/types/i18n-ru-part4.d.ts +1 -0
  81. package/dist/types/i18n-ru-part4.transcript-stub.d.ts +12 -0
  82. package/dist/types/i18n-ru-part5.d.ts +1 -0
  83. package/dist/types/i18n-ru-part5.transcript-stub.d.ts +12 -0
  84. package/dist/types/i18n-ru-part6.d.ts +1 -0
  85. package/dist/types/i18n-ru-part6.transcript-stub.d.ts +12 -0
  86. package/dist/types/i18n-ru-remainder.d.ts +6 -0
  87. package/dist/types/i18n-ru-remainder.transcript-stub.d.ts +11 -0
  88. package/dist/types/i18n.d.ts +6 -0
  89. package/dist/types/live/messages.d.ts +1 -0
  90. package/dist/types/live/messages.transcript-stub.d.ts +1 -0
  91. package/dist/types/local-files/useLocalFilesBridge.d.ts +7 -1
  92. package/dist/types/local-files/useManagedLocalFilesBridge.d.ts +5 -1
  93. package/dist/types/mcp-app/messages.d.ts +1 -0
  94. package/dist/types/mcp-app/messages.transcript-stub.d.ts +1 -0
  95. package/dist/types/session-catalog/session-catalog-hooks.d.ts +4 -1
  96. package/dist/types/settings/messages.d.ts +1 -0
  97. package/dist/types/settings/messages.transcript-stub.d.ts +1 -0
  98. package/dist/types/trajectory/execution-messages.d.ts +1 -0
  99. package/dist/types/trajectory/execution-messages.transcript-stub.d.ts +1 -0
  100. package/dist/types/trajectory/filter-messages.d.ts +1 -0
  101. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +1 -0
  102. package/dist/types/trajectory/project-trajectory-lifecycle.d.ts +1 -1
  103. package/dist/types/trajectory/trajectory-live-store.d.ts +3 -1
  104. package/dist/types/trajectory/window-messages.d.ts +1 -0
  105. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +1 -0
  106. package/dist/types/utils/composerTasks.d.ts +10 -0
  107. package/dist/types/utils/gitModeIntent.d.ts +14 -4
  108. package/dist/types/utils/plural.d.ts +5 -0
  109. package/dist/types/voice/VoiceButton.d.ts +9 -1
  110. package/dist/types/voice/messages.d.ts +1 -0
  111. package/dist/types/voice/messages.transcript-stub.d.ts +1 -0
  112. package/dist/types/voice/useVoiceCapture.d.ts +8 -0
  113. package/dist/{useDaemonMidTurnInjected-BCExZTLK.js → useDaemonMidTurnInjected-D4Woo-Hh.js} +11219 -5645
  114. package/package.json +1 -1
  115. package/dist/agents-route-BYqfB9LM.js +0 -1727
@@ -218,6 +218,9 @@ export interface DaemonBtwMessage extends DaemonMessageMeta {
218
218
  question: string;
219
219
  answer: string;
220
220
  isPending: boolean;
221
+ /** Set when the question explains a background task, so the task's detail
222
+ * panel can mirror the answer in place. Absent for typed /btw. */
223
+ taskId?: string;
221
224
  }
222
225
  export interface DaemonInsightProgressMessage extends DaemonMessageMeta {
223
226
  id: string;
@@ -1,5 +1,6 @@
1
- import type { ACPToolCall } from './types.js';
1
+ import type { ACPToolCall, PermissionRequest } from './types.js';
2
2
  export declare function resolveToolCallName(toolName: string | undefined, rawInput: unknown): string | undefined;
3
+ export declare function isNamedSubSessionApproval(request: PermissionRequest): boolean;
3
4
  export declare function isActiveToolStatus(status: ACPToolCall['status'] | string): boolean;
4
5
  export type TerminalBackgroundAgentStatus = 'completed' | 'failed' | 'cancelled' | 'canceled';
5
6
  export declare function isTerminalBackgroundAgentStatus(status: unknown): status is TerminalBackgroundAgentStatus;
@@ -6,4 +6,5 @@
6
6
  type BrowserNotificationMessage = string | ((vars?: Record<string, string | number>) => string);
7
7
  export declare const BROWSER_NOTIFICATION_MESSAGES_EN: Record<string, BrowserNotificationMessage>;
8
8
  export declare const BROWSER_NOTIFICATION_MESSAGES_ZH: Record<string, BrowserNotificationMessage>;
9
+ export declare const BROWSER_NOTIFICATION_MESSAGES_RU: Record<string, BrowserNotificationMessage>;
9
10
  export {};
@@ -5,3 +5,4 @@
5
5
  */
6
6
  export declare const BROWSER_NOTIFICATION_MESSAGES_EN: {};
7
7
  export declare const BROWSER_NOTIFICATION_MESSAGES_ZH: {};
8
+ export declare const BROWSER_NOTIFICATION_MESSAGES_RU: {};
@@ -0,0 +1,3 @@
1
+ import type { ChatCapabilities } from './contract.js';
2
+ export type ChatRegion = keyof ChatCapabilities;
3
+ export declare function regionsToCapabilities(regions: Iterable<ChatRegion>): ChatCapabilities;
@@ -0,0 +1,106 @@
1
+ import type { Message } from '../adapters/types.js';
2
+ import type { PromptFile, PromptImage } from '../adapters/promptTypes.js';
3
+ import type { ComposerSubmitMetadata } from '../hooks/useComposerCore.js';
4
+ export type Admission = 'accepted' | 'rejected' | 'unknown';
5
+ export type Outcome = 'established' | 'unsettled' | 'failed';
6
+ export interface IntentTarget {
7
+ readonly sessionId: string;
8
+ readonly turnId?: string;
9
+ readonly attemptId?: string;
10
+ readonly requestId?: string;
11
+ }
12
+ export interface IntentResult {
13
+ readonly admission: Admission;
14
+ readonly outcome?: Outcome;
15
+ readonly target: IntentTarget;
16
+ }
17
+ export type OperationState = 'pending' | 'running' | 'established' | 'unsettled' | 'failed';
18
+ export type IntentKind = 'submit' | 'cancel' | 'approval' | 'question' | 'compression' | 'lifecycle' | 'mcp';
19
+ export interface ChatOperation {
20
+ readonly id: string;
21
+ readonly kind: IntentKind;
22
+ readonly state: OperationState;
23
+ readonly target: IntentTarget;
24
+ }
25
+ export type ChatPhase = 'idle' | 'submitting' | 'running' | 'cancelling' | 'failed';
26
+ export interface PendingApproval {
27
+ readonly id: string;
28
+ readonly status: 'pending' | 'superseded';
29
+ }
30
+ export interface PendingQuestion {
31
+ readonly id: string;
32
+ }
33
+ export interface QuestionAnswer {
34
+ readonly questionId: string;
35
+ readonly value: string;
36
+ }
37
+ export interface ComposerSubmit {
38
+ readonly text: string;
39
+ readonly images?: readonly PromptImage[];
40
+ readonly files?: readonly PromptFile[];
41
+ readonly metadata?: ComposerSubmitMetadata;
42
+ }
43
+ export interface ModelSelectionController {
44
+ readonly models: readonly {
45
+ modelId: string;
46
+ label: string;
47
+ }[];
48
+ readonly selectedModelId?: string;
49
+ select(modelId: string): Promise<IntentResult>;
50
+ }
51
+ export interface ApprovalSelectionController {
52
+ readonly mode: string;
53
+ readonly availableModes: readonly string[];
54
+ select(mode: string): Promise<IntentResult>;
55
+ }
56
+ export interface ContextUsageController {
57
+ readonly usageKnown: boolean;
58
+ readonly inputTokens?: number;
59
+ readonly contextWindowSize?: number;
60
+ compress(): Promise<IntentResult>;
61
+ }
62
+ export type SessionLifecycleAction = 'close' | 'archive' | 'unarchive' | 'delete';
63
+ export interface SessionOpsController {
64
+ rename(title: string): Promise<IntentResult>;
65
+ export?(): Promise<IntentResult>;
66
+ lifecycle?(action: SessionLifecycleAction): Promise<IntentResult>;
67
+ }
68
+ export interface ChatCapabilities {
69
+ readonly contextUsage: boolean;
70
+ readonly usageStats: boolean;
71
+ readonly modelSelection: boolean;
72
+ readonly approvalSelection: boolean;
73
+ readonly sessionOps: boolean;
74
+ readonly conversationSearch: boolean;
75
+ readonly goalDisplay: boolean;
76
+ readonly terminal: boolean;
77
+ readonly tasks: boolean;
78
+ readonly diagnostics: boolean;
79
+ readonly artifacts: boolean;
80
+ }
81
+ export interface ChatStatusFacts {
82
+ readonly queueLength: number;
83
+ readonly goalActive: boolean;
84
+ }
85
+ export interface SessionChatController {
86
+ readonly kind: 'daemon' | 'managed';
87
+ readonly sessionId: string;
88
+ readonly storageKey: string;
89
+ readonly operations: readonly ChatOperation[];
90
+ readonly messages: readonly Message[];
91
+ readonly transcriptState: 'loading' | 'ready' | 'error';
92
+ loadOlder?(): Promise<void>;
93
+ readonly phase: ChatPhase;
94
+ submit(input: ComposerSubmit): Promise<IntentResult>;
95
+ cancel(): Promise<IntentResult>;
96
+ readonly pendingApprovals: readonly PendingApproval[];
97
+ readonly pendingQuestions: readonly PendingQuestion[];
98
+ respondApproval(id: string, optionId: string): Promise<IntentResult>;
99
+ respondQuestion(id: string, answers: readonly QuestionAnswer[]): Promise<IntentResult>;
100
+ readonly modelSelection?: ModelSelectionController;
101
+ readonly approvalSelection?: ApprovalSelectionController;
102
+ readonly contextUsage?: ContextUsageController;
103
+ readonly sessionOps?: SessionOpsController;
104
+ readonly statusFacts: ChatStatusFacts;
105
+ readonly capabilities: ChatCapabilities;
106
+ }
@@ -0,0 +1,8 @@
1
+ import type { Admission, ChatOperation, ChatPhase, IntentResult, IntentTarget, OperationState } from './contract.js';
2
+ export type OutcomeWitness = 'settled' | 'failed' | 'none';
3
+ export declare function resolveOutcome(admission: Admission, witness: OutcomeWitness): IntentResult['outcome'];
4
+ export declare function resolveIntent(admission: Admission, witness: OutcomeWitness, target: IntentTarget): IntentResult;
5
+ export declare function isTerminalOperation(state: OperationState): boolean;
6
+ export declare function retainOperations(operations: readonly ChatOperation[]): ChatOperation[];
7
+ export declare function acknowledgeOperation(operations: readonly ChatOperation[], operationId: string): ChatOperation[];
8
+ export declare function deriveChatPhase(operations: readonly ChatOperation[], settled: 'idle' | 'failed'): ChatPhase;
@@ -32,6 +32,16 @@ interface BranchPickerPopoverProps {
32
32
  onOpenWorktrees?: () => void;
33
33
  /** Opens the commit history graph. */
34
34
  onOpenLog?: () => void;
35
+ /**
36
+ * "Create branch here": turn the session's detached managed worktree
37
+ * into a named branch. Offered only for detached worktree sessions.
38
+ */
39
+ onCreateWorktreeBranch?: (name: string) => Promise<void>;
40
+ /**
41
+ * "Hand off": move the session between its managed worktree and the
42
+ * local checkout. Direction follows gitCwd (worktree path => 'local').
43
+ */
44
+ onHandoff?: (to: 'local' | 'worktree') => Promise<void>;
35
45
  children: React.ReactNode;
36
46
  }
37
47
  type HintTone = 'muted' | 'info' | 'warning';
@@ -74,5 +84,5 @@ export declare function deriveActionHints(t: TranslateFn, data: DaemonGitBranche
74
84
  * re-fetched. Exported for tests.
75
85
  */
76
86
  export declare function listingContradictsStatus(data: DaemonGitBranchesResult, status: DaemonWorkspaceGitStatus): boolean;
77
- export declare function BranchPickerPopover({ open, onOpenChange, workspaceCwd, gitCwd, gitSessionId, side, onBranchChanged, status, onStatusRefreshed, onOpenDiff, onOpenCommit, onOpenWorktrees, onOpenLog, children, }: BranchPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
87
+ export declare function BranchPickerPopover({ open, onOpenChange, workspaceCwd, gitCwd, gitSessionId, side, onBranchChanged, status, onStatusRefreshed, onOpenDiff, onOpenCommit, onOpenWorktrees, onOpenLog, onCreateWorktreeBranch, onHandoff, children, }: BranchPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
78
88
  export {};
@@ -31,8 +31,12 @@ interface ChatContextHeaderProps {
31
31
  onOpenTokenUsage?: () => void;
32
32
  /** Opens the session context panel; hidden when omitted. */
33
33
  onOpenContextUsage?: () => void;
34
+ /** Session artifact count; the artifact entry shows when greater than 0. */
35
+ artifactCount?: number;
36
+ /** Opens the environment panel's artifacts section; hidden when omitted. */
37
+ onOpenArtifacts?: () => void;
34
38
  /** Shows the Local Control QR entry; hidden when omitted. */
35
39
  onOpenLocalControlSettings?: () => void;
36
40
  }
37
- export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, hideWorkspaceIcon, environmentOpen, environmentAvailable, environmentRunning, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenFiles, onOpenTokenUsage, onOpenContextUsage, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, hideWorkspaceIcon, environmentOpen, environmentAvailable, environmentRunning, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenFiles, onOpenTokenUsage, onOpenContextUsage, artifactCount, onOpenArtifacts, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
38
42
  export {};
@@ -76,6 +76,10 @@ interface ChatEditorProps {
76
76
  onOpenWorktrees?: () => void;
77
77
  /** Opens the commit history graph. */
78
78
  onOpenLog?: () => void;
79
+ /** "Create branch here" for the session's detached managed worktree. */
80
+ onCreateWorktreeBranch?: (name: string) => Promise<void>;
81
+ /** "Hand off" between the session's worktree and the local checkout. */
82
+ onHandoff?: (to: 'local' | 'worktree') => Promise<void>;
79
83
  /** Workspace name shown in the pane composer's `workspace` toolbar chip. */
80
84
  workspaceName?: string;
81
85
  /** Full workspace cwd, used as the chip's tooltip. */
@@ -9,6 +9,8 @@ export interface ComposerTaskChipsProps {
9
9
  includeAgents: boolean;
10
10
  /** Open the task: locate a workflow in the transcript, open a shell's output, … */
11
11
  onSelectTask: (task: DaemonSessionTaskWithWorkflowStatus) => void;
12
+ /** Ask the model to explain the task as a side question, without opening it. */
13
+ onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
12
14
  /** Hand focus back to the composer, optionally with a typed character. */
13
15
  onReturnToInput?: (text?: string) => void;
14
16
  }
@@ -1,5 +1,14 @@
1
- import type { GoalSnapshotV2 } from '@qwen-code/sdk/daemon';
1
+ import type { GoalSnapshotV2, GoalStatus } from '@qwen-code/sdk/daemon';
2
2
  import { useI18n } from '../i18n';
3
+ /**
4
+ * Lifecycle tone shared by the strip's status text and the Goals page's
5
+ * status pill / budget fills. Maps onto the shared execution-status palette
6
+ * (App.module.css) the cockpit and workflow inspector already use, so a
7
+ * goal's state reads the same colour everywhere: active = in flight,
8
+ * paused/blocked/usage_limited = needs attention, complete = done. Matches
9
+ * GoalStatusMessage's warning/success language.
10
+ */
11
+ export declare function goalStatusTone(status: GoalStatus): 'running' | 'attention' | 'done';
3
12
  export interface GoalStatusStripProps {
4
13
  snapshot: GoalSnapshotV2;
5
14
  busy?: boolean;
@@ -7,6 +16,9 @@ export interface GoalStatusStripProps {
7
16
  onPause: () => void;
8
17
  onResume: () => void;
9
18
  onClear: () => void;
19
+ /** Open the Goals page listing every goal. Absent on surfaces where that
20
+ * page is unavailable — the affordance then does not render. */
21
+ onOpenGoals?: () => void;
10
22
  }
11
23
  export declare function getGoalActiveTimeMs(snapshot: GoalSnapshotV2, now: number): number;
12
24
  export declare function getGoalTokenLabel(goal: NonNullable<GoalSnapshotV2['goal']>, t: ReturnType<typeof useI18n>['t']): string | undefined;
@@ -22,4 +34,4 @@ export declare function getGoalActiveTimeLabel(goal: NonNullable<GoalSnapshotV2[
22
34
  * as it does for tokens.
23
35
  */
24
36
  export declare function getGoalTurnBudgetLabel(goal: NonNullable<GoalSnapshotV2['goal']>, t: ReturnType<typeof useI18n>['t']): string | undefined;
25
- export declare function GoalStatusStrip({ snapshot, busy, onEdit, onPause, onResume, onClear, }: GoalStatusStripProps): import("react/jsx-runtime").JSX.Element | null;
37
+ export declare function GoalStatusStrip({ snapshot, busy, onEdit, onPause, onResume, onClear, onOpenGoals, }: GoalStatusStripProps): import("react/jsx-runtime").JSX.Element | null;
@@ -6,17 +6,56 @@
6
6
  import type { DaemonCapabilities, DaemonClient, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
7
7
  import type { AcpWorkspaceSelector } from '../local-files/bridge-client';
8
8
  import { type LocalFilesStatus } from '../local-files/useLocalFilesBridge';
9
+ /** Concrete command that enables the reverse channel on the daemon. */
10
+ export declare const LOCAL_FILES_DAEMON_COMMAND = "QWEN_SERVE_CLIENT_MCP_OVER_WS=1 qwen serve";
11
+ /**
12
+ * The startup command in the user's shell syntax: the POSIX env-prefix form
13
+ * is not parseable by PowerShell, so on Windows the affordance must copy the
14
+ * `$env:` form or the one action the blocker offers cannot enable the feature.
15
+ * The variable name is the literal run-qwen-serve.ts reads.
16
+ */
17
+ export declare function deriveLocalFilesDaemonCommand(platform: string | undefined): string;
18
+ /**
19
+ * Trigger dot color per phase. `null` means no dot. Failed and needs-gesture
20
+ * get distinct colors so a broken or re-authorization-pending bridge is not
21
+ * invisible the way a plain busy dot made it. `held-elsewhere` stays muted
22
+ * (not primary): the bridge is live but owned by another tab, so this tab must
23
+ * not read the dot as "I have a working bridge here". The warning states use
24
+ * the theme-aware `--warning-color` token (App.module.css) rather than a fixed
25
+ * palette color, so the dot keeps contrast in the light theme too.
26
+ */
27
+ export declare function getLocalFilesDotClass(status: LocalFilesStatus): string | null;
28
+ /** Tooltip naming the state (and directory) instead of the static label. */
29
+ export declare function getLocalFilesTooltip(status: LocalFilesStatus, t: (key: string) => string): string;
30
+ /** Derive the SSH tunnel command for the insecure-context blocker. */
31
+ export declare function deriveLocalFilesTunnelCommand(baseUrl: string): string | undefined;
32
+ /** The local port the copied tunnel binds — the address the user must open. */
33
+ export declare function deriveLocalFilesTunnelLocalPort(baseUrl: string): number | undefined;
9
34
  export interface LocalFilesPanelProps {
10
35
  status: LocalFilesStatus;
11
36
  onConnect: () => void;
12
37
  onDisconnect: () => void;
13
38
  onOpenInNewTab: () => void;
39
+ /** Offered only while connected; re-opens the picker for a new grant. */
40
+ onChangeDirectory?: () => void;
41
+ /** Bound session title, shown while connected when known. */
42
+ sessionName?: string;
43
+ /** Offered in needs-session when the host can create a session. */
44
+ onNewSession?: () => void;
45
+ /** Copies a concrete fix command; absent hosts render no copy buttons. */
46
+ onCopyCommand?: (command: string) => void;
47
+ /** SSH tunnel command for the insecure-context blocker, when derivable. */
48
+ tunnelCommand?: string;
49
+ /** Local port the tunnel binds; the blocker copy names the address to open. */
50
+ tunnelLocalPort?: number;
51
+ /** Daemon startup command in the user's shell syntax; defaults to POSIX. */
52
+ daemonCommand?: string;
14
53
  }
15
54
  /**
16
55
  * The popover body, kept prop-driven and free of hooks/portals so the phase →
17
56
  * affordance mapping is testable without a Radix portal or a daemon provider.
18
57
  */
19
- export declare function LocalFilesPanel({ status, onConnect, onDisconnect, onOpenInNewTab, }: LocalFilesPanelProps): import("react/jsx-runtime").JSX.Element;
58
+ export declare function LocalFilesPanel({ status, onConnect, onDisconnect, onOpenInNewTab, onChangeDirectory, sessionName, onNewSession, onCopyCommand, tunnelCommand, tunnelLocalPort, daemonCommand, }: LocalFilesPanelProps): import("react/jsx-runtime").JSX.Element;
20
59
  interface LocalFilesControlProps {
21
60
  /**
22
61
  * Class for the trigger button. Required, and supplied by the host surface
@@ -8,6 +8,8 @@ export interface ManagedLocalFilesControlProps {
8
8
  provider: ManagedAgentProvider;
9
9
  sessionId: string | undefined;
10
10
  triggerClassName: string;
11
+ /** Bound session title, shown while connected when known. */
12
+ sessionName?: string;
11
13
  }
12
14
  /**
13
15
  * The Managed-mode local files entry. Unlike the daemon control it has no
@@ -15,4 +17,4 @@ export interface ManagedLocalFilesControlProps {
15
17
  * HTTP/SSE transport, and the entry is withheld entirely when the deployment
16
18
  * does not expose client files.
17
19
  */
18
- export declare function ManagedLocalFilesControl({ provider, sessionId, triggerClassName, }: ManagedLocalFilesControlProps): import("react/jsx-runtime").JSX.Element | null;
20
+ export declare function ManagedLocalFilesControl({ provider, sessionId, triggerClassName, sessionName, }: ManagedLocalFilesControlProps): import("react/jsx-runtime").JSX.Element | null;
@@ -4,7 +4,9 @@ import type { WebShellAssistantFeedbackRating, WebShellAssistantTurnFooterRender
4
4
  import { type SessionContentGenerator } from './messages/AssistantMessage';
5
5
  import type { TurnOutputOpenRequest } from './artifacts/TurnOutputs';
6
6
  import type { AttachmentPreviewRequest } from '../adapters/messageTypes';
7
+ import type { HookStatisticsTurn } from './messages/hook-statistics-context';
7
8
  interface MessageItemProps {
9
+ hookTurn?: HookStatisticsTurn;
8
10
  message: Message;
9
11
  pendingApproval?: PermissionRequest | null;
10
12
  /** Run /context detail, exactly like typing it (context-usage panels). */
@@ -12,6 +12,7 @@ export interface MessageListProps {
12
12
  deletion?: MessageDeletionControls;
13
13
  messages: Message[];
14
14
  frozenViewport?: boolean;
15
+ hookStatisticsSessionId?: string;
15
16
  terminalBackgroundShellTaskIds?: ReadonlySet<string>;
16
17
  pendingApproval: PermissionRequest | null;
17
18
  /** Run /context detail, exactly like typing it (context-usage panels). */
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { DaemonSessionArtifact } from '@qwen-code/sdk/daemon';
7
+ import { type RegistrationErrorTranslator } from '../hooks/useReportedArtifactRegistration';
8
+ /**
9
+ * Registers the files slash commands reported writing with the session
10
+ * artifact store. Rendered inside the shell's portal-root provider so the
11
+ * failure toast is scoped to this shell: App calls useSessionArtifacts in
12
+ * its own body, above the provider it returns, so the registration cannot
13
+ * ride along inside that hook without reading an unpopulated context.
14
+ *
15
+ * Mounted once per session consumer: App for the main session, ChatPane for
16
+ * split panes and side tasks, SubagentDetailContent for subagent sessions —
17
+ * each of those runs under its own DaemonSessionProvider, so a single mount
18
+ * in App would leave their reported artifacts unregistered.
19
+ */
20
+ export declare function ReportedArtifactRegistration({ registered, hydrated, refresh, translateError, }: {
21
+ registered: readonly DaemonSessionArtifact[];
22
+ hydrated: boolean;
23
+ refresh: () => Promise<void>;
24
+ translateError?: RegistrationErrorTranslator;
25
+ }): null;
@@ -1,4 +1,6 @@
1
1
  export type ToastTone = 'info' | 'warning' | 'error' | 'success';
2
+ export declare const MAX_TOASTS = 4;
3
+ export declare const TOAST_AUTO_DISMISS_MS = 5000;
2
4
  /** Window event that asks the app-level toast host to show a toast. Lets
3
5
  * deeply nested components (markdown links, artifact actions) report failures
4
6
  * without prop-drilling the toast callback. */
@@ -7,7 +9,7 @@ export interface ToastRequestDetail {
7
9
  tone: ToastTone;
8
10
  message: string;
9
11
  }
10
- export declare function requestToast(tone: ToastTone, message: string): void;
12
+ export declare function requestToast(tone: ToastTone, message: string, scope?: Element | null): void;
11
13
  export interface WebShellToast {
12
14
  id: string;
13
15
  tone: ToastTone;
@@ -15,6 +17,14 @@ export interface WebShellToast {
15
17
  /** Epoch ms when the toast auto-dismisses; survives host remounts. */
16
18
  dismissAt: number;
17
19
  }
20
+ /**
21
+ * The toast queue contract shared by App's listener and WindowToastHost, in
22
+ * one place so the two hosts cannot drift: deadline-based auto-dismiss and
23
+ * tone+message de-duplication with a capped stack (a repeat moves to the top
24
+ * instead of stacking twice; the oldest overflow drops).
25
+ */
26
+ export declare function createWebShellToast(tone: ToastTone, message: string, sequence: number): WebShellToast;
27
+ export declare function appendToastDeduped(current: readonly WebShellToast[], toast: WebShellToast): WebShellToast[];
18
28
  interface ToastHostProps {
19
29
  toasts: readonly WebShellToast[];
20
30
  onDismiss: (id: string) => void;
@@ -22,4 +32,20 @@ interface ToastHostProps {
22
32
  elevated?: boolean;
23
33
  }
24
34
  export declare function ToastHost({ toasts, onDismiss, elevated, }: ToastHostProps): import("react/jsx-runtime").JSX.Element | null;
35
+ /**
36
+ * Self-contained host for the window toast channel, for shells that do not
37
+ * carry App's toast state (the managed-only boot path). Same contract as
38
+ * App's listener: non-empty message guard, tone+message de-duplication, a
39
+ * capped stack, and deadline-based auto-dismiss. Without it, requestToast
40
+ * from a nested control dispatches into a document with no listener and the
41
+ * notice is silently dropped.
42
+ *
43
+ * `scope` narrows the listener to one shell's root element: requestToast
44
+ * dispatches on the acting shell's root (bubbling to window), so co-mounted
45
+ * shells do not show each other's notices. Omit it only for a single-shell
46
+ * document.
47
+ */
48
+ export declare function WindowToastHost({ scope }: {
49
+ scope?: HTMLElement | null;
50
+ }): import("react/jsx-runtime").JSX.Element;
25
51
  export {};
@@ -1,4 +1,4 @@
1
- import type { DaemonSessionArtifact, SessionSource, DaemonSessionMonitorTaskStatus, DaemonSessionShellTaskStatus, DaemonSessionTaskStatus } from '@qwen-code/sdk/daemon';
1
+ import type { DaemonSessionArtifact, SessionSource, DaemonSessionMonitorTaskStatus, DaemonSessionShellTaskStatus, DaemonSessionTaskStatus, DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
2
2
  import type { ACPToolCall, TodoItem } from '../../adapters/types';
3
3
  import type { WebShellRightPanelItem } from '../../customization';
4
4
  import { type DaemonContextMemoryDetail, type DaemonSessionOwnerSnapshot, type DaemonSessionActions } from '@qwen-code/web-shell/daemon-react-sdk';
@@ -175,6 +175,13 @@ export type ArtifactPanelTab = {
175
175
  sessionId: string;
176
176
  sessionActions?: DaemonSessionActions;
177
177
  closeWithPane?: boolean;
178
+ } | {
179
+ id: string;
180
+ kind: 'change_overview';
181
+ title: string;
182
+ workspaceCwd: string;
183
+ workspaceId?: string;
184
+ sessionId?: string;
178
185
  } | {
179
186
  id: string;
180
187
  kind: 'workflow';
@@ -218,6 +225,9 @@ interface ArtifactPanelProps {
218
225
  onOpenMemoryFile?: (file: DaemonContextMemoryDetail, workspaceCwd: string) => void;
219
226
  latestReviewAvailable?: boolean;
220
227
  onOpenLatestReview?: () => void;
228
+ /** Open the delivery-unit change overview tab (git workspaces only). */
229
+ changeOverviewAvailable?: boolean;
230
+ onOpenChangeOverview?: () => void;
221
231
  /** Open an interactive terminal tab in this panel (shown as an empty-state action). */
222
232
  onOpenTerminal?: () => void;
223
233
  /** Open this session's trajectory tab (shown as an empty-state action). */
@@ -254,6 +264,17 @@ interface ArtifactPanelProps {
254
264
  onNestedArtifactsChange?: (sessionId: string, artifacts: readonly DaemonSessionArtifact[]) => void;
255
265
  onOpenNestedSubagent?: (tool: ACPToolCall, sessionId: string, workspaceCwd?: string) => void;
256
266
  agentTasks?: readonly EnvironmentAgentTask[];
267
+ /** The background task shown in the active tab, when it can be explained. */
268
+ explainTask?: DaemonSessionTaskWithWorkflowStatus | null;
269
+ onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
270
+ /** A pending/settled task explanation to mirror in place (taskId-matched). */
271
+ taskExplanation?: {
272
+ messageId: string;
273
+ taskId: string;
274
+ question: string;
275
+ answer: string;
276
+ isPending: boolean;
277
+ } | null;
257
278
  agentTraceLoading?: boolean;
258
279
  agentTraceError?: string;
259
280
  onOpenWorkflowAgent?: (task: EnvironmentAgentTask) => void;
@@ -283,5 +304,5 @@ interface ArtifactPanelProps {
283
304
  fullscreen?: boolean;
284
305
  onToggleFullscreen?: () => void;
285
306
  }
286
- export declare function ArtifactPanel({ contextUsageControls, artifacts, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, onOpenMemoryFile, latestReviewAvailable, onOpenLatestReview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenFiles, onReferenceFile, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, archivedSideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onArchiveSideTasks, onUnarchiveSideTasks, onSideTaskMenuOpen, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
307
+ export declare function ArtifactPanel({ contextUsageControls, artifacts, tabs, activeTabId, reviewChanges, selectedReviewPath, panelWidth, workspaceCwd, loading, restoring, error, onSelectTab, onSelectTurnCallsPrompt, onCloseTab, onOpenFilePreview, onOpenMemoryFile, latestReviewAvailable, onOpenLatestReview, changeOverviewAvailable, onOpenChangeOverview, onOpenTerminal, onOpenTrajectory, trajectoryTabId, onOpenFiles, onReferenceFile, onOpenWebPreview, onWebPreviewChange, items, sideTaskAvailable, sideTasks, archivedSideTasks, sideTasksLoading, onCreateSideTask, onOpenSideTask, onArchiveSideTasks, onUnarchiveSideTasks, onSideTaskMenuOpen, onCreateSideTaskSession, onSideTaskCreated, onSideTaskTitleChange, onSideTaskInitialPromptRefused, onNestedRightPanelOpen, onNestedArtifactsChange, onOpenNestedSubagent, agentTasks, explainTask, onExplainTask, taskExplanation, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
287
308
  export {};
@@ -0,0 +1,4 @@
1
+ export declare function ChangeOverviewPanel({ workspaceCwd, sessionId, }: {
2
+ workspaceCwd: string;
3
+ sessionId?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,95 @@
1
+ import type { DaemonGitCommitDetail } from '@qwen-code/sdk/daemon';
2
+ /** One delivery unit in the change overview: a batch of changed files. */
3
+ export interface ChangeOverviewFile {
4
+ path: string;
5
+ additions: number;
6
+ deletions: number;
7
+ /** Binary rows carry zero counts by design; render a marker, not "+0 -0". */
8
+ isBinary?: boolean;
9
+ }
10
+ /** Why a PR's file list could not be fetched, so the panel can say so honestly. */
11
+ export type PrUnavailableCause = 'cli' | 'route' | 'error';
12
+ export type ChangeOverviewUnit = {
13
+ kind: 'uncommitted';
14
+ id: 'uncommitted';
15
+ files: ChangeOverviewFile[];
16
+ additions: number;
17
+ deletions: number;
18
+ filesCount: number;
19
+ hiddenCount: number;
20
+ } | {
21
+ kind: 'pr';
22
+ id: string;
23
+ number: number;
24
+ title: string;
25
+ url: string;
26
+ /** 'unavailable' when the file list could not be fetched. */
27
+ state: 'ready' | 'unavailable';
28
+ /** Present when state is 'unavailable'; names the actual failure cause. */
29
+ unavailableCause?: PrUnavailableCause;
30
+ files: ChangeOverviewFile[];
31
+ additions: number;
32
+ deletions: number;
33
+ filesCount: number;
34
+ hiddenCount: number;
35
+ } | {
36
+ kind: 'commit';
37
+ id: string;
38
+ sha: string;
39
+ shortSha: string;
40
+ subject: string;
41
+ files: ChangeOverviewFile[];
42
+ additions: number;
43
+ deletions: number;
44
+ filesCount: number;
45
+ hiddenCount: number;
46
+ };
47
+ /**
48
+ * The `[host/]owner/repo` a bound PR's URL points at, so its file list is
49
+ * resolved in that repository rather than by number in the session's checkout
50
+ * (a same number in another repo is a different PR). The host is carried
51
+ * through to `gh --repo` in its documented [HOST/]OWNER/REPO form: dropping it
52
+ * would resolve an Enterprise PR's slug on github.com and could render a
53
+ * foreign same-numbered PR's files under this PR's heading. Returns undefined
54
+ * for anything that is not a plain GitHub PR URL with a valid slug and a bare
55
+ * hostname[:port] host.
56
+ */
57
+ export declare function prRepoFromUrl(url: string): string | undefined;
58
+ /**
59
+ * Classify a failed PR-files fetch from the daemon error's wire shape, so the
60
+ * panel names the real cause instead of always blaming a missing `gh` or an
61
+ * old daemon. `github_cli_unavailable` → gh missing; a 404 → the daemon
62
+ * predates the route; anything else (expired token, rate limit, transient
63
+ * daemon error) → a generic retryable failure.
64
+ */
65
+ export declare function prUnavailableCauseFromError(error: unknown): PrUnavailableCause;
66
+ /**
67
+ * The git log range that yields the commit-fallback window: commits a bound PR
68
+ * does not cover. With a known PR head, only commits after it are loose (the
69
+ * PR units already show the rest); without one, the session's base branch (or
70
+ * HEAD's recent history) bounds the window.
71
+ *
72
+ * Returns a range string, or one of two distinct sentinels: `undefined` means
73
+ * "no baseline — walk HEAD's recent history" (an omitted range), while `null`
74
+ * means "refuse the fallback". A base branch git permits but the daemon's
75
+ * whitelist rejects (e.g. `feat@2026`) would be dropped server-side into an
76
+ * unscoped walk that re-lists pre-session history, so it must skip the fetch
77
+ * entirely (`null`), not fall through to the omitted-range path. The literal
78
+ * `'HEAD'` is the daemon's detached-HEAD sentinel (session.ts treats it the
79
+ * same way), not a baseline: composing `HEAD..HEAD` would be always-empty and
80
+ * silently render a committing session as having no loose commits, so it maps
81
+ * to the no-baseline walk instead.
82
+ */
83
+ export declare function commitFallbackRange(latestPrHeadSha: string | undefined, baseBranch: string | undefined): string | null | undefined;
84
+ /**
85
+ * Map commit-fallback log entries to units. The caller already fetched the
86
+ * loose window via {@link commitFallbackRange}, so covered commits are absent.
87
+ * Merge commits are skipped — their diff-tree detail is the merge's own
88
+ * introduction, not session work — as are commits whose detail is unavailable.
89
+ */
90
+ export declare function buildCommitFallbackUnits(entries: readonly {
91
+ sha: string;
92
+ shortSha: string;
93
+ subject: string;
94
+ parents: string[];
95
+ }[], details: ReadonlyMap<string, DaemonGitCommitDetail>): ChangeOverviewUnit[];
@@ -64,3 +64,36 @@ export declare const FILES_MESSAGES_ZH: {
64
64
  'files.close': string;
65
65
  'files.sourceTooLarge': string;
66
66
  };
67
+ export declare const FILES_MESSAGES_RU: {
68
+ 'files.delete': string;
69
+ 'files.deleteTitle': string;
70
+ 'files.deleteWarning': string;
71
+ 'files.copyRelativePath': string;
72
+ 'files.copyAbsolutePath': string;
73
+ 'files.reference': string;
74
+ 'files.title': string;
75
+ 'files.newFile': string;
76
+ 'files.newFolder': string;
77
+ 'files.deleteMenu': string;
78
+ 'files.deleteFolderTitle': string;
79
+ 'files.deleteFolderWarning': string;
80
+ 'files.deleting': string;
81
+ 'files.name': string;
82
+ 'files.create': string;
83
+ 'files.creating': string;
84
+ 'files.destination': string;
85
+ 'files.invalidName': string;
86
+ 'files.uploadTo': string;
87
+ 'files.description': string;
88
+ 'files.filter': string;
89
+ 'files.noMatches': string;
90
+ 'files.resizeTree': string;
91
+ 'files.toggleTree': string;
92
+ 'files.closePreview': string;
93
+ 'files.emptyDirectory': string;
94
+ 'files.truncated': string;
95
+ 'files.loadFailed': string;
96
+ 'files.reloadUnavailable': string;
97
+ 'files.close': string;
98
+ 'files.sourceTooLarge': string;
99
+ };
@@ -1,2 +1,3 @@
1
1
  export declare const FILES_MESSAGES_EN: {};
2
2
  export declare const FILES_MESSAGES_ZH: {};
3
+ export declare const FILES_MESSAGES_RU: {};
@@ -6,4 +6,5 @@
6
6
  type TokenUsageMessage = string | ((vars?: Record<string, string | number>) => string);
7
7
  export declare const TOKEN_USAGE_MESSAGES_EN: Record<string, TokenUsageMessage>;
8
8
  export declare const TOKEN_USAGE_MESSAGES_ZH: Record<string, TokenUsageMessage>;
9
+ export declare const TOKEN_USAGE_MESSAGES_RU: Record<string, TokenUsageMessage>;
9
10
  export {};
@@ -5,3 +5,4 @@
5
5
  */
6
6
  export declare const TOKEN_USAGE_MESSAGES_EN: {};
7
7
  export declare const TOKEN_USAGE_MESSAGES_ZH: {};
8
+ export declare const TOKEN_USAGE_MESSAGES_RU: {};