@qwen-code/web-shell 0.27.2-preview.0 → 0.27.3
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/README.md +143 -0
- package/dist/{PierreFilePreview-B4n5WCtp.js → PierreFilePreview-BKOzAUEu.js} +1 -1
- package/dist/{SpreadsheetPreview-Bbxqbb8z.js → SpreadsheetPreview-EW2DID9C.js} +2 -2
- package/dist/{WorkspaceFileBrowser-Bj4bedRP.js → WorkspaceFileBrowser-hawy03a1.js} +2 -2
- package/dist/{agents-route-CT-Zjn4s.js → agents-route-CGpa1jTD.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-CULFv0Jj.js → index-BN-WVLl5.js} +59541 -58728
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +7214 -7115
- package/dist/types/App.d.ts +4 -1
- package/dist/types/components/ChatEditor.d.ts +2 -0
- package/dist/types/components/ComposerTaskChips.d.ts +21 -0
- package/dist/types/components/ModelPickerContent.d.ts +13 -0
- package/dist/types/components/TranscriptViewport.d.ts +4 -1
- package/dist/types/components/UnavailableModelTooltip.d.ts +2 -1
- package/dist/types/components/channels/ChannelsManagerPage.d.ts +10 -1
- package/dist/types/components/channels/channel-editor-state.d.ts +4 -3
- package/dist/types/components/channels/channel-platform.d.ts +1 -1
- package/dist/types/components/dialogs/BindSessionPrDialog.d.ts +27 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +21 -5
- package/dist/types/components/managed/java-managed-agent-client.d.ts +1 -0
- package/dist/types/components/managed/use-managed-model-change.d.ts +3 -11
- package/dist/types/components/messages/ToolGroup.d.ts +2 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +1 -1
- package/dist/types/constants/sessions.d.ts +1 -0
- package/dist/types/customization.d.ts +2 -0
- package/dist/types/daemon/session/types.d.ts +4 -2
- package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +7 -0
- package/dist/types/daemon/workspace/types.d.ts +15 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model-picker.d.ts +32 -0
- package/dist/types/settings.d.ts +1 -0
- package/dist/types/toolRevealContext.d.ts +42 -0
- package/dist/types/utils/composerTasks.d.ts +15 -8
- package/dist/{useDaemonMidTurnInjected-B7dPEdqk.js → useDaemonMidTurnInjected-Dz_HbaHK.js} +3202 -3085
- package/package.json +4 -2
- package/dist/types/components/StatusBar.d.ts +0 -26
package/dist/types/App.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type WebShellModelManagementOptions } from './modelManagement';
|
|
2
2
|
import type { WebShellUnavailableModel, WebShellUnavailableModelTooltipMount } from './unavailableModels';
|
|
3
|
+
import type { WebShellModelPickerOptions } from './model-picker';
|
|
3
4
|
import './styles/globals.css';
|
|
4
5
|
import { type WebShellMessageNavigationRequest, type WebShellMessageNavigationResult } from './hooks/useMessageNavigation';
|
|
5
6
|
import { type DaemonProductSessionContext, type DaemonStreamingState } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
@@ -106,6 +107,8 @@ export interface WebShellProps {
|
|
|
106
107
|
settings?: WebShellSettingsOptions;
|
|
107
108
|
/** Model add/delete interactions across WebShell. Not a backend permission policy. */
|
|
108
109
|
modelManagement?: WebShellModelManagementOptions;
|
|
110
|
+
/** Host-owned header and per-model display content in composer pickers. */
|
|
111
|
+
modelPicker?: WebShellModelPickerOptions;
|
|
109
112
|
/** Extra catalog models shown disabled in the composer picker. */
|
|
110
113
|
unavailableModels?: readonly WebShellUnavailableModel[];
|
|
111
114
|
/** Host-owned hint for a disabled model. DOM/Solid hosts mount into the container. */
|
|
@@ -480,4 +483,4 @@ export declare function canArchiveSideTaskSummary(session: Pick<DaemonSessionSum
|
|
|
480
483
|
export declare function mergeSideTaskCatalog(catalog: SideTaskCatalogState, parentSessionId: string, listedItems: SideTaskListItem[], optimisticIds: ReadonlySet<string>): SideTaskCatalogState;
|
|
481
484
|
export declare function getEnvironmentAgentTasks(messages: readonly Message[], sessionTasks: readonly DaemonSessionTaskWithWorkflowStatus[]): EnvironmentAgentTask[];
|
|
482
485
|
export declare function mergeAgentTrace(liveAgents: readonly EnvironmentAgentTask[], trace: DaemonAgentTrace | undefined, now?: number): EnvironmentAgentTask[];
|
|
483
|
-
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, 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;
|
|
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;
|
|
@@ -8,6 +8,7 @@ import type { DaemonSessionGroupPresetColor, DaemonWorkspaceGitStatus, Reasoning
|
|
|
8
8
|
import type { CommandDisplayCategoryOrder } from '../utils/commandDisplay';
|
|
9
9
|
import type { SkillInfo } from '../completions/slashCompletion';
|
|
10
10
|
import type { DaemonReasoningControls, DaemonWorkflowMode, DaemonWorkflowModeStatus } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
11
|
+
import type { WebShellModelPickerContext } from '../model-picker';
|
|
11
12
|
import { type WebShellComposerInput, type WebShellComposerTag, type WebShellComposerTagIconMap, type WebShellAtProvider, type WebShellBuiltinAtProvidersConfig } from '../customization';
|
|
12
13
|
import { type ComposerSubmitMetadata, type EditorHandle } from '../hooks/useComposerCore';
|
|
13
14
|
import { type UseFileUploadOptions } from '../hooks/useFileUpload';
|
|
@@ -107,6 +108,7 @@ interface ChatEditorProps {
|
|
|
107
108
|
onOpenContextUsage?: () => void;
|
|
108
109
|
contextUsageControls?: ContextCompressionControls;
|
|
109
110
|
modelRefresh?: ModelRefreshState;
|
|
111
|
+
modelPickerScope?: Pick<WebShellModelPickerContext, 'sessionId' | 'workspaceId' | 'workspaceCwd' | 'daemonBaseUrl'>;
|
|
110
112
|
availableModels?: Array<{
|
|
111
113
|
id: string;
|
|
112
114
|
label?: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
|
|
2
|
+
export interface ComposerTaskChipsHandle {
|
|
3
|
+
/** Focus the first chip; false when there is none to focus. */
|
|
4
|
+
focus(): boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ComposerTaskChipsProps {
|
|
7
|
+
tasks: readonly DaemonSessionTaskWithWorkflowStatus[];
|
|
8
|
+
/** Whether background agents get a chip (hosts without agent surfaces opt out). */
|
|
9
|
+
includeAgents: boolean;
|
|
10
|
+
/** Open the task: locate a workflow in the transcript, open a shell's output, … */
|
|
11
|
+
onSelectTask: (task: DaemonSessionTaskWithWorkflowStatus) => void;
|
|
12
|
+
/** Hand focus back to the composer, optionally with a typed character. */
|
|
13
|
+
onReturnToInput?: (text?: string) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Chips above the composer for this session's unfinished background work —
|
|
17
|
+
* one per kind ("1 workflow", "2 shells"). A chip that stands for a single
|
|
18
|
+
* task opens it directly; one that stands for several opens a list above the
|
|
19
|
+
* row to pick from. Finished tasks have no chip, so the row clears itself.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ComposerTaskChips: import("react").ForwardRefExoticComponent<ComposerTaskChipsProps & import("react").RefAttributes<ComposerTaskChipsHandle>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { WebShellModelPickerContext, WebShellModelPickerMount } from '../model-picker';
|
|
3
|
+
export declare function isModelPickerOverlayEvent(root: HTMLElement | null, event: Event): boolean;
|
|
4
|
+
export declare function useModelPickerOverlays(open: boolean): HTMLElement | null;
|
|
5
|
+
export declare function ModelPickerContent<T extends WebShellModelPickerContext>({ mount, context, overlayRoot, revision, fallback, className, onActiveChange, }: {
|
|
6
|
+
mount?: WebShellModelPickerMount<T>;
|
|
7
|
+
context: Omit<T, 'overlayContainer'>;
|
|
8
|
+
overlayRoot: HTMLElement | null;
|
|
9
|
+
revision?: object;
|
|
10
|
+
fallback?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
onActiveChange?: (active: boolean) => void;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,4 +14,7 @@ export declare function followRangeFromRows(rows: readonly {
|
|
|
14
14
|
bottom: number;
|
|
15
15
|
ordinal?: number;
|
|
16
16
|
}[], viewportTop: number, viewportBottom: number): TurnFollowRange | undefined;
|
|
17
|
-
export
|
|
17
|
+
export interface TranscriptViewportProps extends MessageListProps {
|
|
18
|
+
approvalOverlayActive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const TranscriptViewport: import("react").ForwardRefExoticComponent<TranscriptViewportProps & import("react").RefAttributes<MessageListHandle>>;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type ReactElement } from 'react';
|
|
7
7
|
import type { WebShellUnavailableModel, WebShellUnavailableModelTooltipMount } from '../unavailableModels';
|
|
8
|
-
export declare function UnavailableModelTooltip({ model, mount, children, }: {
|
|
8
|
+
export declare function UnavailableModelTooltip({ model, mount, enabled, children, }: {
|
|
9
9
|
model: WebShellUnavailableModel;
|
|
10
10
|
mount?: WebShellUnavailableModelTooltipMount;
|
|
11
|
+
enabled?: boolean;
|
|
11
12
|
children: ReactElement;
|
|
12
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,15 @@ import { type Ref } from 'react';
|
|
|
7
7
|
interface ChannelsManagerPageProps {
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
initialFocusRef?: Ref<HTMLHeadingElement>;
|
|
10
|
+
/** This tab's daemon-registered client id, for QR-login attribution. */
|
|
11
|
+
clientId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The workspace this tab's session belongs to. The client id is registered
|
|
14
|
+
* with that workspace's bridge only, and the daemon validates the header
|
|
15
|
+
* against the *target* workspace's bridge — so sending it while managing a
|
|
16
|
+
* different workspace is a hard `400 invalid_client_id`.
|
|
17
|
+
*/
|
|
18
|
+
sessionWorkspaceCwd?: string;
|
|
10
19
|
}
|
|
11
|
-
export declare function ChannelsManagerPage({ onClose, initialFocusRef, }: ChannelsManagerPageProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function ChannelsManagerPage({ onClose, initialFocusRef, clientId, sessionWorkspaceCwd, }: ChannelsManagerPageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
21
|
export {};
|
|
@@ -43,10 +43,11 @@ export declare const PRIVATE_ONLY_FIELD_KEYS: Set<string>;
|
|
|
43
43
|
export declare const GROUP_ONLY_FIELD_KEYS: Set<string>;
|
|
44
44
|
/**
|
|
45
45
|
* Canonical repository IDs the allowlist currently names, in typing order.
|
|
46
|
-
* Entries that
|
|
47
|
-
* and a row for a half-typed repository would only
|
|
46
|
+
* Entries that do not match the channel's repository shape are left out: the
|
|
47
|
+
* save path rejects them, and a row for a half-typed repository would only
|
|
48
|
+
* flicker.
|
|
48
49
|
*/
|
|
49
|
-
export declare function repositoryAllowlistIds(value: string): string[];
|
|
50
|
+
export declare function repositoryAllowlistIds(value: string, type: unknown): string[];
|
|
50
51
|
/** Whether the repository event filter processes a list at all. */
|
|
51
52
|
export declare function isRepoFilterActive(mode: unknown): boolean;
|
|
52
53
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { DaemonChannelTypeDescriptor } from '@qwen-code/sdk/daemon';
|
|
7
7
|
export declare const PLATFORM_MARKS: Record<string, string>;
|
|
8
|
-
export declare function isSupportedChannelType(type: unknown): type is 'dingtalk' | 'dws' | 'weixin' | 'wecom' | 'wecom-callback' | 'feishu' | 'github' | 'gitlab' | 'email' | 'qq';
|
|
8
|
+
export declare function isSupportedChannelType(type: unknown): type is 'dingtalk' | 'dingtalk-webhook' | 'dws' | 'weixin' | 'wecom' | 'wecom-callback' | 'feishu' | 'github' | 'gitlab' | 'email' | 'qq';
|
|
9
9
|
export declare function isChannelPlatformAvailable(descriptor: DaemonChannelTypeDescriptor): boolean;
|
|
10
10
|
export declare function isRepositoryOnlyChannelType(type: unknown): boolean;
|
|
11
11
|
export declare function isPrivateOnlyChannelType(type: unknown): boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export interface BindSessionPrPayload {
|
|
7
|
+
number: number;
|
|
8
|
+
url: string;
|
|
9
|
+
state?: 'open' | 'merged' | 'closed';
|
|
10
|
+
}
|
|
11
|
+
interface BindSessionPrDialogProps {
|
|
12
|
+
workspaceCwd: string;
|
|
13
|
+
busy: boolean;
|
|
14
|
+
/** Daemon-side failure surfaced by the panel; resolution errors are internal. */
|
|
15
|
+
error?: string;
|
|
16
|
+
onSubmit: (pr: BindSessionPrPayload) => void;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Supplementary PR registration: binds an existing PR the automatic paths
|
|
21
|
+
* missed. A URL binds normalized to its canonical /pull/<N> spelling (the
|
|
22
|
+
* daemon's refresh sweep resolves its state); a bare number or #N resolves
|
|
23
|
+
* through the workspace's open-PR list, so a number outside that list
|
|
24
|
+
* (merged/closed or beyond the list cap) asks for the URL.
|
|
25
|
+
*/
|
|
26
|
+
export declare function BindSessionPrDialog({ workspaceCwd, busy, error, onSubmit, onClose, }: BindSessionPrDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -40,7 +40,7 @@ export interface paths {
|
|
|
40
40
|
};
|
|
41
41
|
get?: never;
|
|
42
42
|
put?: never;
|
|
43
|
-
/** @description Synchronously rename a Session
|
|
43
|
+
/** @description Synchronously rename a Session in one local SQL transaction under the same authorization as public PATCH. The public SQL row is the display authority: HTTP 200 confirms the SQL title is persisted, while the Harness journal copy is updated by a best-effort notification after commit and may lag or be skipped when the Harness is unavailable or does not support fenced titles. Workspace-bound fresh renames require current OPERATOR access and the original binding's execution facts; unbound Sessions use the existing tenant-scoped rename authorization. An active Turn does not itself block rename. Reuse the same idempotency key only for the same Session and title; completed replay returns the Session's current persisted title without another notification, including the existing last-visible result after deletion. Fresh-rename capability changes do not preclude authorized replay. The result title is authoritative and can differ from the requested title when a later rename already completed. */
|
|
44
44
|
post: operations["webShellRenameSession"];
|
|
45
45
|
delete?: never;
|
|
46
46
|
options?: never;
|
|
@@ -474,7 +474,7 @@ export interface paths {
|
|
|
474
474
|
};
|
|
475
475
|
get?: never;
|
|
476
476
|
put?: never;
|
|
477
|
-
/** @description Change the model of
|
|
477
|
+
/** @description Change the model selection of a Workspace Session for later Turns, including while a Turn or approval is active. Already admitted Turns keep their immutable model snapshot. Lifecycle, recovery and unsettled context changes remain guarded. The actor-scoped idempotency key replays an earlier completed change before current admission checks; expectedRevision prevents overwriting a concurrent selection. */
|
|
478
478
|
post: operations["changeWebShellSessionModel"];
|
|
479
479
|
delete?: never;
|
|
480
480
|
options?: never;
|
|
@@ -508,7 +508,7 @@ export interface paths {
|
|
|
508
508
|
};
|
|
509
509
|
get?: never;
|
|
510
510
|
put?: never;
|
|
511
|
-
/** @description Change the execution approval policy of an eligible Workspace Session: built-in qwen-code or a stored AgentDefinition on exactly hosted-workspace-files/1, hosted-workspace-files/3 or hosted-workspace-shell/
|
|
511
|
+
/** @description Change the execution approval policy of an eligible Workspace Session: built-in qwen-code or a stored AgentDefinition on exactly hosted-workspace-files/1, hosted-workspace-files/3, hosted-workspace-shell/1 or hosted-workspace-shell/3. With liveSupported, execution policy changes affect subsequent current-Turn permission checks and permit eligible pending ordinary tool approvals. Otherwise the Session must be idle. Plan changes remain idle-only. Requires its recorded owner, current OPERATOR or OWNER access and Session-specific Harness feature support. Changes are revision-checked and actor/session-scoped idempotent. Definition creation policy and pins remain immutable. Classifier auto requires auto-approval/1. Optional permissionRules requires permission-rules/1 and an idle Session. Omitted rules preserve the current selection; three empty arrays clear it. Mode, Plan and rules share one approval revision and receipt. Persisted rules are also snapshotted at Turn admission; replay preserves the original policy. Empty rules are omitted from responses and Harness payloads. */
|
|
512
512
|
post: operations["changeWebShellSessionApproval"];
|
|
513
513
|
delete?: never;
|
|
514
514
|
options?: never;
|
|
@@ -1783,9 +1783,9 @@ export interface components {
|
|
|
1783
1783
|
sessionDelete?: boolean;
|
|
1784
1784
|
/** @description Present only for persisted Shell Sessions, with no schema default; files and unbound Sessions omit it. True when Workspace files, Shell deployment admission and a valid persisted approval mode are valid. False prevents fresh sending. Disabling only the Shell flag preserves accepted cancellation and approval while Workspace files remain enabled and persisted approval remains valid; files-off or invalid approval can refuse attachment. This capability does not override authorization or recovery refusals. */
|
|
1785
1785
|
foregroundShell?: boolean;
|
|
1786
|
-
/** @description The caller may
|
|
1786
|
+
/** @description The caller may change the Session model selection for later Turns using the server model catalog, including while a Turn or approval is active. Missing means unsupported; authorization, recovery and revision admission still apply. */
|
|
1787
1787
|
modelChange?: boolean;
|
|
1788
|
-
/** @description The caller owns this eligible Workspace Session with current OPERATOR or OWNER access. Built-in qwen-code requires approval-selection/1; stored AgentDefinitions on exactly hosted-workspace-files/1, hosted-workspace-files/3 or hosted-workspace-shell/
|
|
1788
|
+
/** @description The caller owns this eligible Workspace Session with current OPERATOR or OWNER access. Built-in qwen-code requires approval-selection/1; stored AgentDefinitions on exactly hosted-workspace-files/1, hosted-workspace-files/3, hosted-workspace-shell/1 or hosted-workspace-shell/3 also require agent-definition-approval-selection/1. Idle-state admission is checked separately. Missing means false. */
|
|
1789
1789
|
approvalModeChange?: boolean;
|
|
1790
1790
|
/** @description Optional deployment capability; missing means false. */
|
|
1791
1791
|
inputAttachments?: boolean;
|
|
@@ -2728,6 +2728,7 @@ export interface components {
|
|
|
2728
2728
|
revision: number;
|
|
2729
2729
|
supported: boolean;
|
|
2730
2730
|
availableServers: components["schemas"]["ManagedMcpPublishedServer"][];
|
|
2731
|
+
/** @description The selected MCP server snapshot, including retained removed entries. Only non-removed entries count toward the 32-server live capacity, and the retained snapshot is capped at 96 total entries. */
|
|
2731
2732
|
servers: components["schemas"]["ManagedMcpManagementServer"][];
|
|
2732
2733
|
operation?: components["schemas"]["ManagedMcpManagementOperation"];
|
|
2733
2734
|
};
|
|
@@ -2890,11 +2891,26 @@ export interface components {
|
|
|
2890
2891
|
/** @description Exact source commit, resolved npm version, or imported content revision. Supplied together with sourceType. */
|
|
2891
2892
|
sourceRevision?: string;
|
|
2892
2893
|
};
|
|
2894
|
+
ManagedExtensionSourceReference: {
|
|
2895
|
+
providerId: string;
|
|
2896
|
+
/** @enum {string} */
|
|
2897
|
+
kind: "skill" | "extension";
|
|
2898
|
+
resourceId: string;
|
|
2899
|
+
/** @description Exact immutable business revision. Dynamic selectors must be resolved by the business entry point. */
|
|
2900
|
+
revision: string;
|
|
2901
|
+
};
|
|
2902
|
+
ManagedExtensionSourceOrigin: {
|
|
2903
|
+
reference: components["schemas"]["ManagedExtensionSourceReference"];
|
|
2904
|
+
/** @description SHA-256 of the actual raw archive bytes, distinct from packageDigest. */
|
|
2905
|
+
sourceDigest: string;
|
|
2906
|
+
requestDigest: string;
|
|
2907
|
+
};
|
|
2893
2908
|
ManagedExtensionPackage: {
|
|
2894
2909
|
pin: components["schemas"]["ManagedExtensionPackagePin"];
|
|
2895
2910
|
manifest: components["schemas"]["ManagedExtensionPackageManifest"];
|
|
2896
2911
|
/** Format: int64 */
|
|
2897
2912
|
byteLength: number;
|
|
2913
|
+
source?: components["schemas"]["ManagedExtensionSourceOrigin"];
|
|
2898
2914
|
};
|
|
2899
2915
|
ManagedExtensionPackageCatalog: {
|
|
2900
2916
|
supported: boolean;
|
|
@@ -486,6 +486,7 @@ export declare class JavaManagedAgentClient {
|
|
|
486
486
|
pin: components["schemas"]["ManagedExtensionPackagePin"];
|
|
487
487
|
manifest: components["schemas"]["ManagedExtensionPackageManifest"];
|
|
488
488
|
byteLength: number;
|
|
489
|
+
source?: components["schemas"]["ManagedExtensionSourceOrigin"];
|
|
489
490
|
}>;
|
|
490
491
|
queryMcpManagement(request: Schemas['WebShellMcpManagementQuery'], signal?: AbortSignal): Promise<{
|
|
491
492
|
sessionId: string;
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import type { ManagedAgentProvider, ManagedAgentSessionSummary, ManagedSessionModels } from './managed-agent-provider';
|
|
2
|
-
interface ModelIntent {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
modelId: string;
|
|
5
|
-
expectedRevision: number;
|
|
6
|
-
idempotencyKey: string;
|
|
7
|
-
}
|
|
1
|
+
import type { ManagedAgentProvider, ManagedAgentSessionSummary, ManagedModelSelection, ManagedSessionModels } from './managed-agent-provider';
|
|
8
2
|
export declare function useManagedModelChange(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, refreshSummary: (signal?: AbortSignal) => Promise<ManagedAgentSessionSummary | undefined>, interactive: boolean): {
|
|
3
|
+
selection: ManagedModelSelection | undefined;
|
|
9
4
|
options: ManagedSessionModels | undefined;
|
|
10
5
|
optionsLoading: boolean;
|
|
11
6
|
optionsError: boolean;
|
|
12
7
|
supported: boolean;
|
|
13
8
|
blocked: boolean;
|
|
14
|
-
submit: (modelId: string) => Promise<
|
|
15
|
-
confirm: () => Promise<true | undefined>;
|
|
9
|
+
submit: (modelId: string) => Promise<boolean | undefined>;
|
|
16
10
|
reloadOptions: () => void;
|
|
17
11
|
isBlocked: () => boolean;
|
|
18
12
|
key: string;
|
|
19
|
-
pending?: ModelIntent;
|
|
20
13
|
busy: boolean;
|
|
21
14
|
errorCode?: string;
|
|
22
15
|
};
|
|
23
|
-
export {};
|
|
@@ -39,6 +39,8 @@ interface ToolLineProps {
|
|
|
39
39
|
detailsVisible?: boolean;
|
|
40
40
|
hideHeader?: boolean;
|
|
41
41
|
hideCollapsedOutput?: boolean;
|
|
42
|
+
/** Bumped by the enclosing group to open this row from elsewhere. */
|
|
43
|
+
revealSeq?: number;
|
|
42
44
|
}
|
|
43
45
|
export declare function shouldAutoExpand(tool: ACPToolCall): boolean;
|
|
44
46
|
export declare function getToolHeaderKind(tool: ACPToolCall): ToolHeaderKind;
|
|
@@ -33,7 +33,7 @@ export interface WebShellSidebarFooterOptions {
|
|
|
33
33
|
export declare const DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
|
|
34
34
|
export declare const DESKTOP_DEFAULT_FOOTER_ITEMS: readonly WebShellSidebarFooterItem[];
|
|
35
35
|
export declare const DEFAULT_PRIMARY_NAV_ITEMS: readonly WebShellSidebarPrimaryNavItem[];
|
|
36
|
-
export type WebShellSidebarSessionActionItem = 'details' | 'rename' | 'group' | 'export' | 'delete' | 'pin' | 'split' | 'archive';
|
|
36
|
+
export type WebShellSidebarSessionActionItem = 'details' | 'rename' | 'bindPr' | 'group' | 'export' | 'delete' | 'pin' | 'split' | 'archive';
|
|
37
37
|
/** Subset of action items that have working inline (hover-button) handlers. */
|
|
38
38
|
export type WebShellSidebarSessionInlineActionItem = 'pin' | 'rename' | 'export' | 'delete';
|
|
39
39
|
export interface WebShellSidebarSessionActionsOptions {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export declare const SESSION_LIST_PAGE_SIZE = 1000;
|
|
11
11
|
export declare const SESSION_ARCHIVE_BATCH_SIZE = 100;
|
|
12
12
|
export declare const SIDEBAR_SESSION_PREVIEW_LIMIT = 5;
|
|
13
|
+
export declare const SIDEBAR_SESSION_EXPAND_STEP = 10;
|
|
13
14
|
export declare const SESSION_ORGANIZATION_FEATURE = "session_organization";
|
|
14
15
|
export declare const SESSION_LIVE_STATE_FEATURE = "workspace_session_live_state";
|
|
15
16
|
export declare const SESSION_TRANSCRIPT_PAGINATION_FEATURE = "session_transcript_pagination";
|
|
@@ -10,6 +10,7 @@ import type { ACPToolCall } from './adapters/types';
|
|
|
10
10
|
import type { WelcomeHeaderProps } from './components/WelcomeHeader';
|
|
11
11
|
import type { WebShellTheme } from './themeContext';
|
|
12
12
|
import type { ComposerPlaceholderState } from './utils/composerInputState';
|
|
13
|
+
import type { WebShellModelPickerOptions } from './model-picker';
|
|
13
14
|
export type MarkdownContentSource = 'assistant' | 'thinking';
|
|
14
15
|
/** Select an existing directory on the connected daemon, or cancel with undefined. */
|
|
15
16
|
export type WebShellWorkspaceDirectoryPicker = (opts?: {
|
|
@@ -519,6 +520,7 @@ export type FooterRenderer = ComponentType<WebShellFooterRenderInfo>;
|
|
|
519
520
|
*/
|
|
520
521
|
export type LoadingPhrasesResolver = (language: string) => readonly string[] | undefined | null;
|
|
521
522
|
export interface WebShellCustomization {
|
|
523
|
+
modelPicker?: WebShellModelPickerOptions;
|
|
522
524
|
onRefreshModels?: Parameters<DaemonSessionActions['refreshModels']>[0];
|
|
523
525
|
allowedApprovalModes?: readonly WebShellApprovalMode[];
|
|
524
526
|
filterArtifact?: ArtifactFilter;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { ReactNode } from 'react';
|
|
7
|
-
import type { CreateSessionRequest, DaemonBranchSessionRequest, DaemonCapabilities, DaemonBackgroundTurn, DaemonEvent, DaemonApprovalMode, DaemonApprovalModeResult, DaemonAvailableCommand, DaemonForkSessionResult, DaemonInputAnnotation, DaemonSessionBtwResult, DaemonSessionGenerationEvent, DaemonSessionAttachmentReference, DaemonSessionAttachmentData, DaemonMidTurnMessageResult, DaemonMidTurnMessagesResult, DaemonRemoveMidTurnMessageResult, DaemonSendMidTurnMessagesNowResult, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionClient, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, DaemonSessionTaskRuntimeStatus, DaemonSessionTaskWithWorkflowStatus, DaemonSessionTasksStatus, DaemonSessionWorkflowTaskStatus, DaemonSessionWorkflowTasksStatus, DaemonSessionStatsStatus, DaemonSessionArtifactsEnvelope, DaemonSessionArtifactInput, DaemonSessionArtifactMutationResult, SessionSourceInput, SessionSourcesResult, SessionSourceUpsertResult, SessionSourceRemoveResult, DaemonSkillToggleMutation, DaemonShellCommandResult, DaemonTranscriptBlock, DaemonTranscriptStore, DaemonWorkspaceGitStatus, DaemonWorkspaceProvidersStatus, DaemonStandaloneCreationRecovery, DaemonStandaloneWorkingDirectory, HeartbeatResult, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, PermissionResponse, PromptContentBlock, PromptResult, ReasoningSelection, SessionMetadataResult, SetModelResult } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { CreateSessionRequest, DaemonBranchSessionRequest, DaemonCapabilities, DaemonBackgroundTurn, DaemonEvent, DaemonApprovalMode, DaemonApprovalModeResult, DaemonAvailableCommand, DaemonForkSessionResult, DaemonInputAnnotation, DaemonSessionBtwResult, DaemonSessionGenerationEvent, DaemonSessionAttachmentReference, DaemonSessionAttachmentData, DaemonMidTurnMessageResult, DaemonMidTurnMessagesResult, DaemonRemoveMidTurnMessageResult, DaemonSendMidTurnMessagesNowResult, DaemonPendingPromptsResult, DaemonRemovePendingPromptResult, DaemonSessionContextStatus, DaemonSessionSavedWorkflowDetail, DaemonSessionContextUsageStatus, DaemonSessionRecapResult, DaemonRewindResult, DaemonRewindSnapshotInfo, DaemonSession, DaemonSessionClient, DaemonSessionPrInfo, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, DaemonSessionTaskRuntimeStatus, DaemonSessionTaskWithWorkflowStatus, DaemonSessionTasksStatus, DaemonSessionWorkflowTaskStatus, DaemonSessionWorkflowTasksStatus, DaemonSessionStatsStatus, DaemonSessionArtifactsEnvelope, DaemonSessionArtifactInput, DaemonSessionArtifactMutationResult, SessionSourceInput, SessionSourcesResult, SessionSourceUpsertResult, SessionSourceRemoveResult, DaemonSkillToggleMutation, DaemonShellCommandResult, DaemonTranscriptBlock, DaemonTranscriptStore, DaemonWorkspaceGitStatus, DaemonWorkspaceProvidersStatus, DaemonStandaloneCreationRecovery, DaemonStandaloneWorkingDirectory, HeartbeatResult, GoalControlRequest, GoalSnapshotV2, GoalStateResponse, PermissionResponse, PromptContentBlock, PromptResult, ReasoningSelection, SessionMetadataResult, SetModelResult } from '@qwen-code/sdk/daemon';
|
|
8
8
|
export type DaemonConnectionStatus = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
9
9
|
export interface DaemonSessionOwnerSnapshot {
|
|
10
10
|
isCurrent(): boolean;
|
|
@@ -239,7 +239,7 @@ export type DaemonPromptSettledListener = (event: DaemonPromptSettledEvent) => v
|
|
|
239
239
|
export type DaemonPromptSettlementSubscribe = (listener: DaemonPromptSettledListener) => () => void;
|
|
240
240
|
export type DaemonNoticeSeverity = 'info' | 'warning' | 'error';
|
|
241
241
|
export type DaemonNoticeCategory = 'validation' | 'user_action' | 'connection' | 'protocol' | 'lifecycle' | 'system';
|
|
242
|
-
export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
|
|
242
|
+
export type DaemonNoticeOperation = 'send_prompt' | 'continue_session' | 'send_shell_command' | 'switch_model' | 'set_reasoning_effort' | 'set_workflow_mode' | 'set_approval_mode' | 'submit_permission' | 'cancel_prompt' | 'attach_session' | 'load_session' | 'resume_session' | 'create_session' | 'close_session' | 'rename_session' | 'bind_session_pr' | 'release_session' | 'list_sessions' | 'load_context' | 'load_context_usage' | 'load_tasks' | 'load_artifacts' | 'read_attachment' | 'remove_attachment' | 'cancel_task' | 'control_workflow' | 'run_saved_workflow' | 'read_saved_workflow' | 'load_goal' | 'control_goal' | 'clear_goal' | 'load_stats' | 'rewind_snapshots' | 'rewind_session' | 'refresh_commands' | 'recap_session' | 'generate_session_content' | 'btw_session' | 'branch_session' | 'fork_session' | 'record_session' | 'stream' | 'normalize_event';
|
|
243
243
|
export interface DaemonSessionNotice {
|
|
244
244
|
id: string;
|
|
245
245
|
severity: DaemonNoticeSeverity;
|
|
@@ -514,6 +514,8 @@ export interface DaemonSessionActions {
|
|
|
514
514
|
silent?: boolean;
|
|
515
515
|
}): Promise<DaemonSessionContextUsageStatus>;
|
|
516
516
|
renameSession(displayName: string): Promise<SessionMetadataResult>;
|
|
517
|
+
/** Manually bind a GitHub PR to the current session (supplementary registration). */
|
|
518
|
+
bindSessionPr(pr: Omit<DaemonSessionPrInfo, 'issues'>): Promise<SessionMetadataResult>;
|
|
517
519
|
recapSession(): Promise<DaemonSessionRecapResult>;
|
|
518
520
|
generateSessionContent(prompt: string, opts?: {
|
|
519
521
|
signal?: AbortSignal;
|
|
@@ -10,6 +10,13 @@ interface WorkspaceChannelsResource extends DaemonChannelsResource {
|
|
|
10
10
|
}
|
|
11
11
|
interface DaemonChannelsOptions extends DaemonResourceOptions {
|
|
12
12
|
workspaceCwd?: string;
|
|
13
|
+
/**
|
|
14
|
+
* This tab's daemon-registered client id. QR-login routes use it to attribute
|
|
15
|
+
* a login to the tab that created it, so a peer tab neither reattaches nor
|
|
16
|
+
* cancels it. Omitted when no session is attached, which keeps the previous
|
|
17
|
+
* id-less behaviour rather than sending an id the daemon would reject.
|
|
18
|
+
*/
|
|
19
|
+
clientId?: string;
|
|
13
20
|
}
|
|
14
21
|
export declare function useDaemonChannels(options?: DaemonChannelsOptions): {
|
|
15
22
|
data: {
|
|
@@ -130,9 +130,21 @@ export interface DaemonChannelObservedContacts {
|
|
|
130
130
|
}>;
|
|
131
131
|
}
|
|
132
132
|
export interface DaemonChannelQrLoginActions {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
/**
|
|
134
|
+
* `clientId` attributes the login to this browser tab. Without it the daemon
|
|
135
|
+
* treats every id-less caller as the same client, so it reattaches a peer's
|
|
136
|
+
* login and lets any of them cancel it.
|
|
137
|
+
*/
|
|
138
|
+
start(name: string, clientId?: string): Promise<DaemonChannelQrLoginStartResult>;
|
|
139
|
+
state(loginId: string, clientId?: string): Promise<DaemonChannelQrLoginView>;
|
|
140
|
+
cancel(loginId: string, clientId?: string): Promise<DaemonChannelQrLoginView>;
|
|
141
|
+
/**
|
|
142
|
+
* Release a login while the page is going away. Sent with `keepalive` so the
|
|
143
|
+
* request outlives the document: a reload or tab close runs no React cleanup,
|
|
144
|
+
* so `cancel` alone never fires for the abandonment path operators use most.
|
|
145
|
+
* Best-effort — the session still expires if the request is lost.
|
|
146
|
+
*/
|
|
147
|
+
release(loginId: string, clientId?: string, workspaceCwd?: string): Promise<void>;
|
|
136
148
|
}
|
|
137
149
|
export interface DaemonChannelPairingActions {
|
|
138
150
|
list(name: string): Promise<DaemonChannelPairingRequestsSnapshot>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export type { DatasetCell, EchartsFullDataBlockProps, EchartsFullDataOption, Ech
|
|
|
85
85
|
export { WEB_SHELL_SETTING_ITEM_IDS } from './settings';
|
|
86
86
|
export type { WebShellSettingItemId, WebShellSettingsOptions, } from './settings';
|
|
87
87
|
export type { WebShellModelManagementOptions } from './modelManagement';
|
|
88
|
+
export type { WebShellModelPickerContext, WebShellModelPickerItemContext, WebShellModelPickerMount, WebShellModelPickerOptions, } from './model-picker';
|
|
88
89
|
export type { WebShellUnavailableModel, WebShellUnavailableModelTooltipHandle, WebShellUnavailableModelTooltipInfo, WebShellUnavailableModelTooltipMount, } from './unavailableModels';
|
|
89
90
|
export type { WebShellMessageNavigationRequest, WebShellMessageNavigationResult, } from './hooks/useMessageNavigation';
|
|
90
91
|
export { highlightCode } from './components/messages/codeHighlighter';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WebShellLanguage } from './i18n';
|
|
2
|
+
import type { WebShellTheme } from './themeContext';
|
|
3
|
+
export interface WebShellModelPickerContext {
|
|
4
|
+
readonly composerId: string;
|
|
5
|
+
readonly sessionId?: string;
|
|
6
|
+
readonly workspaceId?: string;
|
|
7
|
+
readonly workspaceCwd?: string;
|
|
8
|
+
readonly daemonBaseUrl?: string;
|
|
9
|
+
readonly currentModelId?: string;
|
|
10
|
+
readonly language: WebShellLanguage;
|
|
11
|
+
readonly theme: WebShellTheme;
|
|
12
|
+
readonly overlayContainer: HTMLElement;
|
|
13
|
+
}
|
|
14
|
+
export interface WebShellModelPickerItemContext extends WebShellModelPickerContext {
|
|
15
|
+
readonly model: {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly label: string;
|
|
18
|
+
readonly disabled: boolean;
|
|
19
|
+
readonly tooltip?: string;
|
|
20
|
+
};
|
|
21
|
+
readonly isSelected: boolean;
|
|
22
|
+
readonly rowElement: HTMLElement;
|
|
23
|
+
}
|
|
24
|
+
/** Keep mount functions stable; create an independent view for each call. */
|
|
25
|
+
export type WebShellModelPickerMount<TContext> = (container: HTMLElement, context: TContext) => {
|
|
26
|
+
update(context: TContext): void;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
export interface WebShellModelPickerOptions {
|
|
30
|
+
readonly mountHeader?: WebShellModelPickerMount<WebShellModelPickerContext>;
|
|
31
|
+
readonly displayContentByModelId?: Readonly<Partial<Record<string, WebShellModelPickerMount<WebShellModelPickerItemContext>>>>;
|
|
32
|
+
}
|
package/dist/types/settings.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ declare const SETTING_KEYS: {
|
|
|
64
64
|
readonly 'setting:artifacts': "experimental.artifact";
|
|
65
65
|
readonly 'setting:tool-use-summaries': "experimental.emitToolUseSummaries";
|
|
66
66
|
readonly 'setting:unified-agent-loop': "experimental.unifiedAgentLoop";
|
|
67
|
+
readonly 'setting:event-bus-agent-loop': "experimental.eventBusAgentLoop";
|
|
67
68
|
readonly 'setting:voice-model': "voiceModel";
|
|
68
69
|
readonly 'setting:image-model': "imageModel";
|
|
69
70
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A one-shot "open this tool call" request, keyed by tool call id.
|
|
4
|
+
*
|
|
5
|
+
* The transcript is virtualized, so the tool group a caller wants to open may
|
|
6
|
+
* not be mounted when the request is made: it mounts once the list scrolls to
|
|
7
|
+
* it. The request therefore waits in this store until the group holding the
|
|
8
|
+
* call consumes it, instead of being delivered to a DOM node that does not
|
|
9
|
+
* exist yet.
|
|
10
|
+
*/
|
|
11
|
+
export interface ToolRevealStore {
|
|
12
|
+
/** Ask the row for `callId` to expand. Replaces any earlier request. */
|
|
13
|
+
request(callId: string): void;
|
|
14
|
+
/** Drop a request that can no longer be served (e.g. the scroll failed). */
|
|
15
|
+
cancel(callId: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* The pending call id when `matches` accepts it; undefined otherwise. A
|
|
18
|
+
* request keeps being served for a short grace period after the first
|
|
19
|
+
* match, then clears.
|
|
20
|
+
*/
|
|
21
|
+
consume(matches: (callId: string) => boolean): string | undefined;
|
|
22
|
+
subscribe(listener: () => void): () => void;
|
|
23
|
+
getVersion(): number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* How long a served request keeps being served. Scrolling to a row can
|
|
27
|
+
* unmount and remount it right after it first mounts (the virtualized list
|
|
28
|
+
* re-measures), and the fresh instance must open too. A remount after this
|
|
29
|
+
* is the user scrolling back, which keeps the row's own state.
|
|
30
|
+
*/
|
|
31
|
+
export declare const REVEAL_REMOUNT_GRACE_MS = 1000;
|
|
32
|
+
export declare function createToolRevealStore(now?: () => number): ToolRevealStore;
|
|
33
|
+
export declare function ToolRevealProvider({ store, children, }: {
|
|
34
|
+
store: ToolRevealStore;
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Calls `onReveal` with the requested call id when a reveal request names a
|
|
39
|
+
* call `matches` accepts — right away when the consumer is already mounted,
|
|
40
|
+
* or on mount when the request arrived first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useToolRevealRequest(matches: (callId: string) => boolean, onReveal: (callId: string) => void): void;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import type { DaemonSessionTaskWithWorkflowStatus } from '@qwen-code/sdk/daemon';
|
|
2
2
|
/**
|
|
3
3
|
* Tasks that belong to THIS session's live background state — what the
|
|
4
|
-
*
|
|
4
|
+
* composer chip row draws from and the environment panel lists.
|
|
5
5
|
*
|
|
6
6
|
* Agent tasks have their own surfaces, and retained workflow runs are
|
|
7
7
|
* history: `getWorkflowTasks()` merges the project's saved snapshots into
|
|
8
8
|
* the same list, so without the `isHistorical` exclusion a project with
|
|
9
|
-
* saved runs
|
|
10
|
-
* for the rest of the session, with no way to clear it. Consumers that
|
|
9
|
+
* saved runs would list every one of them as this session's work. Consumers that
|
|
11
10
|
* genuinely want the history (the workflow details provider, the tasks
|
|
12
11
|
* dialog) read the unfiltered list instead.
|
|
13
12
|
*/
|
|
14
13
|
export declare function isComposerTask(task: DaemonSessionTaskWithWorkflowStatus): task is Exclude<DaemonSessionTaskWithWorkflowStatus, {
|
|
15
14
|
kind: 'agent';
|
|
16
15
|
}>;
|
|
16
|
+
/** The kinds the composer chip row groups live tasks under, in display order. */
|
|
17
|
+
export type ComposerTaskChipKind = 'workflow' | 'agent' | 'shell' | 'monitor';
|
|
18
|
+
export interface ComposerTaskChipGroup {
|
|
19
|
+
kind: ComposerTaskChipKind;
|
|
20
|
+
tasks: DaemonSessionTaskWithWorkflowStatus[];
|
|
21
|
+
}
|
|
17
22
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
* Group this session's unfinished background tasks for the chip row above
|
|
24
|
+
* the composer. Finished tasks are left out on purpose: once a run settles
|
|
25
|
+
* its chip disappears, and the run stays reachable from the transcript, the
|
|
26
|
+
* environment panel and the tasks dialog.
|
|
22
27
|
*/
|
|
23
|
-
export declare function
|
|
28
|
+
export declare function getComposerTaskChipGroups(tasks: readonly DaemonSessionTaskWithWorkflowStatus[], options: {
|
|
29
|
+
includeAgents: boolean;
|
|
30
|
+
}): ComposerTaskChipGroup[];
|