@qwen-code/web-shell 0.28.4 → 0.28.6

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 (51) hide show
  1. package/NOTICES.txt +1 -1
  2. package/dist/{PierreFilePreview-Cn-K0sjp.js → PierreFilePreview-CAyMSfe1.js} +1 -1
  3. package/dist/{SpreadsheetPreview-9HeqwVPY.js → SpreadsheetPreview-sCcmRNTT.js} +2 -2
  4. package/dist/{WorkspaceFileBrowser-DKicahqO.js → WorkspaceFileBrowser-DEvIFGbs.js} +2 -2
  5. package/dist/{WorkspacePdfRangePreview-2_xkjgkQ.js → WorkspacePdfRangePreview-iMWtsLo7.js} +2 -2
  6. package/dist/{agents-route-CgXJn9nH.js → agents-route-CrZAsZhs.js} +2 -2
  7. package/dist/daemon-react-sdk.js +1 -1
  8. package/dist/{i18n-ru-_WgXRbpi.js → i18n-ru-C7ncd9S1.js} +6 -10
  9. package/dist/{i18n-zh-cn-nzJpapgU.js → i18n-zh-cn-7l1xyTcL.js} +6 -10
  10. package/dist/{i18n-zh-tw-DRUCD7h2.js → i18n-zh-tw-DU7AgDPK.js} +12 -10
  11. package/dist/{index-Mt-5HQ-Q.js → index-D-5-_HVQ.js} +69483 -68237
  12. package/dist/index.js +3 -3
  13. package/dist/sw.js +1 -1
  14. package/dist/{terminal-runtime-BQaN1NCS.js → terminal-runtime-ubK12HhZ.js} +997 -997
  15. package/dist/transcript.js +10593 -10534
  16. package/dist/types/adapters/transcriptToMessages.d.ts +0 -20
  17. package/dist/types/chat-core/ChatSurface.d.ts +5 -1
  18. package/dist/types/chat-core/contract.d.ts +7 -0
  19. package/dist/types/components/BranchPickerPopover.d.ts +15 -1
  20. package/dist/types/components/ComposerTaskChips.d.ts +7 -4
  21. package/dist/types/components/GitModePopover.d.ts +9 -1
  22. package/dist/types/components/MessageItem.d.ts +1 -0
  23. package/dist/types/components/MessageList.d.ts +1 -0
  24. package/dist/types/components/TranscriptViewport.d.ts +6 -0
  25. package/dist/types/components/WorkspaceSelector.d.ts +5 -1
  26. package/dist/types/components/artifacts/artifactUtils.d.ts +3 -1
  27. package/dist/types/components/managed/chat-capabilities.d.ts +3 -1
  28. package/dist/types/components/managed/chat-controller.d.ts +65 -0
  29. package/dist/types/components/managed/generated/managed-agent-api.d.ts +1 -1
  30. package/dist/types/components/managed/managed-agent-provider.d.ts +13 -1
  31. package/dist/types/components/managed/managed-question-response.d.ts +7 -0
  32. package/dist/types/components/managed/use-managed-actions.d.ts +1 -1
  33. package/dist/types/components/managed/use-managed-chat-controller.d.ts +9 -0
  34. package/dist/types/components/managed/use-managed-turn-cancel.d.ts +5 -2
  35. package/dist/types/components/messages/AskUserQuestion.d.ts +15 -2
  36. package/dist/types/components/messages/UserMessage.d.ts +1 -0
  37. package/dist/types/components/sidebar/sidebar-hover-suppression.d.ts +1 -0
  38. package/dist/types/daemon/chat-controller.d.ts +5 -0
  39. package/dist/types/daemon/remotePromptSidechannel.d.ts +13 -0
  40. package/dist/types/daemon/session/DaemonSessionProvider.d.ts +1 -0
  41. package/dist/types/daemon/session/index.d.ts +1 -1
  42. package/dist/types/daemon/session/types.d.ts +5 -1
  43. package/dist/types/daemon/workspace/types.d.ts +23 -0
  44. package/dist/types/generated-ui/effects.d.ts +27 -0
  45. package/dist/types/hooks/useInputHistory.d.ts +10 -1
  46. package/dist/types/settings.d.ts +1 -0
  47. package/dist/types/utils/promptAdmission.d.ts +2 -1
  48. package/dist/types/utils/rectangles.d.ts +8 -0
  49. package/dist/{useDaemonMidTurnInjected-C7uv5N2a.js → useDaemonMidTurnInjected-jDVqCK0b.js} +5954 -5786
  50. package/package.json +1 -1
  51. package/dist/types/components/managed/ManagedQuestionForm.d.ts +0 -13
@@ -28,26 +28,6 @@ export declare function isRetryableTurnErrorKind(errorKind: string | undefined):
28
28
  export declare function assistantBlockRendersAsSystemNotice(block: DaemonTranscriptBlock): boolean;
29
29
  export declare function transcriptBlocksToDaemonMessages(blocks: readonly DaemonTranscriptBlock[], options?: TranscriptMessageOptions): DaemonMessage[];
30
30
  export declare function daemonToolBlockToToolCall(block: DaemonToolTranscriptBlock, safeToolProjection: boolean): DaemonMessageToolCall;
31
- type ParsedInsight = {
32
- type: 'insight_progress';
33
- stage: string;
34
- progress: number;
35
- detail?: string;
36
- } | {
37
- type: 'insight_ready';
38
- path: string;
39
- } | {
40
- type: 'insight_error';
41
- error: string;
42
- };
43
- type InsightSegment = {
44
- kind: 'text';
45
- text: string;
46
- } | {
47
- kind: 'insight';
48
- data: ParsedInsight;
49
- };
50
- export declare function splitInsightSegments(text: string): InsightSegment[] | null;
51
31
  /**
52
32
  * The visible assistant text of a block's text, with insight protocol frames
53
33
  * (`insight_progress` / `insight_ready` / `insight_error`) stripped exactly as
@@ -6,6 +6,7 @@
6
6
  import { type ReactNode } from 'react';
7
7
  import type { CommandInfo, TodoItem } from '../adapters/types.js';
8
8
  import type { SessionContentGenerator } from '../components/messages/AssistantMessage.js';
9
+ import { type ComposerToolbarAction } from '../components/ChatEditor.js';
9
10
  import type { SessionChatController } from './contract.js';
10
11
  export interface ChatSurfaceProps {
11
12
  readonly controller: SessionChatController;
@@ -33,6 +34,9 @@ export interface ChatSurfaceProps {
33
34
  readonly atWorkspaceCwd?: string;
34
35
  readonly composerScopeKey?: string;
35
36
  readonly composerSubmitBlocked?: boolean;
37
+ readonly sessionViewportEnabled?: boolean;
38
+ readonly workspaceFeaturesEnabled?: boolean;
39
+ readonly visibleToolbarActions?: readonly ComposerToolbarAction[];
36
40
  }
37
41
  /**
38
42
  * The backend-neutral chat column (unified chat surface, slice 2). It renders
@@ -42,4 +46,4 @@ export interface ChatSurfaceProps {
42
46
  * establishment — the composer defers its draft commit to admission, while turn
43
47
  * and decision outcomes are reflected through the controller's observable state.
44
48
  */
45
- export declare function ChatSurface({ controller, header, panels, composerStatus, transcriptError, commands, onError, hasOlderHistory, onLoadOlderHistory, historyPaginationError, loadingOlderHistory, historyCapacityReached, planTodos, planExecutionMode, approvalDisabled, approvalKeyboardActive, showBrowserNotifications, generateContent, askUserFreeTextLabel, askUserDetails, atWorkspaceCwd, composerScopeKey, composerSubmitBlocked, }: ChatSurfaceProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function ChatSurface({ controller, header, panels, composerStatus, transcriptError, commands, onError, hasOlderHistory, onLoadOlderHistory, historyPaginationError, loadingOlderHistory, historyCapacityReached, planTodos, planExecutionMode, approvalDisabled, approvalKeyboardActive, showBrowserNotifications, generateContent, askUserFreeTextLabel, askUserDetails, atWorkspaceCwd, composerScopeKey, composerSubmitBlocked, sessionViewportEnabled, workspaceFeaturesEnabled, visibleToolbarActions, }: ChatSurfaceProps): import("react/jsx-runtime").JSX.Element;
@@ -35,6 +35,8 @@ export interface PendingQuestion {
35
35
  export interface QuestionAnswer {
36
36
  readonly questionId: string;
37
37
  readonly value: string;
38
+ readonly optionIds?: readonly string[];
39
+ readonly text?: string;
38
40
  }
39
41
  export interface ComposerSubmit {
40
42
  readonly text: string;
@@ -88,9 +90,14 @@ export interface SessionChatController {
88
90
  readonly kind: 'daemon' | 'managed';
89
91
  readonly sessionId: string;
90
92
  readonly storageKey: string;
93
+ readonly activeTurnId?: string;
91
94
  readonly operations: readonly ChatOperation[];
92
95
  readonly messages: readonly Message[];
93
96
  readonly transcriptState: 'loading' | 'ready' | 'error';
97
+ readonly hasOlderHistory?: boolean;
98
+ readonly loadingOlderHistory?: boolean;
99
+ readonly historyCapacityReached?: boolean;
100
+ readonly historyPaginationError?: boolean;
94
101
  loadOlder?(options?: {
95
102
  force?: boolean;
96
103
  }): Promise<void>;
@@ -6,6 +6,19 @@
6
6
  import type { DaemonGitBranchesResult, DaemonWorkspaceGitStatus } from '@qwen-code/sdk/daemon';
7
7
  import { useI18n } from '../i18n';
8
8
  export declare const GIT_REMOTE_MUTATION_FETCH_TIMEOUT_MS = 600000;
9
+ export interface BranchPickerPreservedState {
10
+ scopeKey: string;
11
+ search: string;
12
+ newBranchMode: boolean;
13
+ newBranchName: string;
14
+ checkoutRefMode: boolean;
15
+ checkoutRefValue: string;
16
+ createBranchMode: boolean;
17
+ createBranchValue: string;
18
+ view: 'branches' | 'remotes';
19
+ remoteName: string;
20
+ remoteUrl: string;
21
+ }
9
22
  interface BranchPickerPopoverProps {
10
23
  open: boolean;
11
24
  onOpenChange: (open: boolean) => void;
@@ -14,6 +27,7 @@ interface BranchPickerPopoverProps {
14
27
  gitSessionId?: string;
15
28
  side?: 'top' | 'right' | 'bottom' | 'left';
16
29
  onBranchChanged?: () => void;
30
+ preservedStateRef?: React.MutableRefObject<BranchPickerPreservedState | null>;
17
31
  /**
18
32
  * Working-tree summary from the trigger chip. Seeds the hints beside the
19
33
  * Update / Commit / Push actions (dirty counts, in-progress operation) until
@@ -84,5 +98,5 @@ export declare function deriveActionHints(t: TranslateFn, data: DaemonGitBranche
84
98
  * re-fetched. Exported for tests.
85
99
  */
86
100
  export declare function listingContradictsStatus(data: DaemonGitBranchesResult, status: DaemonWorkspaceGitStatus): boolean;
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;
101
+ export declare function BranchPickerPopover({ open, onOpenChange, workspaceCwd, gitCwd, gitSessionId, side, onBranchChanged, status, onStatusRefreshed, onOpenDiff, onOpenCommit, onOpenWorktrees, onOpenLog, onCreateWorktreeBranch, onHandoff, preservedStateRef, children, }: BranchPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
88
102
  export {};
@@ -8,8 +8,10 @@ export interface ComposerTaskChipsProps {
8
8
  tasks: readonly ComposerChipTask[];
9
9
  /** Whether background agents get a chip (hosts without agent surfaces opt out). */
10
10
  includeAgents: boolean;
11
- /** Open the task: locate a workflow in the transcript, open a shell's output, … */
12
- onSelectTask: (task: ComposerChipTask) => void;
11
+ /** Select a task; direct single-chip activation also allows collapsing it. */
12
+ onSelectTask: (task: ComposerChipTask, toggle?: boolean) => void;
13
+ /** Whether a single-task chip's target panel or dialog is currently open. */
14
+ isTaskOpen?: (task: ComposerChipTask) => boolean;
13
15
  /** Ask the model to explain the task as a side question, without opening it. */
14
16
  onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
15
17
  /** Hand focus back to the composer, optionally with a typed character. */
@@ -18,7 +20,8 @@ export interface ComposerTaskChipsProps {
18
20
  /**
19
21
  * Chips above the composer for this session's unfinished background work —
20
22
  * one per kind ("1 workflow", "2 shells"). A chip that stands for a single
21
- * task opens it directly; one that stands for several opens a list above the
22
- * row to pick from. Finished tasks have no chip, so the row clears itself.
23
+ * task toggles its detail; one that stands for several opens a list above the
24
+ * row to pick from and collapses that list on repeat activation. Finished
25
+ * tasks have no chip, so the row clears itself.
23
26
  */
24
27
  export declare const ComposerTaskChips: import("react").ForwardRefExoticComponent<ComposerTaskChipsProps & import("react").RefAttributes<ComposerTaskChipsHandle>>;
@@ -14,12 +14,20 @@ export type SessionGitIntent = {
14
14
  slug?: string;
15
15
  };
16
16
  export declare function validateBranchName(name: string): boolean;
17
+ export interface GitModePopoverDraft {
18
+ selectedMode: SessionGitIntent['mode'];
19
+ branchName: string;
20
+ }
17
21
  interface GitModePopoverProps {
18
22
  branch: string;
19
23
  status?: DaemonWorkspaceGitStatus;
20
24
  compact?: boolean;
21
25
  intent: SessionGitIntent;
22
26
  onIntentChange: (intent: SessionGitIntent) => void;
27
+ open?: boolean;
28
+ onOpenChange?: (open: boolean) => void;
29
+ draft?: GitModePopoverDraft;
30
+ onDraftChange?: (update: (current: GitModePopoverDraft) => GitModePopoverDraft) => void;
23
31
  }
24
- export declare function GitModePopover({ branch, status, compact, intent, onIntentChange, }: GitModePopoverProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function GitModePopover({ branch, status, compact, intent, onIntentChange, open: openProp, onOpenChange, draft, onDraftChange, }: GitModePopoverProps): import("react/jsx-runtime").JSX.Element;
25
33
  export {};
@@ -24,6 +24,7 @@ interface MessageItemProps {
24
24
  showRetryHint?: boolean;
25
25
  onRetryClick?: () => void;
26
26
  sendFailed?: boolean;
27
+ sendFailedStatus?: 'failed' | 'uncertain';
27
28
  onRetrySend?: () => void;
28
29
  /**
29
30
  * Open the in-place editor for this user message. Return `true` when a host
@@ -95,6 +95,7 @@ export interface MessageListProps {
95
95
  showRetryHint?: boolean;
96
96
  onRetryClick?: () => void;
97
97
  failedPromptMessageId?: string;
98
+ failedPromptStatus?: 'failed' | 'uncertain';
98
99
  onRetryFailedPrompt?: () => void;
99
100
  onBranchSession?: (branchRecordId?: string) => void | Promise<void>;
100
101
  onCanScrollToBottomChange?: (canScrollToBottom: boolean) => void;
@@ -16,5 +16,11 @@ export declare function followRangeFromRows(rows: readonly {
16
16
  }[], viewportTop: number, viewportBottom: number): TurnFollowRange | undefined;
17
17
  export interface TranscriptViewportProps extends MessageListProps {
18
18
  approvalOverlayActive?: boolean;
19
+ /**
20
+ * Enables session-context historical turn navigation and message deletion.
21
+ * Defaults to `true` for daemon callers; pass `false` for flat live hosts
22
+ * (including non-daemon surfaces co-mounted inside a daemon provider tree).
23
+ */
24
+ sessionViewportEnabled?: boolean;
19
25
  }
20
26
  export declare const TranscriptViewport: import("react").ForwardRefExoticComponent<TranscriptViewportProps & import("react").RefAttributes<MessageListHandle>>;
@@ -33,10 +33,14 @@ interface WorkspaceSelectorProps {
33
33
  onOpenExistingFolder: () => void;
34
34
  /** Touch activation can otherwise release over a newly opened option. */
35
35
  contentSide?: 'top' | 'bottom';
36
+ open?: boolean;
37
+ onOpenChange?: (open: boolean) => void;
38
+ newWorkspaceOpen?: boolean;
39
+ onNewWorkspaceOpenChange?: (open: boolean) => void;
36
40
  }
37
41
  /**
38
42
  * Composer workspace menu. Capability-gated creation actions and disabled
39
43
  * untrusted entries keep presentation aligned with daemon authorization.
40
44
  */
41
- export declare function WorkspaceSelector({ workspaces, selectedWorkspaceCwd, disabled, busy, alwaysVisible, menuItems, scratchSupported, existingFolderSupported, standaloneSupported, selectedStandalone, className, onSelectWorkspace, onSelectHostedWorkspace, onSelectStandalone, onCreateScratch, onOpenExistingFolder, contentSide, }: WorkspaceSelectorProps): import("react/jsx-runtime").JSX.Element | null;
45
+ export declare function WorkspaceSelector({ workspaces, selectedWorkspaceCwd, disabled, busy, alwaysVisible, menuItems, scratchSupported, existingFolderSupported, standaloneSupported, selectedStandalone, className, onSelectWorkspace, onSelectHostedWorkspace, onSelectStandalone, onCreateScratch, onOpenExistingFolder, contentSide, open: openProp, onOpenChange, newWorkspaceOpen: newWorkspaceOpenProp, onNewWorkspaceOpenChange, }: WorkspaceSelectorProps): import("react/jsx-runtime").JSX.Element | null;
42
46
  export {};
@@ -124,6 +124,7 @@ export interface ArtifactLibrarySessionJumpDeps {
124
124
  }>;
125
125
  getPendingJumpArtifactOpen: () => PendingArtifactJumpOpenRequest | undefined;
126
126
  setPendingJumpArtifactOpen: (request: PendingArtifactJumpOpenRequest | undefined) => void;
127
+ isCurrent: () => boolean;
127
128
  loadSidebarSession: (sessionId: string, workspaceCwd?: string) => Promise<void>;
128
129
  reportError: (error: unknown, fallbackMessage: string) => void;
129
130
  }
@@ -133,7 +134,8 @@ export interface ArtifactLibrarySessionJumpDeps {
133
134
  * pending artifact open is armed only AFTER unarchive resolves and immediately
134
135
  * before `loadSidebarSession`, so `resolvePendingArtifactJumpOpen` does not
135
136
  * cancel the request while the shell is still parked on the old session during
136
- * the awaited unarchive RPC.
137
+ * the awaited unarchive RPC. `isCurrent()` is checked after the awaited
138
+ * unarchive so a navigation started meanwhile is never overridden.
137
139
  */
138
140
  export declare function runArtifactLibrarySessionJump(deps: ArtifactLibrarySessionJumpDeps): Promise<void>;
139
141
  export {};
@@ -1,5 +1,7 @@
1
1
  import type { ManagedAgentSessionSummary } from './managed-agent-provider.js';
2
- import type { ChatRegion } from '../../chat-core/capabilities.js';
2
+ import type { ChatCapabilities } from '../../chat-core/contract.js';
3
+ import { type ChatRegion } from '../../chat-core/capabilities.js';
3
4
  export type ManagedCapabilityKey = keyof ManagedAgentSessionSummary['capabilities'];
4
5
  export declare const MANAGED_CHAT_CAPABILITY_MAP: Record<ManagedCapabilityKey, readonly ChatRegion[]>;
5
6
  export declare function isManagedCapabilityOn(value: boolean | null | undefined): boolean;
7
+ export declare function managedCapabilitiesFromSummary(capabilities: Partial<ManagedAgentSessionSummary['capabilities']> | undefined): ChatCapabilities;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { Message, PermissionRequest } from '../../adapters/types.js';
7
+ import type { Admission, ApprovalSelectionController, ChatCapabilities, ChatOperation, ChatStatusFacts, ComposerSubmit, ContextUsageController, ModelSelectionController, QuestionAnswer, SessionChatController, SessionOpsController } from '../../chat-core/contract.js';
8
+ import type { ManagedAgentPendingAction, ManagedAgentPendingQuestionAction, ManagedAgentQuestionAnswer, ManagedAgentSessionPhase } from './managed-agent-provider.js';
9
+ import { MAX_MANAGED_QUESTION_TEXT_LENGTH } from './managed-question-response.js';
10
+ export { MAX_MANAGED_QUESTION_TEXT_LENGTH };
11
+ type OperationState = ChatOperation['state'];
12
+ export interface ManagedTransportAdmission {
13
+ readonly admission: Admission;
14
+ readonly operationId?: string;
15
+ readonly turnId?: string;
16
+ }
17
+ export interface ManagedOperationSettlement {
18
+ readonly operationId: string;
19
+ readonly status: 'completed' | 'failed' | 'cancelled' | 'recovery_blocked';
20
+ }
21
+ export interface ManagedTurnSettlement {
22
+ readonly turnId: string;
23
+ readonly outcome: 'completed' | 'cancelled' | 'failed';
24
+ }
25
+ export interface ManagedActionSettlement {
26
+ readonly actionId: string;
27
+ readonly outcome: 'resolved' | 'expired' | 'superseded' | 'failed';
28
+ }
29
+ export interface ManagedChatControllerDeps {
30
+ readonly sessionId: string;
31
+ readonly storageKey: string;
32
+ readonly activeTurnId?: string;
33
+ readonly sessionPhase: ManagedAgentSessionPhase;
34
+ readonly messages: readonly Message[];
35
+ readonly transcriptState: 'loading' | 'ready' | 'error';
36
+ readonly hasOlderHistory?: boolean;
37
+ readonly loadingOlderHistory?: boolean;
38
+ readonly historyCapacityReached?: boolean;
39
+ readonly historyPaginationError?: boolean;
40
+ loadOlder?(options?: {
41
+ force?: boolean;
42
+ }): Promise<void>;
43
+ readonly pendingActions: readonly ManagedAgentPendingAction[];
44
+ readonly now?: () => number;
45
+ readonly statusFacts: ChatStatusFacts;
46
+ readonly capabilities: ChatCapabilities;
47
+ readonly modelSelection?: ModelSelectionController;
48
+ readonly approvalSelection?: ApprovalSelectionController;
49
+ readonly contextUsage?: ContextUsageController;
50
+ readonly sessionOps?: SessionOpsController;
51
+ submitPrompt(input: ComposerSubmit): Promise<ManagedTransportAdmission>;
52
+ cancelTurn(turnId: string): Promise<ManagedTransportAdmission>;
53
+ submitApproval(actionId: string, optionId: string): Promise<ManagedTransportAdmission>;
54
+ submitQuestion(actionId: string, answers: readonly ManagedAgentQuestionAnswer[]): Promise<ManagedTransportAdmission>;
55
+ subscribeOperationSettlement?(listener: (event: ManagedOperationSettlement) => void): () => void;
56
+ subscribeTurnSettlement?(listener: (event: ManagedTurnSettlement) => void): () => void;
57
+ subscribeActionSettlement?(listener: (event: ManagedActionSettlement) => void): () => void;
58
+ readonly signal?: AbortSignal;
59
+ }
60
+ export declare const MANAGED_QUESTION_SUBMIT_OPTION_ID = "submit";
61
+ export declare function mapManagedPhase(phase: ManagedAgentSessionPhase): 'idle' | 'running' | 'cancelling' | 'failed';
62
+ export declare function mapManagedOperationStatus(status: ManagedOperationSettlement['status']): Exclude<OperationState, 'pending'>;
63
+ export declare function toManagedQuestionPermissionRequest(action: ManagedAgentPendingQuestionAction): PermissionRequest;
64
+ export declare function normalizeManagedQuestionAnswers(action: ManagedAgentPendingQuestionAction, answers: readonly QuestionAnswer[]): ManagedAgentQuestionAnswer[] | null;
65
+ export declare function createManagedChatController(deps: ManagedChatControllerDeps): SessionChatController;
@@ -822,7 +822,7 @@ export interface paths {
822
822
  };
823
823
  get?: never;
824
824
  put?: never;
825
- /** @description Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. A cleanup recheck that no Hosted Harness can serve returns 503 recovery_runtime_unavailable; a typed terminal decline returns 409 hosted_turn_recovery_declined, and retrying cannot change a decline. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement. */
825
+ /** @description Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. A cleanup recheck that no Hosted Harness can serve returns 503 recovery_runtime_unavailable; a typed terminal decline returns 409 hosted_turn_recovery_declined, and retrying cannot change a decline. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. A Turn cancelled before Harness admission keeps its public Turn id, while its cleanup recheck targets the settled prompt the Harness names for the Session. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement. */
826
826
  post: operations["recheckWebShellSessionRecovery"];
827
827
  delete?: never;
828
828
  options?: never;
@@ -214,6 +214,18 @@ export interface ManagedAgentRequestOptions {
214
214
  export interface ManagedAgentCommandOptions extends ManagedAgentRequestOptions {
215
215
  idempotencyKey: string;
216
216
  }
217
+ export interface ManagedAgentOperationAdmission {
218
+ readonly sessionId: string;
219
+ readonly operationId: string;
220
+ readonly turnId?: string;
221
+ }
222
+ export interface ManagedAgentOperationSettlement extends ManagedAgentOperationAdmission {
223
+ readonly status: components['schemas']['WebShellOperation']['status'];
224
+ }
225
+ export interface ManagedAgentOperationObserver {
226
+ readonly onAccepted?: (admission: ManagedAgentOperationAdmission) => void;
227
+ readonly onSettlement?: (settlement: ManagedAgentOperationSettlement) => void;
228
+ }
217
229
  export type ManagedContextCompressionOperation = components['schemas']['WebShellContextCompressionOperation'];
218
230
  export type ManagedTask = components['schemas']['WebShellTask'];
219
231
  export type ManagedTaskPage = components['schemas']['WebShellTaskPage'];
@@ -348,7 +360,7 @@ export interface ManagedAgentProvider {
348
360
  listPending(sessionId: string, options: ManagedAgentRequestOptions & {
349
361
  includeChildren?: boolean;
350
362
  }): Promise<ManagedAgentPendingAction[]>;
351
- respond(action: ManagedAgentPendingAction, response: ManagedAgentActionResponse, options: ManagedAgentCommandOptions): Promise<void>;
363
+ respond(action: ManagedAgentPendingAction, response: ManagedAgentActionResponse, options: ManagedAgentCommandOptions & ManagedAgentOperationObserver): Promise<void>;
352
364
  };
353
365
  readonly toolResults?: ManagedToolResultReader;
354
366
  /** Present when the provider can list a Workspace's artifacts across Sessions. */
@@ -1,4 +1,11 @@
1
1
  import type { ManagedAgentPendingQuestionAction, ManagedAgentQuestionAnswer } from './managed-agent-provider';
2
2
  export declare const MAX_MANAGED_QUESTION_ANSWER_BYTES: number;
3
+ export declare const MAX_MANAGED_QUESTION_TEXT_LENGTH = 8192;
4
+ export type ManagedQuestionDraft = Record<string, {
5
+ optionIds: string[];
6
+ text: string;
7
+ }>;
8
+ export declare function managedQuestionAnswersFromDraft(action: ManagedAgentPendingQuestionAction, draft: ManagedQuestionDraft): ManagedAgentQuestionAnswer[];
9
+ export declare function exceedsManagedQuestionAnswerLimits(answers: readonly ManagedAgentQuestionAnswer[]): boolean;
3
10
  export declare function canonicalQuestionAnswers(action: ManagedAgentPendingQuestionAction, answers: readonly ManagedAgentQuestionAnswer[]): ManagedAgentQuestionAnswer[];
4
11
  export declare function questionResponseKey(action: ManagedAgentPendingQuestionAction, answers: readonly ManagedAgentQuestionAnswer[]): string;
@@ -1,5 +1,5 @@
1
1
  import type { ManagedAgentPendingAction, ManagedAgentActionResponse, ManagedAgentProvider, ManagedAgentSessionEvent } from './managed-agent-provider';
2
- import type { ManagedQuestionDraft } from './ManagedQuestionForm';
2
+ import type { ManagedQuestionDraft } from './managed-question-response';
3
3
  export declare function managedActionKey(action: ManagedAgentPendingAction): string;
4
4
  export interface ManagedActionsState {
5
5
  actions: readonly ManagedAgentPendingAction[];
@@ -0,0 +1,9 @@
1
+ import type { SessionChatController } from '../../chat-core/contract';
2
+ import type { ManagedAgentProvider } from './managed-agent-provider';
3
+ interface ManagedChatControllerOptions {
4
+ readonly provider: ManagedAgentProvider;
5
+ readonly clientId: string;
6
+ readonly sessionId: string | undefined;
7
+ }
8
+ export declare function useManagedChatController({ provider, clientId, sessionId, }: ManagedChatControllerOptions): SessionChatController | undefined;
9
+ export {};
@@ -1,5 +1,8 @@
1
- import type { ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
2
- export declare function useManagedTurnCancel(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, interactive: boolean, refreshSummary: () => Promise<ManagedAgentSessionSummary | undefined>): {
1
+ import type { ManagedAgentOperationObserver, ManagedAgentProvider, ManagedAgentSessionSummary } from './managed-agent-provider';
2
+ export interface ManagedTurnCancelObserver extends ManagedAgentOperationObserver {
3
+ readonly onError?: (error: unknown) => void;
4
+ }
5
+ export declare function useManagedTurnCancel(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, interactive: boolean, refreshSummary: () => Promise<ManagedAgentSessionSummary | undefined>, observer?: ManagedTurnCancelObserver): {
3
6
  request: () => Promise<void>;
4
7
  retry: () => Promise<void>;
5
8
  status: "failed" | "stopping" | "unconfirmed" | undefined;
@@ -1,9 +1,22 @@
1
1
  import type { PermissionRequest } from '../../adapters/types';
2
+ import type { QuestionAnswer } from '../../chat-core/contract';
3
+ export type AskUserQuestionDraft = Record<string, {
4
+ optionIds: string[];
5
+ text: string;
6
+ }>;
2
7
  interface AskUserQuestionProps {
3
8
  request: PermissionRequest;
4
- onConfirm: (id: string, selectedOption: string, answers?: Record<string, string>) => Promise<boolean>;
9
+ onConfirm: (id: string, selectedOption: string, answers?: Record<string, string>, structuredAnswers?: readonly QuestionAnswer[]) => Promise<boolean>;
5
10
  onError: (error: unknown, fallback: string) => void;
6
11
  variant?: 'inline' | 'floating';
12
+ /** Disables answering and submitting while keeping questions inspectable. */
13
+ disabled?: boolean;
14
+ /** Blocks only submission (Submit button and submit shortcuts) while keeping inputs editable. */
15
+ submitDisabled?: boolean;
16
+ /** Optional initial draft hydrated when a request mounts or changes identity. */
17
+ initialDraft?: AskUserQuestionDraft;
18
+ /** Emitted after user-driven answer edits so a host can preserve drafts across switches. */
19
+ onDraftChange?: (draft: AskUserQuestionDraft) => void;
7
20
  customInputLabel?: string;
8
21
  /**
9
22
  * Opens a side task that explains the pending question before the user
@@ -20,5 +33,5 @@ interface AskUserQuestionProps {
20
33
  */
21
34
  keyboardActive?: boolean;
22
35
  }
23
- export declare function AskUserQuestion({ request, onConfirm, onError, variant, keyboardActive, customInputLabel, onAskDetails, }: AskUserQuestionProps): import("react/jsx-runtime").JSX.Element | null;
36
+ export declare function AskUserQuestion({ request, onConfirm, onError, variant, disabled, submitDisabled, initialDraft, onDraftChange, keyboardActive, customInputLabel, onAskDetails, }: AskUserQuestionProps): import("react/jsx-runtime").JSX.Element | null;
24
37
  export {};
@@ -22,6 +22,7 @@ interface UserMessageProps {
22
22
  inputAnnotations?: readonly DaemonInputAnnotation[];
23
23
  isLocateFlashing?: boolean;
24
24
  sendFailed?: boolean;
25
+ sendFailedStatus?: 'failed' | 'uncertain';
25
26
  onRetrySend?: () => void;
26
27
  /** Render the message as an in-place editor instead of rendered content. */
27
28
  editing?: boolean;
@@ -0,0 +1 @@
1
+ export declare const SidebarHoverSuppressionContext: import("react").Context<boolean>;
@@ -33,6 +33,10 @@ export interface DaemonChatControllerDeps {
33
33
  readonly storageKey: string;
34
34
  readonly messages: readonly Message[];
35
35
  readonly transcriptState: 'loading' | 'ready' | 'error';
36
+ readonly hasOlderHistory?: boolean;
37
+ readonly loadingOlderHistory?: boolean;
38
+ readonly historyCapacityReached?: boolean;
39
+ readonly historyPaginationError?: boolean;
36
40
  loadOlder?(options?: {
37
41
  force?: boolean;
38
42
  }): Promise<void>;
@@ -52,6 +56,7 @@ export interface DaemonChatControllerDeps {
52
56
  subscribeDecisionSettlement(listener: (event: DaemonDecisionSettlement) => void): () => void;
53
57
  subscribeApprovalCurrency(listener: (requestId: string, live: boolean) => void): () => void;
54
58
  readonly liveApprovalRequestIds?: readonly string[];
59
+ readonly livePromptIds?: readonly string[];
55
60
  readonly settledPhase?: 'idle' | 'failed';
56
61
  readonly signal?: AbortSignal;
57
62
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export interface RemotePromptSidechannelEvent {
7
+ sessionId: string;
8
+ kind: 'prompt';
9
+ }
10
+ type RemotePromptListener = (event: RemotePromptSidechannelEvent) => void;
11
+ export declare function subscribeSidechannelRemotePrompt(listener: RemotePromptListener): () => void;
12
+ export declare function publishSidechannelRemotePrompt(event: RemotePromptSidechannelEvent): void;
13
+ export {};
@@ -26,6 +26,7 @@ export declare function useDaemonTranscriptStore(): DaemonTranscriptStore;
26
26
  export declare function useDaemonTranscriptHistory(): DaemonTranscriptHistory;
27
27
  export declare function useDaemonTurnNavigationStore(): DaemonTurnNavigationStore;
28
28
  export declare function useDaemonHistoryNavigationStore(): DaemonHistoryNavigationStore;
29
+ export declare function useOptionalDaemonHistoryNavigationStore(): DaemonHistoryNavigationStore | undefined;
29
30
  export declare function useDaemonTurnNavigationState(): DaemonTurnNavigationSnapshot;
30
31
  export declare function useDaemonTranscriptState(): DaemonTranscriptState;
31
32
  export declare function useDaemonTranscriptBlocks(): readonly DaemonTranscriptBlock[];
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Qwen Team
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export { DaemonSessionProvider, DEFAULT_MAX_BLOCKS, useDaemonActions, useOptionalDaemonActions, useDaemonSessionOwnerGuard, useDaemonWorkspaceEventSignals, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, } from './DaemonSessionProvider.js';
6
+ export { DaemonSessionProvider, DEFAULT_MAX_BLOCKS, useDaemonActions, useOptionalDaemonActions, useDaemonSessionOwnerGuard, useDaemonWorkspaceEventSignals, useDaemonActiveTodoList, useDaemonConnection, useDaemonPendingPermissions, useDaemonPromptStatus, useDaemonSessionNotices, useDaemonStreamingState, useDaemonSession, useDaemonTranscriptBlocks, useDaemonTranscriptHistory, useDaemonTranscriptState, useDaemonTranscriptStore, useDaemonTurnNavigationState, useDaemonTurnNavigationStore, useOptionalDaemonHistoryNavigationStore, } from './DaemonSessionProvider.js';
7
7
  export type { DaemonTranscriptHistory } from './DaemonSessionProvider.js';
8
8
  export { createDaemonTurnNavigationStore } from './turn-navigation-store.js';
9
9
  export type { CreateDaemonTurnNavigationStoreOptions, DaemonPromptAdmission, DaemonProvisionalTurn, DaemonSelectedTurnState, DaemonTurnIndexPage, DaemonTurnLocation, DaemonTurnNavigationClient, DaemonTurnNavigationError, DaemonTurnNavigationSession, DaemonTurnNavigationSnapshot, DaemonTurnNavigationStore, } from './turn-navigation-store.js';
@@ -312,6 +312,8 @@ export interface DaemonCommandInfo {
312
312
  export interface SendPromptOptions {
313
313
  /** Original text declared at the user submission boundary, before host preparation. */
314
314
  submittedPrompt?: string;
315
+ /** Keep host-initiated commands out of the user's cross-device input history. */
316
+ suppressInputHistory?: boolean;
315
317
  source?: 'mcp-app';
316
318
  optimisticUserMessage?: boolean;
317
319
  /**
@@ -331,6 +333,8 @@ export interface SendPromptOptions {
331
333
  retry?: boolean;
332
334
  /** Fired after local validation, immediately before dispatch to the daemon. */
333
335
  onAdmissionStarted?: () => void;
336
+ /** Caller-generated key used to deduplicate retried prompt admissions. */
337
+ idempotencyKey?: string;
334
338
  /** Revalidates the caller before every HTTP attempt, including client recovery. */
335
339
  beforeDispatch?: (clientId: string | undefined) => void;
336
340
  /**
@@ -434,7 +438,7 @@ export interface DaemonSessionActions {
434
438
  * prompt status, or connection. The turn runs on the daemon after the
435
439
  * client detaches; a later loadSession attaches fresh.
436
440
  */
437
- sendDetachedPrompt(session: DaemonSessionClient, text: string, options?: Pick<SendPromptOptions, 'submittedPrompt' | 'images' | 'files' | 'inputAnnotations' | 'retry' | 'onAdmissionStarted' | 'onAdmitted'>): Promise<SubmitPromptResult>;
441
+ sendDetachedPrompt(session: DaemonSessionClient, text: string, options?: Pick<SendPromptOptions, 'submittedPrompt' | 'suppressInputHistory' | 'images' | 'files' | 'inputAnnotations' | 'retry' | 'idempotencyKey' | 'onAdmissionStarted' | 'onAdmitted'>): Promise<SubmitPromptResult>;
438
442
  cancel(): Promise<void>;
439
443
  setModel(modelId: string): Promise<SetModelResult>;
440
444
  refreshModels(beforeRefresh?: (target: {
@@ -393,6 +393,17 @@ export interface DaemonAutofixPrWatchList {
393
393
  error: string;
394
394
  }>;
395
395
  }
396
+ /** Input history kinds persisted per workspace on the daemon. */
397
+ export type DaemonInputHistoryKind = 'prompt' | 'shell';
398
+ /** Result of `GET /workspace/input-history` (or workspace-qualified). */
399
+ export type DaemonInputHistoryResult = {
400
+ notModified: true;
401
+ } | {
402
+ notModified: false;
403
+ kind: DaemonInputHistoryKind;
404
+ entries: string[];
405
+ revision: string;
406
+ };
396
407
  /** One entry of a Channel's event journal (`GET .../channels/events`). */
397
408
  export type DaemonChannelEventEntry = DaemonChannelEvent;
398
409
  export type DaemonChannelEventList = DaemonChannelEventsSnapshot;
@@ -536,6 +547,18 @@ export interface DaemonWorkspaceActions extends Pick<DaemonClient, 'getSubscript
536
547
  /** The `/autofix-pr` watches of a workspace's clone; `workspaceId` as for
537
548
  * `listScheduledTasks`. Only to a daemon advertising `autofix_pr_watches`. */
538
549
  listAutofixPrWatches(workspaceId?: string): Promise<DaemonAutofixPrWatchList>;
550
+ /** Workspace-scoped prompt/shell input history (`workspace_input_history`). */
551
+ loadInputHistory(opts: {
552
+ kind: DaemonInputHistoryKind;
553
+ limit?: number;
554
+ workspaceId?: string;
555
+ ifNoneMatch?: string;
556
+ }): Promise<DaemonInputHistoryResult>;
557
+ recordInputHistory(opts: {
558
+ kind: DaemonInputHistoryKind;
559
+ entry: string;
560
+ workspaceId?: string;
561
+ }): Promise<void>;
539
562
  /** The provider workspace's Channel event journal, newest last. A scoped
540
563
  * workspace reads its own through its client. */
541
564
  listChannelEvents(query?: DaemonChannelEventsQuery): Promise<DaemonChannelEventList>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /** The bundled card asks for a copy; downloads use `ui/download-file`. */
7
+ export declare const COPY_CAPABILITY = "qwen-code/generated-ui-copy";
8
+ export declare const COPY_WRITE = "qwen-code/generated-ui-copy/write";
9
+ export type EffectStatus = 'copied' | 'copy-pending' | 'downloaded' | 'refused';
10
+ export interface DownloadFile {
11
+ filename: string;
12
+ mimeType: string;
13
+ text: string;
14
+ }
15
+ /** The text of a valid copy request, checked here rather than trusted. */
16
+ export declare function copyRequestText(params: unknown): string | undefined;
17
+ /** A safe name with the extension of its type; never a path. */
18
+ export declare function sanitizeFilename(name: string, mimeType: string): string;
19
+ /**
20
+ * The file of a valid `ui/download-file` request: exactly one embedded text
21
+ * resource of an allowed type and size. Links and binary content are refused.
22
+ */
23
+ export declare function downloadRequestFile(params: unknown): DownloadFile | undefined;
24
+ /** Whether the browser accepted the write; it may refuse a stale gesture. */
25
+ export declare function writeClipboard(text: string): Promise<boolean>;
26
+ /** Starts the browser download; whether the file is saved is up to it. */
27
+ export declare function startDownload(file: DownloadFile, doc?: Document): void;
@@ -1,7 +1,16 @@
1
1
  export declare function getPromptHistoryStorageKey(workspaceCwd?: string): string;
2
+ export declare function getShellHistoryStorageKey(workspaceCwd?: string): string;
3
+ /**
4
+ * Merges local entries with authoritative daemon entries (both oldest-to-newest).
5
+ * Keeps unique local-only entries first so pre-existing browser history is not
6
+ * lost, then appends canonical server entries at the newest tail.
7
+ */
8
+ export declare function mergeRemoteInputHistory(localEntries: readonly string[], remoteEntries: readonly string[], previousRemoteEntries?: readonly string[] | null): string[];
2
9
  export declare function pushInputHistoryEntry(storageKey: string, text: string, fallbackStorageKey?: string): void;
3
- export declare function useInputHistory(storageKey?: string, fallbackStorageKey?: string): {
10
+ export declare function useInputHistory(storageKey?: string, fallbackStorageKey?: string, remoteHistoryEnabled?: boolean): {
4
11
  push: (text: string) => void;
12
+ applyRemoteEntries: (remoteEntries: readonly string[], expectedMutationVersion?: number, remoteRevision?: string) => boolean;
13
+ getMutationVersion: () => number;
5
14
  navigateUp: (currentText: string) => string | null;
6
15
  navigateDown: () => string | null;
7
16
  isNavigating: () => boolean;
@@ -9,6 +9,7 @@ declare const SETTING_KEYS: {
9
9
  readonly 'setting:git-pr-co-author': "general.gitCoAuthor.pr";
10
10
  readonly 'setting:language': "general.language";
11
11
  readonly 'setting:output-language': "general.outputLanguage";
12
+ readonly 'setting:display-language': "general.displayLanguage";
12
13
  readonly 'setting:prevent-system-sleep': "general.preventSystemSleep";
13
14
  readonly 'setting:review-attribution': "review.attribution";
14
15
  readonly 'setting:review-sandbox': "review.sandbox";
@@ -1,5 +1,6 @@
1
1
  export declare class PromptDispatchCancelledError extends Error {
2
2
  name: string;
3
3
  }
4
- export declare function isMcpAppPromptAdmissionRejected(error: unknown): boolean;
5
4
  export declare function isDefinitelyRejectedPromptAdmission(error: unknown): boolean;
5
+ export declare function isMcpAppPromptAdmissionRejected(error: unknown): boolean;
6
+ export declare function createPromptIdempotencyKey(): string;