@qwen-code/web-shell 0.28.0 → 0.28.1-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICES.txt +464 -0
- package/README.md +4 -3
- package/dist/{PierreFilePreview-D6shMVrF.js → PierreFilePreview-CsARQefS.js} +1 -1
- package/dist/{SpreadsheetPreview-CI7hXBn_.js → SpreadsheetPreview-D3YGKe0n.js} +2 -2
- package/dist/{WorkspaceFileBrowser-D2lUYsk2.js → WorkspaceFileBrowser-1GbG0WLt.js} +189 -189
- package/dist/WorkspacePdfRangePreview-it3G4-Se.js +22384 -0
- package/dist/{agents-route-Cekk3UIP.js → agents-route-Dbjm9Y2P.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/i18n-ru-CfZvlNRX.js +4399 -0
- package/dist/i18n-zh-cn-oYBQlyci.js +4455 -0
- package/dist/i18n-zh-tw-meIHyJiH.js +5548 -0
- package/dist/{index-BNap2Fh4.js → index-ChVhTKLB.js} +74375 -78989
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/terminal-runtime-BQaN1NCS.js +7881 -0
- package/dist/transcript.js +15235 -14935
- package/dist/types/App.d.ts +6 -2
- package/dist/types/adapters/messageTypes.d.ts +10 -1
- package/dist/types/adapters/transcriptAdapter.d.ts +8 -0
- package/dist/types/chat-core/capabilities.d.ts +3 -0
- package/dist/types/chat-core/contract.d.ts +106 -0
- package/dist/types/chat-core/intent.d.ts +8 -0
- package/dist/types/completions/sendCompletion.d.ts +28 -0
- package/dist/types/completions/slashCompletion.d.ts +8 -1
- package/dist/types/components/ChatContextHeader.d.ts +8 -2
- package/dist/types/components/ChatEditor.d.ts +3 -1
- package/dist/types/components/ChatPane.d.ts +3 -1
- package/dist/types/components/ComposerStatusStack.d.ts +8 -0
- package/dist/types/components/ComposerTaskChips.d.ts +5 -2
- package/dist/types/components/GoalStatusStrip.d.ts +9 -0
- package/dist/types/components/RestartRecoveryPanel.d.ts +22 -0
- package/dist/types/components/SessionGoalMarker.d.ts +24 -0
- package/dist/types/components/UnavailableModelTooltip.d.ts +4 -2
- package/dist/types/components/WebShellTranscript.d.ts +3 -1
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +38 -3
- package/dist/types/components/artifacts/ArtifactsListPanel.d.ts +13 -0
- package/dist/types/components/artifacts/SessionPanel.d.ts +19 -0
- package/dist/types/components/artifacts/WorkspacePdfRangePreview.d.ts +10 -0
- package/dist/types/components/artifacts/artifactUtils.d.ts +9 -5
- package/dist/types/components/artifacts/change-overview.d.ts +21 -14
- package/dist/types/components/channels/channel-platform.d.ts +1 -1
- package/dist/types/components/managed/ManagedArtifactLibraryPage.d.ts +15 -0
- package/dist/types/components/managed/ManagedSurfaceDecisionsDialog.d.ts +1 -0
- package/dist/types/components/managed/ManagedTerminalPanel.d.ts +0 -1
- package/dist/types/components/managed/ManagedWorkspaceNavigation.d.ts +2 -1
- package/dist/types/components/managed/WorkspaceBindingCreator.d.ts +14 -2
- package/dist/types/components/managed/chat-capabilities.d.ts +5 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +100 -6
- package/dist/types/components/managed/java-managed-agent-client.d.ts +21 -0
- package/dist/types/components/managed/managed-agent-provider.d.ts +4 -1
- package/dist/types/components/managed/managed-artifact-library-messages.d.ts +8 -0
- package/dist/types/components/managed/managed-artifact-library-messages.transcript-stub.d.ts +8 -0
- package/dist/types/components/managed/managed-diagnostics-messages.d.ts +167 -167
- package/dist/types/components/managed/managed-extension-install.d.ts +3 -0
- package/dist/types/components/managed/managed-recovery-messages.d.ts +3 -1
- package/dist/types/components/managed/managed-surface-decisions.d.ts +10 -0
- package/dist/types/components/managed/managed-tool-result-types.d.ts +6 -0
- package/dist/types/components/managed/use-managed-recovery.d.ts +1 -2
- package/dist/types/components/messages/AssistantMessage.d.ts +4 -1
- package/dist/types/components/messages/AssistantMessageRow.d.ts +13 -0
- package/dist/types/components/messages/AssistantMessageRow.transcript-stub.d.ts +6 -0
- package/dist/types/components/messages/BtwMessage.d.ts +6 -0
- package/dist/types/components/messages/Markdown.d.ts +1 -0
- package/dist/types/components/messages/MemoryMessage.d.ts +1 -2
- package/dist/types/components/messages/ModAssistantMessage.d.ts +15 -0
- package/dist/types/components/messages/UserMessage.d.ts +5 -1
- package/dist/types/components/messages/WorkflowExecutionView.d.ts +4 -0
- package/dist/types/components/messages/mod-rows.d.ts +53 -0
- package/dist/types/components/panels/EnvironmentPanel.d.ts +1 -7
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
- package/dist/types/components/streaming-tail.d.ts +8 -0
- package/dist/types/components/streaming-tail.transcript-stub.d.ts +6 -0
- package/dist/types/components/terminal/TerminalPanel.d.ts +0 -1
- package/dist/types/components/terminal/terminal-runtime.d.ts +8 -0
- package/dist/types/components/terminal/use-terminal-runtime.d.ts +6 -0
- package/dist/types/components/ui/dialog.d.ts +1 -0
- package/dist/types/components/ui/drawer.d.ts +1 -1
- package/dist/types/constants/approvalModes.d.ts +7 -0
- package/dist/types/constants/localCommands.d.ts +3 -1
- package/dist/types/constants/sessions.d.ts +1 -0
- package/dist/types/customization.d.ts +16 -3
- package/dist/types/daemon/chat-capabilities.d.ts +3 -0
- package/dist/types/daemon/chat-controller.d.ts +67 -0
- package/dist/types/daemon/chat-intents.d.ts +88 -0
- package/dist/types/daemon/permission-signals.d.ts +35 -0
- package/dist/types/daemon/session/types.d.ts +23 -0
- package/dist/types/daemon/useDaemonChatController.d.ts +15 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonChannelEvents.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +14 -2
- package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -1
- package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +6 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +5 -0
- package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +5 -0
- package/dist/types/generated-ui/instance-store.d.ts +4 -1
- package/dist/types/generated-ui/view-state.d.ts +51 -0
- package/dist/types/hooks/useAtMentionSources.d.ts +1 -1
- package/dist/types/hooks/useComposerCore.d.ts +4 -2
- package/dist/types/hooks/useComposerWorkspace.d.ts +7 -0
- package/dist/types/hooks/useIsTouchComposer.d.ts +1 -0
- package/dist/types/hooks/useModelConfigurations.d.ts +7 -0
- package/dist/types/hooks/useModelRefresh.d.ts +1 -0
- package/dist/types/hooks/useScopedSessions.d.ts +1 -0
- package/dist/types/hooks/useSessionArtifacts.d.ts +7 -0
- package/dist/types/hooks/useSubSessionTasks.d.ts +8 -0
- package/dist/types/i18n-catalogs.d.ts +3 -0
- package/dist/types/i18n-catalogs.eager.d.ts +3 -0
- package/dist/types/i18n-language.d.ts +2 -0
- package/dist/types/i18n-ru.d.ts +7 -0
- package/dist/types/i18n-zh-cn.d.ts +7 -0
- package/dist/types/i18n-zh-tw.d.ts +8 -0
- package/dist/types/i18n-zh-tw.transcript-stub.d.ts +6 -0
- package/dist/types/i18n.d.ts +7 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/mcpAppHostContext.d.ts +4 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +1 -0
- package/dist/types/session-catalog/session-live-work.d.ts +39 -0
- package/dist/types/settings.d.ts +3 -0
- package/dist/types/subagentDetailsContext.d.ts +9 -1
- package/dist/types/trajectory/buildTimeline.d.ts +1 -1
- package/dist/types/trajectory/types.d.ts +2 -0
- package/dist/types/utils/askUserPermission.d.ts +1 -1
- package/dist/types/utils/composerTasks.d.ts +16 -4
- package/dist/types/utils/imageIngestion.d.ts +1 -0
- package/dist/types/utils/planMode.d.ts +2 -2
- package/dist/types/utils/sendCommand.d.ts +31 -0
- package/dist/types/utils/sessionPreparation.d.ts +16 -14
- package/dist/types/vision-timeout-command.d.ts +17 -0
- package/dist/types/voice/use-voice-workspace-settings.d.ts +1 -0
- package/dist/types/voice/voice-workspace-target.d.ts +1 -0
- package/dist/useDaemonMidTurnInjected-BjQ9zxRv.js +23539 -0
- package/package.json +4 -1
- package/dist/types/components/managed/ManagedRecoveryPanel.d.ts +0 -9
- package/dist/useDaemonMidTurnInjected-FRZ0JLKH.js +0 -31564
package/dist/types/App.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ export interface WebShellProps {
|
|
|
142
142
|
*/
|
|
143
143
|
onThemeResolved?: (theme: WebShellTheme) => void;
|
|
144
144
|
/** UI language for the web-shell. Defaults to `?language=` or browser language. */
|
|
145
|
-
language?: 'en' | 'zh-CN' | 'zh' | 'zh-cn' | 'ru' | 'ru-ru';
|
|
145
|
+
language?: 'en' | 'zh-CN' | 'zh' | 'zh-cn' | 'zh-TW' | 'zh-tw' | 'zh-HK' | 'zh-hk' | 'zh-Hant' | 'zh-hant' | 'zh-MO' | 'zh-mo' | 'ru' | 'ru-ru';
|
|
146
146
|
/** Called when `/language ui` changes the web-shell UI language. */
|
|
147
147
|
onLanguageChange?: (language: WebShellLanguage) => void;
|
|
148
148
|
/**
|
|
@@ -235,6 +235,8 @@ export interface WebShellProps {
|
|
|
235
235
|
allowedApprovalModes?: readonly WebShellApprovalMode[];
|
|
236
236
|
/** Composer presentation shared by the main chat, split panes, and side tasks. */
|
|
237
237
|
composerVariant?: 'default' | 'simple';
|
|
238
|
+
/** Show the composer focus glow and typing animation. Defaults to true. */
|
|
239
|
+
composerGlowEnabled?: boolean;
|
|
238
240
|
/** Optionally filter main-model entries without changing shared defaults. */
|
|
239
241
|
mainModelFilter?: (model: ModelDialogModel) => boolean;
|
|
240
242
|
/** Stack completion details vertically for narrow embedded hosts. */
|
|
@@ -413,6 +415,8 @@ export interface WebShellProps {
|
|
|
413
415
|
markdownTableMode?: MarkdownTableMode;
|
|
414
416
|
/** Enable virtual scrolling only when rendered transcript rows exceed this threshold. Defaults to 200. */
|
|
415
417
|
virtualScrollThreshold?: number;
|
|
418
|
+
/** Extra transcript rows to render on each side of the viewport when virtualized. Defaults to 15. */
|
|
419
|
+
overscan?: number;
|
|
416
420
|
/** 会话消息数超过此阈值时显示搜索入口,默认 10。 */
|
|
417
421
|
conversationSearchThreshold?: number;
|
|
418
422
|
/** Custom Markdown behavior for assistant content only. */
|
|
@@ -483,4 +487,4 @@ export declare function canArchiveSideTaskSummary(session: Pick<DaemonSessionSum
|
|
|
483
487
|
export declare function mergeSideTaskCatalog(catalog: SideTaskCatalogState, parentSessionId: string, listedItems: SideTaskListItem[], optimisticIds: ReadonlySet<string>): SideTaskCatalogState;
|
|
484
488
|
export declare function getEnvironmentAgentTasks(messages: readonly Message[], sessionTasks: readonly DaemonSessionTaskWithWorkflowStatus[]): EnvironmentAgentTask[];
|
|
485
489
|
export declare function mergeAgentTrace(liveAgents: readonly EnvironmentAgentTask[], trace: DaemonAgentTrace | undefined, now?: number): EnvironmentAgentTask[];
|
|
486
|
-
export declare function App({ onRefreshModels, askUserFreeTextLabel, onSessionIdChange, onSessionInfoChange, onModelChange, onSessionCreated, managedAgentProvider, theme: providedTheme, onThemeChange, onThemeResolved, language: providedLanguage, onLanguageChange, onLanguageResolved, brand: providedBrand, onBrandResolved, className: externalClassName, style: externalStyle, shadowDom, onConnectionChange, onStreamingStateChange, onError, onBugReport, hiddenSlashCommands, slashCommandCategoryOrder, onSlashCommand, builtinAtProviders, atProviders, composerTagIcons, fileUploadEnabled, fileUploadDirectory, artifact, fileDropAction, renderToolHeaderExtra, alignManagedChatWithHost, showManagedSessionHeader, renderWelcomeHeader, renderWelcomeFooter, mobileWelcomeFooterMiddle, parseUserMessageContent, renderUserMessageContent, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, renderAssistantTurnFooter, assistantFeedback, getAssistantSourcesIcon, sourceReferences, renderComposerToolbarStart, renderComposerToolbarEnd, renderComposerToolbarRight, renderComposerHeader, renderComposerFooter, renderChatHeader, renderFooter, bottomStatusItems, chatMaxWidth, sidebar, settings: settingsPresentation, modelManagement, modelPicker, unavailableModels, mountUnavailableModelTooltip, header, rightPanel, showToolCalls, environmentPanel, splitSessionIds: externalSplitSessionIds, onSplitSessionIdsChange, renderPaneHeaderActions, onRightPanelOpen, onFileReviewOpen, onWorkspaceFileOpen, onPickWorkspaceDirectory, onInsightReportOpen, onContextUsageOpen, messageTurnOutputs, filterArtifact, shellRef, composerToolbarActions, hostOwnsAddMenu, allowedApprovalModes: allowedApprovalModesProp, composerVariant, mainModelFilter, compactComposerOverlays, autoSubmitSlashCommands, additionalSlashCommands, contextUsageAlwaysVisible, userMessageEditing, onUserMessageEditRequest, cycleModeOnTab, sessionSourceType, subscriptionDraft, composerToolbarAdditionalActions, composerPlaceholders, compactThinking, hostOwnsEditDiffPreview, collapseCompletedTurns, markdownTableMode, virtualScrollThreshold, conversationSearchThreshold, markdown, loadingPhrases, onAgentTasksChange, onTranscriptChange, onSessionArtifactsChange, onToast, composerRef, onComposerReady, composerInput, composerInputVersion, onSessionChange, onAssistantTurnSettled, prepareSubmit, onSubmitBefore, restartSseOnPrompt, historyPageSize, initialSelectedWorkspaceCwd, lockedWorkspaceCwd, lockedWorkspaceCapability, }?: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
490
|
+
export declare function App({ onRefreshModels, askUserFreeTextLabel, onSessionIdChange, onSessionInfoChange, onModelChange, onSessionCreated, managedAgentProvider, theme: providedTheme, onThemeChange, onThemeResolved, language: providedLanguage, onLanguageChange, onLanguageResolved, brand: providedBrand, onBrandResolved, className: externalClassName, style: externalStyle, shadowDom, onConnectionChange, onStreamingStateChange, onError, onBugReport, hiddenSlashCommands, slashCommandCategoryOrder, onSlashCommand, builtinAtProviders, atProviders, composerTagIcons, fileUploadEnabled, fileUploadDirectory, artifact, fileDropAction, renderToolHeaderExtra, alignManagedChatWithHost, showManagedSessionHeader, renderWelcomeHeader, renderWelcomeFooter, mobileWelcomeFooterMiddle, parseUserMessageContent, renderUserMessageContent, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, renderAssistantTurnFooter, assistantFeedback, getAssistantSourcesIcon, sourceReferences, renderComposerToolbarStart, renderComposerToolbarEnd, renderComposerToolbarRight, renderComposerHeader, renderComposerFooter, renderChatHeader, renderFooter, bottomStatusItems, chatMaxWidth, sidebar, settings: settingsPresentation, modelManagement, modelPicker, unavailableModels, mountUnavailableModelTooltip, header, rightPanel, showToolCalls, environmentPanel, splitSessionIds: externalSplitSessionIds, onSplitSessionIdsChange, renderPaneHeaderActions, onRightPanelOpen, onFileReviewOpen, onWorkspaceFileOpen, onPickWorkspaceDirectory, onInsightReportOpen, onContextUsageOpen, messageTurnOutputs, filterArtifact, shellRef, composerToolbarActions, hostOwnsAddMenu, allowedApprovalModes: allowedApprovalModesProp, composerVariant, composerGlowEnabled, mainModelFilter, compactComposerOverlays, autoSubmitSlashCommands, additionalSlashCommands, contextUsageAlwaysVisible, userMessageEditing, onUserMessageEditRequest, cycleModeOnTab, sessionSourceType, subscriptionDraft, composerToolbarAdditionalActions, composerPlaceholders, compactThinking, hostOwnsEditDiffPreview, collapseCompletedTurns, markdownTableMode, virtualScrollThreshold, overscan, conversationSearchThreshold, markdown, loadingPhrases, onAgentTasksChange, onTranscriptChange, onSessionArtifactsChange, onToast, composerRef, onComposerReady, composerInput, composerInputVersion, onSessionChange, onAssistantTurnSettled, prepareSubmit, onSubmitBefore, restartSseOnPrompt, historyPageSize, initialSelectedWorkspaceCwd, lockedWorkspaceCwd, lockedWorkspaceCapability, }?: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { DaemonBackgroundTurn, DaemonSessionArtifactInput, DaemonInputAnnotation, QwenAgentMessageMeta } from '@qwen-code/sdk/daemon';
|
|
6
|
+
import type { DaemonBackgroundTurn, DaemonSessionArtifactInput, DaemonInputAnnotation, DaemonInputSourceAnnotation, QwenAgentMessageMeta } from '@qwen-code/sdk/daemon';
|
|
7
7
|
import type { components } from '../components/managed/generated/managed-agent-api.js';
|
|
8
8
|
export interface AttachmentPreviewRequest {
|
|
9
9
|
name: string;
|
|
@@ -130,6 +130,8 @@ export interface DaemonUserMessage extends DaemonMessageMeta {
|
|
|
130
130
|
attachmentId?: string;
|
|
131
131
|
}>;
|
|
132
132
|
inputAnnotations?: DaemonInputAnnotation[];
|
|
133
|
+
/** The other session that sent this message (`/send`, a sub-session launch). */
|
|
134
|
+
sentFrom?: DaemonInputSourceAnnotation;
|
|
133
135
|
source?: string;
|
|
134
136
|
/** `_meta.qwenAgentMessage` of an @-mention (`kind: 'agent_mention'`). */
|
|
135
137
|
agentMessage?: QwenAgentMessageMeta;
|
|
@@ -140,6 +142,10 @@ export interface DaemonAssistantMessage extends DaemonMessageMeta {
|
|
|
140
142
|
role: 'assistant';
|
|
141
143
|
content: string;
|
|
142
144
|
isStreaming?: boolean;
|
|
145
|
+
/** The block's `meta.source`, such as `slash_command` for command output. */
|
|
146
|
+
source?: string;
|
|
147
|
+
/** Identifies subagent output rendered without its parent tool card. */
|
|
148
|
+
parentToolCallId?: string;
|
|
143
149
|
branchRecordId?: string;
|
|
144
150
|
/**
|
|
145
151
|
* Token usage folded onto this assistant block by the daemon SDK reducer
|
|
@@ -218,6 +224,9 @@ export interface DaemonBtwMessage extends DaemonMessageMeta {
|
|
|
218
224
|
question: string;
|
|
219
225
|
answer: string;
|
|
220
226
|
isPending: boolean;
|
|
227
|
+
/** Set when the question explains a background task, so the task's detail
|
|
228
|
+
* panel can mirror the answer in place. Absent for typed /btw. */
|
|
229
|
+
taskId?: string;
|
|
221
230
|
}
|
|
222
231
|
export interface DaemonInsightProgressMessage extends DaemonMessageMeta {
|
|
223
232
|
id: string;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { DaemonTranscriptBlock } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
2
|
import type { PermissionRequest } from './types.js';
|
|
3
3
|
export declare function extractPendingPermission(blocks: readonly DaemonTranscriptBlock[]): PermissionRequest | null;
|
|
4
|
+
/**
|
|
5
|
+
* Cheap block-level form of `isAskUserPermission(extractPendingPermission(...))`:
|
|
6
|
+
* it reads only the tool name and raw input the classification needs, without
|
|
7
|
+
* building the preview content (`escapePreviewText` of the serialized input).
|
|
8
|
+
* Callers that classify a pending set on every render use this so a streaming
|
|
9
|
+
* delta does not re-serialize each outstanding approval's payload.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isAskUserPermissionBlock(block: DaemonTranscriptBlock): boolean;
|
|
4
12
|
export declare function escapePreviewText(text: string): string;
|
|
@@ -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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SlashArgumentCompleter } from './slashCompletion';
|
|
2
|
+
import { SEND_COMMAND_OPTIONS } from '../utils/sendCommand';
|
|
3
|
+
type SendOption = (typeof SEND_COMMAND_OPTIONS)[number];
|
|
4
|
+
export interface SendCompletionChoice {
|
|
5
|
+
/** What goes into the command line. */
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
detail?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SendCompletionSources {
|
|
11
|
+
/** `--workspace` choices; `value` is what the command resolves to `cwd`. */
|
|
12
|
+
workspaces: ReadonlyArray<SendCompletionChoice & {
|
|
13
|
+
cwd: string;
|
|
14
|
+
}>;
|
|
15
|
+
/** The workspace `/send` targets without `--workspace`. */
|
|
16
|
+
currentWorkspaceCwd: string;
|
|
17
|
+
resolveWorkspace(value: string): string;
|
|
18
|
+
/** `--session-id` choices for a workspace, or `undefined` until loaded. */
|
|
19
|
+
sessionsFor(workspaceCwd: string): readonly SendCompletionChoice[] | undefined;
|
|
20
|
+
optionDetail(option: SendOption): string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Completes `/send` options and their values: option names, registered
|
|
24
|
+
* workspaces, and the sessions of the chosen workspace. Once the message
|
|
25
|
+
* starts, it offers nothing. Each item replaces the line up to the cursor.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createSendArgumentCompleter(sources: SendCompletionSources): SlashArgumentCompleter;
|
|
28
|
+
export {};
|
|
@@ -28,9 +28,16 @@ export interface SlashCommandCompletionResult {
|
|
|
28
28
|
items: SlashCommandCompletionItem[];
|
|
29
29
|
}
|
|
30
30
|
type Translate = (key: string) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Completes one command's arguments from data the static trees cannot hold
|
|
33
|
+
* (workspaces, sessions). Gets the line up to the cursor; returns `undefined`
|
|
34
|
+
* when the line is not its command, `null` for no menu. `from`/`to` are
|
|
35
|
+
* offsets within the line.
|
|
36
|
+
*/
|
|
37
|
+
export type SlashArgumentCompleter = (lineTextBeforeCursor: string) => SlashCommandCompletionResult | null | undefined;
|
|
31
38
|
export declare function getMissingSlashPrefixCompletion(text: string, commands: CommandInfo[]): string | null;
|
|
32
39
|
export declare function getImplicitTabCompletion(text: string, commands: CommandInfo[], language: WebShellLanguage): string | null;
|
|
33
40
|
export declare function getSlashCommandArgumentHint(text: string, commands: CommandInfo[], language: WebShellLanguage, skillNames?: ReadonlySet<string>): string | null;
|
|
34
|
-
export declare function getSlashCommandCompletionResult(text: string, cursor: number, commands: CommandInfo[], skills?: SkillInfo[], language?: WebShellLanguage, translate?: Translate, categoryOrder?: CommandDisplayCategoryOrder, includeEmpty?: boolean): SlashCommandCompletionResult | null;
|
|
41
|
+
export declare function getSlashCommandCompletionResult(text: string, cursor: number, commands: CommandInfo[], skills?: SkillInfo[], language?: WebShellLanguage, translate?: Translate, categoryOrder?: CommandDisplayCategoryOrder, includeEmpty?: boolean, argumentCompleter?: SlashArgumentCompleter): SlashCommandCompletionResult | null;
|
|
35
42
|
export declare function slashCompletionSource(getCommands: () => CommandInfo[], getSkills?: () => SkillInfo[], getLanguage?: () => WebShellLanguage, translate?: Translate, getCategoryOrder?: () => CommandDisplayCategoryOrder | undefined): (context: CompletionContext) => CompletionResult | null;
|
|
36
43
|
export {};
|
|
@@ -33,10 +33,16 @@ interface ChatContextHeaderProps {
|
|
|
33
33
|
onOpenContextUsage?: () => void;
|
|
34
34
|
/** Session artifact count; the artifact entry shows when greater than 0. */
|
|
35
35
|
artifactCount?: number;
|
|
36
|
-
/**
|
|
36
|
+
/** Toggles the right panel's artifacts list tab; hidden when omitted. */
|
|
37
37
|
onOpenArtifacts?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the artifacts list tab is the active right-panel tab. With zero
|
|
40
|
+
* artifacts the entry still renders as the close affordance only in that
|
|
41
|
+
* case, not for unrelated open tabs.
|
|
42
|
+
*/
|
|
43
|
+
artifactsTabActive?: boolean;
|
|
38
44
|
/** Shows the Local Control QR entry; hidden when omitted. */
|
|
39
45
|
onOpenLocalControlSettings?: () => void;
|
|
40
46
|
}
|
|
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;
|
|
47
|
+
export declare function ChatContextHeader({ content, location, workspaceName, workspacePath, hideWorkspaceIcon, environmentOpen, environmentAvailable, environmentRunning, rightPanelOpen, rightPanelAvailable, onToggleEnvironment, onToggleRightPanel, onOpenFiles, onOpenTokenUsage, onOpenContextUsage, artifactCount, onOpenArtifacts, artifactsTabActive, onOpenLocalControlSettings, }: ChatContextHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
42
48
|
export {};
|
|
@@ -6,7 +6,7 @@ import type { AttachmentPreviewRequest } from '../adapters/messageTypes';
|
|
|
6
6
|
import type { UseDaemonFollowupSuggestionReturn } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
7
7
|
import type { DaemonSessionGroupPresetColor, DaemonWorkspaceGitStatus, ReasoningSelection } from '@qwen-code/sdk/daemon';
|
|
8
8
|
import type { CommandDisplayCategoryOrder } from '../utils/commandDisplay';
|
|
9
|
-
import type { SkillInfo } from '../completions/slashCompletion';
|
|
9
|
+
import type { SkillInfo, SlashArgumentCompleter } from '../completions/slashCompletion';
|
|
10
10
|
import type { DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
11
11
|
import type { WebShellModelPickerContext } from '../model-picker';
|
|
12
12
|
import { type WebShellComposerInput, type WebShellComposerTag, type WebShellComposerTagIconMap, type WebShellAtProvider, type WebShellBuiltinAtProvidersConfig } from '../customization';
|
|
@@ -42,6 +42,8 @@ interface ChatEditorProps {
|
|
|
42
42
|
skillsLoadError?: boolean;
|
|
43
43
|
skillsLoaded?: boolean;
|
|
44
44
|
slashCommandCategoryOrder?: CommandDisplayCategoryOrder;
|
|
45
|
+
/** Completes arguments the static subcommand trees cannot (`/send`). */
|
|
46
|
+
slashArgumentCompleter?: SlashArgumentCompleter;
|
|
45
47
|
autoSubmitSlashCommands?: boolean;
|
|
46
48
|
queuedMessages?: string[];
|
|
47
49
|
onPopQueuedMessages?: () => boolean;
|
|
@@ -78,6 +78,8 @@ export interface ChatPaneProps {
|
|
|
78
78
|
messageTurnOutputs?: readonly TurnOutputKind[];
|
|
79
79
|
/** Render inside a parent surface that already provides its own frame. */
|
|
80
80
|
embedded?: boolean;
|
|
81
|
+
/** Show the session without a composer; approvals still render. */
|
|
82
|
+
readOnly?: boolean;
|
|
81
83
|
onFirstPromptAdmitted?: (text: string) => void;
|
|
82
84
|
/** Whether this pane owns Session Catalog turn-completion reconciliation. */
|
|
83
85
|
reportCatalogTurnCompletion?: boolean;
|
|
@@ -97,4 +99,4 @@ export interface ChatPaneProps {
|
|
|
97
99
|
* state, approvals, and composer, and the browser scopes keyboard focus to the
|
|
98
100
|
* pane the user clicks into — so there is no cross-pane approval arbitration.
|
|
99
101
|
*/
|
|
100
|
-
export declare function ChatPane({ title, sessionSummary, showSessionDetails, isActive, onApprovalChange, workspaceCwd, renderHeaderActions, onClose, onToggleMaximize, isMaximized, onError, onImageIngestionNotice, onSlashCommand, modelManagement, unavailableModels, mountUnavailableModelTooltip, onOpenGoals, onRightPanelOpen, onOpenMonitor, onPaneArtifactsChange, registerContextUsageControls, onBeforeContextCompress, onOpenContextUsage, messageTurnOutputs, embedded, onFirstPromptAdmitted, reportCatalogTurnCompletion, hidden, voiceUserRevision, voiceWorkspaceRevisions, voiceWorkspaces, sessionWorkflowEnabled, showResponseTokensPerSecond, planControlVisible, }: ChatPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export declare function ChatPane({ title, sessionSummary, showSessionDetails, isActive, onApprovalChange, workspaceCwd, renderHeaderActions, onClose, onToggleMaximize, isMaximized, onError, onImageIngestionNotice, onSlashCommand, modelManagement, unavailableModels, mountUnavailableModelTooltip, onOpenGoals, onRightPanelOpen, onOpenMonitor, onPaneArtifactsChange, registerContextUsageControls, onBeforeContextCompress, onOpenContextUsage, messageTurnOutputs, embedded, readOnly, onFirstPromptAdmitted, reportCatalogTurnCompletion, hidden, voiceUserRevision, voiceWorkspaceRevisions, voiceWorkspaces, sessionWorkflowEnabled, showResponseTokensPerSecond, planControlVisible, }: ChatPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type GoalStatusStripProps } from './GoalStatusStrip';
|
|
3
|
+
import { QueuedPromptDisplay } from './QueuedPromptDisplay';
|
|
4
|
+
export interface ComposerStatusStackProps {
|
|
5
|
+
queued: ComponentProps<typeof QueuedPromptDisplay>;
|
|
6
|
+
goal?: GoalStatusStripProps;
|
|
7
|
+
}
|
|
8
|
+
export declare function ComposerStatusStack({ queued, goal, }: ComposerStatusStackProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import { type ComposerChipTask } from '../utils/composerTasks';
|
|
2
3
|
export interface ComposerTaskChipsHandle {
|
|
3
4
|
/** Focus the first chip; false when there is none to focus. */
|
|
4
5
|
focus(): boolean;
|
|
5
6
|
}
|
|
6
7
|
export interface ComposerTaskChipsProps {
|
|
7
|
-
tasks: readonly
|
|
8
|
+
tasks: readonly ComposerChipTask[];
|
|
8
9
|
/** Whether background agents get a chip (hosts without agent surfaces opt out). */
|
|
9
10
|
includeAgents: boolean;
|
|
10
11
|
/** Open the task: locate a workflow in the transcript, open a shell's output, … */
|
|
11
|
-
onSelectTask: (task:
|
|
12
|
+
onSelectTask: (task: ComposerChipTask) => void;
|
|
13
|
+
/** Ask the model to explain the task as a side question, without opening it. */
|
|
14
|
+
onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
|
|
12
15
|
/** Hand focus back to the composer, optionally with a typed character. */
|
|
13
16
|
onReturnToInput?: (text?: string) => void;
|
|
14
17
|
}
|
|
@@ -9,6 +9,15 @@ import { useI18n } from '../i18n';
|
|
|
9
9
|
* GoalStatusMessage's warning/success language.
|
|
10
10
|
*/
|
|
11
11
|
export declare function goalStatusTone(status: GoalStatus): 'running' | 'attention' | 'done';
|
|
12
|
+
/**
|
|
13
|
+
* Whether a Goal is still a navigation aid: an absent or completed goal is
|
|
14
|
+
* hidden, matching the Goals listings' `complete` filter. The strip, the
|
|
15
|
+
* sidebar's reservation/marker decision and the marker's own guard all read
|
|
16
|
+
* this one predicate so the three surfaces cannot drift apart.
|
|
17
|
+
*/
|
|
18
|
+
export declare function hasVisibleGoal<T extends {
|
|
19
|
+
status: GoalStatus;
|
|
20
|
+
}>(goal: T | null | undefined): goal is T;
|
|
12
21
|
export interface GoalStatusStripProps {
|
|
13
22
|
snapshot: GoalSnapshotV2;
|
|
14
23
|
busy?: boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonClient } from '@qwen-code/sdk/daemon';
|
|
7
|
+
type RestartRecoveryClient = Pick<DaemonClient, 'getRestartRecoveries' | 'continueRestartRecoveries'>;
|
|
8
|
+
export interface RestartRecoveryPanelProps {
|
|
9
|
+
client: RestartRecoveryClient;
|
|
10
|
+
available: boolean;
|
|
11
|
+
/** `restart_recovery` capability; false keeps older daemons untouched. */
|
|
12
|
+
supported?: boolean;
|
|
13
|
+
workspaceCwds: readonly string[];
|
|
14
|
+
workspaceLabels?: ReadonlyMap<string, string>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Lists sessions whose last prompt was interrupted by a daemon restart and
|
|
18
|
+
* continues them without opening each conversation. The list is fetched once
|
|
19
|
+
* when the daemon becomes available; continuation results are applied per row.
|
|
20
|
+
*/
|
|
21
|
+
export declare function RestartRecoveryPanel({ client, available, supported, workspaceCwds, workspaceLabels, }: RestartRecoveryPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonSessionGoalInfo } from '@qwen-code/sdk/daemon';
|
|
7
|
+
interface SessionGoalMarkerProps {
|
|
8
|
+
/** The session's goal projection from the catalog (disk sidecar). */
|
|
9
|
+
goal: DaemonSessionGoalInfo;
|
|
10
|
+
/**
|
|
11
|
+
* Opens the session — the same action as the row. Absent on surfaces
|
|
12
|
+
* whose rows do not open (archived list), where the marker is a pure
|
|
13
|
+
* indicator.
|
|
14
|
+
*/
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The sidebar's goal marker: the app-wide Goals glyph tinted with the same
|
|
19
|
+
* lifecycle tone as the Goals page, so a session carrying a Goal reads at a
|
|
20
|
+
* glance. Completed goals render nothing — both Goals listings filter
|
|
21
|
+
* `complete`, and the sidebar follows the same policy.
|
|
22
|
+
*/
|
|
23
|
+
export declare function SessionGoalMarker({ goal, onOpen }: SessionGoalMarkerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export {};
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* Copyright 2026 Qwen Team
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type ReactElement } from 'react';
|
|
6
|
+
import { type ComponentProps, type ReactElement } from 'react';
|
|
7
7
|
import type { WebShellUnavailableModel, WebShellUnavailableModelTooltipMount } from '../unavailableModels';
|
|
8
|
-
|
|
8
|
+
import { PopoverContent } from './ui/popover';
|
|
9
|
+
export declare function UnavailableModelTooltip({ model, mount, enabled, side, children, }: {
|
|
9
10
|
model: WebShellUnavailableModel;
|
|
10
11
|
mount?: WebShellUnavailableModelTooltipMount;
|
|
11
12
|
enabled?: boolean;
|
|
13
|
+
side?: ComponentProps<typeof PopoverContent>['side'];
|
|
12
14
|
children: ReactElement;
|
|
13
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ export interface WebShellTranscriptProps {
|
|
|
8
8
|
blocks: readonly DaemonTranscriptBlock[];
|
|
9
9
|
renderMode?: 'readonly' | 'document';
|
|
10
10
|
theme?: WebShellTheme;
|
|
11
|
-
language?: 'en' | 'zh-CN' | 'zh' | 'zh-cn' | 'ru' | 'ru-ru';
|
|
11
|
+
language?: 'en' | 'zh-CN' | 'zh' | 'zh-cn' | 'zh-TW' | 'zh-tw' | 'zh-HK' | 'zh-hk' | 'zh-Hant' | 'zh-hant' | 'zh-MO' | 'zh-mo' | 'ru' | 'ru-ru';
|
|
12
12
|
className?: string;
|
|
13
13
|
style?: CSSProperties;
|
|
14
14
|
chatMaxWidth?: number;
|
|
@@ -18,6 +18,8 @@ export interface WebShellTranscriptProps {
|
|
|
18
18
|
collapseCompletedTurns?: boolean;
|
|
19
19
|
markdownTableMode?: MarkdownTableMode;
|
|
20
20
|
virtualScrollThreshold?: number;
|
|
21
|
+
/** Extra transcript rows to render on each side of the viewport when virtualized. Defaults to 15. */
|
|
22
|
+
overscan?: number;
|
|
21
23
|
markdown?: WebShellMarkdownCustomization;
|
|
22
24
|
sourceSessionId?: string;
|
|
23
25
|
sources?: readonly SessionSource[];
|
|
@@ -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';
|
|
@@ -143,6 +143,13 @@ export type ArtifactPanelTab = {
|
|
|
143
143
|
workspaceCwd?: string;
|
|
144
144
|
nameFromFirstPrompt?: boolean;
|
|
145
145
|
initialPrompt?: string;
|
|
146
|
+
} | {
|
|
147
|
+
/** Another session, shown read-only: where a `/send` message runs. */
|
|
148
|
+
id: string;
|
|
149
|
+
kind: 'session';
|
|
150
|
+
title: string;
|
|
151
|
+
sessionId: string;
|
|
152
|
+
workspaceCwd: string;
|
|
146
153
|
} | {
|
|
147
154
|
id: string;
|
|
148
155
|
kind: 'terminal';
|
|
@@ -175,6 +182,11 @@ export type ArtifactPanelTab = {
|
|
|
175
182
|
sessionId: string;
|
|
176
183
|
sessionActions?: DaemonSessionActions;
|
|
177
184
|
closeWithPane?: boolean;
|
|
185
|
+
} | {
|
|
186
|
+
id: string;
|
|
187
|
+
kind: 'artifacts';
|
|
188
|
+
title: string;
|
|
189
|
+
sessionId?: string;
|
|
178
190
|
} | {
|
|
179
191
|
id: string;
|
|
180
192
|
kind: 'change_overview';
|
|
@@ -208,6 +220,14 @@ export interface SideTaskListItem {
|
|
|
208
220
|
interface ArtifactPanelProps {
|
|
209
221
|
contextUsageControls?: Readonly<Record<string, ContextUsageControls>>;
|
|
210
222
|
artifacts: readonly DaemonSessionArtifact[];
|
|
223
|
+
/**
|
|
224
|
+
* The session's own artifacts, matching the header count badge. The list tab
|
|
225
|
+
* renders these rather than the panel-wide merged collection (which also
|
|
226
|
+
* carries pane/open-time extras used for preview-tab icon lookup).
|
|
227
|
+
*/
|
|
228
|
+
sessionArtifacts?: readonly DaemonSessionArtifact[];
|
|
229
|
+
/** Open an artifact preview tab from the artifacts list tab. */
|
|
230
|
+
onOpenArtifact?: (artifactId: string) => void;
|
|
211
231
|
tabs: readonly ArtifactPanelTab[];
|
|
212
232
|
activeTabId: string | null;
|
|
213
233
|
reviewChanges: readonly TurnOutputFileChange[];
|
|
@@ -225,7 +245,11 @@ interface ArtifactPanelProps {
|
|
|
225
245
|
onOpenMemoryFile?: (file: DaemonContextMemoryDetail, workspaceCwd: string) => void;
|
|
226
246
|
latestReviewAvailable?: boolean;
|
|
227
247
|
onOpenLatestReview?: () => void;
|
|
228
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Offer the delivery-unit change overview tab. Gated on an active workspace
|
|
250
|
+
* (a cwd to scope it to), not on git-ness: a non-git workspace still opens
|
|
251
|
+
* the tab, which reports that it is not a git repository.
|
|
252
|
+
*/
|
|
229
253
|
changeOverviewAvailable?: boolean;
|
|
230
254
|
onOpenChangeOverview?: () => void;
|
|
231
255
|
/** Open an interactive terminal tab in this panel (shown as an empty-state action). */
|
|
@@ -264,6 +288,17 @@ interface ArtifactPanelProps {
|
|
|
264
288
|
onNestedArtifactsChange?: (sessionId: string, artifacts: readonly DaemonSessionArtifact[]) => void;
|
|
265
289
|
onOpenNestedSubagent?: (tool: ACPToolCall, sessionId: string, workspaceCwd?: string) => void;
|
|
266
290
|
agentTasks?: readonly EnvironmentAgentTask[];
|
|
291
|
+
/** The background task shown in the active tab, when it can be explained. */
|
|
292
|
+
explainTask?: DaemonSessionTaskWithWorkflowStatus | null;
|
|
293
|
+
onExplainTask?: (task: DaemonSessionTaskWithWorkflowStatus) => void;
|
|
294
|
+
/** A pending/settled task explanation to mirror in place (taskId-matched). */
|
|
295
|
+
taskExplanation?: {
|
|
296
|
+
messageId: string;
|
|
297
|
+
taskId: string;
|
|
298
|
+
question: string;
|
|
299
|
+
answer: string;
|
|
300
|
+
isPending: boolean;
|
|
301
|
+
} | null;
|
|
267
302
|
agentTraceLoading?: boolean;
|
|
268
303
|
agentTraceError?: string;
|
|
269
304
|
onOpenWorkflowAgent?: (task: EnvironmentAgentTask) => void;
|
|
@@ -293,5 +328,5 @@ interface ArtifactPanelProps {
|
|
|
293
328
|
fullscreen?: boolean;
|
|
294
329
|
onToggleFullscreen?: () => void;
|
|
295
330
|
}
|
|
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;
|
|
331
|
+
export declare function ArtifactPanel({ contextUsageControls, artifacts, sessionArtifacts, onOpenArtifact, 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;
|
|
297
332
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DaemonSessionArtifact } from '@qwen-code/sdk/daemon';
|
|
2
|
+
interface ArtifactsListPanelProps {
|
|
3
|
+
artifacts: readonly DaemonSessionArtifact[];
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
onOpenArtifact?: (artifactId: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Session artifact list shown as a right-panel tab. The list reads the live
|
|
9
|
+
* `artifacts` prop rather than a tab payload, so the tab stays serializable and
|
|
10
|
+
* never shows a stale snapshot.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ArtifactsListPanel({ artifacts, loading, onOpenArtifact, }: ArtifactsListPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DaemonSessionArtifact } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import type { TurnOutputOpenRequest } from './TurnOutputs';
|
|
3
|
+
interface SessionPanelProps {
|
|
4
|
+
tabId: string;
|
|
5
|
+
sessionId: string;
|
|
6
|
+
workspaceCwd: string;
|
|
7
|
+
title: string;
|
|
8
|
+
onRightPanelOpen?: (request: TurnOutputOpenRequest) => void;
|
|
9
|
+
onArtifactsChange?: (sessionId: string, artifacts: readonly DaemonSessionArtifact[]) => void;
|
|
10
|
+
onError?: (error: unknown, fallback: string) => void;
|
|
11
|
+
onImageIngestionNotice?: (tone: 'warning' | 'error', message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Another session, live, beside this one: where a message sent with `/send`
|
|
15
|
+
* runs. Read-only, but its approvals and questions still show, since nobody
|
|
16
|
+
* else may be watching it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SessionPanel({ tabId, sessionId, workspaceCwd, title, onRightPanelOpen, onArtifactsChange, onError, onImageIngestionNotice, }: SessionPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ArtifactWorkspaceActions } from './useArtifactWorkspaceTarget';
|
|
2
|
+
export default function WorkspacePdfRangePreview({ workspacePath, workspaceActions, initialStat, onOpenFull, }: {
|
|
3
|
+
workspacePath: string;
|
|
4
|
+
workspaceActions: Pick<ArtifactWorkspaceActions, 'stat' | 'readFileBytes'>;
|
|
5
|
+
initialStat: {
|
|
6
|
+
sizeBytes: number;
|
|
7
|
+
modifiedMs: number;
|
|
8
|
+
};
|
|
9
|
+
onOpenFull: () => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,19 +20,22 @@ export declare function isAudioArtifact(workspacePath?: string, mimeType?: strin
|
|
|
20
20
|
export declare function getArtifactFreshnessKey(artifact: Pick<DaemonSessionArtifact, 'status' | 'updatedAt' | 'metadata'>): string;
|
|
21
21
|
export declare function getArtifactTypeLabel(artifact: DaemonSessionArtifact): string;
|
|
22
22
|
export declare function formatArtifactSize(sizeBytes: number | undefined): string;
|
|
23
|
+
export declare const MAX_WORKSPACE_FILE_BLOB_BYTES: number;
|
|
23
24
|
export declare function normalizeArtifactMimeType(mimeType?: string): string;
|
|
24
25
|
export declare function getArtifactImageMimeType(artifact: Pick<DaemonSessionArtifact, 'mimeType' | 'workspacePath'>): string | undefined;
|
|
25
26
|
export declare function getImageMimeTypeFromPath(path: string): string | undefined;
|
|
26
27
|
export declare function getReviewDownloadMimeType(value: string): string;
|
|
28
|
+
interface WorkspaceFileBlobStat {
|
|
29
|
+
sizeBytes: number;
|
|
30
|
+
modifiedMs: number;
|
|
31
|
+
type?: string;
|
|
32
|
+
}
|
|
27
33
|
export declare function readWorkspaceFileAsBlob(readFileBytes: (filePath: string, opts?: {
|
|
28
34
|
offset?: number;
|
|
29
35
|
maxBytes?: number;
|
|
30
36
|
}) => Promise<Pick<DaemonWorkspaceFileBytes, 'contentBase64' | 'offset' | 'returnedBytes' | 'sizeBytes'>>, filePath: string, mimeType: string, options: {
|
|
31
|
-
statFile: (filePath: string) => Promise<
|
|
32
|
-
|
|
33
|
-
modifiedMs: number;
|
|
34
|
-
type?: string;
|
|
35
|
-
}>;
|
|
37
|
+
statFile: (filePath: string) => Promise<WorkspaceFileBlobStat>;
|
|
38
|
+
initialStat?: WorkspaceFileBlobStat;
|
|
36
39
|
isCancelled?: () => boolean;
|
|
37
40
|
maxBytes?: number;
|
|
38
41
|
}): Promise<Blob>;
|
|
@@ -52,3 +55,4 @@ export declare function stripWorkspacePath(path: string, workspaceCwd?: string):
|
|
|
52
55
|
export declare function isSamePath(left: string | undefined, right: string | undefined, workspaceCwd?: string): boolean;
|
|
53
56
|
export declare function artifactPreviewDocument(html: string, title: string): string;
|
|
54
57
|
export declare function loadArtifactPreviewDocument(html: string, title: string, signal: AbortSignal): Promise<string>;
|
|
58
|
+
export {};
|