@qwen-code/web-shell 0.24.3 → 0.24.4
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/LICENSE +203 -0
- package/dist/daemon-react-sdk.js +1 -1
- package/dist/index.js +29080 -28828
- package/dist/sw.js +1 -1
- package/dist/{toolNames-DQad2xSu.js → toolNames-Cnaa5VCB.js} +21 -9
- package/dist/transcript.js +2427 -2398
- package/dist/types/adapters/types.d.ts +4 -1
- package/dist/types/components/StandaloneAuth.d.ts +2 -1
- package/dist/types/components/local-control-api.d.ts +3 -1
- package/dist/types/components/messages/ToolGroup.d.ts +0 -1
- package/dist/types/config/pairing.d.ts +9 -0
- package/dist/types/config/remote-workspace-add.d.ts +25 -0
- package/dist/types/customization.d.ts +2 -0
- package/dist/types/daemon/session/session-context.d.ts +11 -0
- package/dist/types/utils/unifiedDiff.d.ts +1 -0
- package/dist/types/utils/workspace.d.ts +3 -2
- package/package.json +19 -20
|
@@ -61,8 +61,11 @@ export interface TurnCollapseHead {
|
|
|
61
61
|
liveStartedAt?: number;
|
|
62
62
|
}
|
|
63
63
|
export interface ContentBlock {
|
|
64
|
-
type: 'text' | 'image';
|
|
64
|
+
type: 'text' | 'image' | 'diff';
|
|
65
65
|
text?: string;
|
|
66
|
+
path?: string;
|
|
67
|
+
oldText?: string;
|
|
68
|
+
newText?: string;
|
|
66
69
|
source?: {
|
|
67
70
|
type: string;
|
|
68
71
|
media_type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { WebShellLanguage } from '../i18n';
|
|
3
3
|
import { type WebShellTheme } from '../themeContext';
|
|
4
|
-
export declare function StandaloneAuth({ baseUrl, initialToken, initialAddress, language, theme, invalidTarget, unconfirmedTarget, onChangeTarget, children, }: {
|
|
4
|
+
export declare function StandaloneAuth({ baseUrl, initialToken, initialAddress, language, theme, invalidTarget, unconfirmedTarget, pairingFailed, onChangeTarget, children, }: {
|
|
5
5
|
baseUrl: string;
|
|
6
6
|
initialToken?: string;
|
|
7
7
|
initialAddress?: string;
|
|
@@ -12,6 +12,7 @@ export declare function StandaloneAuth({ baseUrl, initialToken, initialAddress,
|
|
|
12
12
|
invalidTarget?: boolean;
|
|
13
13
|
/** The daemon came from a link to an origin this browser has not used. */
|
|
14
14
|
unconfirmedTarget?: boolean;
|
|
15
|
+
pairingFailed?: boolean;
|
|
15
16
|
onChangeTarget?: (daemonOrigin: string, token?: string, options?: {
|
|
16
17
|
continueFlow?: 'workspace' | 'connection';
|
|
17
18
|
}) => boolean | void;
|
|
@@ -17,6 +17,7 @@ export interface LocalControlStatus {
|
|
|
17
17
|
*/
|
|
18
18
|
urlRedacted?: boolean;
|
|
19
19
|
qrText?: string;
|
|
20
|
+
expiresInMs?: number;
|
|
20
21
|
interfaceName?: string;
|
|
21
22
|
address?: string;
|
|
22
23
|
sleepInhibited?: boolean;
|
|
@@ -25,6 +26,7 @@ export interface LocalControlStatus {
|
|
|
25
26
|
}
|
|
26
27
|
export declare class LocalControlRequestError extends Error {
|
|
27
28
|
readonly payload?: LocalControlStatus | undefined;
|
|
28
|
-
|
|
29
|
+
readonly status?: number | undefined;
|
|
30
|
+
constructor(message: string, payload?: LocalControlStatus | undefined, status?: number | undefined);
|
|
29
31
|
}
|
|
30
32
|
export declare function requestLocalControl(baseUrl: string, token: string | undefined, method: 'GET' | 'POST', path: string, body?: object): Promise<LocalControlStatus>;
|
|
@@ -25,7 +25,6 @@ interface ToolGroupProps {
|
|
|
25
25
|
}
|
|
26
26
|
export declare function extractDiff(tool: ACPToolCall): string;
|
|
27
27
|
export declare function getRawFileDiff(tool: ACPToolCall): string;
|
|
28
|
-
export declare function buildUnifiedDiff(oldText: string, newText: string): string;
|
|
29
28
|
export declare function languageForPath(filePath: string): string;
|
|
30
29
|
export declare function fencedCodeBlock(language: string, code: string): string;
|
|
31
30
|
interface ToolLineProps {
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
export interface RemotePathSuggestions {
|
|
2
|
+
dir: string;
|
|
3
|
+
sep: string;
|
|
4
|
+
suggestions: {
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
}[];
|
|
8
|
+
truncated: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fetches directory suggestions from an arbitrary daemon origin without
|
|
12
|
+
* navigating the page. Used by the Add-workspace dialog's location switcher
|
|
13
|
+
* so the user can browse a remote daemon's folders in place.
|
|
14
|
+
*
|
|
15
|
+
* Goes through the current daemon's proxy route to avoid CSP issues.
|
|
16
|
+
*/
|
|
17
|
+
export declare function fetchRemotePathSuggestions(daemonOrigin: string, prefix: string): Promise<RemotePathSuggestions>;
|
|
18
|
+
/**
|
|
19
|
+
* Registers a workspace on an arbitrary daemon origin without navigating the
|
|
20
|
+
* page. Used by the Add-workspace dialog when the user browsed a remote
|
|
21
|
+
* daemon's folders in place and then confirms the add.
|
|
22
|
+
*
|
|
23
|
+
* Goes through the current daemon's proxy route to avoid CSP issues.
|
|
24
|
+
*/
|
|
25
|
+
export declare function addWorkspaceToDaemon(daemonOrigin: string, cwd: string, persist: boolean, displayName?: string): Promise<void>;
|
|
1
26
|
export declare function isRemoteWorkspaceAddActive(): boolean;
|
|
2
27
|
export declare function clearRemoteWorkspaceAddStep(): void;
|
|
3
28
|
export declare function startRemoteWorkspaceAdd(daemonOrigin: string, token?: string): boolean;
|
|
@@ -10,6 +10,8 @@ import type { WebShellTheme } from './themeContext';
|
|
|
10
10
|
export type MarkdownContentSource = 'assistant' | 'thinking';
|
|
11
11
|
export interface MarkdownRenderContext {
|
|
12
12
|
source: MarkdownContentSource;
|
|
13
|
+
/** 当前消息的生成态;历史或静态内容为 false,不取会话全局忙态。 */
|
|
14
|
+
isStreaming: boolean;
|
|
13
15
|
}
|
|
14
16
|
export interface WebShellCodeBlockRenderInfo {
|
|
15
17
|
/**
|
|
@@ -7,6 +7,17 @@ import type { DaemonCapabilities, DaemonSession } from '@qwen-code/sdk/daemon';
|
|
|
7
7
|
import type { DaemonProductSessionContext, DaemonStandaloneConnectionState } from './types.js';
|
|
8
8
|
export declare function resolveProviderSessionContext(sessionContext: DaemonProductSessionContext | undefined, workspaceCwd: string | undefined, inheritedWorkspaceCwd: string | undefined): DaemonProductSessionContext | undefined;
|
|
9
9
|
export declare function resolveActionSessionContext(sessionContext: DaemonProductSessionContext | undefined, workspaceCwd: string | undefined, fallback: DaemonProductSessionContext | undefined): DaemonProductSessionContext | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The Live workspace is the daemon's own, and it announces it by tagging that
|
|
12
|
+
* entry `kind: 'live'` — a tag no daemon old enough to lack Live session
|
|
13
|
+
* routing has ever sent. That tag is therefore the whole precondition.
|
|
14
|
+
*
|
|
15
|
+
* It deliberately does not ask for `multi_workspace_sessions`. That feature
|
|
16
|
+
* counts *user* workspaces (`listEntries()` drops the Live entry as internal),
|
|
17
|
+
* so a daemon serving a single project withholds it while still advertising
|
|
18
|
+
* the Live workspace in the very same payload — and a Live session could not
|
|
19
|
+
* be opened at all. The checks below are what actually keep this safe.
|
|
20
|
+
*/
|
|
10
21
|
export declare function resolveLiveSessionWorkspaceCwd(capabilities: DaemonCapabilities): string;
|
|
11
22
|
export declare function sessionContextKey(context: DaemonProductSessionContext | undefined): string;
|
|
12
23
|
export declare function restoreSessionContextMatches(requested: DaemonProductSessionContext | undefined, active: DaemonProductSessionContext | undefined): boolean;
|
|
@@ -10,8 +10,9 @@ import type { DaemonCapabilities, DaemonSessionSummary, DaemonWorkspaceCapabilit
|
|
|
10
10
|
* it has no segments.
|
|
11
11
|
*/
|
|
12
12
|
export declare function workspaceBasename(cwd: string): string;
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
13
|
+
export declare function sshWorkspaceLabel(ssh: NonNullable<DaemonWorkspaceCapability['ssh']>): string;
|
|
14
|
+
export declare function workspaceLabel(workspace: Pick<DaemonWorkspaceCapability, 'cwd' | 'displayName' | 'ssh'>): string;
|
|
15
|
+
export declare function workspaceLabelForCwd(cwd: string, workspaces: readonly Pick<DaemonWorkspaceCapability, 'cwd' | 'displayName' | 'ssh'>[] | undefined): string;
|
|
15
16
|
/**
|
|
16
17
|
* True when the daemon advertises more than one registered workspace — i.e. the
|
|
17
18
|
* multi-workspace session surfaces (per-workspace labels/tags) should show.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwen-code/web-shell",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/QwenLM/qwen-code.git",
|
|
@@ -28,24 +28,6 @@
|
|
|
28
28
|
"dist/*.js",
|
|
29
29
|
"dist/types"
|
|
30
30
|
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"dev": "vite",
|
|
33
|
-
"build": "vite build && vite build --config vite.lib.config.ts && vite build --config vite.lib.config.ts --mode transcript && tsc -p tsconfig.lib.json",
|
|
34
|
-
"lint": "cd ../.. && eslint packages/web-shell --ext .ts,.tsx",
|
|
35
|
-
"lint:fix": "cd ../.. && eslint packages/web-shell --ext .ts,.tsx --fix",
|
|
36
|
-
"format:check": "cd ../.. && prettier --experimental-cli --check packages/web-shell",
|
|
37
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
38
|
-
"test": "vitest run --config vitest.config.ts",
|
|
39
|
-
"test:ci": "vitest run --config vitest.config.ts",
|
|
40
|
-
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
41
|
-
"test:e2e:smoke": "playwright test --config playwright.config.ts --grep @smoke",
|
|
42
|
-
"test:e2e:perf": "cross-env WEB_SHELL_PERF=1 playwright test --config playwright.config.ts --grep @perf --project=chromium",
|
|
43
|
-
"test:e2e": "playwright test --config playwright.config.ts",
|
|
44
|
-
"test:e2e:visuals": "playwright test --config playwright.visuals.config.ts",
|
|
45
|
-
"test:e2e:report": "playwright show-report client/e2e/playwright-report",
|
|
46
|
-
"verify": "npm run lint && npm run format:check && npm run typecheck && npm run test:ci",
|
|
47
|
-
"prepublishOnly": "node scripts/verify-publish-artifacts.mjs"
|
|
48
|
-
},
|
|
49
31
|
"dependencies": {
|
|
50
32
|
"@codemirror/autocomplete": "^6.18.0",
|
|
51
33
|
"@codemirror/commands": "^6.7.0",
|
|
@@ -104,5 +86,22 @@
|
|
|
104
86
|
"typescript": "^5.3.3",
|
|
105
87
|
"vite": "^5.0.0",
|
|
106
88
|
"vitest": "^3.2.4"
|
|
89
|
+
},
|
|
90
|
+
"scripts": {
|
|
91
|
+
"dev": "vite",
|
|
92
|
+
"build": "vite build && vite build --config vite.lib.config.ts && vite build --config vite.lib.config.ts --mode transcript && tsc -p tsconfig.lib.json",
|
|
93
|
+
"lint": "cd ../.. && eslint packages/web-shell --ext .ts,.tsx",
|
|
94
|
+
"lint:fix": "cd ../.. && eslint packages/web-shell --ext .ts,.tsx --fix",
|
|
95
|
+
"format:check": "cd ../.. && prettier --experimental-cli --check packages/web-shell",
|
|
96
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
97
|
+
"test": "vitest run --config vitest.config.ts",
|
|
98
|
+
"test:ci": "vitest run --config vitest.config.ts",
|
|
99
|
+
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
100
|
+
"test:e2e:smoke": "playwright test --config playwright.config.ts --grep @smoke",
|
|
101
|
+
"test:e2e:perf": "cross-env WEB_SHELL_PERF=1 playwright test --config playwright.config.ts --grep @perf --project=chromium",
|
|
102
|
+
"test:e2e": "playwright test --config playwright.config.ts",
|
|
103
|
+
"test:e2e:visuals": "playwright test --config playwright.visuals.config.ts",
|
|
104
|
+
"test:e2e:report": "playwright show-report client/e2e/playwright-report",
|
|
105
|
+
"verify": "npm run lint && npm run format:check && npm run typecheck && npm run test:ci"
|
|
107
106
|
}
|
|
108
|
-
}
|
|
107
|
+
}
|