@qwen-code/web-shell 0.27.4 → 0.28.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 (106) hide show
  1. package/dist/{PierreFilePreview-BMd8Nqyr.js → PierreFilePreview-D6shMVrF.js} +1 -1
  2. package/dist/{SpreadsheetPreview-MnZX4z-A.js → SpreadsheetPreview-CI7hXBn_.js} +11 -11
  3. package/dist/{WorkspaceFileBrowser-CvJS8MdL.js → WorkspaceFileBrowser-D2lUYsk2.js} +2 -2
  4. package/dist/agents-route-Cekk3UIP.js +1746 -0
  5. package/dist/daemon-react-sdk.js +1 -1
  6. package/dist/{index-ENe4NzKy.js → index-BNap2Fh4.js} +63368 -61131
  7. package/dist/index.js +3 -3
  8. package/dist/sw.js +1 -1
  9. package/dist/transcript.js +10397 -10160
  10. package/dist/types/adapters/toolClassification.d.ts +2 -1
  11. package/dist/types/browser-notifications/messages.d.ts +1 -0
  12. package/dist/types/browser-notifications/messages.transcript-stub.d.ts +1 -0
  13. package/dist/types/components/BranchPickerPopover.d.ts +11 -1
  14. package/dist/types/components/ChatContextHeader.d.ts +5 -1
  15. package/dist/types/components/ChatEditor.d.ts +4 -0
  16. package/dist/types/components/GoalStatusStrip.d.ts +14 -2
  17. package/dist/types/components/LocalFilesControl.d.ts +40 -1
  18. package/dist/types/components/ManagedLocalFilesControl.d.ts +3 -1
  19. package/dist/types/components/MessageItem.d.ts +2 -0
  20. package/dist/types/components/MessageList.d.ts +1 -0
  21. package/dist/types/components/ReportedArtifactRegistration.d.ts +25 -0
  22. package/dist/types/components/ToastHost.d.ts +27 -1
  23. package/dist/types/components/artifacts/ArtifactPanel.d.ts +11 -1
  24. package/dist/types/components/artifacts/ChangeOverviewPanel.d.ts +4 -0
  25. package/dist/types/components/artifacts/change-overview.d.ts +95 -0
  26. package/dist/types/components/artifacts/files-messages.d.ts +33 -0
  27. package/dist/types/components/artifacts/files-messages.transcript-stub.d.ts +1 -0
  28. package/dist/types/components/artifacts/token-usage-messages.d.ts +1 -0
  29. package/dist/types/components/artifacts/token-usage-messages.transcript-stub.d.ts +1 -0
  30. package/dist/types/components/artifacts/useChangeOverview.d.ts +21 -0
  31. package/dist/types/components/channels/channel-events-messages.d.ts +1 -0
  32. package/dist/types/components/dialogs/GoalsDialog.d.ts +2 -1
  33. package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
  34. package/dist/types/components/managed/managed-diagnostics-messages.d.ts +167 -167
  35. package/dist/types/components/managed/managed-extension-messages.d.ts +1 -0
  36. package/dist/types/components/managed/managed-lifecycle-messages.d.ts +40 -0
  37. package/dist/types/components/managed/managed-lifecycle-messages.transcript-stub.d.ts +1 -0
  38. package/dist/types/components/managed/managed-mcp-messages.d.ts +1 -0
  39. package/dist/types/components/managed/managed-mcp-messages.transcript-stub.d.ts +1 -0
  40. package/dist/types/components/managed/managed-recovery-messages.d.ts +1 -0
  41. package/dist/types/components/managed/managed-task-messages.d.ts +1 -0
  42. package/dist/types/components/managed/managed-task-messages.transcript-stub.d.ts +1 -0
  43. package/dist/types/components/managed/managed-workspace-messages.d.ts +1 -0
  44. package/dist/types/components/managed/managed-workspace-messages.transcript-stub.d.ts +1 -0
  45. package/dist/types/components/message-deletion-messages.d.ts +1 -0
  46. package/dist/types/components/message-deletion-messages.transcript-stub.d.ts +1 -0
  47. package/dist/types/components/messages/AssistantMessage.d.ts +2 -0
  48. package/dist/types/components/messages/HookStatistics.d.ts +4 -0
  49. package/dist/types/components/messages/HookStatistics.transcript-stub.d.ts +4 -0
  50. package/dist/types/components/messages/hook-statistics-context.d.ts +13 -0
  51. package/dist/types/components/messages/hook-statistics-turns.d.ts +3 -0
  52. package/dist/types/components/messages/session-link.d.ts +1 -0
  53. package/dist/types/components/panels/EnvironmentPanel.d.ts +7 -1
  54. package/dist/types/components/sidebar/ActivityDateSessions.d.ts +22 -0
  55. package/dist/types/components/sidebar/SessionGroupSection.d.ts +4 -2
  56. package/dist/types/components/sidebar/SessionSortMenu.d.ts +15 -1
  57. package/dist/types/components/sidebar/activity-messages.d.ts +1 -0
  58. package/dist/types/components/sidebar/activity-model.d.ts +1 -1
  59. package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +13 -5
  60. package/dist/types/components/workspace-agents/messages.d.ts +1 -0
  61. package/dist/types/components/workspace-agents/messages.transcript-stub.d.ts +1 -0
  62. package/dist/types/customization.d.ts +10 -2
  63. package/dist/types/daemon/session/types.d.ts +19 -2
  64. package/dist/types/hooks/useComposerCore.d.ts +18 -0
  65. package/dist/types/hooks/useSessionArtifacts.d.ts +1 -2
  66. package/dist/types/i18n-ru-part1.d.ts +1 -0
  67. package/dist/types/i18n-ru-part1.transcript-stub.d.ts +12 -0
  68. package/dist/types/i18n-ru-part2.d.ts +1 -0
  69. package/dist/types/i18n-ru-part2.transcript-stub.d.ts +12 -0
  70. package/dist/types/i18n-ru-part3.d.ts +1 -0
  71. package/dist/types/i18n-ru-part3.transcript-stub.d.ts +12 -0
  72. package/dist/types/i18n-ru-part4.d.ts +1 -0
  73. package/dist/types/i18n-ru-part4.transcript-stub.d.ts +12 -0
  74. package/dist/types/i18n-ru-part5.d.ts +1 -0
  75. package/dist/types/i18n-ru-part5.transcript-stub.d.ts +12 -0
  76. package/dist/types/i18n-ru-part6.d.ts +1 -0
  77. package/dist/types/i18n-ru-part6.transcript-stub.d.ts +12 -0
  78. package/dist/types/i18n-ru-remainder.d.ts +6 -0
  79. package/dist/types/i18n-ru-remainder.transcript-stub.d.ts +11 -0
  80. package/dist/types/i18n.d.ts +6 -0
  81. package/dist/types/live/messages.d.ts +1 -0
  82. package/dist/types/live/messages.transcript-stub.d.ts +1 -0
  83. package/dist/types/local-files/useLocalFilesBridge.d.ts +7 -1
  84. package/dist/types/local-files/useManagedLocalFilesBridge.d.ts +5 -1
  85. package/dist/types/mcp-app/messages.d.ts +1 -0
  86. package/dist/types/mcp-app/messages.transcript-stub.d.ts +1 -0
  87. package/dist/types/session-catalog/session-catalog-hooks.d.ts +4 -1
  88. package/dist/types/settings/messages.d.ts +1 -0
  89. package/dist/types/settings/messages.transcript-stub.d.ts +1 -0
  90. package/dist/types/trajectory/execution-messages.d.ts +1 -0
  91. package/dist/types/trajectory/execution-messages.transcript-stub.d.ts +1 -0
  92. package/dist/types/trajectory/filter-messages.d.ts +1 -0
  93. package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +1 -0
  94. package/dist/types/trajectory/project-trajectory-lifecycle.d.ts +1 -1
  95. package/dist/types/trajectory/trajectory-live-store.d.ts +3 -1
  96. package/dist/types/trajectory/window-messages.d.ts +1 -0
  97. package/dist/types/trajectory/window-messages.transcript-stub.d.ts +1 -0
  98. package/dist/types/utils/gitModeIntent.d.ts +14 -4
  99. package/dist/types/utils/plural.d.ts +5 -0
  100. package/dist/types/voice/VoiceButton.d.ts +9 -1
  101. package/dist/types/voice/messages.d.ts +1 -0
  102. package/dist/types/voice/messages.transcript-stub.d.ts +1 -0
  103. package/dist/types/voice/useVoiceCapture.d.ts +8 -0
  104. package/dist/{useDaemonMidTurnInjected-BCExZTLK.js → useDaemonMidTurnInjected-FRZ0JLKH.js} +11301 -5741
  105. package/package.json +1 -1
  106. package/dist/agents-route-BYqfB9LM.js +0 -1727
@@ -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: {};
@@ -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. */
@@ -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 {};
@@ -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). */
@@ -283,5 +293,5 @@ interface ArtifactPanelProps {
283
293
  fullscreen?: boolean;
284
294
  onToggleFullscreen?: () => void;
285
295
  }
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;
296
+ 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, agentTraceLoading, agentTraceError, onOpenWorkflowAgent, onError, sessionWorkflowEnabled, modelManagement, unavailableModels, mountUnavailableModelTooltip, workflow, onImageIngestionNotice, deferSubagentMount, onClose, variant, fullscreen, onToggleFullscreen, }: ArtifactPanelProps): import("react/jsx-runtime").JSX.Element;
287
297
  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: {};
@@ -0,0 +1,21 @@
1
+ import { type ChangeOverviewUnit } from './change-overview';
2
+ export interface ChangeOverviewState {
3
+ /** False when the workspace is not a git repository. */
4
+ gitAvailable: boolean;
5
+ /** True when a fetch failed transiently; retryable, not a workspace property. */
6
+ loadFailed: boolean;
7
+ loading: boolean;
8
+ units: ChangeOverviewUnit[];
9
+ /** True when the commit-fallback window is capped and older commits exist. */
10
+ commitsTruncated: boolean;
11
+ }
12
+ /**
13
+ * Assemble the session's delivery-unit change overview from git: the
14
+ * uncommitted batch, one unit per bound PR (with its changed-file list and
15
+ * scale), and a commit fallback for commits no bound PR covers. Read-only;
16
+ * every fetch degrades gracefully so a missing `gh` or an old daemon never
17
+ * blanks the panel.
18
+ */
19
+ export declare function useChangeOverview(workspaceCwd: string, sessionId?: string): ChangeOverviewState & {
20
+ refresh: () => void;
21
+ };
@@ -6,4 +6,5 @@
6
6
  type ChannelEventsMessage = string | ((vars?: Record<string, string | number>) => string);
7
7
  export declare const CHANNEL_EVENTS_MESSAGES_EN: Record<string, ChannelEventsMessage>;
8
8
  export declare const CHANNEL_EVENTS_MESSAGES_ZH: Record<string, ChannelEventsMessage>;
9
+ export declare const CHANNEL_EVENTS_MESSAGES_RU: Record<string, ChannelEventsMessage>;
9
10
  export {};
@@ -24,7 +24,8 @@ interface GoalsDialogProps {
24
24
  /** Forces all goal listing through this workspace's route. */
25
25
  lockedWorkspace?: DaemonWorkspaceCapability;
26
26
  /** The workspace the create form defaults to (the App's currently selected
27
- * workspace). Falls back to the primary when absent or not operable. */
27
+ * workspace). Falls back to a creatable primary, else the first creatable
28
+ * entry, when absent or not creatable. */
28
29
  defaultWorkspaceCwd?: string;
29
30
  onError: (error: unknown, fallback: string) => void;
30
31
  }
@@ -1742,7 +1742,7 @@ export interface components {
1742
1742
  approvalMode?: "default" | "auto-edit" | "yolo";
1743
1743
  /** @description Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state. */
1744
1744
  planMode?: boolean;
1745
- /** @description Optional static Skills imported from the enabled management catalog or added explicitly to the pinned AgentDefinition catalog. The merged catalog has unique names, at most 256 entries, 512 KiB per body and 2 MiB compact JSON. Requires session-skills/2; persisted immutably and included in creation idempotency. */
1745
+ /** @description Optional static Skills imported from the enabled management catalog or added explicitly to the pinned AgentDefinition catalog. The merged catalog has unique names, at most 256 entries, 512 KiB per body and 2 MiB compact JSON; a caller loop whose body is the verbatim bundled import is superseded by the definition's entry or the server variant rather than rejected; a user-authored caller loop that collides with a definition-authored loop is still rejected. On a creator-bearing tool profile the server also contributes a loop skill variant selected by the Session profile, replacing only the bundled caller import (carrying over its invocation flags) and added even when this array is empty; a user-authored caller loop or a definition-authored loop skill is preserved and suppresses the variant, and on a creator-less profile only the bundled caller import is dropped. Requires session-skills/2; persisted immutably and included in creation idempotency. */
1746
1746
  skills?: components["schemas"]["SessionCreationSkill"][];
1747
1747
  /** @description Optional immutable initial extension selection. Omission keeps the legacy configuration path; an explicit empty array starts the unified configuration format. Included in creation idempotency and applied before the first model request. Requires session-extension-packages/1 and an extension-capable original Runtime. */
1748
1748
  extensionPins?: components["schemas"]["ManagedExtensionPackagePin"][];