@qwen-code/web-shell 0.25.3-preview.0 → 0.25.4-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICES.txt +1240 -0
- package/README.md +73 -27
- package/dist/{PierreFilePreview-DAD1C1oX.js → PierreFilePreview-vbxsbBX2.js} +1 -1
- package/dist/{SpreadsheetPreview-DShn9rcb.js → SpreadsheetPreview-yFPFfgME.js} +2 -2
- package/dist/{WorkspaceFileBrowser-zWgE76sn.js → WorkspaceFileBrowser-DGQbVeSD.js} +656 -656
- package/dist/{agents-route-CYSCpPDR.js → agents-route-D6wGe0cs.js} +2 -2
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/docx-preview-BucJeYCm.js +5570 -0
- package/dist/{index-CWxIoEi_.js → index-ChD_Ub2E.js} +59450 -56243
- package/dist/index.js +3 -3
- package/dist/sw.js +1 -1
- package/dist/transcript.js +11721 -11050
- package/dist/types/App.d.ts +7 -2
- package/dist/types/adapters/messageTypes.d.ts +3 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +3 -1
- package/dist/types/components/ChatEditor.d.ts +5 -0
- package/dist/types/components/MessageDeletionToolbar.d.ts +4 -0
- package/dist/types/components/MessageItem.d.ts +2 -0
- package/dist/types/components/MessageList.d.ts +2 -0
- package/dist/types/components/MessageTimestamp.d.ts +5 -2
- package/dist/types/components/ModelRefreshControl.d.ts +5 -0
- package/dist/types/components/artifacts/CodeReviewArtifactDetail.d.ts +5 -0
- package/dist/types/components/artifacts/DocxPreview.d.ts +8 -0
- package/dist/types/components/artifacts/TrajectoryExecutions.d.ts +9 -1
- package/dist/types/components/artifacts/TrajectoryInspector.d.ts +2 -1
- package/dist/types/components/artifacts/artifactUtils.d.ts +7 -0
- package/dist/types/components/artifacts/token-usage-messages.d.ts +9 -0
- package/dist/types/components/artifacts/token-usage-messages.transcript-stub.d.ts +7 -0
- package/dist/types/components/channels/channel-platform.d.ts +1 -1
- package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +3 -1
- package/dist/types/components/dialogs/ApprovalModeDialog.d.ts +3 -1
- package/dist/types/components/dialogs/ModelDialog.d.ts +3 -1
- package/dist/types/components/managed/RemoteWorkspaceRegistration.d.ts +9 -0
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +692 -19
- package/dist/types/components/managed/java-managed-agent-client.d.ts +42 -0
- package/dist/types/components/managed/managed-agent-provider.d.ts +44 -0
- package/dist/types/components/managed/managed-input.d.ts +7 -0
- package/dist/types/components/managed/managed-pending-storage.d.ts +2 -0
- package/dist/types/components/managed/managed-session-messages.d.ts +1 -0
- package/dist/types/components/managed/managed-workspace-messages.d.ts +7 -0
- package/dist/types/components/managed/managed-workspace-messages.transcript-stub.d.ts +7 -0
- package/dist/types/components/managed/use-managed-approval-change.d.ts +2 -1
- package/dist/types/components/managed/use-managed-file-references.d.ts +19 -0
- package/dist/types/components/managed/use-managed-skills.d.ts +12 -0
- package/dist/types/components/managed/use-managed-tasks.d.ts +1 -0
- package/dist/types/components/message-deletion-messages.d.ts +7 -0
- package/dist/types/components/message-deletion-messages.transcript-stub.d.ts +7 -0
- package/dist/types/components/messages/TasksStatusMessage.d.ts +6 -0
- package/dist/types/components/messages/toolFormatting.d.ts +1 -0
- package/dist/types/components/messages/tools/ToolDetailsContext.d.ts +13 -0
- package/dist/types/customization.d.ts +4 -1
- package/dist/types/daemon/session/actions.d.ts +10 -2
- package/dist/types/daemon/session/types.d.ts +6 -1
- package/dist/types/hooks/useApprovalModes.d.ts +2 -0
- package/dist/types/hooks/useAtMentionSources.d.ts +5 -0
- package/dist/types/hooks/useComposerCore.d.ts +2 -0
- package/dist/types/hooks/useInputHistory.d.ts +0 -4
- package/dist/types/hooks/useMessageDeletion.d.ts +33 -0
- package/dist/types/hooks/useModelRefresh.d.ts +6 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/transcript.d.ts +2 -2
- package/dist/types/utils/composerTag.d.ts +1 -0
- package/dist/types/utils/dom.d.ts +1 -0
- package/dist/types/utils/message-deletion.d.ts +20 -0
- package/dist/types/utils/planMode.d.ts +4 -0
- package/dist/types/utils/plural.d.ts +7 -0
- package/dist/types/voice/voice-workspace-target.d.ts +2 -0
- package/dist/{useDaemonMidTurnInjected-Cf5L3VKm.js → useDaemonMidTurnInjected-CfhBFIym.js} +5788 -5298
- package/package.json +3 -1
|
@@ -51,8 +51,38 @@ export declare class JavaManagedAgentClient {
|
|
|
51
51
|
displayName: string;
|
|
52
52
|
canCreateSession: boolean;
|
|
53
53
|
state: "active" | "draining" | "removed";
|
|
54
|
+
defaultCwdRelative?: string;
|
|
55
|
+
canSelectDirectory?: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
listRuntimeNodes(signal?: AbortSignal): Promise<{
|
|
58
|
+
supported: boolean;
|
|
59
|
+
data: components["schemas"]["WebShellRuntimeNode"][];
|
|
60
|
+
}>;
|
|
61
|
+
checkWorkspaceDirectory(request: Schemas['WebShellWorkspaceDirectoryRequest'], signal?: AbortSignal): Promise<{
|
|
62
|
+
nodeId: string;
|
|
63
|
+
canonicalPath: string;
|
|
64
|
+
platform: "linux" | "darwin";
|
|
65
|
+
}>;
|
|
66
|
+
registerWorkspace(request: Schemas['WebShellWorkspaceRegisterRequest'], signal?: AbortSignal): Promise<{
|
|
67
|
+
operationId: string;
|
|
68
|
+
type: "workspace_create";
|
|
69
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled" | "recovery_blocked";
|
|
70
|
+
workspaceId?: string | null;
|
|
71
|
+
failureCode?: string | null;
|
|
72
|
+
replayed: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
getWorkspaceOperation(operationId: string, signal?: AbortSignal): Promise<{
|
|
75
|
+
operationId: string;
|
|
76
|
+
type: "workspace_create";
|
|
77
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled" | "recovery_blocked";
|
|
78
|
+
workspaceId?: string | null;
|
|
79
|
+
failureCode?: string | null;
|
|
80
|
+
replayed: boolean;
|
|
54
81
|
}>;
|
|
55
82
|
createWorkspace(request: Schemas['WebShellWorkspaceCreateRequest'], signal?: AbortSignal): Promise<JavaAgentWorkspace>;
|
|
83
|
+
queryWorkspaceFiles(request: Schemas['WebShellWorkspaceFileQueryRequest'], signal?: AbortSignal): Promise<Schemas['WebShellWorkspaceFilePage']>;
|
|
84
|
+
readWorkspaceFile(request: Schemas['WebShellWorkspaceFileReadRequest'], signal?: AbortSignal): Promise<Schemas['WebShellWorkspaceFileSnapshot']>;
|
|
85
|
+
workspaceDirectories(request: Schemas['WebShellWorkspaceDirectoryQueryRequest'], signal?: AbortSignal): Promise<Schemas['WebShellWorkspaceDirectoryPage']>;
|
|
56
86
|
getSessionApproval(sessionId: string, signal?: AbortSignal): Promise<Schemas['WebShellSessionApproval']>;
|
|
57
87
|
changeApproval(request: Schemas['WebShellChangeApprovalRequest'], signal?: AbortSignal): Promise<Schemas['WebShellApprovalChangeResult']>;
|
|
58
88
|
getSessionOptions(agentId: string, signal?: AbortSignal): Promise<Schemas['WebShellSessionOptions']>;
|
|
@@ -69,6 +99,7 @@ export declare class JavaManagedAgentClient {
|
|
|
69
99
|
getTask(request: Schemas['WebShellTaskGetRequest'], signal?: AbortSignal): Promise<{
|
|
70
100
|
taskId: string;
|
|
71
101
|
sessionId: string;
|
|
102
|
+
childSessionId?: string;
|
|
72
103
|
kind: components["schemas"]["TaskKind"];
|
|
73
104
|
state: components["schemas"]["TaskState"];
|
|
74
105
|
definitionRevision?: number;
|
|
@@ -107,11 +138,22 @@ export declare class JavaManagedAgentClient {
|
|
|
107
138
|
modelSelection: components["schemas"]["WebShellModelSelection"];
|
|
108
139
|
supported: boolean;
|
|
109
140
|
}>;
|
|
141
|
+
getSessionSkills(sessionId: string, signal?: AbortSignal): Promise<{
|
|
142
|
+
skills: components["schemas"]["WebShellSkill"][];
|
|
143
|
+
}>;
|
|
110
144
|
changeModel(request: Schemas['WebShellChangeModelRequest'], signal?: AbortSignal): Promise<{
|
|
111
145
|
sessionId: string;
|
|
112
146
|
modelSelection: components["schemas"]["WebShellModelSelection"];
|
|
113
147
|
replayed: boolean;
|
|
114
148
|
}>;
|
|
149
|
+
getToolDetails(sessionId: string, itemId: string, signal?: AbortSignal): Promise<{
|
|
150
|
+
input: {
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
} | null;
|
|
153
|
+
output: string | null;
|
|
154
|
+
truncated: boolean;
|
|
155
|
+
shellResult?: components["schemas"]["WebShellShellResult"];
|
|
156
|
+
}>;
|
|
115
157
|
getToolResult(sessionId: string, itemId: string, signal?: AbortSignal): Promise<{
|
|
116
158
|
result: components["schemas"]["PublicToolResult"];
|
|
117
159
|
access: components["schemas"]["ArtifactAccess"];
|
|
@@ -3,20 +3,26 @@ import type { ManagedToolResultReader } from './managed-tool-result-types';
|
|
|
3
3
|
export type ManagedAgentSessionPhase = 'created' | 'admitted' | 'runtime_starting' | 'agent_running' | 'waiting_runtime' | 'tool_running' | 'cancelling' | 'completed' | 'failed' | 'cancelled';
|
|
4
4
|
export type ManagedAgentRuntimeState = 'unknown' | 'starting' | 'ready' | 'failed';
|
|
5
5
|
export type ManagedApprovalMode = 'default' | 'auto-edit' | 'yolo';
|
|
6
|
+
export type ManagedInputBlock = components['schemas']['InputBlock'];
|
|
7
|
+
export type ManagedSessionSkills = components['schemas']['WebShellSessionSkills'];
|
|
6
8
|
export declare function isManagedApprovalMode(value: unknown): value is ManagedApprovalMode;
|
|
7
9
|
export interface ManagedSessionOptions {
|
|
8
10
|
approvalMode: ManagedApprovalMode;
|
|
9
11
|
availableApprovalModes: ManagedApprovalMode[];
|
|
12
|
+
planModeSupported?: boolean;
|
|
13
|
+
inputAttachments?: boolean;
|
|
10
14
|
}
|
|
11
15
|
export interface ManagedSessionApproval extends ManagedSessionOptions {
|
|
12
16
|
approvalRevision: number;
|
|
13
17
|
supported: boolean;
|
|
18
|
+
planMode?: boolean;
|
|
14
19
|
}
|
|
15
20
|
export interface ManagedApprovalChangeResult {
|
|
16
21
|
sessionId: string;
|
|
17
22
|
approvalMode: ManagedApprovalMode;
|
|
18
23
|
approvalRevision: number;
|
|
19
24
|
replayed: boolean;
|
|
25
|
+
planMode?: boolean;
|
|
20
26
|
}
|
|
21
27
|
export interface ManagedModelContext {
|
|
22
28
|
modelId: string;
|
|
@@ -47,6 +53,8 @@ export interface ManagedAgentSessionSummary {
|
|
|
47
53
|
approvalMode?: ManagedApprovalMode;
|
|
48
54
|
initialApprovalMode?: ManagedApprovalMode;
|
|
49
55
|
approvalRevision?: number;
|
|
56
|
+
planMode?: boolean;
|
|
57
|
+
planModeSupported?: boolean;
|
|
50
58
|
modelContext?: ManagedModelContext;
|
|
51
59
|
modelSelection?: ManagedModelSelection;
|
|
52
60
|
activeTurnId?: string;
|
|
@@ -75,6 +83,7 @@ export interface ManagedAgentSessionSummary {
|
|
|
75
83
|
cwdChange?: boolean;
|
|
76
84
|
modelChange?: boolean;
|
|
77
85
|
approvalModeChange?: boolean;
|
|
86
|
+
inputAttachments?: boolean;
|
|
78
87
|
};
|
|
79
88
|
failure?: {
|
|
80
89
|
code: string;
|
|
@@ -120,6 +129,15 @@ export type ManagedTaskEventPage = components['schemas']['WebShellTaskEventPage'
|
|
|
120
129
|
export type ManagedTaskCancelOperation = components['schemas']['WebShellCommandOperation'] & {
|
|
121
130
|
type: 'task_cancel';
|
|
122
131
|
};
|
|
132
|
+
export type ManagedRuntimeNode = components['schemas']['WebShellRuntimeNode'];
|
|
133
|
+
export type ManagedWorkspaceDirectory = components['schemas']['WebShellWorkspaceDirectory'];
|
|
134
|
+
export type ManagedWorkspaceCreateOperation = components['schemas']['WebShellWorkspaceCreateOperation'];
|
|
135
|
+
export interface ManagedWorkspaceRegistration {
|
|
136
|
+
listNodes(options: ManagedAgentRequestOptions): Promise<components['schemas']['WebShellRuntimeNodePage']>;
|
|
137
|
+
checkDirectory(request: components['schemas']['WebShellWorkspaceDirectoryRequest'], options: ManagedAgentRequestOptions): Promise<ManagedWorkspaceDirectory>;
|
|
138
|
+
create(request: Omit<components['schemas']['WebShellWorkspaceRegisterRequest'], 'idempotencyKey' | 'requestId'>, options: ManagedAgentCommandOptions): Promise<ManagedWorkspaceCreateOperation>;
|
|
139
|
+
query(operationId: string, options: ManagedAgentRequestOptions): Promise<ManagedWorkspaceCreateOperation>;
|
|
140
|
+
}
|
|
123
141
|
/** A Hosted tool approval waiting for the Session owner's answer. */
|
|
124
142
|
export interface ManagedAgentPendingAction {
|
|
125
143
|
actionId: string;
|
|
@@ -142,12 +160,18 @@ export interface ManagedAgentProvider {
|
|
|
142
160
|
readonly storageKey: string;
|
|
143
161
|
readonly canCancel: boolean;
|
|
144
162
|
readonly acceptsWorkspaceCwd: boolean;
|
|
163
|
+
readonly skills?: {
|
|
164
|
+
list(sessionId: string, options: ManagedAgentRequestOptions): Promise<ManagedSessionSkills>;
|
|
165
|
+
};
|
|
145
166
|
/** Present when the provider can serve Hosted permission Actions. */
|
|
146
167
|
readonly actions?: {
|
|
147
168
|
listPending(sessionId: string, options: ManagedAgentRequestOptions): Promise<ManagedAgentPendingAction[]>;
|
|
148
169
|
respond(action: ManagedAgentPendingAction, optionId: string, options: ManagedAgentCommandOptions): Promise<void>;
|
|
149
170
|
};
|
|
150
171
|
readonly toolResults?: ManagedToolResultReader;
|
|
172
|
+
readonly toolDetails?: {
|
|
173
|
+
get(sessionId: string, itemId: string, options: ManagedAgentRequestOptions): Promise<components['schemas']['WebShellToolDetails']>;
|
|
174
|
+
};
|
|
151
175
|
readonly tasks?: {
|
|
152
176
|
list(sessionId: string, options: ManagedAgentRequestOptions & {
|
|
153
177
|
cursor?: string;
|
|
@@ -175,6 +199,7 @@ export interface ManagedAgentProvider {
|
|
|
175
199
|
submit(sessionId: string, request: {
|
|
176
200
|
approvalMode: ManagedApprovalMode;
|
|
177
201
|
expectedRevision: number;
|
|
202
|
+
planMode?: boolean;
|
|
178
203
|
}, options: ManagedAgentCommandOptions & {
|
|
179
204
|
requestId: string;
|
|
180
205
|
}): Promise<ManagedApprovalChangeResult>;
|
|
@@ -186,8 +211,13 @@ export interface ManagedAgentProvider {
|
|
|
186
211
|
expectedRevision: number;
|
|
187
212
|
}, options: ManagedAgentCommandOptions): Promise<ManagedModelChangeResult>;
|
|
188
213
|
};
|
|
214
|
+
readonly workspaceFiles?: {
|
|
215
|
+
query(request: components['schemas']['WebShellWorkspaceFileQueryRequest'], options: ManagedAgentRequestOptions): Promise<components['schemas']['WebShellWorkspaceFilePage']>;
|
|
216
|
+
read(request: components['schemas']['WebShellWorkspaceFileReadRequest'], options: ManagedAgentRequestOptions): Promise<components['schemas']['WebShellWorkspaceFileSnapshot']>;
|
|
217
|
+
};
|
|
189
218
|
readonly workspaceBinding?: {
|
|
190
219
|
readonly agentId: string;
|
|
220
|
+
readonly registration?: ManagedWorkspaceRegistration;
|
|
191
221
|
/** Host-published model-specific AgentDefinitions available for new Sessions. */
|
|
192
222
|
readonly modelPresets?: readonly {
|
|
193
223
|
agentId: string;
|
|
@@ -202,18 +232,26 @@ export interface ManagedAgentProvider {
|
|
|
202
232
|
nextCursor?: string;
|
|
203
233
|
supported: boolean;
|
|
204
234
|
canCreateWorkspace?: boolean;
|
|
235
|
+
canSelectDirectory?: boolean;
|
|
205
236
|
supportsApprovalModeSelection?: boolean;
|
|
206
237
|
}>;
|
|
207
238
|
get(workspaceId: string, options: ManagedAgentRequestOptions): Promise<ManagedAgentWorkspace>;
|
|
208
239
|
createWorkspace?(request: {
|
|
209
240
|
displayName: string;
|
|
241
|
+
sourceWorkspaceId?: string;
|
|
242
|
+
cwdRelative?: string;
|
|
210
243
|
}, options: ManagedAgentCommandOptions): Promise<ManagedAgentWorkspace>;
|
|
244
|
+
directories?(request: {
|
|
245
|
+
workspaceId: string;
|
|
246
|
+
cwdRelative: string;
|
|
247
|
+
}, options: ManagedAgentRequestOptions): Promise<components['schemas']['WebShellWorkspaceDirectoryPage']>;
|
|
211
248
|
getSessionOptions?(agentId: string, options: ManagedAgentRequestOptions): Promise<ManagedSessionOptions>;
|
|
212
249
|
createEmpty(request: {
|
|
213
250
|
agentId: string;
|
|
214
251
|
workspaceId: string;
|
|
215
252
|
cwdRelative: string;
|
|
216
253
|
approvalMode?: ManagedApprovalMode;
|
|
254
|
+
planMode?: boolean;
|
|
217
255
|
}, options: ManagedAgentCommandOptions): Promise<{
|
|
218
256
|
sessionId: string;
|
|
219
257
|
}>;
|
|
@@ -222,7 +260,9 @@ export interface ManagedAgentProvider {
|
|
|
222
260
|
workspaceId: string;
|
|
223
261
|
cwdRelative: string;
|
|
224
262
|
text: string;
|
|
263
|
+
input?: ManagedInputBlock[];
|
|
225
264
|
approvalMode?: ManagedApprovalMode;
|
|
265
|
+
planMode?: boolean;
|
|
226
266
|
}, options: ManagedAgentCommandOptions): Promise<{
|
|
227
267
|
sessionId: string;
|
|
228
268
|
}>;
|
|
@@ -243,9 +283,11 @@ export interface ManagedAgentProvider {
|
|
|
243
283
|
createSession(request: {
|
|
244
284
|
text: string;
|
|
245
285
|
workspaceCwd?: string;
|
|
286
|
+
input?: ManagedInputBlock[];
|
|
246
287
|
}, options: ManagedAgentCommandOptions): Promise<ManagedAgentTurnAdmission>;
|
|
247
288
|
submitPrompt(sessionId: string, request: {
|
|
248
289
|
text: string;
|
|
290
|
+
input?: ManagedInputBlock[];
|
|
249
291
|
}, options: ManagedAgentCommandOptions): Promise<ManagedAgentTurnAdmission>;
|
|
250
292
|
cancel(sessionId: string, turnId: string, options: ManagedAgentCommandOptions): Promise<void>;
|
|
251
293
|
subscribeEvents(sessionId: string, options: ManagedAgentRequestOptions & {
|
|
@@ -270,4 +312,6 @@ export interface ManagedAgentWorkspace {
|
|
|
270
312
|
displayName: string;
|
|
271
313
|
state: string;
|
|
272
314
|
canCreateSession: boolean;
|
|
315
|
+
defaultCwdRelative?: string;
|
|
316
|
+
canSelectDirectory?: boolean;
|
|
273
317
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PromptFile, PromptImage } from '../../adapters/promptTypes';
|
|
2
|
+
import type { ManagedInputBlock } from './managed-agent-provider';
|
|
3
|
+
import type { EditorHandle } from '../../hooks/useComposerCore';
|
|
4
|
+
export declare function isManagedInput(value: unknown): value is ManagedInputBlock[];
|
|
5
|
+
export declare function encodeManagedInput(text: string, images?: readonly PromptImage[], files?: readonly PromptFile[]): Promise<ManagedInputBlock[]>;
|
|
6
|
+
export declare function managedInputText(input: readonly ManagedInputBlock[]): string;
|
|
7
|
+
export declare function restoreManagedAttachments(editor: EditorHandle | null, input?: readonly ManagedInputBlock[]): void;
|
|
@@ -2,3 +2,4 @@ import type { Message } from '../../adapters/types';
|
|
|
2
2
|
import type { ManagedAgentSessionEvent } from './managed-agent-provider';
|
|
3
3
|
export declare function mergeManagedEvents(current: readonly ManagedAgentSessionEvent[], incoming: readonly ManagedAgentSessionEvent[]): ManagedAgentSessionEvent[];
|
|
4
4
|
export declare function managedEventsToMessages(events: readonly ManagedAgentSessionEvent[], truncatedLabel: string): Message[];
|
|
5
|
+
export declare function createManagedMessageProjector(): (events: readonly ManagedAgentSessionEvent[], truncatedLabel: string) => Message[];
|
|
@@ -5,6 +5,7 @@ interface ApprovalIntent {
|
|
|
5
5
|
expectedRevision: number;
|
|
6
6
|
idempotencyKey: string;
|
|
7
7
|
requestId: string;
|
|
8
|
+
planMode?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare function useManagedApprovalChange(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined, summary: ManagedAgentSessionSummary | undefined, refreshSummary: (signal?: AbortSignal) => Promise<ManagedAgentSessionSummary | undefined>, interactive: boolean): {
|
|
10
11
|
options: ManagedSessionApproval | undefined;
|
|
@@ -12,7 +13,7 @@ export declare function useManagedApprovalChange(provider: ManagedAgentProvider,
|
|
|
12
13
|
optionsError: boolean;
|
|
13
14
|
supported: boolean;
|
|
14
15
|
blocked: boolean;
|
|
15
|
-
submit: (approvalMode: ManagedApprovalMode) => Promise<true | undefined>;
|
|
16
|
+
submit: (approvalMode: ManagedApprovalMode, planMode?: boolean) => Promise<true | undefined>;
|
|
16
17
|
confirm: () => Promise<true | undefined>;
|
|
17
18
|
reloadOptions: () => void;
|
|
18
19
|
isBlocked: () => boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AtMentionWorkspaceActions } from '../../hooks/useAtMentionSources';
|
|
2
|
+
import type { ComposerSubmitMetadata } from '../../hooks/useComposerCore';
|
|
3
|
+
import type { ManagedAgentProvider } from './managed-agent-provider';
|
|
4
|
+
import type { PromptFile } from '../../adapters/promptTypes';
|
|
5
|
+
export declare function useManagedFileReferences(provider: ManagedAgentProvider, clientId: string, workspace: {
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
cwdRelative: string;
|
|
8
|
+
contextRevision?: number;
|
|
9
|
+
state?: string;
|
|
10
|
+
} | undefined, sessionId?: string): {
|
|
11
|
+
actions: AtMentionWorkspaceActions | undefined;
|
|
12
|
+
busy: boolean;
|
|
13
|
+
prepareInput: (text: string, files?: readonly PromptFile[], metadata?: ComposerSubmitMetadata) => Promise<{
|
|
14
|
+
text: string;
|
|
15
|
+
files: PromptFile[];
|
|
16
|
+
}>;
|
|
17
|
+
assertCurrent: () => void;
|
|
18
|
+
error: string | undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ManagedAgentProvider } from './managed-agent-provider';
|
|
2
|
+
export declare function useManagedSkills(provider: ManagedAgentProvider, clientId: string, sessionId: string | undefined): {
|
|
3
|
+
supported: boolean;
|
|
4
|
+
skills: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
loaded: boolean;
|
|
10
|
+
error: boolean;
|
|
11
|
+
onOpenChange: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
12
|
+
};
|
|
@@ -9,6 +9,7 @@ export declare function useManagedTasks(provider: ManagedAgentProvider, clientId
|
|
|
9
9
|
task: {
|
|
10
10
|
taskId: string;
|
|
11
11
|
sessionId: string;
|
|
12
|
+
childSessionId?: string;
|
|
12
13
|
kind: import("./generated/managed-agent-api").components["schemas"]["TaskKind"];
|
|
13
14
|
state: import("./generated/managed-agent-api").components["schemas"]["TaskState"];
|
|
14
15
|
definitionRevision?: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare const MESSAGE_DELETION_MESSAGES_EN: Record<string, string | ((vars?: Record<string, string | number>) => string)>;
|
|
7
|
+
export declare const MESSAGE_DELETION_MESSAGES_ZH: Record<string, string | ((vars?: Record<string, string | number>) => string)>;
|
|
@@ -36,4 +36,10 @@ export declare function ShellTaskDetail({ task, actions: providedActions, }: {
|
|
|
36
36
|
task: DaemonSessionShellTaskStatus;
|
|
37
37
|
actions?: DaemonSessionActions;
|
|
38
38
|
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Tab title for a shell task. The full command is unreadable once the tab
|
|
41
|
+
* truncates it, so use the executable's basename (`/opt/homebrew/.../mariadbd`
|
|
42
|
+
* becomes `mariadbd`) and fall back to the first line.
|
|
43
|
+
*/
|
|
44
|
+
export declare function shellTaskPanelTitle(command: string): string;
|
|
39
45
|
export { ACTIVE_EVENT as TASKS_STATUS_ACTIVE_EVENT };
|
|
@@ -34,6 +34,7 @@ export declare function getToolDescription(tool: ACPToolCall, workspaceCwd?: str
|
|
|
34
34
|
export declare function getToolSummaryDescription(tool: ACPToolCall, workspaceCwd?: string): string;
|
|
35
35
|
export declare function getShellToolSemanticDescription(tool: ACPToolCall): string;
|
|
36
36
|
export declare function extractText(tool: ACPToolCall): string | null;
|
|
37
|
+
export declare function hasRecordedOutput(tool: ACPToolCall): boolean;
|
|
37
38
|
export declare function getAdvisorDisplayText(tool: ACPToolCall): string | null;
|
|
38
39
|
export declare function getToolResultSummary(tool: ACPToolCall): string;
|
|
39
40
|
export declare function getEmptyMcpToolTitleDescription(toolName: string | undefined, title: string | undefined, input: Record<string, unknown> | undefined): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ACPToolCall } from '../../../adapters/types';
|
|
3
|
+
export type ToolDetailsLoader = (callId: string, signal: AbortSignal) => Promise<Pick<ACPToolCall, 'args' | 'rawOutput'>>;
|
|
4
|
+
export declare const ToolDetailsContext: import("react").Context<ToolDetailsLoader | undefined>;
|
|
5
|
+
export declare function useToolDetails(tool: ACPToolCall, expanded: boolean): {
|
|
6
|
+
tool: import("../../../adapters/messageTypes").DaemonMessageToolCall;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function ToolDetails({ tool, enabled, children, }: {
|
|
10
|
+
tool: ACPToolCall;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
children: (tool: ACPToolCall) => ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { WebShellApprovalMode } from './utils/planMode';
|
|
1
2
|
import type { ArtifactFilter } from './components/artifacts/TurnOutputs';
|
|
2
3
|
import { type CSSProperties, type ComponentType, type ReactNode } from 'react';
|
|
3
4
|
import type { Components, Options } from 'react-markdown';
|
|
4
5
|
import type { ChartRendererRegistry, MarkdownChartLabelOverrides } from '@datafe-open/markdown-chart';
|
|
5
6
|
import type { MarkdownChartReactErrorHandler } from '@datafe-open/markdown-chart-react';
|
|
6
7
|
import type { DaemonInputAnnotation, DaemonSessionArtifact, DaemonSessionAttachmentReference, SessionSource, GoalSnapshotV2 } from '@qwen-code/sdk/daemon';
|
|
7
|
-
import type { DaemonStreamingState } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
8
|
+
import type { DaemonSessionActions, DaemonStreamingState } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
8
9
|
import type { ACPToolCall } from './adapters/types';
|
|
9
10
|
import type { WelcomeHeaderProps } from './components/WelcomeHeader';
|
|
10
11
|
import type { WebShellTheme } from './themeContext';
|
|
@@ -512,6 +513,8 @@ export type FooterRenderer = ComponentType<WebShellFooterRenderInfo>;
|
|
|
512
513
|
*/
|
|
513
514
|
export type LoadingPhrasesResolver = (language: string) => readonly string[] | undefined | null;
|
|
514
515
|
export interface WebShellCustomization {
|
|
516
|
+
onRefreshModels?: Parameters<DaemonSessionActions['refreshModels']>[0];
|
|
517
|
+
allowedApprovalModes?: readonly WebShellApprovalMode[];
|
|
515
518
|
filterArtifact?: ArtifactFilter;
|
|
516
519
|
artifact?: WebShellArtifactCustomization;
|
|
517
520
|
/** Host-specific label for the Ask User Question free-text choice. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Dispatch, SetStateAction } from 'react';
|
|
7
|
-
import type { DaemonSessionClient, CreateSessionRequest, DaemonTranscriptStore, DaemonCapabilities } from '@qwen-code/sdk/daemon';
|
|
7
|
+
import type { DaemonClient, DaemonSessionClient, CreateSessionRequest, DaemonTranscriptStore, DaemonCapabilities } from '@qwen-code/sdk/daemon';
|
|
8
8
|
import { type TimerRef } from '../timing.js';
|
|
9
9
|
import type { ActivePrompt, AddDaemonSessionNotice, DaemonActivePromptState, DaemonConnectionState, DaemonPromptStatus, DaemonSessionActions, SettledPrompt, PendingSessionLoad, DaemonProductSessionContext } from './types.js';
|
|
10
10
|
interface RefBox<T> {
|
|
@@ -14,6 +14,13 @@ export declare function resolveSessionRestoreTimeouts(capabilities: DaemonCapabi
|
|
|
14
14
|
requestTimeoutMs: number;
|
|
15
15
|
watchdogTimeoutMs: number | undefined;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Limit for a workspace create, which waits for the capability preflight and
|
|
19
|
+
* then for the create request. The SDK sizes that request from the same
|
|
20
|
+
* advertised session budget as a restore, so an action limit below the sum of
|
|
21
|
+
* the two reports a timeout on a spawn the daemon is still finishing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveCreateWatchdogTimeoutMs(capabilities: DaemonCapabilities | undefined): number;
|
|
17
24
|
export interface CreateDaemonSessionActionsArgs {
|
|
18
25
|
store: DaemonTranscriptStore;
|
|
19
26
|
sessionRef: RefBox<DaemonSessionClient | undefined>;
|
|
@@ -54,6 +61,7 @@ export interface CreateDaemonSessionActionsArgs {
|
|
|
54
61
|
createDetachedSession: (workspaceCwd?: string, overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'sourceType' | 'worktree' | 'branch'>) => Promise<DaemonSessionClient>;
|
|
55
62
|
createDetachedStandaloneSession: (overrides?: Pick<CreateSessionRequest, 'approvalMode' | 'modelServiceId'>) => Promise<DaemonSessionClient>;
|
|
56
63
|
getDefaultSessionContext: () => DaemonProductSessionContext | undefined;
|
|
64
|
+
getClient?: () => DaemonClient | undefined;
|
|
57
65
|
getConnection: () => DaemonConnectionState;
|
|
58
66
|
getEventDetailMode: () => 'full' | 'summary';
|
|
59
67
|
hasSessionActivePrompt: () => boolean;
|
|
@@ -80,7 +88,7 @@ export interface CreateDaemonSessionActionsArgs {
|
|
|
80
88
|
export declare function getWorkspaceModelsAfterSessionClear(current: DaemonConnectionState): DaemonConnectionState['models'];
|
|
81
89
|
export declare function getConnectionAfterSessionClear(current: DaemonConnectionState, clearedSessionId: string | undefined, preserveWorkspaceMetadata?: boolean, dropSessionContext?: boolean): DaemonConnectionState;
|
|
82
90
|
export declare function advanceSessionRecoveryGeneration(generations: WeakMap<DaemonSessionClient, number>, session: DaemonSessionClient): number;
|
|
83
|
-
export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getConnection, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
|
|
91
|
+
export declare function createDaemonSessionActions({ store, sessionRef, activePromptsRef, settledPromptsRef, pendingSessionLoadRef, pendingSessionLoadIdRef, sessionConfigGeneration, sessionRecoveryGeneration, heartbeatSupportedRef, manualSessionClearRef, skipNextCleanupDetachSessionRef, passiveAssistantDoneTimerRef, daemonActivePromptRef, settleRestoredActivePrompt, flushTranscript, getCreateSessionRequest, createDetachedSession, createDetachedStandaloneSession, getDefaultSessionContext, getClient, getConnection, getEventDetailMode, hasSessionActivePrompt, resetCurrentSessionActivePrompt, restartEventStream, addNotice, setConnection, setPromptStatus, setRestoreSessionId, setRestoreSessionContext, setRestoreMode, setRestoreSessionNonce, setAttachSessionNonce, setNewSessionNonce, clearLiveJournalRepair, onPromptAdmitted, onContinuationAdmitted, onPromptRemoved, }: CreateDaemonSessionActionsArgs): DaemonSessionActions;
|
|
84
92
|
/**
|
|
85
93
|
* Key under which a shell command tracks its prompt in the active-prompt map.
|
|
86
94
|
* Shell commands run as their own prompt alongside a conversation turn, so they
|
|
@@ -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, DaemonSessionSummary, DaemonSessionSupportedCommandsStatus, 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, 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;
|
|
@@ -375,6 +375,10 @@ export interface DaemonSessionActions {
|
|
|
375
375
|
submitPrompt(text: string, options?: SubmitPromptOptions): Promise<SubmitPromptResult>;
|
|
376
376
|
cancel(): Promise<void>;
|
|
377
377
|
setModel(modelId: string): Promise<SetModelResult>;
|
|
378
|
+
refreshModels(beforeRefresh?: (target: {
|
|
379
|
+
workspaceCwd: string;
|
|
380
|
+
sessionId?: string;
|
|
381
|
+
}) => void | Promise<void>): Promise<void>;
|
|
378
382
|
setReasoningEffort(value: ReasoningSelection, opts?: {
|
|
379
383
|
persist?: boolean;
|
|
380
384
|
}): Promise<void>;
|
|
@@ -517,6 +521,7 @@ export interface DaemonSessionActions {
|
|
|
517
521
|
removePendingPrompt(promptId: string, opts?: PendingPromptActionOptions): Promise<DaemonRemovePendingPromptResult>;
|
|
518
522
|
sendShellCommand(command: string): Promise<DaemonShellCommandResult>;
|
|
519
523
|
getTasks(opts?: GetTasksActionOptions): Promise<DaemonSessionTasksStatus>;
|
|
524
|
+
getTaskRuntime(taskId: string): Promise<DaemonSessionTaskRuntimeStatus>;
|
|
520
525
|
getWorkflowTasks(opts?: GetTasksActionOptions): Promise<DaemonSessionWorkflowTasksStatus>;
|
|
521
526
|
cancelTask(taskId: string, kind: DaemonSessionTaskWithWorkflowStatus['kind']): Promise<{
|
|
522
527
|
cancelled: boolean;
|
|
@@ -66,6 +66,11 @@ export declare function createBuiltinProviderCache(): BuiltinProviderCache;
|
|
|
66
66
|
export declare function getCached<K, V>(cache: Map<K, Promise<V>>, key: K, load: () => Promise<V>): Promise<V>;
|
|
67
67
|
export interface AtMentionWorkspaceActions {
|
|
68
68
|
globWorkspace?: GlobWorkspaceFn;
|
|
69
|
+
searchWorkspaceFiles?: (query: string, signal: AbortSignal) => Promise<string[]>;
|
|
70
|
+
prepareFileReference?: (tag: WebShellComposerTag) => Promise<WebShellComposerTag>;
|
|
71
|
+
onFileReferenceDiscarded?: () => void;
|
|
72
|
+
scopeKey?: string;
|
|
73
|
+
filesOnly?: boolean;
|
|
69
74
|
loadExtensionsStatus?: LoadExtensionsStatusFn;
|
|
70
75
|
listDirectory?: ListDirectoryFn;
|
|
71
76
|
loadMcpStatus?: LoadMcpStatusFn;
|
|
@@ -101,6 +101,8 @@ export interface UseComposerCoreOptions {
|
|
|
101
101
|
shellModeEnabled?: boolean;
|
|
102
102
|
attachmentsEnabled?: boolean;
|
|
103
103
|
workspaceFeaturesEnabled?: boolean;
|
|
104
|
+
fileReferenceActions?: AtMentionWorkspaceActions;
|
|
105
|
+
persistFileReferences?: boolean;
|
|
104
106
|
composerTagIcons?: WebShellComposerTagIconMap;
|
|
105
107
|
parseUserMessageContent?: UserMessageContentParser;
|
|
106
108
|
renderComposerTag?: ComposerTagRenderer;
|
|
@@ -10,8 +10,4 @@ export declare function useInputHistory(storageKey?: string, fallbackStorageKey?
|
|
|
10
10
|
getReverseMatches: (query: string) => string[];
|
|
11
11
|
getLastEntry: (filter?: (entry: string) => boolean) => string | null;
|
|
12
12
|
resetSearch: () => void;
|
|
13
|
-
nav: {
|
|
14
|
-
canUp: boolean;
|
|
15
|
-
canDown: boolean;
|
|
16
|
-
};
|
|
17
13
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Message } from '../adapters/types';
|
|
2
|
+
export interface MessageDeletionControls {
|
|
3
|
+
active: boolean;
|
|
4
|
+
busy: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
selected: ReadonlySet<string>;
|
|
7
|
+
allowed: ReadonlySet<string>;
|
|
8
|
+
groupByMessage: ReadonlyMap<string, string>;
|
|
9
|
+
error?: string;
|
|
10
|
+
confirming: boolean;
|
|
11
|
+
canDelete(message: Message): boolean;
|
|
12
|
+
start(message: Message): void;
|
|
13
|
+
toggle(groupId: string): void;
|
|
14
|
+
cancel(): void;
|
|
15
|
+
setConfirming(value: boolean): void;
|
|
16
|
+
submit(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useMessageDeletion(messages: Message[], sessionBlocked: boolean, historical?: boolean): {
|
|
19
|
+
active: boolean;
|
|
20
|
+
busy: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
groupByMessage: Map<string, string>;
|
|
23
|
+
error: string | undefined;
|
|
24
|
+
confirming: boolean;
|
|
25
|
+
selected: Set<string>;
|
|
26
|
+
allowed: Set<string>;
|
|
27
|
+
canDelete: (message: import("../adapters/messageTypes").DaemonMessage) => boolean;
|
|
28
|
+
start: (message: import("../adapters/messageTypes").DaemonMessage) => void;
|
|
29
|
+
toggle: (id: string) => void;
|
|
30
|
+
cancel: () => void;
|
|
31
|
+
setConfirming: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
32
|
+
submit: () => void;
|
|
33
|
+
} | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DaemonSessionActions } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
|
+
export declare function useModelRefresh(beforeRefresh?: Parameters<DaemonSessionActions['refreshModels']>[0]): {
|
|
3
|
+
refresh: (() => Promise<void>) | undefined;
|
|
4
|
+
refreshing: boolean;
|
|
5
|
+
error: string | undefined;
|
|
6
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ import { type WebShellBrowserNotificationsOptions } from './browser-turn-notific
|
|
|
6
6
|
export { WebShellTranscript } from './components/WebShellTranscript';
|
|
7
7
|
export type { WebShellTranscriptProps } from './components/WebShellTranscript';
|
|
8
8
|
export * from './daemon-react-sdk';
|
|
9
|
+
export type { WebShellApprovalMode } from './utils/planMode';
|
|
9
10
|
export type { WebShellBrowserNotificationsOptions } from './browser-turn-notifications';
|
|
10
11
|
export { JavaManagedAgentClient, JavaManagedAgentHttpError, type JavaAgentCommandAdmission, type JavaAgentEnvironment, type JavaAgentEvent, type JavaAgentSession, type JavaAgentTranscript, type JavaAgentTurn, type JavaManagedAgentClientOptions, } from './components/managed/java-managed-agent-client';
|
|
11
12
|
export { createJavaManagedAgentProvider, type JavaManagedAgentProviderOptions, } from './components/managed/java-managed-agent-provider';
|
|
12
13
|
export { ManagedAgentWebShell, type ManagedAgentWebShellProps, } from './ManagedAgentWebShell';
|
|
13
14
|
export type { ManagedArtifact, ManagedArtifactPage, ManagedArtifactResponse, ManagedArtifactSave, ManagedToolResult, ManagedToolResultReader, ManagedToolResultResponse, } from './components/managed/managed-tool-result-types';
|
|
14
|
-
export { type ManagedAgentCommandOptions, type ManagedAgentPendingAction, type ManagedAgentProvider, type ManagedAgentRequestOptions, type ManagedAgentRuntimeState, type ManagedAgentSessionEvent, type ManagedAgentSessionEventType, type ManagedAgentSessionPhase, type ManagedAgentSessionSummary, type ManagedAgentSessionTranscript, type ManagedAgentTurnAdmission, } from './components/managed/managed-agent-provider';
|
|
15
|
+
export { type ManagedAgentCommandOptions, type ManagedAgentPendingAction, type ManagedAgentProvider, type ManagedAgentRequestOptions, type ManagedAgentRuntimeState, type ManagedAgentSessionEvent, type ManagedAgentSessionEventType, type ManagedAgentSessionPhase, type ManagedAgentSessionSummary, type ManagedAgentSessionTranscript, type ManagedAgentTurnAdmission, type ManagedRuntimeNode, type ManagedWorkspaceDirectory, type ManagedWorkspaceCreateOperation, type ManagedWorkspaceRegistration, } from './components/managed/managed-agent-provider';
|
|
15
16
|
export interface WebShellWithProvidersProps extends WebShellProps {
|
|
16
17
|
/**
|
|
17
18
|
* Opt in to URL routing. Explicit initial session target props override the
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* renders `McpStatusMessage`, `TasksStatusMessage` and the artifact turn
|
|
17
17
|
* outputs, and those call the strict `useDaemonActions` / `useDaemonWorkspace`
|
|
18
18
|
* hooks, so their provider guards are in `dist/transcript.js`. Decoupling them
|
|
19
|
-
* is #11100.
|
|
20
|
-
*
|
|
19
|
+
* is #11100. Artifact tests enforce specific package boundaries rather than
|
|
20
|
+
* asserting that the daemon runtime is absent.
|
|
21
21
|
*
|
|
22
22
|
* Do not rely on importing the package root or incidental tree shaking to
|
|
23
23
|
* keep this payload small; see
|
|
@@ -30,6 +30,7 @@ export declare function isPreviewableFileComposerTag(tag: WebShellComposerTag):
|
|
|
30
30
|
kind: 'file';
|
|
31
31
|
value: string;
|
|
32
32
|
};
|
|
33
|
+
export declare function isValidComposerTag(tag: unknown): tag is WebShellComposerTag;
|
|
33
34
|
export interface ParseUserMessageContentOptions {
|
|
34
35
|
requireSourcePreservation?: boolean;
|
|
35
36
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DaemonTranscriptBlock, DaemonTranscriptStore } from '@qwen-code/sdk/daemon';
|
|
2
|
+
import type { Message } from '../adapters/types.js';
|
|
3
|
+
export interface MessageDeletionGroup {
|
|
4
|
+
id: string;
|
|
5
|
+
promptId?: string;
|
|
6
|
+
promptIds?: string[];
|
|
7
|
+
recordIds: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare function messageDeletionGroups(messages: readonly Message[], groups: readonly MessageDeletionGroup[]): Map<string, string>;
|
|
10
|
+
export declare function localMessageDeletionGroups(messages: readonly Message[]): {
|
|
11
|
+
id: string;
|
|
12
|
+
recordIds: never[];
|
|
13
|
+
}[];
|
|
14
|
+
export declare function localDeletionBlocks(blocks: readonly DaemonTranscriptBlock[]): DaemonTranscriptBlock[];
|
|
15
|
+
export declare function removeDeletedMessageBlocks(store: DaemonTranscriptStore, deletedGroupIds: readonly string[], deletedPromptIds: readonly string[]): void;
|
|
16
|
+
export declare function restoreLocalDeletionBlocks(store: DaemonTranscriptStore, before: readonly DaemonTranscriptBlock[]): void;
|
|
17
|
+
export declare function beginLocalCommand(store: DaemonTranscriptStore, id: string): void;
|
|
18
|
+
export declare function finishLocalCommand(store: DaemonTranscriptStore, id?: string): void;
|
|
19
|
+
export declare function hasPendingLocalCommands(store: DaemonTranscriptStore): boolean;
|
|
20
|
+
export declare function clearPendingLocalCommands(store: DaemonTranscriptStore): void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { DAEMON_APPROVAL_MODES } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
2
|
+
export type WebShellApprovalMode = Exclude<(typeof DAEMON_APPROVAL_MODES)[number], 'plan'>;
|
|
1
3
|
export declare const EXECUTION_APPROVAL_MODES: ("default" | "auto-edit" | "yolo" | "auto")[];
|
|
4
|
+
export declare function resolveApprovalModes(value: unknown): readonly WebShellApprovalMode[];
|
|
5
|
+
export declare function nextApprovalMode(available: readonly WebShellApprovalMode[], current: string): WebShellApprovalMode | undefined;
|
|
2
6
|
export declare function parsePlanCommand(args: string, enabled: boolean): {
|
|
3
7
|
enabled: boolean;
|
|
4
8
|
prompt?: string;
|