@chatcode/chatcode-cli 3.0.4 → 3.0.5-rc.2
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.i18n.yaml +6 -6
- package/README.md +10 -4
- package/README.zh.md +10 -4
- package/lib/bin.js +23 -9
- package/lib/{command-errors-Ca64Lgba.js → command-errors-CsRCh0gk.js} +12 -12
- package/lib/{command-trees-CVc4Xu_z.js → command-trees-CD_43rxX.js} +2 -2
- package/lib/{component-identity-6aEut5Yt.js → component-identity-DGA2-TeB.js} +3 -3
- package/lib/{dump-config-ZzrfvtnX.js → dump-config-D8kXfdTs.js} +1 -1
- package/lib/dump-config-DuCc-QB7.js +2 -0
- package/lib/{dump-config-schema-BlO-eZ-J.js → dump-config-schema-CtZbroi6.js} +2 -2
- package/lib/{extension-events-C7MUpqVE.js → extension-events-D0BjYRqT.js} +21 -21
- package/lib/{host-access-CLbyAGT5.js → host-access-DLJjuR07.js} +1 -1
- package/lib/{keymap-82JwLLHe.js → keymap-C4cs2IBN.js} +2 -2
- package/lib/{plugin-BlQlWIR5.js → plugin-CGtTByud.js} +801 -456
- package/lib/{plugin-BZdazFXS.js → plugin-CYw-MBRn.js} +1 -1
- package/lib/{profile-boot-B0aEEQIR.js → profile-boot-CffsubnV.js} +7 -7
- package/lib/profile-boot.js +1 -1
- package/lib/{scenes-BNS0ZFyQ.js → scenes-CbAGK5Uy.js} +3 -3
- package/lib/{settings-sections-CXH24cu5.js → settings-sections-DYKDa04e.js} +3 -3
- package/lib/{statusBarSettings-BAMzn8fX.js → statusBarSettings-T1m8xad4.js} +3 -3
- package/lib/{themes-DXUIvP7m.js → themes-BY2ui1Dv.js} +12 -12
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +1 -1
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +7 -7
- package/lib/types/bin.d.ts +9 -0
- package/lib/types/tui-compat.d.ts +1 -1
- package/lib/types/web-instance-process.d.ts +20 -0
- package/lib/{web-instance-DbP7IHPv.js → web-instance-D_Ppi2Zo.js} +176 -14
- package/lib/{web-instance-B0jec7cq.js → web-instance-amvCJWnq.js} +1 -1
- package/lib/{workspaces-CUJXNU5W.js → workspaces-D5VKbESy.js} +2 -2
- package/package.json +30 -31
- package/runtime/manifest.json +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +169 -11
- package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/types/files.d.ts +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/lib/types/rules.d.ts +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +11 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/contract/snapshot.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +10 -3
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +32 -11
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/index.js +62 -11
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/darwin-lock.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/index.d.ts +7 -2
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/linux-lock.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +62 -62
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +10 -10
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +49 -49
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +204 -204
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +159 -157
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/service.d.ts +4 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +129 -123
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +19 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/changes.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/Deliverables.d.ts +1 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/locales.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +2 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +37 -37
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +12 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +119 -32
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/catalog.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/effort-preferences.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/slots.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +8 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +128 -128
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +182 -182
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +130 -130
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +50 -50
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +88 -88
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +36 -36
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +13 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +27 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +42 -42
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +44 -44
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +25 -25
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +70 -70
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +18 -18
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +26 -26
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +20 -20
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +37 -37
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +27 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +95 -95
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +197 -197
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +49 -49
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +656 -152
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +9 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +46 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +9 -10
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/deletion.d.ts +57 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +32 -32
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +24 -24
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +899 -453
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/adapter.d.ts +4 -20
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/adapter.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/serialize.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/sse.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/translate.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/types.d.ts +159 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/file-store.d.ts +3 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/files-api.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol-adapter.d.ts +41 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/transport.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/types.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +5 -4
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +33 -9
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +12 -10
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +208 -39
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.js +129 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +31 -8
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.d.ts +7 -2
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.js +35 -19
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/types.d.ts +11 -10
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +1 -0
- package/scripts/link-embedded-runtime.mjs +1 -1
- package/lib/dump-config-CDixiJNt.js +0 -2
- package/lib/{home-migration-BjDmRwBB.js → home-migration-lRjtl2fP.js} +1 -1
- package/lib/{startup-diagnostics-C_hRCp-q.js → startup-diagnostics-4mLHYTFc.js} +1 -1
|
@@ -546,7 +546,7 @@ const PROFILE_TEMPLATES = {
|
|
|
546
546
|
cli: { bundles: [
|
|
547
547
|
"@deepseek-ai/dsh-base",
|
|
548
548
|
"@deepseek-harness-tui/dsh-tui",
|
|
549
|
-
"
|
|
549
|
+
"@chatcode/cco-llm-chatcode-config",
|
|
550
550
|
"dshmarket",
|
|
551
551
|
"dsh-computer-use"
|
|
552
552
|
] },
|
|
@@ -561,16 +561,37 @@ const INSTALLATION_OWNED_PROFILE_TUPLES = {
|
|
|
561
561
|
"@deepseek-ai/dsh-web-app",
|
|
562
562
|
"dshmarket"
|
|
563
563
|
]],
|
|
564
|
-
cli: [
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
564
|
+
cli: [
|
|
565
|
+
[
|
|
566
|
+
"@deepseek-ai/dsh-base",
|
|
567
|
+
"@deepseek-harness-tui/dsh-tui",
|
|
568
|
+
"@chatcode/cco-llm-chatcode-config"
|
|
569
|
+
],
|
|
570
|
+
[
|
|
571
|
+
"@deepseek-ai/dsh-base",
|
|
572
|
+
"@deepseek-harness-tui/dsh-tui",
|
|
573
|
+
"@chatcode/cco-llm-chatcode-config",
|
|
574
|
+
"dshmarket"
|
|
575
|
+
],
|
|
576
|
+
[
|
|
577
|
+
"@deepseek-ai/dsh-base",
|
|
578
|
+
"@deepseek-harness-tui/dsh-tui",
|
|
579
|
+
"dsh-llm-chatcode-config"
|
|
580
|
+
],
|
|
581
|
+
[
|
|
582
|
+
"@deepseek-ai/dsh-base",
|
|
583
|
+
"@deepseek-harness-tui/dsh-tui",
|
|
584
|
+
"dsh-llm-chatcode-config",
|
|
585
|
+
"dshmarket"
|
|
586
|
+
],
|
|
587
|
+
[
|
|
588
|
+
"@deepseek-ai/dsh-base",
|
|
589
|
+
"@deepseek-harness-tui/dsh-tui",
|
|
590
|
+
"dsh-llm-chatcode-config",
|
|
591
|
+
"dshmarket",
|
|
592
|
+
"dsh-computer-use"
|
|
593
|
+
]
|
|
594
|
+
],
|
|
574
595
|
headless: [[
|
|
575
596
|
"@deepseek-ai/dsh-base",
|
|
576
597
|
"@deepseek-ai/dsh-web-app",
|
|
@@ -3,11 +3,11 @@ import { link, lstat, mkdir, readFile, rename, rm, stat, writeFile } from "node:
|
|
|
3
3
|
import { dirname, win32 } from "node:path";
|
|
4
4
|
import { execFile } from "node:child_process";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
|
-
import { closeSync, constants, fstatSync, lstatSync, openSync, readFileSync } from "node:fs";
|
|
6
|
+
import { closeSync, constants, fstatSync, lstatSync, openSync, readFileSync, readSync } from "node:fs";
|
|
7
7
|
import { constants as constants$1 } from "node:os";
|
|
8
8
|
//#region lib/types/windows-lock.js
|
|
9
9
|
/** Exclusive Windows inspection for an empty or zero-filled lock left by a failed creator. */
|
|
10
|
-
const execute = promisify(execFile);
|
|
10
|
+
const execute$1 = promisify(execFile);
|
|
11
11
|
/**
|
|
12
12
|
* Read a small lock only when no other handle has the file open.
|
|
13
13
|
* @param path - lock path, protected by the caller's takeover claim.
|
|
@@ -26,7 +26,7 @@ async function readUnopenedWindowsLock(path) {
|
|
|
26
26
|
"} finally { $file.Dispose() }"
|
|
27
27
|
].join("\n");
|
|
28
28
|
try {
|
|
29
|
-
const { stdout } = await execute(powershell, [
|
|
29
|
+
const { stdout } = await execute$1(powershell, [
|
|
30
30
|
"-NoLogo",
|
|
31
31
|
"-NoProfile",
|
|
32
32
|
"-NonInteractive",
|
|
@@ -111,7 +111,7 @@ async function readClosedLinuxLock(path) {
|
|
|
111
111
|
}
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region lib/types/linux-lock.js
|
|
114
|
-
/** Linux writer identity and complete-record publication
|
|
114
|
+
/** Linux writer identity and complete-record publication on Linux and macOS. */
|
|
115
115
|
const RECORD = /^(\d+)\r?\n(?:linux ([a-f0-9-]{36}) (\d+) ([a-f0-9]{24})\n)?$/u;
|
|
116
116
|
let ownIdentity;
|
|
117
117
|
/** Read kernel identity without treating inaccessible procfs as evidence of an exited writer. */
|
|
@@ -142,13 +142,13 @@ async function writerLockRecord() {
|
|
|
142
142
|
return current === void 0 ? pid : `${pid}linux ${current} ${randomBytes(12).toString("hex")}\n`;
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Exclusively publish a complete Linux identity record
|
|
145
|
+
* Exclusively publish a complete macOS PID or Linux identity record; other platforms use wx.
|
|
146
146
|
* @param path - lock sibling in an existing parent directory.
|
|
147
147
|
* @param record - one acquisition's record from writerLockRecord.
|
|
148
148
|
*/
|
|
149
149
|
async function createWriterLock(path, record) {
|
|
150
150
|
const nonce = RECORD.exec(record)?.[4];
|
|
151
|
-
if (process.platform !== "linux" || nonce === void 0) {
|
|
151
|
+
if (process.platform !== "darwin" && (process.platform !== "linux" || nonce === void 0)) {
|
|
152
152
|
await writeFile(path, record, {
|
|
153
153
|
mode: 384,
|
|
154
154
|
flag: "wx"
|
|
@@ -204,6 +204,52 @@ async function writerExited(record, path) {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
//#endregion
|
|
207
|
+
//#region lib/types/darwin-lock.js
|
|
208
|
+
/** Read-only macOS inspection of incomplete legacy locks through the system lsof. */
|
|
209
|
+
const execute = promisify(execFile);
|
|
210
|
+
/**
|
|
211
|
+
* Read a small regular lock after lsof reports no open handles on its unchanged inode.
|
|
212
|
+
* @param path - existing lock path protected by the caller's takeover claim.
|
|
213
|
+
* @returns the record, or undefined when any handle, warning, or inspection failure remains.
|
|
214
|
+
*/
|
|
215
|
+
async function readClosedDarwinLock(path) {
|
|
216
|
+
let fd;
|
|
217
|
+
try {
|
|
218
|
+
const before = lstatSync(path);
|
|
219
|
+
if (!before.isFile() || before.size > 128) return void 0;
|
|
220
|
+
try {
|
|
221
|
+
await execute("/usr/sbin/lsof", [
|
|
222
|
+
"-nP",
|
|
223
|
+
"+w",
|
|
224
|
+
"-F",
|
|
225
|
+
"p",
|
|
226
|
+
"--",
|
|
227
|
+
path
|
|
228
|
+
], {
|
|
229
|
+
encoding: "utf8",
|
|
230
|
+
timeout: 2e3,
|
|
231
|
+
maxBuffer: 4096,
|
|
232
|
+
env: Object.fromEntries(Object.entries(process.env).filter(([name]) => !/KEY|SECRET|TOKEN|PASSWORD/i.test(name)))
|
|
233
|
+
});
|
|
234
|
+
return;
|
|
235
|
+
} catch (error) {
|
|
236
|
+
if (error === null || typeof error !== "object" || !("code" in error) || error.code !== 1 || !("killed" in error) || error.killed !== false || !("signal" in error) || error.signal !== null || !("stdout" in error) || error.stdout !== "" || !("stderr" in error) || error.stderr !== "") return void 0;
|
|
237
|
+
}
|
|
238
|
+
fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
239
|
+
const held = fstatSync(fd);
|
|
240
|
+
if (!held.isFile() || held.size > 128 || held.dev !== before.dev || held.ino !== before.ino) return void 0;
|
|
241
|
+
const bytes = Buffer.alloc(129);
|
|
242
|
+
const length = readSync(fd, bytes, 0, bytes.length, 0);
|
|
243
|
+
const current = lstatSync(path);
|
|
244
|
+
if (length > 128 || current.dev !== held.dev || current.ino !== held.ino) return void 0;
|
|
245
|
+
return bytes.toString("utf8", 0, length);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
return;
|
|
248
|
+
} finally {
|
|
249
|
+
if (fd !== void 0) closeSync(fd);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
207
253
|
//#region lib/types/index.js
|
|
208
254
|
/**
|
|
209
255
|
* Atomic file replacement and writer coordination.
|
|
@@ -218,7 +264,8 @@ async function writerExited(record, path) {
|
|
|
218
264
|
* recovers empty or zero-filled records after an exclusive read proves no
|
|
219
265
|
* creator still has the lock file open. Linux uses a read lease to exclude
|
|
220
266
|
* unfinished writers, and kernel process identity to distinguish a previous
|
|
221
|
-
* boot, reused PID, or zombie process.
|
|
267
|
+
* boot, reused PID, or zombie process. macOS inspects legacy damaged records
|
|
268
|
+
* with the system lsof and publishes complete new records by hard link.
|
|
222
269
|
* @module @deepseek-ai/dsh-atomic-write
|
|
223
270
|
*/
|
|
224
271
|
const WINDOWS_TRANSIENT_FILE_ERRORS = new Set([
|
|
@@ -311,7 +358,7 @@ async function readLockRecord(lockPath) {
|
|
|
311
358
|
}
|
|
312
359
|
}
|
|
313
360
|
/**
|
|
314
|
-
* Remove an exited holder's lock or a closed, damaged Windows or
|
|
361
|
+
* Remove an exited holder's lock or a closed, damaged Windows, Linux, or macOS lock. Contenders that read the
|
|
315
362
|
* same record serialize on a claim file named after it. Under the claim, the
|
|
316
363
|
* claimant re-reads the lock and probes its PID again, and removes it only
|
|
317
364
|
* when it still holds that record and that PID is still gone. A damaged
|
|
@@ -324,7 +371,7 @@ async function readLockRecord(lockPath) {
|
|
|
324
371
|
async function takeOverExitedLock(lockPath) {
|
|
325
372
|
const record = await readLockRecord(lockPath);
|
|
326
373
|
if (record === void 0) return false;
|
|
327
|
-
const damaged = (process.platform === "win32" || process.platform === "linux") && damagedRecord(record, process.platform === "
|
|
374
|
+
const damaged = (process.platform === "win32" || process.platform === "linux" || process.platform === "darwin") && damagedRecord(record, process.platform === "win32" ? 64 : 128);
|
|
328
375
|
const partialLinuxPid = process.platform === "linux" && /^\d{1,10}$/u.test(record);
|
|
329
376
|
if (!damaged && !partialLinuxPid && !await holderExited(record, lockPath)) return false;
|
|
330
377
|
const claim = `${lockPath}.takeover-${createHash("sha256").update(record).digest("hex").slice(0, 16)}`;
|
|
@@ -341,7 +388,7 @@ async function takeOverExitedLock(lockPath) {
|
|
|
341
388
|
try {
|
|
342
389
|
if (await readLockRecord(lockPath) !== record) return false;
|
|
343
390
|
if (damaged || partialLinuxPid) {
|
|
344
|
-
if ((process.platform === "win32" ? await readUnopenedWindowsLock(lockPath) : await readClosedLinuxLock(lockPath)) !== record) return false;
|
|
391
|
+
if ((process.platform === "win32" ? await readUnopenedWindowsLock(lockPath) : process.platform === "darwin" ? await readClosedDarwinLock(lockPath) : await readClosedLinuxLock(lockPath)) !== record) return false;
|
|
345
392
|
} else if (!await holderExited(record, lockPath)) return false;
|
|
346
393
|
try {
|
|
347
394
|
await rm(lockPath, { force: true });
|
|
@@ -386,7 +433,11 @@ const DEFAULT_LOCK_WAIT_MS = 2e3;
|
|
|
386
433
|
* exclusive inspection proves no creator still has the file open. A failed
|
|
387
434
|
* inspection preserves the lock. Linux also recovers empty or zero-filled
|
|
388
435
|
* records of at most 128 bytes and unfinished PID records after a read lease
|
|
389
|
-
* excludes open writers.
|
|
436
|
+
* excludes open writers. macOS recovers empty or zero-filled records up to
|
|
437
|
+
* 128 bytes only after the system lsof reports no open handles on the unchanged
|
|
438
|
+
* inode without warnings. Missing or failed inspection preserves the lock.
|
|
439
|
+
* New macOS records are published complete by exclusive hard link.
|
|
440
|
+
* Dead takeover claimants are recovered automatically.
|
|
390
441
|
* Windows lock release retries transient file interference for a bounded interval. Contention backs
|
|
391
442
|
* off exponentially and times out after the deadline. Linux identity records
|
|
392
443
|
* distinguish PID reuse, a previous boot, and zombies. Legacy PID-only records
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a small regular lock after lsof reports no open handles on its unchanged inode.
|
|
3
|
+
* @param path - existing lock path protected by the caller's takeover claim.
|
|
4
|
+
* @returns the record, or undefined when any handle, warning, or inspection failure remains.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readClosedDarwinLock(path: string): Promise<string | undefined>;
|
|
7
|
+
//# sourceMappingURL=darwin-lock.d.ts.map
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* recovers empty or zero-filled records after an exclusive read proves no
|
|
12
12
|
* creator still has the lock file open. Linux uses a read lease to exclude
|
|
13
13
|
* unfinished writers, and kernel process identity to distinguish a previous
|
|
14
|
-
* boot, reused PID, or zombie process.
|
|
14
|
+
* boot, reused PID, or zombie process. macOS inspects legacy damaged records
|
|
15
|
+
* with the system lsof and publishes complete new records by hard link.
|
|
15
16
|
* @module @deepseek-ai/dsh-atomic-write
|
|
16
17
|
*/
|
|
17
18
|
/**
|
|
@@ -76,7 +77,11 @@ export interface FileLockOptions {
|
|
|
76
77
|
* exclusive inspection proves no creator still has the file open. A failed
|
|
77
78
|
* inspection preserves the lock. Linux also recovers empty or zero-filled
|
|
78
79
|
* records of at most 128 bytes and unfinished PID records after a read lease
|
|
79
|
-
* excludes open writers.
|
|
80
|
+
* excludes open writers. macOS recovers empty or zero-filled records up to
|
|
81
|
+
* 128 bytes only after the system lsof reports no open handles on the unchanged
|
|
82
|
+
* inode without warnings. Missing or failed inspection preserves the lock.
|
|
83
|
+
* New macOS records are published complete by exclusive hard link.
|
|
84
|
+
* Dead takeover claimants are recovered automatically.
|
|
80
85
|
* Windows lock release retries transient file interference for a bounded interval. Contention backs
|
|
81
86
|
* off exponentially and times out after the deadline. Linux identity records
|
|
82
87
|
* distinguish PID reuse, a previous boot, and zombies. Legacy PID-only records
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function writerLockRecord(): Promise<string>;
|
|
6
6
|
/**
|
|
7
|
-
* Exclusively publish a complete Linux identity record
|
|
7
|
+
* Exclusively publish a complete macOS PID or Linux identity record; other platforms use wx.
|
|
8
8
|
* @param path - lock sibling in an existing parent directory.
|
|
9
9
|
* @param record - one acquisition's record from writerLockRecord.
|
|
10
10
|
*/
|
|
@@ -1023,8 +1023,8 @@ window.__ModuleLoader__.load({
|
|
|
1023
1023
|
/** English dictionary, checked complete against the zh key set. */
|
|
1024
1024
|
const en = { "language.title": "Language" };
|
|
1025
1025
|
//#endregion
|
|
1026
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
1027
|
-
const css = ".
|
|
1026
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/locale/src/client/LanguageRow.module.css.mjs
|
|
1027
|
+
const css = "._0iSwzW_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}._0iSwzW_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}._0iSwzW_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._0iSwzW_selector{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._0iSwzW_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}._0iSwzW_chevron{flex:none}";
|
|
1028
1028
|
const tagId = "@deepseek-ai/dsh-client-locale/LanguageRow.module.css";
|
|
1029
1029
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
1030
1030
|
const tag = document.createElement("style");
|
|
@@ -1034,11 +1034,11 @@ window.__ModuleLoader__.load({
|
|
|
1034
1034
|
document.head.appendChild(tag);
|
|
1035
1035
|
}
|
|
1036
1036
|
var LanguageRow_module_css_default = {
|
|
1037
|
-
"chevron": "
|
|
1038
|
-
"row": "
|
|
1039
|
-
"rowText": "
|
|
1040
|
-
"selector": "
|
|
1041
|
-
"title": "
|
|
1037
|
+
"chevron": "_0iSwzW_chevron",
|
|
1038
|
+
"row": "_0iSwzW_row",
|
|
1039
|
+
"rowText": "_0iSwzW_rowText",
|
|
1040
|
+
"selector": "_0iSwzW_selector",
|
|
1041
|
+
"title": "_0iSwzW_title"
|
|
1042
1042
|
};
|
|
1043
1043
|
//#endregion
|
|
1044
1044
|
//#region lib/types/client/LanguageRow.js
|
|
@@ -326,8 +326,8 @@ window.__ModuleLoader__.load({
|
|
|
326
326
|
enableDevToolsToCreate: "请先在通用设置中开启代码工作工具,再启动创造模式"
|
|
327
327
|
};
|
|
328
328
|
//#endregion
|
|
329
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
330
|
-
const css$3 = ".
|
|
329
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/ui-agent-preset/src/client/AgentPresetLabel.module.css.mjs
|
|
330
|
+
const css$3 = ".WZ3-da_label{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-fill-tsp-secondary);max-width:180px;height:22px;color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;align-items:center;gap:4px;padding:0 2px 0 0;font-size:12px;line-height:22px;display:inline-flex;overflow:hidden}.WZ3-da_icon{opacity:.7;flex:none}@container (width<=540px){.WZ3-da_label{display:none}}";
|
|
331
331
|
const tagId$3 = "@deepseek-ai/dsh-client-ui-agent-preset/AgentPresetLabel.module.css";
|
|
332
332
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
333
333
|
const tag = document.createElement("style");
|
|
@@ -337,8 +337,8 @@ window.__ModuleLoader__.load({
|
|
|
337
337
|
document.head.appendChild(tag);
|
|
338
338
|
}
|
|
339
339
|
var AgentPresetLabel_module_css_default = {
|
|
340
|
-
"icon": "
|
|
341
|
-
"label": "
|
|
340
|
+
"icon": "WZ3-da_icon",
|
|
341
|
+
"label": "WZ3-da_label"
|
|
342
342
|
};
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region lib/types/client/AgentPresetLabel.js
|
|
@@ -378,8 +378,8 @@ window.__ModuleLoader__.load({
|
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
//#endregion
|
|
381
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
382
|
-
const css$2 = ".
|
|
381
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/ui-agent-preset/src/client/AgentPresetSeat.module.css.mjs
|
|
382
|
+
const css$2 = ".iIjfFG_menuAnchor{min-width:54px;max-width:100%}.iIjfFG_seat{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(100%,240px);min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.iIjfFG_seat:not(:disabled):hover,.iIjfFG_seat[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.iIjfFG_seat:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.iIjfFG_seatIcon{color:var(--dsw-alias-label-primary);flex:none}.iIjfFG_seatLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.iIjfFG_introIcon{animation:.15s cubic-bezier(.16,1,.3,1) both iIjfFG_seat-icon-in}@keyframes iIjfFG_seat-icon-in{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.iIjfFG_introText{white-space:pre;display:inline-block}.iIjfFG_introChar{white-space:pre;opacity:0;animation:.4s ease-out forwards iIjfFG_seat-char-in;display:inline-block}@keyframes iIjfFG_seat-char-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){.iIjfFG_introIcon,.iIjfFG_introChar{opacity:1;animation:none}}.iIjfFG_chevron{color:var(--dsw-alias-label-caption);flex:none}.iIjfFG_item{flex-direction:column;gap:2px;max-width:280px;display:flex}.iIjfFG_itemName{color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px}.iIjfFG_itemDesc{color:var(--dsw-alias-label-caption);white-space:normal;font-size:12px;line-height:16px}";
|
|
383
383
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-agent-preset/AgentPresetSeat.module.css";
|
|
384
384
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
385
385
|
const tag = document.createElement("style");
|
|
@@ -389,19 +389,19 @@ window.__ModuleLoader__.load({
|
|
|
389
389
|
document.head.appendChild(tag);
|
|
390
390
|
}
|
|
391
391
|
var AgentPresetSeat_module_css_default = {
|
|
392
|
-
"chevron": "
|
|
393
|
-
"introChar": "
|
|
394
|
-
"introIcon": "
|
|
395
|
-
"introText": "
|
|
396
|
-
"item": "
|
|
397
|
-
"itemDesc": "
|
|
398
|
-
"itemName": "
|
|
399
|
-
"menuAnchor": "
|
|
400
|
-
"seat": "
|
|
401
|
-
"seat-char-in": "
|
|
402
|
-
"seat-icon-in": "
|
|
403
|
-
"seatIcon": "
|
|
404
|
-
"seatLabel": "
|
|
392
|
+
"chevron": "iIjfFG_chevron",
|
|
393
|
+
"introChar": "iIjfFG_introChar",
|
|
394
|
+
"introIcon": "iIjfFG_introIcon",
|
|
395
|
+
"introText": "iIjfFG_introText",
|
|
396
|
+
"item": "iIjfFG_item",
|
|
397
|
+
"itemDesc": "iIjfFG_itemDesc",
|
|
398
|
+
"itemName": "iIjfFG_itemName",
|
|
399
|
+
"menuAnchor": "iIjfFG_menuAnchor",
|
|
400
|
+
"seat": "iIjfFG_seat",
|
|
401
|
+
"seat-char-in": "iIjfFG_seat-char-in",
|
|
402
|
+
"seat-icon-in": "iIjfFG_seat-icon-in",
|
|
403
|
+
"seatIcon": "iIjfFG_seatIcon",
|
|
404
|
+
"seatLabel": "iIjfFG_seatLabel"
|
|
405
405
|
};
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region lib/types/client/AgentPresetSeat.js
|
|
@@ -564,8 +564,8 @@ window.__ModuleLoader__.load({
|
|
|
564
564
|
}, toast.seq)] });
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
568
|
-
const css$1 = ".
|
|
567
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/ui-agent-preset/src/client/PresetGuideDialog.module.css.mjs
|
|
568
|
+
const css$1 = ".WKl9qa_guideDialog{box-sizing:border-box;gap:0;width:min(640px,100%);height:min(600px,100%);max-height:100%;padding:0}.WKl9qa_guideLayout{flex-direction:column;height:100%;min-height:0;display:flex}.WKl9qa_guideHeader{flex:none;padding:24px 24px 20px 28px}.WKl9qa_guideTitleRow{justify-content:space-between;align-items:center;gap:16px;display:flex}.WKl9qa_guideTitle{margin:0;font-size:20px;font-weight:600;line-height:28px}.WKl9qa_guideIntro{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:14px;line-height:22px}.WKl9qa_guideClose{border-radius:var(--dsw-radius-md);width:32px;height:32px;min-height:32px;color:var(--dsw-alias-label-tertiary);padding:0}.WKl9qa_guideTabs{flex:none;margin:0 28px 22px}.WKl9qa_guidePanel{--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;flex:1;padding:0 24px 24px 28px;font-size:16px;overflow-y:auto}.WKl9qa_guidePanel:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.WKl9qa_guidePanel h3{margin:28px 0 10px;font-size:16px;font-weight:600;line-height:24px}.WKl9qa_guidePanel h3:first-child{margin-top:0}.WKl9qa_guidePanel p{color:var(--dsw-alias-label-primary);margin:0 0 16px;font-size:16px;line-height:1.625}.WKl9qa_guidePanel blockquote{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);border:0;margin:10px 0 14px;padding:14px 16px}.WKl9qa_guidePanel blockquote p{color:var(--dsw-alias-label-primary);margin:0}.WKl9qa_guidePanel[data-guide-page=usage] p{color:var(--dsw-alias-label-secondary);margin-bottom:12px;font-size:14px;line-height:22px}.WKl9qa_guidePanel[data-guide-page=usage] h3{margin:0}.WKl9qa_guideExample+.WKl9qa_guideExample{margin-top:28px}.WKl9qa_guideExampleHeader{flex-wrap:wrap;align-items:center;gap:8px 10px;margin-bottom:8px;display:flex}.WKl9qa_guideExampleTag{flex-shrink:0;gap:4px}.WKl9qa_guidePanel[data-guide-page=usage] blockquote{margin:8px 0;padding:12px 16px}.WKl9qa_guidePanel[data-guide-page=usage] blockquote p{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;line-height:26px}";
|
|
569
569
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-agent-preset/PresetGuideDialog.module.css";
|
|
570
570
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
571
571
|
const tag = document.createElement("style");
|
|
@@ -575,18 +575,18 @@ window.__ModuleLoader__.load({
|
|
|
575
575
|
document.head.appendChild(tag);
|
|
576
576
|
}
|
|
577
577
|
var PresetGuideDialog_module_css_default = {
|
|
578
|
-
"guideClose": "
|
|
579
|
-
"guideDialog": "
|
|
580
|
-
"guideExample": "
|
|
581
|
-
"guideExampleHeader": "
|
|
582
|
-
"guideExampleTag": "
|
|
583
|
-
"guideHeader": "
|
|
584
|
-
"guideIntro": "
|
|
585
|
-
"guideLayout": "
|
|
586
|
-
"guidePanel": "
|
|
587
|
-
"guideTabs": "
|
|
588
|
-
"guideTitle": "
|
|
589
|
-
"guideTitleRow": "
|
|
578
|
+
"guideClose": "WKl9qa_guideClose",
|
|
579
|
+
"guideDialog": "WKl9qa_guideDialog",
|
|
580
|
+
"guideExample": "WKl9qa_guideExample",
|
|
581
|
+
"guideExampleHeader": "WKl9qa_guideExampleHeader",
|
|
582
|
+
"guideExampleTag": "WKl9qa_guideExampleTag",
|
|
583
|
+
"guideHeader": "WKl9qa_guideHeader",
|
|
584
|
+
"guideIntro": "WKl9qa_guideIntro",
|
|
585
|
+
"guideLayout": "WKl9qa_guideLayout",
|
|
586
|
+
"guidePanel": "WKl9qa_guidePanel",
|
|
587
|
+
"guideTabs": "WKl9qa_guideTabs",
|
|
588
|
+
"guideTitle": "WKl9qa_guideTitle",
|
|
589
|
+
"guideTitleRow": "WKl9qa_guideTitleRow"
|
|
590
590
|
};
|
|
591
591
|
//#endregion
|
|
592
592
|
//#region lib/types/client/PresetGuideDialog.js
|
|
@@ -774,8 +774,8 @@ window.__ModuleLoader__.load({
|
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
776
|
//#endregion
|
|
777
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
778
|
-
const css = ".
|
|
777
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/ui-agent-preset/src/client/AgentPresetSection.module.css.mjs
|
|
778
|
+
const css = "._2q4LZG_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}._2q4LZG_title{margin:0;font-size:18px;font-weight:600}._2q4LZG_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px}._2q4LZG_group{flex-direction:column;gap:10px;display:flex}._2q4LZG_group+._2q4LZG_group{margin-top:20px}._2q4LZG_groupHead{letter-spacing:.06em;text-transform:uppercase;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;font-weight:600}._2q4LZG_cards{grid-template-columns:repeat(auto-fill,minmax(268px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}._2q4LZG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;transition:border-color .16s,background .16s;display:flex}._2q4LZG_card:hover:not(._2q4LZG_cardActive):not(._2q4LZG_cardSelectionDisabled){background:var(--dsw-alias-interactive-bg-hover)}._2q4LZG_cardActive{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}._2q4LZG_cardSelectionDisabled{background:var(--dsw-alias-bg-module-platform)}._2q4LZG_cardSelectionDisabled ._2q4LZG_cardMain{opacity:.48}._2q4LZG_cardBroken,._2q4LZG_cardBroken:hover{border-color:var(--dsw-alias-state-error-primary)}._2q4LZG_brokenBadge{corner-shape:round;white-space:nowrap;background:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-bg-layer-3);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}._2q4LZG_brokenTip{z-index:1;border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-label-primary);width:max-content;max-width:100%;color:var(--dsw-alias-bg-layer-3);text-align:left;white-space:pre-line;overflow-wrap:anywhere;opacity:0;pointer-events:none;padding:6px 8px;font-size:11px;font-weight:400;line-height:1.5;transition:opacity .12s;position:absolute;top:calc(100% + 6px);left:0}._2q4LZG_brokenBadge:hover ._2q4LZG_brokenTip,._2q4LZG_cardMain:focus-visible ._2q4LZG_brokenTip{opacity:1}._2q4LZG_cardMain[aria-disabled=true]{cursor:default}._2q4LZG_cardBrokenReason{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}._2q4LZG_cardMain{appearance:none;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--dsw-radius-xl) var(--dsw-radius-xl) 0 0;background:0 0;border:0;flex-direction:column;flex:1;gap:12px;padding:14px 16px 12px;display:flex}._2q4LZG_cardMain:disabled{cursor:default}._2q4LZG_cardMain:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}._2q4LZG_cardHead{align-items:flex-start;gap:12px;display:flex;position:relative}._2q4LZG_cardIdentity{flex:1;align-items:center;gap:6px;min-width:0;display:flex}._2q4LZG_cardName{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:15px;font-weight:600;line-height:1.4;overflow:hidden}._2q4LZG_cardDesc{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:4;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin-block:auto;font-size:13px;line-height:1.55;display:-webkit-box;overflow:hidden}._2q4LZG_cardId{max-width:35%;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;font-size:11px;line-height:21px;overflow:hidden}._2q4LZG_cardFoot{border-top:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;padding:6px 10px;display:flex}._2q4LZG_cardHelp{align-items:center;gap:4px;margin-right:auto;display:flex}._2q4LZG_helpButton{min-height:28px;color:var(--dsw-alias-label-tertiary);padding:5px 6px;font-size:12px;font-weight:400}._2q4LZG_helpButton:hover,._2q4LZG_helpButton:focus-visible{color:var(--dsw-alias-label-primary)}._2q4LZG_iconButton{appearance:none;border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;padding:6px;display:inline-flex;position:relative}._2q4LZG_iconButton:hover{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}._2q4LZG_iconButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-1px}._2q4LZG_iconButton:after{content:attr(data-tip);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);white-space:nowrap;opacity:0;pointer-events:none;padding:3px 8px;font-size:11px;line-height:17px;transition:opacity .12s;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%)}._2q4LZG_iconButton:hover:after,._2q4LZG_iconButton:focus-visible:after{opacity:1}._2q4LZG_dialog{width:min(720px,100%)}._2q4LZG_viewerCode{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);max-height:min(60vh,560px);color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);white-space:pre;tab-size:2;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);margin:0;padding:12px;font-size:12.5px;line-height:1.5;overflow:auto}._2q4LZG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}._2q4LZG_creatorButton{box-sizing:border-box;border:1px dashed var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);height:44px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;justify-content:center;align-self:stretch;align-items:center;gap:6px;font-size:14px;line-height:22px;display:flex}._2q4LZG_creatorButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._2q4LZG_creatorButton:disabled{opacity:.4;cursor:default}";
|
|
779
779
|
const tagId = "@deepseek-ai/dsh-client-ui-agent-preset/AgentPresetSection.module.css";
|
|
780
780
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
781
781
|
const tag = document.createElement("style");
|
|
@@ -785,33 +785,33 @@ window.__ModuleLoader__.load({
|
|
|
785
785
|
document.head.appendChild(tag);
|
|
786
786
|
}
|
|
787
787
|
var AgentPresetSection_module_css_default = {
|
|
788
|
-
"brokenBadge": "
|
|
789
|
-
"brokenTip": "
|
|
790
|
-
"card": "
|
|
791
|
-
"cardActive": "
|
|
792
|
-
"cardBroken": "
|
|
793
|
-
"cardBrokenReason": "
|
|
794
|
-
"cardDesc": "
|
|
795
|
-
"cardFoot": "
|
|
796
|
-
"cardHead": "
|
|
797
|
-
"cardHelp": "
|
|
798
|
-
"cardId": "
|
|
799
|
-
"cardIdentity": "
|
|
800
|
-
"cardMain": "
|
|
801
|
-
"cardName": "
|
|
802
|
-
"cardSelectionDisabled": "
|
|
803
|
-
"cards": "
|
|
804
|
-
"creatorButton": "
|
|
805
|
-
"dialog": "
|
|
806
|
-
"error": "
|
|
807
|
-
"group": "
|
|
808
|
-
"groupHead": "
|
|
809
|
-
"helpButton": "
|
|
810
|
-
"iconButton": "
|
|
811
|
-
"intro": "
|
|
812
|
-
"section": "
|
|
813
|
-
"title": "
|
|
814
|
-
"viewerCode": "
|
|
788
|
+
"brokenBadge": "_2q4LZG_brokenBadge",
|
|
789
|
+
"brokenTip": "_2q4LZG_brokenTip",
|
|
790
|
+
"card": "_2q4LZG_card",
|
|
791
|
+
"cardActive": "_2q4LZG_cardActive",
|
|
792
|
+
"cardBroken": "_2q4LZG_cardBroken",
|
|
793
|
+
"cardBrokenReason": "_2q4LZG_cardBrokenReason",
|
|
794
|
+
"cardDesc": "_2q4LZG_cardDesc",
|
|
795
|
+
"cardFoot": "_2q4LZG_cardFoot",
|
|
796
|
+
"cardHead": "_2q4LZG_cardHead",
|
|
797
|
+
"cardHelp": "_2q4LZG_cardHelp",
|
|
798
|
+
"cardId": "_2q4LZG_cardId",
|
|
799
|
+
"cardIdentity": "_2q4LZG_cardIdentity",
|
|
800
|
+
"cardMain": "_2q4LZG_cardMain",
|
|
801
|
+
"cardName": "_2q4LZG_cardName",
|
|
802
|
+
"cardSelectionDisabled": "_2q4LZG_cardSelectionDisabled",
|
|
803
|
+
"cards": "_2q4LZG_cards",
|
|
804
|
+
"creatorButton": "_2q4LZG_creatorButton",
|
|
805
|
+
"dialog": "_2q4LZG_dialog",
|
|
806
|
+
"error": "_2q4LZG_error",
|
|
807
|
+
"group": "_2q4LZG_group",
|
|
808
|
+
"groupHead": "_2q4LZG_groupHead",
|
|
809
|
+
"helpButton": "_2q4LZG_helpButton",
|
|
810
|
+
"iconButton": "_2q4LZG_iconButton",
|
|
811
|
+
"intro": "_2q4LZG_intro",
|
|
812
|
+
"section": "_2q4LZG_section",
|
|
813
|
+
"title": "_2q4LZG_title",
|
|
814
|
+
"viewerCode": "_2q4LZG_viewerCode"
|
|
815
815
|
};
|
|
816
816
|
//#endregion
|
|
817
817
|
//#region lib/types/client/AgentPresetSection.js
|
|
@@ -7,8 +7,8 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
11
|
-
const css = ".
|
|
10
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/client/ui-approval/src/client/ApprovalPanel.module.css.mjs
|
|
11
|
+
const css = ".Ip46CG_root{padding:8px calc(var(--dsh-composer-side-clearance) + 16px) 12px;flex-direction:column;align-items:center;display:flex}.Ip46CG_card{width:100%;max-width:var(--dsh-chat-content-width);border:1px solid var(--dsw-alias-state-warn-secondary);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);overflow:hidden}.Ip46CG_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);align-items:center;gap:8px;padding:10px 16px;font-size:13px;line-height:18px;display:flex}.Ip46CG_body{box-sizing:border-box;max-height:var(--dsh-composer-text-max-height);flex-direction:column;gap:6px;padding:12px 16px 0;display:flex;overflow-y:auto}.Ip46CG_headline{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:500;line-height:24px}.Ip46CG_command{color:var(--dsw-alias-label-tertiary);font-family:var(--ds-font-family-code);word-break:break-all;font-size:13px;line-height:20px}.Ip46CG_actionRow{justify-content:flex-end;gap:8px;padding:14px 16px;display:flex}.Ip46CG_reject:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);border-color:#0000}";
|
|
12
12
|
const tagId = "@deepseek-ai/dsh-client-ui-approval/ApprovalPanel.module.css";
|
|
13
13
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
14
14
|
const tag = document.createElement("style");
|
|
@@ -18,14 +18,14 @@ window.__ModuleLoader__.load({
|
|
|
18
18
|
document.head.appendChild(tag);
|
|
19
19
|
}
|
|
20
20
|
var ApprovalPanel_module_css_default = {
|
|
21
|
-
"actionRow": "
|
|
22
|
-
"body": "
|
|
23
|
-
"card": "
|
|
24
|
-
"command": "
|
|
25
|
-
"headline": "
|
|
26
|
-
"reject": "
|
|
27
|
-
"root": "
|
|
28
|
-
"strip": "
|
|
21
|
+
"actionRow": "Ip46CG_actionRow",
|
|
22
|
+
"body": "Ip46CG_body",
|
|
23
|
+
"card": "Ip46CG_card",
|
|
24
|
+
"command": "Ip46CG_command",
|
|
25
|
+
"headline": "Ip46CG_headline",
|
|
26
|
+
"reject": "Ip46CG_reject",
|
|
27
|
+
"root": "Ip46CG_root",
|
|
28
|
+
"strip": "Ip46CG_strip"
|
|
29
29
|
};
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region lib/types/client/ApprovalPanel.js
|