@qwen-code/web-shell 0.25.1-preview.0 → 0.25.1-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-route-DAa1HKQE.js +1546 -0
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/{index-D9Bc2Hcz.js → index-zUj3SlrB.js} +46696 -45366
- package/dist/index.js +22 -22
- package/dist/sw.js +1 -1
- package/dist/{toolNames-CDhDlFnq.js → toolNames-B_KiYcXs.js} +3633 -3746
- package/dist/transcript.js +9600 -9312
- package/dist/types/adapters/messageTypes.d.ts +8 -1
- package/dist/types/components/ChatContextHeader.d.ts +3 -1
- package/dist/types/components/agents/AgentCreatePage.d.ts +7 -1
- package/dist/types/components/agents/AgentsManagerPage.d.ts +4 -5
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +1 -8
- package/dist/types/components/artifacts/TrajectoryFilters.d.ts +15 -0
- package/dist/types/components/artifacts/TrajectoryInspector.d.ts +3 -1
- package/dist/types/components/managed/generated/managed-agent-api.d.ts +9 -7
- package/dist/types/components/managed/java-managed-agent-client.d.ts +2 -0
- package/dist/types/components/messages/AssistantMessage.d.ts +3 -1
- package/dist/types/components/messages/UserMessage.d.ts +3 -1
- package/dist/types/components/messages/agent-message-details.d.ts +36 -0
- package/dist/types/components/messages/squad-tag.d.ts +16 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +2 -4
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +1 -2
- package/dist/types/components/workspace-agents/ThreadsPage.d.ts +30 -54
- package/dist/types/components/workspace-agents/add-runtime-dialog.d.ts +30 -4
- package/dist/types/components/workspace-agents/agent-events.d.ts +4 -34
- package/dist/types/components/workspace-agents/agents-route.d.ts +19 -0
- package/dist/types/components/workspace-agents/agents-view-logic.d.ts +14 -163
- package/dist/types/components/workspace-agents/lazy-agents-route.d.ts +7 -0
- package/dist/types/components/workspace-agents/messages.d.ts +2 -2
- package/dist/types/components/workspace-agents/session-agent-live-runs.d.ts +96 -0
- package/dist/types/components/workspace-agents/session-agents-api.d.ts +39 -0
- package/dist/types/components/workspace-agents/squads-section.d.ts +28 -0
- package/dist/types/components/workspace-agents/threads-api.d.ts +24 -35
- package/dist/types/components/workspace-agents/use-session-agent-runs.d.ts +66 -0
- package/dist/types/components/workspace-agents/useAgentChatEntry.d.ts +74 -10
- package/dist/types/components/workspaces/WorkspaceHostProjects.d.ts +11 -0
- package/dist/types/components/workspaces/WorkspaceLocation.d.ts +7 -0
- package/dist/types/config/workspace-hosts.d.ts +11 -0
- package/dist/types/trajectory/filter-messages.d.ts +9 -0
- package/dist/types/trajectory/filter-messages.transcript-stub.d.ts +7 -0
- package/dist/types/trajectory/filterTrajectory.d.ts +22 -0
- package/package.json +2 -1
- package/dist/ThreadsRoute-CXAiD3t_.js +0 -2407
- package/dist/types/components/workspace-agents/LazyThreadsRoute.d.ts +0 -7
- package/dist/types/components/workspace-agents/ThreadChat.d.ts +0 -35
- package/dist/types/components/workspace-agents/ThreadView.d.ts +0 -72
- package/dist/types/components/workspace-agents/ThreadsRoute.d.ts +0 -23
- package/dist/types/components/workspace-agents/useProjectConversations.d.ts +0 -10
|
@@ -2,27 +2,90 @@ import { type ComponentProps } from 'react';
|
|
|
2
2
|
import type { ChatEditor } from '../ChatEditor';
|
|
3
3
|
import type { WebShellAtProvider } from '../../customization';
|
|
4
4
|
import type { useI18n } from '../../i18n';
|
|
5
|
+
import { type SessionAgentsApi } from './session-agents-api';
|
|
6
|
+
import type { WorkspaceAgentSummaryView } from './ThreadsPage';
|
|
7
|
+
import { type DaemonTranscriptBlock, type SessionSquadView } from '@qwen-code/sdk/daemon';
|
|
5
8
|
type Submit = ComponentProps<typeof ChatEditor>['onSubmit'];
|
|
6
9
|
/**
|
|
7
|
-
* The
|
|
8
|
-
*
|
|
10
|
+
* The @tokens of a message, lowercased. Same rules as core's parseMentions: no
|
|
11
|
+
* ASCII word character before `@`, so "请@迁移助手" counts and "a@b.dev" does
|
|
12
|
+
* not; a token followed by `/` is a path, not a mention.
|
|
9
13
|
*/
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
export declare function mentionTokens(text: string): string[];
|
|
15
|
+
/**
|
|
16
|
+
* The agents a message addresses, in mention order. A name may run into the
|
|
17
|
+
* next word in scripts without spaces ("@迁移助手看一下"); the longest name the
|
|
18
|
+
* token starts with wins. Same addressability predicate as the picker: an
|
|
19
|
+
* agent the server would skip must not divert the message.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveMentionedAgents(tokens: readonly string[], agents: readonly WorkspaceAgentSummaryView[]): WorkspaceAgentSummaryView[];
|
|
22
|
+
/** A 32px "people" mask: squads get an icon in the picker, agents none. */
|
|
23
|
+
export declare const SQUAD_PICKER_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAVklEQVR42u2TMQ4AIAgD+f+ncXXRgKFWTC/pai8CZkKIJvgi1PKdRKlgRgDyU20ETkb1lwD0WqIPU88VdoaCOlsPhlo+S5QJOijU8rAEXeDGrggh3mEAQPbbJbEAqj0AAAAASUVORK5CYII=";
|
|
24
|
+
/**
|
|
25
|
+
* The squads a message addresses, by the same token rules as
|
|
26
|
+
* {@link resolveMentionedAgents}. A token that names an agent exactly is the
|
|
27
|
+
* agent's, as on the daemon.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveMentionedSquads(tokens: readonly string[], squads: readonly SessionSquadView[]): SessionSquadView[];
|
|
30
|
+
/** The chat session an @-mention goes to, and the workspace it lives in. */
|
|
31
|
+
export interface AgentMentionSession {
|
|
32
|
+
sessionId: string;
|
|
33
|
+
/** Unset: the hook's own `cwd`. */
|
|
34
|
+
workspaceCwd?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* An @-mention the daemon accepted but deferred behind a running main-model
|
|
38
|
+
* turn (`deferred: true`): its record, and so the user's message, only lands
|
|
39
|
+
* once that turn settles. Shown as the user's message until then.
|
|
40
|
+
*/
|
|
41
|
+
export interface PendingAgentMention {
|
|
42
|
+
/** The post's `clientMessageId`. */
|
|
43
|
+
id: string;
|
|
44
|
+
sessionId: string;
|
|
45
|
+
text: string;
|
|
46
|
+
/**
|
|
47
|
+
* Recorded mentions with this text the session already had, plus earlier
|
|
48
|
+
* pending ones, when it was posted: the record that settles this one is
|
|
49
|
+
* the next.
|
|
50
|
+
*/
|
|
51
|
+
recordedBefore: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The text of each recorded @-mention (`agent_mention` user message) in the
|
|
55
|
+
* transcript, in order. Compare with {@link isPendingMentionRecorded}.
|
|
56
|
+
*/
|
|
57
|
+
export declare function recordedAgentMentionTexts(blocks: readonly DaemonTranscriptBlock[]): string[];
|
|
58
|
+
/** True once the record of `mention` is among the recorded mention texts. */
|
|
59
|
+
export declare function isPendingMentionRecorded(mention: PendingAgentMention, recordedTexts: readonly string[]): boolean;
|
|
60
|
+
export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, sessionApi, sessionApiFor, ensureSession, onSubmit, onError, onCreateAgent, sessionId, recordedMentionTexts, t, }: {
|
|
15
61
|
enabled: boolean;
|
|
16
62
|
cwd?: string;
|
|
17
63
|
baseUrl: string;
|
|
18
64
|
token?: string;
|
|
65
|
+
/** The session routes of the same workspace (`cwd`). */
|
|
66
|
+
sessionApi?: SessionAgentsApi;
|
|
67
|
+
/**
|
|
68
|
+
* The session routes of another workspace, for a session that lives
|
|
69
|
+
* elsewhere. Defaults to the HTTP routes of that workspace.
|
|
70
|
+
*/
|
|
71
|
+
sessionApiFor?: (workspaceCwd: string) => SessionAgentsApi;
|
|
72
|
+
/**
|
|
73
|
+
* The current chat session, creating it first when this is a new chat (the
|
|
74
|
+
* same lazy creation an ordinary first prompt goes through), with the
|
|
75
|
+
* workspace it was created in.
|
|
76
|
+
*/
|
|
77
|
+
ensureSession: () => Promise<AgentMentionSession | string | undefined>;
|
|
19
78
|
onSubmit: Submit;
|
|
20
|
-
onOpen: (id: string, cwd: string) => void;
|
|
21
79
|
onError: (message: string) => void;
|
|
22
|
-
/** The conversation so far, when mentioning from a chat that has one. */
|
|
23
|
-
getContext?: () => string;
|
|
24
80
|
/** Offered as the picker's last item: open the New agent page. */
|
|
25
81
|
onCreateAgent?: () => void;
|
|
82
|
+
/** The session the chat shows; only its pending @-mentions are returned. */
|
|
83
|
+
sessionId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* {@link recordedAgentMentionTexts} of that session's transcript, memoized:
|
|
86
|
+
* a pending @-mention is dropped once its record shows up here.
|
|
87
|
+
*/
|
|
88
|
+
recordedMentionTexts?: readonly string[];
|
|
26
89
|
/**
|
|
27
90
|
* The caller's translator. App calls this hook above its I18nProvider, where
|
|
28
91
|
* useI18n() would hand back the default that echoes keys.
|
|
@@ -32,5 +95,6 @@ export declare function useAgentChatEntry({ enabled, cwd, baseUrl, token, onSubm
|
|
|
32
95
|
providers: WebShellAtProvider[];
|
|
33
96
|
submit: (text: string, images?: import("../../adapters/promptTypes").PromptImage[], files?: import("../../adapters/promptTypes").PromptFile[], commitAccepted?: import("../../hooks/useComposerCore").ComposerSubmitCommit, metadata?: import("../../hooks/useComposerCore").ComposerSubmitMetadata) => boolean | void;
|
|
34
97
|
pending: boolean;
|
|
98
|
+
pendingMentions: PendingAgentMention[];
|
|
35
99
|
};
|
|
36
100
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names the connected host above its live project list. Until another host is
|
|
3
|
+
* saved there is nothing to tell apart, so the plain list stays unlabeled.
|
|
4
|
+
*/
|
|
5
|
+
export declare function WorkspaceHostHeading(): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
/**
|
|
7
|
+
* Saved projects on the other hosts, grouped by host below the live list.
|
|
8
|
+
* Only the connected host is live; choosing one of these reloads the page
|
|
9
|
+
* against its host.
|
|
10
|
+
*/
|
|
11
|
+
export declare function OtherHostProjects(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact label naming the host a chat runs on, with the working directory in
|
|
3
|
+
* its tooltip. Hidden until a project can live on more than one host.
|
|
4
|
+
*/
|
|
5
|
+
export declare function WorkspaceLocation({ cwd }: {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
|
|
2
|
+
export declare const WorkspaceHostsEnabled: import("react").Context<boolean>;
|
|
3
|
+
export interface WorkspaceHost {
|
|
4
|
+
origin: string;
|
|
5
|
+
workspaces: Pick<DaemonWorkspaceCapability, 'id' | 'cwd' | 'displayName'>[];
|
|
6
|
+
}
|
|
7
|
+
export declare function readWorkspaceHosts(): WorkspaceHost[];
|
|
8
|
+
export declare function rememberWorkspaceHost(origin: string, workspaces: WorkspaceHost['workspaces']): void;
|
|
9
|
+
/** Saved hosts, kept in sync with catalog updates from this and other tabs. */
|
|
10
|
+
export declare function useWorkspaceHosts(): WorkspaceHost[];
|
|
11
|
+
export declare function openHostedWorkspace(origin: string, workspaceId?: string): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
type FilterMessage = string | ((vars?: Record<string, string | number>) => string);
|
|
7
|
+
export declare const TRAJECTORY_FILTER_MESSAGES_EN: Record<string, FilterMessage>;
|
|
8
|
+
export declare const TRAJECTORY_FILTER_MESSAGES_ZH: Record<string, FilterMessage>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Trajectory, TrajectoryRow } from './types';
|
|
7
|
+
export interface TrajectoryFilter {
|
|
8
|
+
query: string;
|
|
9
|
+
type: 'all' | TrajectoryRow['kind'];
|
|
10
|
+
status: 'all' | 'success' | 'error' | 'cancelled' | 'running' | 'unknown';
|
|
11
|
+
}
|
|
12
|
+
export interface TrajectorySearchIndex {
|
|
13
|
+
rows: Array<{
|
|
14
|
+
key: string;
|
|
15
|
+
kind: TrajectoryRow['kind'];
|
|
16
|
+
status?: Exclude<TrajectoryFilter['status'], 'all'>;
|
|
17
|
+
fields: string[];
|
|
18
|
+
}>;
|
|
19
|
+
truncatedCount: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function buildTrajectorySearchIndex(trajectory: Trajectory): TrajectorySearchIndex;
|
|
22
|
+
export declare function filterTrajectory(index: TrajectorySearchIndex, filter: TrajectoryFilter): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwen-code/web-shell",
|
|
3
|
-
"version": "0.25.1-preview.
|
|
3
|
+
"version": "0.25.1-preview.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/QwenLM/qwen-code.git",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@playwright/test": "1.61.1",
|
|
75
|
+
"@qwen-code/acp-bridge": "file:../acp-bridge",
|
|
75
76
|
"@qwen-code/sdk": "file:../sdk-typescript",
|
|
76
77
|
"@tailwindcss/vite": "^4.3.2",
|
|
77
78
|
"@types/hast": "^3.0.5",
|