@authinex/dsh-plugin 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -48
- package/lib/client.js +235 -141
- package/lib/index.js +768 -112
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(client_exports);
|
|
|
30
30
|
|
|
31
31
|
// src/panel/panel.tsx
|
|
32
32
|
var import_react5 = require("react");
|
|
33
|
-
var
|
|
33
|
+
var import_dsh_client_ui_primitives6 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
34
34
|
|
|
35
35
|
// src/session/endpoint.ts
|
|
36
36
|
function checkEndpoint(raw) {
|
|
@@ -286,23 +286,25 @@ var TOOLS = {
|
|
|
286
286
|
ask_assistant: {
|
|
287
287
|
title: "问智能助手",
|
|
288
288
|
timeoutMs: 9e4,
|
|
289
|
-
description:
|
|
290
|
-
|
|
289
|
+
description: `把问题交给线上客服 Agent。后台执行,结果自动回到对话,不必调用查任务进度。
|
|
290
|
+
先试 search_kb / search_code。跨来源仍对不上再用它,并在 brief 写已知依据。不要传 deep。${DATA_NOT_INSTRUCTION}`,
|
|
291
291
|
parameters: {
|
|
292
292
|
question: { type: "string", required: true, description: "完整问句" },
|
|
293
|
-
version: { type: "string", description: "产品版本,可空" }
|
|
293
|
+
version: { type: "string", description: "产品版本,可空" },
|
|
294
|
+
brief: { type: "string", description: "已知依据、试过的检索、要补的部分。不要贴整段对话" }
|
|
294
295
|
}
|
|
295
296
|
},
|
|
296
297
|
locate_online: {
|
|
297
298
|
title: "线上源码定位",
|
|
298
299
|
timeoutMs: 7e4,
|
|
299
|
-
description:
|
|
300
|
+
description: `按版本读线上源码做只读定位。后台执行,结果自动回到对话,不必调用查任务进度。
|
|
300
301
|
结论按「根因 / 文件 / 证据 / 置信度 / 反证 / 过程」分块,引用时保留行号。
|
|
301
302
|
问「怎么配」「支持不支持」不要用它,用 search_kb 或 product_features。${DATA_NOT_INSTRUCTION}`,
|
|
302
303
|
parameters: {
|
|
303
304
|
question: { type: "string", required: true, description: "要定位的现象" },
|
|
304
305
|
version: { type: "string", description: "产品版本或分支" },
|
|
305
|
-
side: { type: "string", description: "frontend 或 backend,可空" }
|
|
306
|
+
side: { type: "string", description: "frontend 或 backend,可空" },
|
|
307
|
+
brief: { type: "string", description: "本机已查到的路径和单号。不要贴整段对话" }
|
|
306
308
|
}
|
|
307
309
|
},
|
|
308
310
|
task_status: {
|
|
@@ -335,6 +337,19 @@ var TOOLS = {
|
|
|
335
337
|
}
|
|
336
338
|
};
|
|
337
339
|
|
|
340
|
+
// src/work/deep-analysis.ts
|
|
341
|
+
var DEEP_ON_HINT = "每轮先用代码检索核实再答:结论、源码依据(文件:行号)、旁证、反证和置信度都会列出来。";
|
|
342
|
+
var DEEP_OFF_HINT = "按问题复杂度自动决定用哪些工具;源码分析能力不受影响,需要看代码时照样会用。";
|
|
343
|
+
var DEEP_COST_HINT = "开启后耗时可能更久,但给出的答案证据更丰富、维度更全。";
|
|
344
|
+
var HOWTO = "用法:/ax-deep 开,或 /ax-deep 关";
|
|
345
|
+
var USAGE = `没看懂。${HOWTO}`;
|
|
346
|
+
function deepSaveFailureText(body) {
|
|
347
|
+
const data = body || {};
|
|
348
|
+
const missing = !("ok" in data) || String(data.detail || "") === "not found";
|
|
349
|
+
if (missing) return "没保存:插件后端还是旧版本,重启智能问答后这个开关才能用";
|
|
350
|
+
return String(data.message || "没有保存");
|
|
351
|
+
}
|
|
352
|
+
|
|
338
353
|
// src/work/work-context.ts
|
|
339
354
|
var PRODUCT_KINDS = [
|
|
340
355
|
{ id: "yunshu", label: "云枢" },
|
|
@@ -346,6 +361,8 @@ function labelOf(kind) {
|
|
|
346
361
|
const found = PRODUCT_KINDS.find((item) => item.id === kind);
|
|
347
362
|
return found ? found.label : kind;
|
|
348
363
|
}
|
|
364
|
+
var HOWTO2 = "用法:/ax-context 云枢 8.7 某客户 要问的问题,或 /ax-context 清空";
|
|
365
|
+
var USAGE2 = `没看懂。${HOWTO2}`;
|
|
349
366
|
function parseReceiptText(text) {
|
|
350
367
|
const lines = String(text || "").split("\n").map((line) => line.trim()).filter(Boolean);
|
|
351
368
|
const first = lines[0] || "";
|
|
@@ -460,6 +477,10 @@ function verified(state) {
|
|
|
460
477
|
const phase = state?.phase;
|
|
461
478
|
return phase === "bound" || phase === "caps-missing" || phase === "upgrade";
|
|
462
479
|
}
|
|
480
|
+
var BIND_FORM_PHASES = ["unbound", "invalid", "revoked", "locked"];
|
|
481
|
+
function showsBindForm(phase) {
|
|
482
|
+
return BIND_FORM_PHASES.includes(phase);
|
|
483
|
+
}
|
|
463
484
|
function phaseTone(phase) {
|
|
464
485
|
if (phase === "bound") return "done";
|
|
465
486
|
if (phase === "binding") return "ongoing";
|
|
@@ -540,6 +561,8 @@ function viewModel(state) {
|
|
|
540
561
|
retryAfterSec: Number(state?.retryAfterSec || 0),
|
|
541
562
|
installedSkills: Array.isArray(state?.installedSkills) ? state.installedSkills : [],
|
|
542
563
|
workContext: showIdentity ? workContext : EMPTY_WORK,
|
|
564
|
+
// 开关只对已登录的这份配置有意义;未绑定时和工具清单一样不外露。
|
|
565
|
+
deepAnalysis: showIdentity ? Boolean(state?.deepAnalysis) : false,
|
|
543
566
|
skillsOnline: Boolean(state?.skillsOnline)
|
|
544
567
|
};
|
|
545
568
|
}
|
|
@@ -1317,10 +1340,38 @@ function SkillsTab(props) {
|
|
|
1317
1340
|
] });
|
|
1318
1341
|
}
|
|
1319
1342
|
|
|
1320
|
-
// src/work/
|
|
1321
|
-
var import_react4 = require("react");
|
|
1343
|
+
// src/work/deep-analysis-card.tsx
|
|
1322
1344
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1323
1345
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1346
|
+
function DeepAnalysisCard(props) {
|
|
1347
|
+
const on = props.value;
|
|
1348
|
+
const noCode = on && props.hasCodeTools === false;
|
|
1349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-card", children: [
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-switch-row", children: [
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-switch-text", children: [
|
|
1352
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-title", children: "深度分析" }),
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-desc", children: on ? DEEP_ON_HINT : DEEP_OFF_HINT }),
|
|
1354
|
+
on ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-notice", children: DEEP_COST_HINT }) : null,
|
|
1355
|
+
noCode ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-error", children: "当前角色没有代码检索和线上定位工具,开启后答复只能标「未用源码核实」。" }) : null
|
|
1356
|
+
] }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1358
|
+
import_dsh_client_ui_primitives4.Switch,
|
|
1359
|
+
{
|
|
1360
|
+
checked: on,
|
|
1361
|
+
disabled: props.disabled,
|
|
1362
|
+
label: "深度分析",
|
|
1363
|
+
onChange: props.onChange
|
|
1364
|
+
}
|
|
1365
|
+
)
|
|
1366
|
+
] }),
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "axds-row", children: props.saving ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "正在保存…" }) : props.note ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: props.note.tone === "ok" ? "axds-ok" : "axds-error", role: "status", children: props.note.text }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "修改后立即生效,也可以在对话里用 /ax-deep 开 / 关" }) })
|
|
1368
|
+
] });
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
// src/work/work-context-card.tsx
|
|
1372
|
+
var import_react4 = require("react");
|
|
1373
|
+
var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1374
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1324
1375
|
function WorkContextCard(props) {
|
|
1325
1376
|
const [productKind, setProductKind] = (0, import_react4.useState)(props.value.productKind);
|
|
1326
1377
|
const [version, setVersion] = (0, import_react4.useState)(props.value.version);
|
|
@@ -1331,16 +1382,16 @@ function WorkContextCard(props) {
|
|
|
1331
1382
|
setCustomer(props.value.customer);
|
|
1332
1383
|
}, [props.value.productKind, props.value.version, props.value.customer]);
|
|
1333
1384
|
const shownKind = labelOf(productKind);
|
|
1334
|
-
return /* @__PURE__ */ (0,
|
|
1335
|
-
/* @__PURE__ */ (0,
|
|
1336
|
-
/* @__PURE__ */ (0,
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-card", children: [
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-between", children: [
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-title", children: "工作上下文" }),
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "没填的版本和产品线,调用工具时补上" })
|
|
1338
1389
|
] }),
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1340
|
-
/* @__PURE__ */ (0,
|
|
1341
|
-
/* @__PURE__ */ (0,
|
|
1342
|
-
/* @__PURE__ */ (0,
|
|
1343
|
-
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-fields", children: [
|
|
1391
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "产品线" }),
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1394
|
+
import_dsh_client_ui_primitives5.Input,
|
|
1344
1395
|
{
|
|
1345
1396
|
className: "axds-input",
|
|
1346
1397
|
value: shownKind,
|
|
@@ -1353,10 +1404,10 @@ function WorkContextCard(props) {
|
|
|
1353
1404
|
}
|
|
1354
1405
|
)
|
|
1355
1406
|
] }),
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1357
|
-
/* @__PURE__ */ (0,
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "版本" }),
|
|
1409
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1410
|
+
import_dsh_client_ui_primitives5.Input,
|
|
1360
1411
|
{
|
|
1361
1412
|
className: "axds-input",
|
|
1362
1413
|
value: version,
|
|
@@ -1370,10 +1421,10 @@ function WorkContextCard(props) {
|
|
|
1370
1421
|
}
|
|
1371
1422
|
)
|
|
1372
1423
|
] }),
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1376
|
-
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "客户" }),
|
|
1426
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1427
|
+
import_dsh_client_ui_primitives5.Input,
|
|
1377
1428
|
{
|
|
1378
1429
|
className: "axds-input",
|
|
1379
1430
|
value: customer,
|
|
@@ -1388,11 +1439,11 @@ function WorkContextCard(props) {
|
|
|
1388
1439
|
)
|
|
1389
1440
|
] })
|
|
1390
1441
|
] }),
|
|
1391
|
-
/* @__PURE__ */ (0,
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
1395
|
-
|
|
1442
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "也可以在对话里用 /ax-context 云枢 8.7 某客户 要问的问题" }),
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "ghost", disabled: props.disabled, onClick: props.onClear, children: "清空" }),
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1446
|
+
import_dsh_client_ui_primitives5.Button,
|
|
1396
1447
|
{
|
|
1397
1448
|
size: "sm",
|
|
1398
1449
|
variant: "primary",
|
|
@@ -1408,7 +1459,7 @@ function WorkContextCard(props) {
|
|
|
1408
1459
|
}
|
|
1409
1460
|
|
|
1410
1461
|
// src/panel/panel.tsx
|
|
1411
|
-
var
|
|
1462
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1412
1463
|
function AuthinexPanel() {
|
|
1413
1464
|
const [state, setState] = (0, import_react5.useState)(null);
|
|
1414
1465
|
const [loaded, setLoaded] = (0, import_react5.useState)(false);
|
|
@@ -1423,6 +1474,8 @@ function AuthinexPanel() {
|
|
|
1423
1474
|
const [feedback, setFeedback] = (0, import_react5.useState)("");
|
|
1424
1475
|
const [tab, setTab] = (0, import_react5.useState)("overview");
|
|
1425
1476
|
const [skillRefresh, setSkillRefresh] = (0, import_react5.useState)(0);
|
|
1477
|
+
const [deepDraft, setDeepDraft] = (0, import_react5.useState)(null);
|
|
1478
|
+
const [deepNote, setDeepNote] = (0, import_react5.useState)(null);
|
|
1426
1479
|
const model = (0, import_react5.useMemo)(() => viewModel(state || void 0), [state]);
|
|
1427
1480
|
const applyState = (0, import_react5.useCallback)((next) => {
|
|
1428
1481
|
setState(next);
|
|
@@ -1444,14 +1497,18 @@ function AuthinexPanel() {
|
|
|
1444
1497
|
(0, import_react5.useEffect)(() => {
|
|
1445
1498
|
if (model.endpoint) setEndpoint((prev) => prev || model.endpoint);
|
|
1446
1499
|
}, [model.endpoint]);
|
|
1447
|
-
const run = (0, import_react5.useCallback)(async (label, work) => {
|
|
1500
|
+
const run = (0, import_react5.useCallback)(async (label, work, onFail) => {
|
|
1448
1501
|
setBusy(label);
|
|
1449
1502
|
setNotice("");
|
|
1450
1503
|
setLocalError("");
|
|
1451
1504
|
setFeedback("");
|
|
1452
1505
|
try {
|
|
1453
1506
|
await work();
|
|
1454
|
-
} catch {
|
|
1507
|
+
} catch (error) {
|
|
1508
|
+
if (onFail) {
|
|
1509
|
+
onFail(error);
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1455
1512
|
setState({ phase: "unreachable" });
|
|
1456
1513
|
if (label === "refresh") setNotice("没有刷新到");
|
|
1457
1514
|
if (label === "update") setNotice("没有查到更新");
|
|
@@ -1541,6 +1598,26 @@ function AuthinexPanel() {
|
|
|
1541
1598
|
setFeedback(body.ok ? "ok" : "error");
|
|
1542
1599
|
});
|
|
1543
1600
|
};
|
|
1601
|
+
const onSetDeep = (enabled) => {
|
|
1602
|
+
setDeepDraft(enabled);
|
|
1603
|
+
setDeepNote(null);
|
|
1604
|
+
const fail = (text) => {
|
|
1605
|
+
setDeepDraft(null);
|
|
1606
|
+
setDeepNote({ tone: "error", text });
|
|
1607
|
+
};
|
|
1608
|
+
void run("deep", async () => {
|
|
1609
|
+
const body = await api("/authinex-ds/deep", { method: "POST", body: { enabled } });
|
|
1610
|
+
if (body.ok !== true) {
|
|
1611
|
+
fail(deepSaveFailureText(body));
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
setDeepDraft(null);
|
|
1615
|
+
setDeepNote({ tone: "ok", text: enabled ? "已开启" : "已关闭" });
|
|
1616
|
+
if (body.state) applyState(body.state);
|
|
1617
|
+
}, () => {
|
|
1618
|
+
fail("没保存:请求没有回来,检查插件后端是否在运行");
|
|
1619
|
+
});
|
|
1620
|
+
};
|
|
1544
1621
|
const onCheckUpdate = () => {
|
|
1545
1622
|
void run("update", async () => {
|
|
1546
1623
|
const [body] = await Promise.all([
|
|
@@ -1562,43 +1639,43 @@ function AuthinexPanel() {
|
|
|
1562
1639
|
if (body.ok) setRestart(true);
|
|
1563
1640
|
});
|
|
1564
1641
|
};
|
|
1565
|
-
const showForm = loaded && (model.phase
|
|
1642
|
+
const showForm = loaded && showsBindForm(model.phase);
|
|
1566
1643
|
const message = localError || notice || model.message;
|
|
1567
|
-
const messageError = localError !== "" || model.phase === "invalid" || model.phase === "revoked" || model.phase === "unreachable";
|
|
1644
|
+
const messageError = localError !== "" || model.phase === "invalid" || model.phase === "revoked" || model.phase === "unreachable" || model.phase === "locked";
|
|
1568
1645
|
const disabled = busy !== "";
|
|
1569
1646
|
const pending = busy === "refresh" ? "正在刷新…" : busy === "update" ? "正在检查更新…" : busy.startsWith("test:") ? "正在测试连接…" : busy.startsWith("save:") ? "正在保存…" : "";
|
|
1570
1647
|
const messageClass = feedback === "ok" ? "axds-ok" : feedback === "warn" ? "axds-notice" : messageError || feedback === "error" ? "axds-error" : "axds-muted";
|
|
1571
1648
|
const installed = model.installedSkills;
|
|
1572
|
-
return /* @__PURE__ */ (0,
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1577
|
-
/* @__PURE__ */ (0,
|
|
1649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "axds", "aria-label": "AuthineX 助手", children: [
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "axds-head", children: [
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.StateDot, { state: model.tone }),
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-head-text", children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-title", children: "AuthineX 助手" }),
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-sub", children: loaded ? model.headline : "正在读取状态…" })
|
|
1578
1655
|
] }),
|
|
1579
|
-
/* @__PURE__ */ (0,
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-head-actions", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", disabled, onClick: onRefresh, children: busy === "refresh" ? "刷新中" : "刷新" }) })
|
|
1580
1657
|
] }),
|
|
1581
|
-
model.retryAfterSec > 0 ? /* @__PURE__ */ (0,
|
|
1658
|
+
model.retryAfterSec > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-notice", children: [
|
|
1582
1659
|
"请等待 ",
|
|
1583
1660
|
model.retryAfterSec,
|
|
1584
1661
|
" 秒后再试。"
|
|
1585
1662
|
] }) : null,
|
|
1586
|
-
model.phase === "upgrade" ? /* @__PURE__ */ (0,
|
|
1663
|
+
model.phase === "upgrade" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-error", children: [
|
|
1587
1664
|
"当前版本 ",
|
|
1588
1665
|
model.version,
|
|
1589
1666
|
",最低要求 ",
|
|
1590
1667
|
model.minVersion,
|
|
1591
1668
|
"。请先更新插件。"
|
|
1592
1669
|
] }) : null,
|
|
1593
|
-
pending ? /* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1596
|
-
] }, "pending") : message ? /* @__PURE__ */ (0,
|
|
1597
|
-
showForm ? /* @__PURE__ */ (0,
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
1599
|
-
/* @__PURE__ */ (0,
|
|
1600
|
-
/* @__PURE__ */ (0,
|
|
1601
|
-
|
|
1670
|
+
pending ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-pending", role: "status", children: [
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-spin", "aria-hidden": "true" }),
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: pending })
|
|
1673
|
+
] }, "pending") : message ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: messageClass, role: "status", children: message }, message) : null,
|
|
1674
|
+
showForm ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "axds-card", onSubmit: onBind, children: [
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "访问地址" }),
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1678
|
+
import_dsh_client_ui_primitives6.Input,
|
|
1602
1679
|
{
|
|
1603
1680
|
className: "axds-input",
|
|
1604
1681
|
value: endpoint,
|
|
@@ -1612,10 +1689,10 @@ function AuthinexPanel() {
|
|
|
1612
1689
|
}
|
|
1613
1690
|
)
|
|
1614
1691
|
] }),
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1618
|
-
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "密钥" }),
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1695
|
+
import_dsh_client_ui_primitives6.Input,
|
|
1619
1696
|
{
|
|
1620
1697
|
className: "axds-input",
|
|
1621
1698
|
value: key,
|
|
@@ -1629,31 +1706,32 @@ function AuthinexPanel() {
|
|
|
1629
1706
|
}
|
|
1630
1707
|
)
|
|
1631
1708
|
] }),
|
|
1632
|
-
/* @__PURE__ */ (0,
|
|
1633
|
-
|
|
1634
|
-
/* @__PURE__ */ (0,
|
|
1709
|
+
model.phase === "locked" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "正在等待上一次重试冷却。密钥已经注销的话,直接贴一把新的;不想再试就点下面的「解除绑定」。" }) : null,
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "地址和密钥都由你填;插件本身不带任何地址或密钥。" }),
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { type: "submit", variant: "primary", size: "md", disabled: disabled || key.trim() === "", children: "绑定" })
|
|
1635
1713
|
] }),
|
|
1636
|
-
model.endpoint ? /* @__PURE__ */ (0,
|
|
1637
|
-
/* @__PURE__ */ (0,
|
|
1714
|
+
model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
|
|
1638
1716
|
"本机还记着上次的地址 ",
|
|
1639
1717
|
model.endpoint
|
|
1640
1718
|
] }),
|
|
1641
|
-
/* @__PURE__ */ (0,
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
|
|
1642
1720
|
setConfirmUnbind(true);
|
|
1643
1721
|
}, children: "解除绑定" })
|
|
1644
1722
|
] }) : null,
|
|
1645
|
-
model.phase === "invalid" && model.endpoint ? /* @__PURE__ */ (0,
|
|
1723
|
+
model.phase === "invalid" && model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "升级不会作废这把密钥。把原来的密钥再贴一次,就会接回这台机器。" }) : null
|
|
1646
1724
|
] }) : null,
|
|
1647
|
-
model.user ? /* @__PURE__ */ (0,
|
|
1648
|
-
/* @__PURE__ */ (0,
|
|
1649
|
-
/* @__PURE__ */ (0,
|
|
1650
|
-
model.endpoint ? /* @__PURE__ */ (0,
|
|
1725
|
+
model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: model.user.displayName }),
|
|
1728
|
+
model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
|
|
1651
1729
|
"· ",
|
|
1652
1730
|
model.endpoint
|
|
1653
1731
|
] }) : null
|
|
1654
1732
|
] }),
|
|
1655
|
-
/* @__PURE__ */ (0,
|
|
1656
|
-
/* @__PURE__ */ (0,
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-tabs", role: "tablist", "aria-label": "配置分区", children: [
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1657
1735
|
"button",
|
|
1658
1736
|
{
|
|
1659
1737
|
type: "button",
|
|
@@ -1664,7 +1742,7 @@ function AuthinexPanel() {
|
|
|
1664
1742
|
children: "概览"
|
|
1665
1743
|
}
|
|
1666
1744
|
),
|
|
1667
|
-
/* @__PURE__ */ (0,
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1668
1746
|
"button",
|
|
1669
1747
|
{
|
|
1670
1748
|
type: "button",
|
|
@@ -1674,23 +1752,23 @@ function AuthinexPanel() {
|
|
|
1674
1752
|
onClick: () => setTab("skills"),
|
|
1675
1753
|
children: [
|
|
1676
1754
|
"技能",
|
|
1677
|
-
installed.length ? /* @__PURE__ */ (0,
|
|
1755
|
+
installed.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-tab-badge", children: installed.length }) : null
|
|
1678
1756
|
]
|
|
1679
1757
|
}
|
|
1680
1758
|
)
|
|
1681
1759
|
] }),
|
|
1682
|
-
tab === "overview" ? /* @__PURE__ */ (0,
|
|
1683
|
-
/* @__PURE__ */ (0,
|
|
1684
|
-
/* @__PURE__ */ (0,
|
|
1685
|
-
/* @__PURE__ */ (0,
|
|
1686
|
-
/* @__PURE__ */ (0,
|
|
1760
|
+
tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-between", children: [
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-title", children: "可用功能" }),
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
|
|
1687
1765
|
model.tools.length,
|
|
1688
1766
|
" 个工具"
|
|
1689
1767
|
] })
|
|
1690
1768
|
] }),
|
|
1691
|
-
model.tools.length ? /* @__PURE__ */ (0,
|
|
1769
|
+
model.tools.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-tags", children: model.toolNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Tag, { tone: "neutral", children: name }, name)) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "当前角色没有可用工具。权限由运营台角色决定。" })
|
|
1692
1770
|
] }),
|
|
1693
|
-
model.user ? /* @__PURE__ */ (0,
|
|
1771
|
+
model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1694
1772
|
WorkContextCard,
|
|
1695
1773
|
{
|
|
1696
1774
|
value: model.workContext,
|
|
@@ -1698,9 +1776,20 @@ function AuthinexPanel() {
|
|
|
1698
1776
|
onSave: onSaveContext,
|
|
1699
1777
|
onClear: onClearContext
|
|
1700
1778
|
}
|
|
1779
|
+
) : null,
|
|
1780
|
+
model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1781
|
+
DeepAnalysisCard,
|
|
1782
|
+
{
|
|
1783
|
+
value: deepDraft ?? model.deepAnalysis,
|
|
1784
|
+
disabled,
|
|
1785
|
+
saving: busy === "deep",
|
|
1786
|
+
note: deepNote,
|
|
1787
|
+
hasCodeTools: model.tools.includes("search_code"),
|
|
1788
|
+
onChange: onSetDeep
|
|
1789
|
+
}
|
|
1701
1790
|
) : null
|
|
1702
1791
|
] }) : null,
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1704
1793
|
AccountsCard,
|
|
1705
1794
|
{
|
|
1706
1795
|
active: tab === "overview",
|
|
@@ -1712,20 +1801,20 @@ function AuthinexPanel() {
|
|
|
1712
1801
|
notify
|
|
1713
1802
|
}
|
|
1714
1803
|
),
|
|
1715
|
-
tab === "overview" ? /* @__PURE__ */ (0,
|
|
1716
|
-
model.update?.version ? /* @__PURE__ */ (0,
|
|
1717
|
-
/* @__PURE__ */ (0,
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1719
|
-
/* @__PURE__ */ (0,
|
|
1804
|
+
tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1805
|
+
model.update?.version ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-between", children: [
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-title", children: model.update.available ? `新版本 ${model.update.version}` : `已是最新(${model.update.version})` }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Tag, { tone: model.update.available ? "info" : "success", children: model.update.available ? "可更新" : "最新" })
|
|
1720
1809
|
] }),
|
|
1721
|
-
model.update.notes ? /* @__PURE__ */ (0,
|
|
1722
|
-
model.update.sha ? /* @__PURE__ */ (0,
|
|
1810
|
+
model.update.notes ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: model.update.notes }) : null,
|
|
1811
|
+
model.update.sha ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-muted", children: [
|
|
1723
1812
|
"校验值 ",
|
|
1724
1813
|
model.update.sha
|
|
1725
1814
|
] }) : null,
|
|
1726
|
-
model.update.available ? /* @__PURE__ */ (0,
|
|
1727
|
-
/* @__PURE__ */ (0,
|
|
1728
|
-
/* @__PURE__ */ (0,
|
|
1815
|
+
model.update.available ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "更新由 DeepSeek 自己的安装器完成,装完要重启智能问答" }),
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: () => {
|
|
1729
1818
|
setConfirmUpdate(true);
|
|
1730
1819
|
}, children: [
|
|
1731
1820
|
"更新到 ",
|
|
@@ -1733,23 +1822,23 @@ function AuthinexPanel() {
|
|
|
1733
1822
|
] })
|
|
1734
1823
|
] }) : null
|
|
1735
1824
|
] }) : null,
|
|
1736
|
-
confirmUpdate ? /* @__PURE__ */ (0,
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
1825
|
+
confirmUpdate ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-confirm", children: [
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
1738
1827
|
"现在更新到 ",
|
|
1739
1828
|
model.update?.version,
|
|
1740
1829
|
"?装完需要重启智能问答。"
|
|
1741
1830
|
] }),
|
|
1742
|
-
/* @__PURE__ */ (0,
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", onClick: () => {
|
|
1743
1832
|
setConfirmUpdate(false);
|
|
1744
1833
|
}, children: "取消" }),
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: onApplyUpdate, children: "确认更新" })
|
|
1746
1835
|
] }) : null,
|
|
1747
|
-
restart ? /* @__PURE__ */ (0,
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
1750
|
-
/* @__PURE__ */ (0,
|
|
1751
|
-
/* @__PURE__ */ (0,
|
|
1752
|
-
|
|
1836
|
+
restart ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-notice", children: "已装好,重启智能问答后新版本才生效。" }) : null,
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "新密钥" }),
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1841
|
+
import_dsh_client_ui_primitives6.Input,
|
|
1753
1842
|
{
|
|
1754
1843
|
className: "axds-input",
|
|
1755
1844
|
value: key,
|
|
@@ -1763,17 +1852,17 @@ function AuthinexPanel() {
|
|
|
1763
1852
|
}
|
|
1764
1853
|
)
|
|
1765
1854
|
] }),
|
|
1766
|
-
/* @__PURE__ */ (0,
|
|
1767
|
-
/* @__PURE__ */ (0,
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
1855
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "贴一把新密钥会重新兑换,运营台才会变成已绑定" }),
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled: disabled || key.trim() === "", onClick: onRebind, children: "绑定这把密钥" })
|
|
1769
1858
|
] })
|
|
1770
1859
|
] }),
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", disabled, onClick: onCheckUpdate, children: busy === "update" ? "检查中" : "检查更新" }),
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "服务端有更新清单就走清单,没有就比 npm 上的版本号" })
|
|
1774
1863
|
] })
|
|
1775
1864
|
] }) : null,
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1777
1866
|
SkillsTab,
|
|
1778
1867
|
{
|
|
1779
1868
|
active: tab === "skills",
|
|
@@ -1786,72 +1875,72 @@ function AuthinexPanel() {
|
|
|
1786
1875
|
},
|
|
1787
1876
|
model.user ? "signed-in" : "signed-out"
|
|
1788
1877
|
),
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
1790
|
-
/* @__PURE__ */ (0,
|
|
1878
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
|
|
1879
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
|
|
1791
1880
|
setConfirmUnbind(true);
|
|
1792
1881
|
}, children: "解除绑定" }),
|
|
1793
|
-
/* @__PURE__ */ (0,
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "解除后地址和密钥都会清掉,要重新填" })
|
|
1794
1883
|
] })
|
|
1795
1884
|
] }) : null,
|
|
1796
|
-
confirmUnbind ? /* @__PURE__ */ (0,
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1798
|
-
/* @__PURE__ */ (0,
|
|
1885
|
+
confirmUnbind ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-confirm", children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "确认解除这台设备的绑定?" }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", onClick: () => {
|
|
1799
1888
|
setConfirmUnbind(false);
|
|
1800
1889
|
}, children: "取消" }),
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: onUnbind, children: "确认解除" })
|
|
1802
1891
|
] }) : null,
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("footer", { className: "axds-foot", children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
1805
1894
|
"v",
|
|
1806
1895
|
model.version || "0.1.0"
|
|
1807
1896
|
] }),
|
|
1808
|
-
model.endpoint ? /* @__PURE__ */ (0,
|
|
1809
|
-
/* @__PURE__ */ (0,
|
|
1810
|
-
/* @__PURE__ */ (0,
|
|
1897
|
+
model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "·" }),
|
|
1899
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: model.endpoint })
|
|
1811
1900
|
] }) : null
|
|
1812
1901
|
] })
|
|
1813
1902
|
] });
|
|
1814
1903
|
}
|
|
1815
1904
|
|
|
1816
1905
|
// src/work/command-card.tsx
|
|
1817
|
-
var
|
|
1906
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1818
1907
|
function AxContextCommandCard(props) {
|
|
1819
1908
|
const outcome = props.node?.outcome;
|
|
1820
1909
|
if (!outcome) {
|
|
1821
|
-
return /* @__PURE__ */ (0,
|
|
1822
|
-
/* @__PURE__ */ (0,
|
|
1823
|
-
/* @__PURE__ */ (0,
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd", "data-state": "running", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-muted", children: "正在设置…" })
|
|
1824
1913
|
] }) });
|
|
1825
1914
|
}
|
|
1826
1915
|
if (outcome.kind === "error") {
|
|
1827
|
-
return /* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
1830
|
-
/* @__PURE__ */ (0,
|
|
1916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "error", children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
|
|
1918
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
|
|
1919
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "bad", children: "没设成" })
|
|
1831
1920
|
] }),
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1921
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-error", children: outcome.text })
|
|
1833
1922
|
] });
|
|
1834
1923
|
}
|
|
1835
1924
|
const receipt = parseReceiptText(outcome.text || "");
|
|
1836
1925
|
if (!receipt) {
|
|
1837
|
-
return /* @__PURE__ */ (0,
|
|
1838
|
-
/* @__PURE__ */ (0,
|
|
1839
|
-
/* @__PURE__ */ (0,
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
|
|
1928
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
|
|
1841
1930
|
] }),
|
|
1842
|
-
/* @__PURE__ */ (0,
|
|
1931
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-muted", children: outcome.text })
|
|
1843
1932
|
] });
|
|
1844
1933
|
}
|
|
1845
|
-
return /* @__PURE__ */ (0,
|
|
1846
|
-
/* @__PURE__ */ (0,
|
|
1847
|
-
/* @__PURE__ */ (0,
|
|
1848
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
|
|
1849
1938
|
] }),
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1851
|
-
/* @__PURE__ */ (0,
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-fields", children: receipt.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "axds-cmd-field", children: [
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: field.label }),
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: field.value })
|
|
1853
1942
|
] }, `${field.label}:${field.value}`)) }),
|
|
1854
|
-
receipt.note ? /* @__PURE__ */ (0,
|
|
1943
|
+
receipt.note ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-muted", children: receipt.note }) : null
|
|
1855
1944
|
] });
|
|
1856
1945
|
}
|
|
1857
1946
|
|
|
@@ -1903,6 +1992,11 @@ var CSS = `
|
|
|
1903
1992
|
.axds-tab:hover{color:var(--dsw-alias-label-primary)}
|
|
1904
1993
|
.axds-tab.on{background:var(--dsw-alias-settings-card-fill);color:var(--dsw-alias-label-primary);font-weight:600;box-shadow:0 1px 2px rgb(0 0 0 / 6%)}
|
|
1905
1994
|
.axds-tab-badge{min-width:16px;height:16px;line-height:16px;padding:0 4px;border-radius:8px;background:var(--dsw-alias-state-success-primary);color:#fff;font-size:10px;text-align:center}
|
|
1995
|
+
/* 开关行照宿主设置项那一套:左边文字块,开关推到最右,标题与说明差一档字重。
|
|
1996
|
+
开关本身用宿主 Switch 原子,这里只管排版,不重画控件。 */
|
|
1997
|
+
.axds-switch-row{display:flex;align-items:center;justify-content:space-between;gap:24px}
|
|
1998
|
+
.axds-switch-text{display:flex;flex-direction:column;gap:4px;min-width:0}
|
|
1999
|
+
.axds-desc{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}
|
|
1906
2000
|
/* 折叠标题:整行可点,箭头只做指示。 */
|
|
1907
2001
|
.axds-collapse{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:left}
|
|
1908
2002
|
.axds-collapse:hover .axds-title{color:var(--dsw-alias-label-primary)}
|