@joekytc/dsh-swarm 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -139
- package/README.zh-CN.md +173 -125
- package/client/ConfigSection.tsx +96 -5
- package/client/ConfigSelect.tsx +3 -1
- package/client/TaskDrawer.tsx +2 -0
- package/client/config-store.ts +48 -7
- package/client/kanban.css +69 -0
- package/client/timeline-model.ts +2 -0
- package/lib/client.js +172 -14
- package/lib/config.d.ts +20 -1
- package/lib/config.js +15 -0
- package/lib/dispatcher/agent-runner.d.ts +13 -5
- package/lib/dispatcher/agent-runner.js +78 -38
- package/lib/dispatcher/chain-auditor.d.ts +4 -4
- package/lib/dispatcher/chain-auditor.js +10 -8
- package/lib/dispatcher/dispatcher.d.ts +18 -18
- package/lib/dispatcher/dispatcher.js +59 -43
- package/lib/dispatcher/event-waker.d.ts +1 -1
- package/lib/dispatcher/event-waker.js +2 -2
- package/lib/dispatcher/git-credentials.d.ts +2 -2
- package/lib/dispatcher/git-credentials.js +2 -2
- package/lib/dispatcher/model-candidates.d.ts +1 -1
- package/lib/dispatcher/model-candidates.js +1 -1
- package/lib/dispatcher/session-events.d.ts +1 -1
- package/lib/dispatcher/session-events.js +1 -1
- package/lib/dispatcher/target-repo.d.ts +2 -2
- package/lib/dispatcher/target-repo.js +3 -3
- package/lib/dispatcher/v-orchestrator.d.ts +8 -8
- package/lib/dispatcher/v-orchestrator.js +41 -41
- package/lib/dispatcher/watchdog.d.ts +1 -1
- package/lib/dispatcher/watchdog.js +2 -2
- package/lib/domain/config-override.d.ts +14 -0
- package/lib/domain/config-override.js +38 -1
- package/lib/domain/delivery-contract.d.ts +2 -2
- package/lib/domain/delivery-contract.js +5 -5
- package/lib/domain/delivery-evidence.d.ts +1 -1
- package/lib/domain/delivery-evidence.js +1 -1
- package/lib/domain/event-store.js +1 -1
- package/lib/domain/im-message.d.ts +15 -0
- package/lib/domain/im-message.js +149 -0
- package/lib/domain/kanban-service.d.ts +13 -10
- package/lib/domain/kanban-service.js +36 -28
- package/lib/domain/memory.d.ts +6 -1
- package/lib/domain/memory.js +25 -8
- package/lib/domain/ocr-review.d.ts +47 -0
- package/lib/domain/ocr-review.js +105 -0
- package/lib/domain/permissions.js +5 -5
- package/lib/domain/projection.js +6 -6
- package/lib/domain/state-machine.js +1 -1
- package/lib/domain/task-parents.js +1 -1
- package/lib/domain/types.d.ts +4 -4
- package/lib/index.js +14 -9
- package/lib/roles/clean-fs-tools.js +3 -4
- package/lib/roles/preset-installer.js +3 -3
- package/lib/roles/skill-installer.js +1 -1
- package/lib/roles/toolsets.d.ts +60 -16
- package/lib/roles/toolsets.js +265 -47
- package/lib/roles/wiki-worker.js +3 -3
- package/lib/routes/kanban-http.d.ts +25 -2
- package/lib/routes/kanban-http.js +171 -11
- package/lib/routes/kanban-sse.d.ts +1 -1
- package/lib/routes/kanban-sse.js +1 -1
- package/lib/routes/planning-driver.d.ts +4 -2
- package/lib/routes/planning-driver.js +7 -3
- package/lib/routes/prefix-router.d.ts +5 -3
- package/lib/routes/prefix-router.js +14 -5
- package/lib/services/config-provider.d.ts +0 -4
- package/lib/services/config-provider.js +7 -9
- package/lib/services/im-delivery.d.ts +109 -0
- package/lib/services/im-delivery.js +301 -0
- package/lib/services/kanban-provider.d.ts +1 -1
- package/lib/services/kanban-provider.js +2 -2
- package/lib/services/ocr-cli.d.ts +35 -0
- package/lib/services/ocr-cli.js +128 -0
- package/lib/tools/kanban-tools.d.ts +2 -2
- package/lib/tools/kanban-tools.js +1 -1
- package/lib/tools/main-session-tools.d.ts +7 -3
- package/lib/tools/main-session-tools.js +120 -21
- package/lib/tools/ocr-review-tools.d.ts +11 -0
- package/lib/tools/ocr-review-tools.js +63 -0
- package/lib/tools/planning-tools.d.ts +5 -2
- package/lib/tools/planning-tools.js +19 -11
- package/lib/tools/wiki-tools.js +2 -2
- package/lib/wiki/kb-linkage.d.ts +1 -1
- package/lib/wiki/local-kb-client.js +3 -3
- package/lib/wiki/local-kb.d.ts +1 -1
- package/lib/wiki/local-kb.js +2 -2
- package/lib/wiki/page-path.d.ts +1 -1
- package/lib/wiki/page-path.js +6 -3
- package/lib/wiki/wiki-vault-client.d.ts +1 -1
- package/lib/wiki/wiki-vault-client.js +1 -1
- package/package.json +1 -1
- package/personas/kanban-d/agent.cordis.yml +33 -12
- package/personas/kanban-dt/agent.cordis.yml +23 -5
- package/personas/kanban-p/agent.cordis.yml +3 -3
- package/personas/kanban-pt/agent.cordis.yml +1 -1
- package/personas/kanban-v/agent.cordis.yml +3 -3
- package/personas/kanban-w/agent.cordis.yml +21 -11
- package/personas/persona-d.md +8 -6
- package/personas/persona-dt.md +12 -4
- package/personas/persona-p.md +1 -1
- package/personas/persona-v.md +2 -2
- package/personas/persona-w.md +2 -2
- package/personas/swarm/agent.cordis.yml +44 -0
- package/personas/swarm/preset.yml +5 -0
package/client/ConfigSelect.tsx
CHANGED
|
@@ -6,12 +6,13 @@ export interface ConfigSelectOption { value: string; label: string }
|
|
|
6
6
|
* DSH 风格下拉:trigger 行(值 + › chevron)+ 弹出菜单(选中打勾、hover 高亮)。
|
|
7
7
|
* 对齐 dsh settings 页 picker 交互:点击外部/Esc 关闭,选中即提交。
|
|
8
8
|
*/
|
|
9
|
-
export function ConfigSelect({ value, options, placeholder, onChange, onCommit }: {
|
|
9
|
+
export function ConfigSelect({ value, options, placeholder, onChange, onCommit, disabled }: {
|
|
10
10
|
value: string;
|
|
11
11
|
options: ConfigSelectOption[];
|
|
12
12
|
placeholder: string;
|
|
13
13
|
onChange: (value: string) => void;
|
|
14
14
|
onCommit?: () => void;
|
|
15
|
+
disabled?: boolean;
|
|
15
16
|
}) {
|
|
16
17
|
const [open, setOpen] = useState(false);
|
|
17
18
|
const rootRef = useRef<HTMLDivElement | null>(null);
|
|
@@ -34,6 +35,7 @@ export function ConfigSelect({ value, options, placeholder, onChange, onCommit }
|
|
|
34
35
|
return (
|
|
35
36
|
<div className="dsh-kb-config__select" ref={rootRef}>
|
|
36
37
|
<button type="button" className="dsh-kb-config__select-trigger" aria-haspopup="listbox" aria-expanded={open}
|
|
38
|
+
disabled={disabled}
|
|
37
39
|
onClick={() => setOpen((v) => !v)}>
|
|
38
40
|
<span className={current ? undefined : 'dsh-kb-config__select-placeholder'}>{current?.label ?? placeholder}</span>
|
|
39
41
|
<span className="dsh-kb-config__select-chevron" aria-hidden="true">
|
package/client/TaskDrawer.tsx
CHANGED
|
@@ -201,7 +201,9 @@ export function TaskDrawer(props: {
|
|
|
201
201
|
))}
|
|
202
202
|
{!props.readOnly && (
|
|
203
203
|
<input
|
|
204
|
+
className="dsh-kb-comment-input"
|
|
204
205
|
aria-label="添加评论"
|
|
206
|
+
placeholder="添加评论,回车发送"
|
|
205
207
|
onKeyDown={(e) => { if (e.key === 'Enter') submitComment(e.target as HTMLInputElement); }}
|
|
206
208
|
/>
|
|
207
209
|
)}
|
package/client/config-store.ts
CHANGED
|
@@ -6,18 +6,24 @@ export interface EditableModelSnapshot { provider: string; model: string; reason
|
|
|
6
6
|
export interface EditableSnapshot {
|
|
7
7
|
wikiVault: { baseUrl: string; pagePrefix: string };
|
|
8
8
|
roles: { models: Partial<Record<string, EditableModelSnapshot>> };
|
|
9
|
+
reviewEngine: { mode: 'delegate' | 'managed'; managed: { provider: string; model: string } };
|
|
9
10
|
}
|
|
11
|
+
/** GET /kanban/ocr/status 响应镜像;null = 尚未拉到/拉取失败(状态未知)。 */
|
|
12
|
+
export interface OcrStatus { installed: boolean; version: string; mode: string; kbMode: 'remote' | 'local'; managedReady: boolean; }
|
|
13
|
+
export type InstallPhase = 'idle' | 'running' | 'done' | 'failed' | 'cancelled';
|
|
10
14
|
export interface ConfigState {
|
|
11
15
|
effective: EditableSnapshot;
|
|
12
16
|
sources: Record<string, string>;
|
|
13
17
|
catalog: { providers: Array<{ id: string; name: string }>; models: Record<string, Array<{ id: string; name: string; efforts: Array<{ id: string; name: string }> }>> };
|
|
18
|
+
ocrStatus: OcrStatus | null;
|
|
19
|
+
install: { phase: InstallPhase; log: string };
|
|
14
20
|
saving: boolean;
|
|
15
21
|
error: string | null;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
/**
|
|
24
|
+
/** 配置外部 store(GET /kanban/config + /kanban/llm-catalog + ocr 运维面;PUT 保存;POST reset),fetch 注入便于测试。 */
|
|
19
25
|
export function createConfigStore(fetchImpl: typeof fetch) {
|
|
20
|
-
let state: ConfigState = { effective: { wikiVault: { baseUrl: '', pagePrefix: '' }, roles: { models: {} } }, sources: {}, catalog: { providers: [], models: {} }, saving: false, error: null };
|
|
26
|
+
let state: ConfigState = { effective: { wikiVault: { baseUrl: '', pagePrefix: '' }, roles: { models: {} }, reviewEngine: { mode: 'delegate', managed: { provider: '', model: '' } } }, sources: {}, catalog: { providers: [], models: {} }, ocrStatus: null, install: { phase: 'idle', log: '' }, saving: false, error: null };
|
|
21
27
|
const listeners = new Set<() => void>();
|
|
22
28
|
const setState = (patch: Partial<ConfigState>) => { state = { ...state, ...patch }; for (const l of [...listeners]) l(); };
|
|
23
29
|
const get = () => state;
|
|
@@ -42,10 +48,45 @@ export function createConfigStore(fetchImpl: typeof fetch) {
|
|
|
42
48
|
} catch (e) { setState({ error: String(e) }); return false; }
|
|
43
49
|
finally { setState({ saving: false }); }
|
|
44
50
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
// ocr 运维面:状态探测 + 安装单飞(轮询由组件驱动,store 不持定时器)+ 托管接入写入
|
|
52
|
+
// 无 reset:各用户模型配置不同,无有意义的公共默认值可回退
|
|
53
|
+
const loadOcrStatus = async () => {
|
|
54
|
+
try {
|
|
55
|
+
const r = await fetchImpl('/kanban/ocr/status');
|
|
56
|
+
if (!r.ok) { setState({ ocrStatus: null }); return; }
|
|
57
|
+
setState({ ocrStatus: await r.json() });
|
|
58
|
+
} catch { setState({ ocrStatus: null }); }
|
|
59
|
+
};
|
|
60
|
+
const startInstall = async () => {
|
|
61
|
+
setState({ install: { phase: 'running', log: '' } });
|
|
62
|
+
try {
|
|
63
|
+
const r = await fetchImpl('/kanban/ocr/install', { method: 'POST' });
|
|
64
|
+
// 409 = 已有安装进行中:同样转轮询跟踪该任务;其余失败态才回落 failed
|
|
65
|
+
if (!r.ok && r.status !== 409) setState({ install: { phase: 'failed', log: 'POST /kanban/ocr/install → ' + r.status } });
|
|
66
|
+
} catch (e) { setState({ install: { phase: 'failed', log: String(e) } }); }
|
|
67
|
+
};
|
|
68
|
+
const cancelInstall = async () =>
|
|
69
|
+
fetchImpl('/kanban/ocr/install/cancel', { method: 'POST' }).then((x) => x.json());
|
|
70
|
+
const loadInstallState = async () => {
|
|
71
|
+
try {
|
|
72
|
+
const r = await fetchImpl('/kanban/ocr/install/state').then((x) => x.json());
|
|
73
|
+
const phase: InstallPhase = r.running ? 'running'
|
|
74
|
+
: r.result === 'ok' ? 'done'
|
|
75
|
+
: r.result === 'failed' ? 'failed'
|
|
76
|
+
: r.result === 'cancelled' ? 'cancelled'
|
|
77
|
+
: 'idle';
|
|
78
|
+
setState({ install: { phase, log: String(r.log ?? '') } });
|
|
79
|
+
if (phase === 'done') await loadOcrStatus(); // 安装成功 → 刷新状态解禁整卡并取版本号
|
|
80
|
+
} catch { /* 轮询失败静默,下一轮重试 */ }
|
|
81
|
+
};
|
|
82
|
+
const wireOcr = async (provider: string, model: string): Promise<{ ok: boolean; log: string }> => {
|
|
83
|
+
try {
|
|
84
|
+
const r = await fetchImpl('/kanban/ocr/wire', {
|
|
85
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ provider, model }),
|
|
86
|
+
});
|
|
87
|
+
const d = await r.json().catch(() => ({}));
|
|
88
|
+
return { ok: Boolean(d.ok), log: String(d.log ?? '') };
|
|
89
|
+
} catch (e) { return { ok: false, log: String(e) }; }
|
|
49
90
|
};
|
|
50
|
-
return { get, subscribe, load, save,
|
|
91
|
+
return { get, subscribe, load, save, loadOcrStatus, startInstall, cancelInstall, loadInstallState, wireOcr };
|
|
51
92
|
}
|
package/client/kanban.css
CHANGED
|
@@ -427,6 +427,26 @@
|
|
|
427
427
|
font: inherit;
|
|
428
428
|
font-size: 12px;
|
|
429
429
|
}
|
|
430
|
+
/* 评论输入:按 DSH 发送消息框风格统一(大圆角复用 16px 契约令牌) */
|
|
431
|
+
.dsh-kb-comment-input {
|
|
432
|
+
display: block;
|
|
433
|
+
width: 100%;
|
|
434
|
+
box-sizing: border-box;
|
|
435
|
+
margin-top: 8px;
|
|
436
|
+
padding: 10px 14px;
|
|
437
|
+
border: 1px solid var(--dsh-kb-border);
|
|
438
|
+
border-radius: var(--dsh-kb-radius-lg); /* 大圆角发送框:复用 16px 契约 */
|
|
439
|
+
background: var(--dsh-kb-input);
|
|
440
|
+
color: var(--dsh-kb-text-primary);
|
|
441
|
+
font: inherit;
|
|
442
|
+
}
|
|
443
|
+
.dsh-kb-comment-input:focus {
|
|
444
|
+
outline: none;
|
|
445
|
+
border-color: var(--dsh-kb-active);
|
|
446
|
+
}
|
|
447
|
+
.dsh-kb-comment-input::placeholder {
|
|
448
|
+
color: var(--dsh-kb-text-tertiary);
|
|
449
|
+
}
|
|
430
450
|
.dsh-kb-unread {
|
|
431
451
|
flex: 0 0 auto;
|
|
432
452
|
border: 1px solid var(--dsh-kb-active);
|
|
@@ -783,3 +803,52 @@
|
|
|
783
803
|
background: var(--dsw-alias-button-primary-fill);
|
|
784
804
|
color: var(--dsw-alias-label-primary-foreground);
|
|
785
805
|
}
|
|
806
|
+
|
|
807
|
+
/* Swarm 配置面板「评审引擎(ocr)」卡:安装中 spinner 行与状态行(成功绿 / 警示黄) */
|
|
808
|
+
.dsh-kb-config__installing {
|
|
809
|
+
display: flex;
|
|
810
|
+
align-items: center;
|
|
811
|
+
gap: 10px;
|
|
812
|
+
margin: 8px 0;
|
|
813
|
+
}
|
|
814
|
+
.dsh-kb-config__installing button {
|
|
815
|
+
margin-left: auto;
|
|
816
|
+
padding: 4px 12px;
|
|
817
|
+
border: 1px solid var(--dsh-kb-config-border, #333);
|
|
818
|
+
border-radius: 10px;
|
|
819
|
+
background: transparent;
|
|
820
|
+
color: inherit;
|
|
821
|
+
font: inherit;
|
|
822
|
+
cursor: pointer;
|
|
823
|
+
}
|
|
824
|
+
.dsh-kb-config__installing-spinner {
|
|
825
|
+
flex: 0 0 auto;
|
|
826
|
+
width: 14px;
|
|
827
|
+
height: 14px;
|
|
828
|
+
border: 2px solid var(--dsw-alias-border-l2, #666);
|
|
829
|
+
border-top-color: transparent;
|
|
830
|
+
border-radius: 50%;
|
|
831
|
+
animation: dsh-kb-ocr-spin 0.9s linear infinite;
|
|
832
|
+
}
|
|
833
|
+
@keyframes dsh-kb-ocr-spin {
|
|
834
|
+
to { transform: rotate(360deg); }
|
|
835
|
+
}
|
|
836
|
+
.dsh-kb-config__ocr-ok { color: var(--dsw-alias-state-success-primary, #2e9e5b); margin: 6px 0; }
|
|
837
|
+
.dsh-kb-config__ocr-warn { color: var(--dsw-alias-state-warning-primary, #b8860b); margin: 6px 0; }
|
|
838
|
+
.dsh-kb-config__installing button,
|
|
839
|
+
.dsh-kb-config__card > button {
|
|
840
|
+
margin-top: 8px;
|
|
841
|
+
}
|
|
842
|
+
.dsh-kb-config__card > button {
|
|
843
|
+
padding: 6px 16px;
|
|
844
|
+
border: 1px solid var(--dsh-kb-config-border, #333);
|
|
845
|
+
border-radius: 10px;
|
|
846
|
+
background: transparent;
|
|
847
|
+
color: inherit;
|
|
848
|
+
font: inherit;
|
|
849
|
+
cursor: pointer;
|
|
850
|
+
transition: background-color 150ms ease;
|
|
851
|
+
}
|
|
852
|
+
.dsh-kb-config__card > button:hover:not([disabled]) { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }
|
|
853
|
+
.dsh-kb-config__card > button[disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
854
|
+
.dsh-kb-config__select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
|
package/client/timeline-model.ts
CHANGED
|
@@ -40,6 +40,7 @@ const STATUS_OF: Record<EventKind, TimelineStatus> = {
|
|
|
40
40
|
'chain/audit-warning': 'exception',
|
|
41
41
|
'chain/audit-confirmed': 'neutral',
|
|
42
42
|
'chain/title-updated': 'neutral',
|
|
43
|
+
'chain/im-delivery-failed': 'exception', // IM 投递失败留痕(非状态转换注记)
|
|
43
44
|
'spec-card/created': 'neutral',
|
|
44
45
|
'spec-card/edited': 'neutral',
|
|
45
46
|
'spec-card/approved': 'success',
|
|
@@ -75,6 +76,7 @@ const KIND_LABEL: Record<EventKind, string> = {
|
|
|
75
76
|
'chain/audit-warning': '越权警告',
|
|
76
77
|
'chain/audit-confirmed': '越权已确认',
|
|
77
78
|
'chain/title-updated': '链路改名',
|
|
79
|
+
'chain/im-delivery-failed': 'IM 投递失败',
|
|
78
80
|
'spec-card/created': '规格卡创建',
|
|
79
81
|
'spec-card/edited': '规格卡编辑',
|
|
80
82
|
'spec-card/approved': '规格卡批准',
|
package/lib/client.js
CHANGED
|
@@ -90,7 +90,7 @@ window.__ModuleLoader__.load({
|
|
|
90
90
|
next.chains = new Map(state.chains).set(ev.chainId, { ...c, rootTaskId: String(ev.payload["rootTaskId"] ?? "") });
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
|
-
//
|
|
93
|
+
// audit 事件不改 Chain 状态,只写验收核对视图(auditWarnings)
|
|
94
94
|
case "chain/audit-warning": {
|
|
95
95
|
const c = state.chains.get(ev.chainId);
|
|
96
96
|
if (!c) throw new Error("projection: unknown chain " + ev.chainId);
|
|
@@ -119,14 +119,14 @@ window.__ModuleLoader__.load({
|
|
|
119
119
|
});
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
|
-
//
|
|
122
|
+
// 链标题改名(非状态转换,只更新 title;快照重放可见)
|
|
123
123
|
case "chain/title-updated": {
|
|
124
124
|
const c = state.chains.get(ev.chainId);
|
|
125
125
|
if (!c) throw new Error("projection: unknown chain " + ev.chainId);
|
|
126
126
|
next.chains = new Map(state.chains).set(ev.chainId, { ...c, title: String(ev.payload["to"] ?? "") });
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
|
-
//
|
|
129
|
+
// 任务标题改名(非状态转换,只更新 title)
|
|
130
130
|
case "task/renamed": {
|
|
131
131
|
if (!ev.taskId) throw new Error("projection: event without taskId");
|
|
132
132
|
const t = state.tasks.get(ev.taskId);
|
|
@@ -864,6 +864,8 @@ window.__ModuleLoader__.load({
|
|
|
864
864
|
"chain/audit-warning": "exception",
|
|
865
865
|
"chain/audit-confirmed": "neutral",
|
|
866
866
|
"chain/title-updated": "neutral",
|
|
867
|
+
"chain/im-delivery-failed": "exception",
|
|
868
|
+
// IM 投递失败留痕(非状态转换注记)
|
|
867
869
|
"spec-card/created": "neutral",
|
|
868
870
|
"spec-card/edited": "neutral",
|
|
869
871
|
"spec-card/approved": "success",
|
|
@@ -897,6 +899,7 @@ window.__ModuleLoader__.load({
|
|
|
897
899
|
"chain/audit-warning": "\u8D8A\u6743\u8B66\u544A",
|
|
898
900
|
"chain/audit-confirmed": "\u8D8A\u6743\u5DF2\u786E\u8BA4",
|
|
899
901
|
"chain/title-updated": "\u94FE\u8DEF\u6539\u540D",
|
|
902
|
+
"chain/im-delivery-failed": "IM \u6295\u9012\u5931\u8D25",
|
|
900
903
|
"spec-card/created": "\u89C4\u683C\u5361\u521B\u5EFA",
|
|
901
904
|
"spec-card/edited": "\u89C4\u683C\u5361\u7F16\u8F91",
|
|
902
905
|
"spec-card/approved": "\u89C4\u683C\u5361\u6279\u51C6",
|
|
@@ -1216,7 +1219,9 @@ window.__ModuleLoader__.load({
|
|
|
1216
1219
|
!props.readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1217
1220
|
"input",
|
|
1218
1221
|
{
|
|
1222
|
+
className: "dsh-kb-comment-input",
|
|
1219
1223
|
"aria-label": "\u6DFB\u52A0\u8BC4\u8BBA",
|
|
1224
|
+
placeholder: "\u6DFB\u52A0\u8BC4\u8BBA\uFF0C\u56DE\u8F66\u53D1\u9001",
|
|
1220
1225
|
onKeyDown: (e) => {
|
|
1221
1226
|
if (e.key === "Enter") submitComment(e.target);
|
|
1222
1227
|
}
|
|
@@ -1406,7 +1411,7 @@ window.__ModuleLoader__.load({
|
|
|
1406
1411
|
// client/config-store.ts
|
|
1407
1412
|
var SWARM_CONFIG_NS = "swarm-config";
|
|
1408
1413
|
function createConfigStore(fetchImpl) {
|
|
1409
|
-
let state = { effective: { wikiVault: { baseUrl: "", pagePrefix: "" }, roles: { models: {} } }, sources: {}, catalog: { providers: [], models: {} }, saving: false, error: null };
|
|
1414
|
+
let state = { effective: { wikiVault: { baseUrl: "", pagePrefix: "" }, roles: { models: {} }, reviewEngine: { mode: "delegate", managed: { provider: "", model: "" } } }, sources: {}, catalog: { providers: [], models: {} }, ocrStatus: null, install: { phase: "idle", log: "" }, saving: false, error: null };
|
|
1410
1415
|
const listeners = /* @__PURE__ */ new Set();
|
|
1411
1416
|
const setState = (patch) => {
|
|
1412
1417
|
state = { ...state, ...patch };
|
|
@@ -1448,18 +1453,57 @@ window.__ModuleLoader__.load({
|
|
|
1448
1453
|
setState({ saving: false });
|
|
1449
1454
|
}
|
|
1450
1455
|
};
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1456
|
+
const loadOcrStatus = async () => {
|
|
1457
|
+
try {
|
|
1458
|
+
const r = await fetchImpl("/kanban/ocr/status");
|
|
1459
|
+
if (!r.ok) {
|
|
1460
|
+
setState({ ocrStatus: null });
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
setState({ ocrStatus: await r.json() });
|
|
1464
|
+
} catch {
|
|
1465
|
+
setState({ ocrStatus: null });
|
|
1466
|
+
}
|
|
1455
1467
|
};
|
|
1456
|
-
|
|
1468
|
+
const startInstall = async () => {
|
|
1469
|
+
setState({ install: { phase: "running", log: "" } });
|
|
1470
|
+
try {
|
|
1471
|
+
const r = await fetchImpl("/kanban/ocr/install", { method: "POST" });
|
|
1472
|
+
if (!r.ok && r.status !== 409) setState({ install: { phase: "failed", log: "POST /kanban/ocr/install \u2192 " + r.status } });
|
|
1473
|
+
} catch (e) {
|
|
1474
|
+
setState({ install: { phase: "failed", log: String(e) } });
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
const cancelInstall = async () => fetchImpl("/kanban/ocr/install/cancel", { method: "POST" }).then((x) => x.json());
|
|
1478
|
+
const loadInstallState = async () => {
|
|
1479
|
+
try {
|
|
1480
|
+
const r = await fetchImpl("/kanban/ocr/install/state").then((x) => x.json());
|
|
1481
|
+
const phase = r.running ? "running" : r.result === "ok" ? "done" : r.result === "failed" ? "failed" : r.result === "cancelled" ? "cancelled" : "idle";
|
|
1482
|
+
setState({ install: { phase, log: String(r.log ?? "") } });
|
|
1483
|
+
if (phase === "done") await loadOcrStatus();
|
|
1484
|
+
} catch {
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
const wireOcr = async (provider, model) => {
|
|
1488
|
+
try {
|
|
1489
|
+
const r = await fetchImpl("/kanban/ocr/wire", {
|
|
1490
|
+
method: "POST",
|
|
1491
|
+
headers: { "Content-Type": "application/json" },
|
|
1492
|
+
body: JSON.stringify({ provider, model })
|
|
1493
|
+
});
|
|
1494
|
+
const d = await r.json().catch(() => ({}));
|
|
1495
|
+
return { ok: Boolean(d.ok), log: String(d.log ?? "") };
|
|
1496
|
+
} catch (e) {
|
|
1497
|
+
return { ok: false, log: String(e) };
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
return { get, subscribe, load, save, loadOcrStatus, startInstall, cancelInstall, loadInstallState, wireOcr };
|
|
1457
1501
|
}
|
|
1458
1502
|
|
|
1459
1503
|
// client/ConfigSelect.tsx
|
|
1460
1504
|
var import_react8 = require("react");
|
|
1461
1505
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1462
|
-
function ConfigSelect({ value, options, placeholder, onChange, onCommit }) {
|
|
1506
|
+
function ConfigSelect({ value, options, placeholder, onChange, onCommit, disabled }) {
|
|
1463
1507
|
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
1464
1508
|
const rootRef = (0, import_react8.useRef)(null);
|
|
1465
1509
|
(0, import_react8.useEffect)(() => {
|
|
@@ -1486,6 +1530,7 @@ window.__ModuleLoader__.load({
|
|
|
1486
1530
|
className: "dsh-kb-config__select-trigger",
|
|
1487
1531
|
"aria-haspopup": "listbox",
|
|
1488
1532
|
"aria-expanded": open,
|
|
1533
|
+
disabled,
|
|
1489
1534
|
onClick: () => setOpen((v) => !v),
|
|
1490
1535
|
children: [
|
|
1491
1536
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: current ? void 0 : "dsh-kb-config__select-placeholder", children: current?.label ?? placeholder }),
|
|
@@ -1538,15 +1583,33 @@ window.__ModuleLoader__.load({
|
|
|
1538
1583
|
// client/ConfigSection.tsx
|
|
1539
1584
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1540
1585
|
var ROLES = ["v", "p", "w", "d", "pt", "dt"];
|
|
1586
|
+
function ocrBanner(ocr, installing) {
|
|
1587
|
+
if (installing) return null;
|
|
1588
|
+
if (ocr === null) return "ocr \u72B6\u6001\u672A\u77E5\u2014\u2014\u59D4\u6258/\u6258\u7BA1\u8BC4\u5BA1\u53EF\u80FD\u4E0D\u53EF\u7528";
|
|
1589
|
+
if (!ocr.installed) return "ocr \u672A\u5B89\u88C5\u2014\u2014\u59D4\u6258/\u6258\u7BA1\u8BC4\u5BA1\u5747\u4E0D\u53EF\u7528";
|
|
1590
|
+
return null;
|
|
1591
|
+
}
|
|
1541
1592
|
function ConfigSection({ fetchImpl, close }) {
|
|
1542
1593
|
const storeRef = (0, import_react9.useRef)(null);
|
|
1543
1594
|
if (!storeRef.current) storeRef.current = createConfigStore(fetchImpl ?? ((...args) => fetch(...args)));
|
|
1544
1595
|
const store = storeRef.current;
|
|
1545
1596
|
const state = (0, import_react9.useSyncExternalStore)(store.subscribe, store.get);
|
|
1546
1597
|
const [draft, setDraft] = (0, import_react9.useState)(null);
|
|
1598
|
+
const [wireResult, setWireResult] = (0, import_react9.useState)(null);
|
|
1547
1599
|
(0, import_react9.useEffect)(() => {
|
|
1548
1600
|
void store.load().then(() => setDraft(store.get().effective));
|
|
1601
|
+
void store.loadOcrStatus();
|
|
1549
1602
|
}, [store]);
|
|
1603
|
+
const installing = state.install.phase === "running";
|
|
1604
|
+
(0, import_react9.useEffect)(() => {
|
|
1605
|
+
if (!installing) return;
|
|
1606
|
+
const tick = () => {
|
|
1607
|
+
void store.loadInstallState();
|
|
1608
|
+
};
|
|
1609
|
+
tick();
|
|
1610
|
+
const timer = setInterval(tick, 1500);
|
|
1611
|
+
return () => clearInterval(timer);
|
|
1612
|
+
}, [store, installing]);
|
|
1550
1613
|
if (!draft) return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config", children: "\u52A0\u8F7D\u4E2D\u2026" });
|
|
1551
1614
|
const commit = (next) => {
|
|
1552
1615
|
setDraft(next);
|
|
@@ -1556,9 +1619,17 @@ window.__ModuleLoader__.load({
|
|
|
1556
1619
|
const prev = draft.roles.models[r] ?? { provider: "", model: "", reasoningEffort: "" };
|
|
1557
1620
|
commit({ ...draft, roles: { models: { ...draft.roles.models, [r]: { ...prev, ...patch } } } });
|
|
1558
1621
|
};
|
|
1622
|
+
const commitReviewEngine = (mode, managed) => {
|
|
1623
|
+
commit({ ...draft, reviewEngine: { mode, managed } });
|
|
1624
|
+
};
|
|
1559
1625
|
const onBlur = () => {
|
|
1560
1626
|
void store.save(draft);
|
|
1561
1627
|
};
|
|
1628
|
+
const ocr = state.ocrStatus;
|
|
1629
|
+
const banner = ocrBanner(ocr, installing);
|
|
1630
|
+
const ocrBlocked = installing || ocr === null || !ocr.installed;
|
|
1631
|
+
const re = draft.reviewEngine;
|
|
1632
|
+
const managedFieldsEnabled = !ocrBlocked && re.mode === "managed";
|
|
1562
1633
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config", children: [
|
|
1563
1634
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
|
|
1564
1635
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u77E5\u8BC6\u5E93" }),
|
|
@@ -1628,15 +1699,102 @@ window.__ModuleLoader__.load({
|
|
|
1628
1699
|
] }, r);
|
|
1629
1700
|
})
|
|
1630
1701
|
] }),
|
|
1631
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.
|
|
1632
|
-
|
|
1633
|
-
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u8BC4\u5BA1\u5F15\u64CE\uFF08ocr\uFF09" }),
|
|
1704
|
+
installing && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__installing", children: [
|
|
1705
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__installing-spinner", "aria-hidden": "true" }),
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "\u6B63\u5728\u5B89\u88C5 ocr\u2026\uFF08npm \u5168\u5C40\u5B89\u88C5\uFF0C\u7EA6 1-2 \u5206\u949F\uFF09" }),
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
|
|
1708
|
+
void store.cancelInstall();
|
|
1709
|
+
}, children: "\u53D6\u6D88" })
|
|
1710
|
+
] }),
|
|
1711
|
+
banner && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", role: "alert", children: banner }),
|
|
1712
|
+
state.install.phase === "failed" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__error", children: [
|
|
1713
|
+
"\u5B89\u88C5\u5931\u8D25\uFF1A",
|
|
1714
|
+
state.install.log.slice(0, 200) || "npm \u5168\u5C40\u5B89\u88C5\u672A\u6210\u529F\uFF0C\u53EF\u91CD\u8BD5"
|
|
1715
|
+
] }),
|
|
1716
|
+
state.install.phase === "cancelled" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", children: "\u5B89\u88C5\u5DF2\u53D6\u6D88\uFF0C\u53EF\u91CD\u65B0\u53D1\u8D77" }),
|
|
1717
|
+
ocr?.installed && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__ocr-ok", children: [
|
|
1718
|
+
"\u2713 ocr ",
|
|
1719
|
+
ocr.version,
|
|
1720
|
+
" \u5DF2\u5B89\u88C5"
|
|
1721
|
+
] }),
|
|
1722
|
+
!installing && (!ocr || !ocr.installed) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", onClick: () => {
|
|
1723
|
+
void store.startInstall();
|
|
1724
|
+
}, children: "\u5B89\u88C5 ocr" }),
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u8BC4\u5BA1\u6A21\u5F0F" }),
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1727
|
+
ConfigSelect,
|
|
1728
|
+
{
|
|
1729
|
+
value: re.mode,
|
|
1730
|
+
disabled: ocrBlocked,
|
|
1731
|
+
placeholder: "\u9009\u62E9\u8BC4\u5BA1\u6A21\u5F0F",
|
|
1732
|
+
options: [
|
|
1733
|
+
{ value: "delegate", label: "\u59D4\u6258\uFF08DT \u81EA\u5DF1\u7684\u6A21\u578B\u8BC4\u5BA1\uFF0C\u96F6 key\uFF09" },
|
|
1734
|
+
{ value: "managed", label: "\u6258\u7BA1\uFF08ocr \u7528\u4E0B\u9009\u6A21\u578B\u8BC4\u5BA1\uFF09" }
|
|
1735
|
+
],
|
|
1736
|
+
onChange: (v) => {
|
|
1737
|
+
if (v !== re.mode) commitReviewEngine(v, re.managed);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__src", children: state.sources["reviewEngine.mode"] === "override" ? "\u5DF2\u8986\u76D6" : "\u7EE7\u627F" }),
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u63D0\u4F9B\u65B9" }),
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1744
|
+
ConfigSelect,
|
|
1745
|
+
{
|
|
1746
|
+
value: re.managed.provider,
|
|
1747
|
+
disabled: !managedFieldsEnabled,
|
|
1748
|
+
placeholder: "\u9009\u62E9\u63D0\u4F9B\u65B9",
|
|
1749
|
+
options: state.catalog.providers.map((p) => ({ value: p.id, label: p.name })),
|
|
1750
|
+
onChange: (v) => {
|
|
1751
|
+
if (v !== re.managed.provider) commitReviewEngine(re.mode, { provider: v, model: "" });
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
),
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "\u6A21\u578B" }),
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1757
|
+
ConfigSelect,
|
|
1758
|
+
{
|
|
1759
|
+
value: re.managed.model,
|
|
1760
|
+
disabled: !managedFieldsEnabled,
|
|
1761
|
+
placeholder: "\u9009\u62E9\u6A21\u578B",
|
|
1762
|
+
options: (state.catalog.models[re.managed.provider] ?? []).map((x) => ({ value: x.id, label: x.name })),
|
|
1763
|
+
onChange: (v) => {
|
|
1764
|
+
if (v !== re.managed.model) commitReviewEngine(re.mode, { ...re.managed, model: v });
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
),
|
|
1768
|
+
ocr?.managedReady === false && re.mode === "managed" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__ocr-warn", children: "\u6258\u7BA1\u672A\u5C31\u7EEA\uFF1A\u9009\u597D\u63D0\u4F9B\u65B9\u4E0E\u6A21\u578B\u540E\u70B9\u300E\u5E94\u7528\u5230 ocr\u300F\u5199\u5165 ocr \u914D\u7F6E\uFF1B\u4E5F\u53EF\u5728\u7EC8\u7AEF\u624B\u52A8 ocr config provider\uFF08\u59D4\u6258\u6A21\u5F0F\u4E0D\u53D7\u5F71\u54CD\uFF09" }),
|
|
1769
|
+
re.mode === "managed" && re.managed.provider && re.managed.model && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1770
|
+
"button",
|
|
1771
|
+
{
|
|
1772
|
+
type: "button",
|
|
1773
|
+
disabled: ocrBlocked,
|
|
1774
|
+
onClick: () => {
|
|
1775
|
+
void store.wireOcr(re.managed.provider, re.managed.model).then(setWireResult);
|
|
1776
|
+
},
|
|
1777
|
+
children: "\u5E94\u7528\u5230 ocr"
|
|
1778
|
+
}
|
|
1779
|
+
),
|
|
1780
|
+
wireResult && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: wireResult.ok ? "dsh-kb-config__ocr-ok" : "dsh-kb-config__error", children: wireResult.ok ? "\u2713 \u5DF2\u5199\u5165 ocr\uFF08dsh-managed\uFF09" : "\u5199\u5165\u5931\u8D25\uFF1A" + wireResult.log.slice(0, 200) }),
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "\u6258\u7BA1\u8BC4\u5BA1\u7531 ocr \u8C03\u7528\u4E0A\u65B9\u9009\u5B9A\u7684\u63D0\u4F9B\u65B9/\u6A21\u578B\u6267\u884C\uFF1B\u63A5\u5165\u70B9\u7531\u7CFB\u7EDF\u81EA\u52A8\u5199\u5165 ocr \u81EA\u5B9A\u4E49\u914D\u7F6E\uFF08dsh-managed\uFF09\uFF0CAPI key \u4ECE dsh \u6A21\u578B\u914D\u7F6E\u89E3\u6790\uFF0C\u4E0D\u5728\u9762\u677F\u660E\u6587\u5C55\u793A" }),
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "dsh-kb-config__help", children: [
|
|
1783
|
+
"\u5B98\u65B9\u6587\u6863\uFF1A",
|
|
1784
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/installation", target: "_blank", rel: "noreferrer", children: "\u5B89\u88C5\u6307\u5357" }),
|
|
1785
|
+
" \xB7 ",
|
|
1786
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/configuration", target: "_blank", rel: "noreferrer", children: "\u6A21\u578B\u914D\u7F6E" }),
|
|
1787
|
+
" \xB7 ",
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: "https://open-codereview.ai/docs/delegate", target: "_blank", rel: "noreferrer", children: "\u59D4\u6258\u6A21\u5F0F\u8BF4\u660E" })
|
|
1789
|
+
] }),
|
|
1790
|
+
ocr?.kbMode === "local" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "\u672C\u5730\u77E5\u8BC6\u5E93\u6A21\u5F0F\u4E0B\u72EC\u7ACB\u8BC4\u5BA1\u62A5\u544A\u6682\u4E0D\u843D wiki\uFF0C\u8BF7\u76F4\u63A5\u7559\u5B58\u5BF9\u8BDD" })
|
|
1791
|
+
] }),
|
|
1634
1792
|
state.error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", children: state.error })
|
|
1635
1793
|
] });
|
|
1636
1794
|
}
|
|
1637
1795
|
|
|
1638
1796
|
// client/kanban.css
|
|
1639
|
-
var kanban_default = "/* T32\uFF1A\u5361\u7247/\u8FDE\u63A5\u7EBF\u7B49\u5C40\u90E8\u8FC7\u6E21\u4FDD\u6301 120-180ms\uFF1Bprefers-reduced-motion \u5168\u5C40\u5173\u95ED */\n.dsh-kb-tab {\n /* DSH \u8BBE\u8BA1\u4EE4\u724C\uFF08\u6D45/\u6DF1\u8272\u968F body[data-ds-dark-theme] \u81EA\u52A8\u5207\u6362\uFF09\u2014\u2014\u7981\u6B62\u786C\u7F16\u7801\u989C\u8272 */\n --dsh-kb-surface: var(--dsw-alias-bg-layer-1);\n --dsh-kb-surface-elev: var(--dsw-alias-bg-layer-3);\n --dsh-kb-text-primary: var(--dsw-alias-label-primary);\n --dsh-kb-text-secondary: var(--dsw-alias-label-secondary);\n --dsh-kb-text-tertiary: var(--dsw-alias-label-tertiary);\n --dsh-kb-border: var(--dsw-alias-border-l2);\n --dsh-kb-hover: var(--dsw-alias-interactive-bg-hover);\n --dsh-kb-mask: var(--dsw-alias-bg-mask-3);\n --dsh-kb-input: var(--dsw-specific-input-major);\n --dsh-kb-inline-code: var(--dsw-alias-markdown-inline-code);\n /* \u5927\u5706\u89D2\u5951\u7EA6\uFF08\u5BF9\u9F50 DSH \u5361\u7247 16px\uFF09\uFF0C\u540E\u7EED UI \u4E00\u5F8B\u590D\u7528 */\n --dsh-kb-radius-lg: 16px;\n --dsh-kb-radius-md: 10px;\n --dsh-kb-radius-sm: 8px;\n /* \u72B6\u6001\u8272 \u2192 DSH \u8BED\u4E49\u4EE4\u724C */\n --dsh-kb-complete: var(--dsw-alias-state-success-primary);\n --dsh-kb-active: var(--dsw-alias-state-business-primary);\n --dsh-kb-blocked: var(--dsw-alias-state-error-primary);\n --dsh-kb-pending: currentColor;\n /* \u89D2\u8272\u8272\uFF1ADSH \u6709\u7B49\u4EF7\u4EE4\u724C\u5219\u590D\u7528\uFF1Bp/pt/dt \u65E0 DSH \u7B49\u4EF7\u8272\uFF0C\u4FDD\u7559\u539F\u503C */\n --dsh-kb-v: var(--dsw-alias-state-business-primary);\n --dsh-kb-p: #a855f7;\n --dsh-kb-w: var(--dsw-alias-state-success-primary);\n --dsh-kb-d: var(--dsw-alias-state-warn-primary);\n --dsh-kb-pt: #6366f1; /* \u8BA1\u5212\u8BC4\u5BA1\uFF1A\u975B/\u6D45\u84DD */\n --dsh-kb-dt: #ec4899; /* \u5B9E\u73B0\u8BC4\u5BA1\uFF1A\u73AB\u7EA2 */\n height: 100%;\n width: 100%;\n /* \u63A5\u5165\u5BBF\u4E3B\u4F1A\u8BDD\u6D41\u5BBD\u5EA6\u7CFB\u7EDF\uFF1A\u81EA\u9002\u5E94 clamp + \u62D6\u62FD\u504F\u597D\uFF08--dsh-chat-content-width \u7531\n \u5BBF\u4E3B ConversationRoot \u5B9A\u4E49\uFF0C\u62D6\u62FD\u624B\u67C4\u5B98\u65B9\u5DF2\u5B9E\u73B0\uFF09\uFF1B780px \u4EC5\u4E3A\u53D8\u91CF\u7F3A\u5931\u65F6\u7684\u515C\u5E95 */\n min-width: 0;\n max-width: var(--dsh-chat-content-width, 780px);\n margin-inline: auto;\n display: flex;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-base);\n pointer-events: auto;\n font-size: 13px;\n line-height: 1.45;\n overflow: hidden;\n}\n\n.dsh-kb-banner {\n flex: 0 0 auto;\n padding: 6px 12px;\n font-size: 12px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-banner--reconnecting,\n.dsh-kb-banner--loading {\n color: var(--dsh-kb-active);\n}\n.dsh-kb-banner--error {\n color: var(--dsh-kb-blocked);\n}\n\n.dsh-kb-tab-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 8px;\n}\n\n.dsh-kb-loading {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n opacity: 0.7;\n}\n\n.dsh-kb-toolbar {\n position: sticky;\n top: 0;\n z-index: 1;\n padding-bottom: 8px;\n}\n.dsh-kb-toolbar input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n}\n\n.dsh-kb-rail {\n display: flex;\n flex-direction: column;\n}\n/* \u72B6\u6001\u7B5B\u9009 chip \u7EC4\uFF1A\u6267\u884C\u4E2D/\u963B\u585E/\u5931\u8D25/\u5DF2\u5B8C\u6210\uFF08\u591A\u9009\u5E76\u96C6\uFF1B\u7A7A=\u9ED8\u8BA4\u89C6\u56FE\uFF09 */\n.dsh-kb-filters {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 0 8px;\n}\n.dsh-kb-filter {\n display: inline-flex;\n align-items: center;\n padding: 2px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: transparent;\n color: currentColor;\n font: inherit;\n cursor: pointer;\n user-select: none;\n transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-filter:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-filter--active {\n border-color: var(--dsh-kb-active);\n color: var(--dsh-kb-active);\n background: color-mix(in srgb, var(--dsh-kb-active) 10%, transparent);\n}\n\n.dsh-kb-chain {\n margin-bottom: 10px;\n}\n.dsh-kb-chain__title {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-chain__title:hover {\n background: var(--dsh-kb-hover);\n}\n/* \u6BCF\u6761\u94FE\u8DEF\u524D\u7684\u6298\u53E0\u7BAD\u5934\uFF08\u4E0E DSH \u6298\u53E0\u4EA4\u4E92\u4E00\u81F4\uFF1A\u7EC6 chevron\uFF0C\u5C55\u5F00\u65F6\u65CB\u8F6C\uFF0C150ms \u8FC7\u6E21\uFF09 */\n.dsh-kb-chain__chevron {\n flex: 0 0 auto;\n width: 7px;\n height: 7px;\n border-top: 1.5px solid currentColor;\n border-right: 1.5px solid currentColor;\n transform: rotate(45deg);\n opacity: 0.7;\n transition: transform 150ms ease;\n}\n.dsh-kb-chain__title[aria-expanded='true'] .dsh-kb-chain__chevron {\n transform: rotate(135deg);\n}\n.dsh-kb-chain__name {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-chain__meta {\n flex: 0 0 auto;\n white-space: nowrap;\n opacity: 0.7;\n}\n.dsh-kb-chain__warning {\n padding: 4px 8px;\n margin: 2px 0 6px;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* D23\uFF1A\u94FE\u5B8C\u6210\u9A8C\u6536\u6838\u5BF9\u8B66\u544A\u884C\uFF08completed \u94FE\u672A\u786E\u8BA4\u524D\u963B\u585E\u6700\u7EC8\u6C47\u62A5\uFF09 */\n.dsh-kb-chain__audit {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: normal;\n}\n.dsh-kb-chain__audit span {\n flex: 1 1 auto;\n overflow: hidden;\n}\n.dsh-kb-audit-confirm {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-blocked);\n padding: 2px 10px;\n cursor: pointer;\n font: inherit;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-audit-confirm:hover {\n background: var(--dsh-kb-blocked);\n color: #fff;\n}\n\n.dsh-kb-nodes {\n list-style: none;\n margin: 0;\n padding: 0 0 0 12px;\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n.dsh-kb-node {\n position: relative;\n padding-left: 12px;\n}\n.dsh-kb-node::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 2px;\n background: var(--dsh-kb-pending);\n transition: background-color 150ms ease;\n}\n.dsh-kb-node--complete::before { background: var(--dsh-kb-complete); }\n.dsh-kb-node--active::before { background: var(--dsh-kb-active); }\n.dsh-kb-node--pending::before {\n background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);\n}\n.dsh-kb-node--blocked::before {\n background: repeating-linear-gradient(to bottom, var(--dsh-kb-blocked) 0 4px, transparent 4px 8px);\n}\n\n.dsh-kb-task {\n display: grid;\n grid-template-columns: 22px 1fr auto;\n grid-template-rows: auto auto;\n gap: 2px 8px;\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n margin: 4px 0;\n border: 1px solid transparent;\n border-radius: var(--dsh-kb-radius-lg);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;\n}\n.dsh-kb-task:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-task[data-selected],\n.dsh-kb-task--active {\n border-color: var(--dsh-kb-active);\n}\n/* T32\uFF1A\u5B8C\u6210\u4EFB\u52A1\u4FDD\u7559\u5728\u8F68\u9053\u4F46\u89C6\u89C9\u964D\u6743\uFF1B\u72B6\u6001\u8272\u4E0D\u53D8\u3001\u4E0D\u6574\u5361\u67D3\u8272 */\n.dsh-kb-task--complete {\n opacity: 0.72;\n}\n.dsh-kb-task__title {\n grid-column: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__status {\n grid-column: 3;\n color: currentColor;\n opacity: 0.75;\n}\n.dsh-kb-task__meta {\n grid-column: 2 / 4;\n opacity: 0.6;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn {\n grid-column: 2 / 4;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn svg {\n flex: 0 0 auto;\n}\n.dsh-kb-task__warn span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task--complete .dsh-kb-task__status { color: var(--dsh-kb-complete); }\n.dsh-kb-task--blocked .dsh-kb-task__status { color: var(--dsh-kb-blocked); }\n/* D17\uFF1A\u9009\u4E2D\u4EFB\u52A1\u6240\u5728\u94FE\u8DEF\u7684\u4E0A\u6E38/\u5F53\u524D/\u4E0B\u6E38\u8DEF\u5F84\u5361\u9AD8\u4EAE\uFF1B\u4E0D\u6539\u53D8\u8FDE\u63A5\u7EBF\u8BED\u4E49\uFF0C\u9009\u4E2D\u5361\u4FDD\u6301\u5F3A\u8FB9\u6846 */\n.dsh-kb-task--related:not(.dsh-kb-task--active) {\n border-color: color-mix(in srgb, var(--dsh-kb-active) 35%, transparent);\n background: color-mix(in srgb, var(--dsh-kb-active) 6%, transparent);\n}\n\n.dsh-kb-empty {\n padding: 24px 12px;\n text-align: center;\n color: var(--dsh-kb-text-secondary);\n border: 1px dashed var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n}\n\n.dsh-kb-profile {\n grid-row: 1 / 3;\n align-self: start;\n width: 20px;\n height: 20px;\n border-radius: var(--dsh-kb-radius-sm);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n color: #fff;\n}\n.dsh-kb-profile--v { background: var(--dsh-kb-v); }\n.dsh-kb-profile--p { background: var(--dsh-kb-p); }\n.dsh-kb-profile--w { background: var(--dsh-kb-w); }\n.dsh-kb-profile--d { background: var(--dsh-kb-d); }\n.dsh-kb-profile--pt { background: var(--dsh-kb-pt); }\n.dsh-kb-profile--dt { background: var(--dsh-kb-dt); }\n\n/* T27\uFF1A\u4EFB\u52A1\u5361\u5F39\u7A97\uFF08\u539F\u4F4D\u8BE6\u60C5\uFF09\u2014\u2014DSH \u9762\u677F\u98CE\u683C\uFF1A\u5927\u5706\u89D2 + \u62AC\u5347\u8868\u9762 + \u6D45/\u6DF1\u8272\u4EE4\u724C */\n.dsh-kb-detail {\n display: flex;\n flex-direction: column;\n min-height: calc(100% - 16px);\n margin: 8px;\n padding: 12px 16px;\n box-sizing: border-box;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);\n}\n.dsh-kb-detail__header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread) {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n cursor: pointer;\n font: inherit;\n line-height: 1;\n transition: background-color 150ms ease;\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread):hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__identity {\n flex: 1 1 auto;\n min-width: 0;\n}\n.dsh-kb-detail__identity strong,\n.dsh-kb-detail__identity span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-detail__actions {\n display: flex;\n gap: 4px;\n flex: 0 0 auto;\n}\n.dsh-kb-detail__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n padding: 4px 10px;\n cursor: pointer;\n font: inherit;\n transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-detail__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__actions button[data-confirming='true'] {\n border-color: var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-detail__actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.dsh-kb-action-form {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-action-form input {\n width: 140px;\n padding: 3px 8px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n font-size: 12px;\n}\n.dsh-kb-unread {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-active);\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsh-kb-active) 12%, transparent);\n color: var(--dsh-kb-active);\n padding: 2px 8px;\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.dsh-kb-action-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n margin: 4px 0;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-action-error span {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-action-error button {\n flex: 0 0 auto;\n border: 1px solid currentColor;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: inherit;\n padding: 1px 6px;\n cursor: pointer;\n font: inherit;\n}\n.dsh-kb-detail [role='tablist'] {\n display: flex;\n gap: 4px;\n padding: 8px 0;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail [role='tab'] {\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-secondary);\n padding: 4px 10px;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-detail [role='tab']:hover {\n color: var(--dsh-kb-text-primary);\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail [role='tab'][aria-selected='true'] {\n background: var(--dsh-kb-hover);\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-detail [role='tabpanel'] {\n padding: 8px 0;\n overflow: auto;\n}\n.dsh-kb-detail h4 {\n margin: 8px 0 4px;\n font-size: 12px;\n text-transform: none;\n color: var(--dsh-kb-text-secondary);\n}\n.dsh-kb-detail code {\n background: var(--dsh-kb-inline-code);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 1px 4px;\n}\n.dsh-kb-detail dl {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 4px 8px;\n margin: 8px 0;\n}\n.dsh-kb-detail dt { opacity: 0.7; color: var(--dsh-kb-text-tertiary); }\n.dsh-kb-detail dd { margin: 0; }\n.dsh-kb-detail time { opacity: 0.6; font-size: 12px; margin-inline-end: 4px; }\n\n/* \u8F68\u8FF9 tab \u53EF\u8BFB\u5316\uFF1A\u7269\u6D41\u5F0F\u7EB5\u5411\u65F6\u95F4\u8F74\uFF08\u56DB\u6001\u914D\u8272 + \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1B\u5F02\u5E38\u6574\u884C\u6807\u7EA2\uFF09 */\n.dsh-kb-timeline {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n}\n.dsh-kb-timeline__item {\n position: relative;\n display: grid;\n grid-template-columns: 16px 1fr;\n gap: 8px;\n padding: 0 0 14px;\n}\n.dsh-kb-timeline__item:last-child {\n padding-bottom: 0;\n}\n/* \u7EB5\u5411\u65F6\u95F4\u7EBF\uFF1A\u8D2F\u7A7F\u8282\u70B9\uFF08\u6700\u65B0\u8282\u70B9\u4E0A\u65B9\u7EBF\u4E0D\u5EF6\u4F38\uFF0C\u6A21\u62DF\u7269\u6D41\u5934\u8282\u70B9\uFF09 */\n.dsh-kb-timeline__axis {\n position: relative;\n}\n.dsh-kb-timeline__item:not(:last-child) .dsh-kb-timeline__axis::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 14px;\n bottom: -4px;\n width: 2px;\n transform: translateX(-50%);\n background: var(--dsh-kb-border);\n}\n.dsh-kb-timeline__dot {\n position: relative;\n z-index: 1;\n display: block;\n width: 10px;\n height: 10px;\n /* \u6C34\u5E73\u5C45\u4E2D\u4E8E 16px \u8F74\u5217\uFF08\u4E2D\u5FC3=8px\uFF09\uFF0C\u4E0E left:50% \u8FDE\u63A5\u7EBF\u5BF9\u9F50 */\n margin: 2px auto 0;\n border-radius: 50%;\n border: 2px solid var(--dsh-kb-surface);\n box-sizing: border-box;\n background: var(--dsh-kb-text-tertiary);\n}\n/* \u56DB\u6001\u914D\u8272\uFF1Aneutral \u7070 / running \u84DD / success \u7EFF / exception \u7EA2 */\n.dsh-kb-timeline__item--running .dsh-kb-timeline__dot {\n background: var(--dsh-kb-active);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n background: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n background: var(--dsh-kb-blocked);\n}\n/* \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1A\u4E3B\u8272\u5706\u70B9\u653E\u5927 + \u67D4\u548C\u8F89\u5149 */\n.dsh-kb-timeline__item--latest .dsh-kb-timeline__dot {\n width: 12px;\n height: 12px;\n margin-top: 0;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-active) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-complete) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-blocked) 22%, transparent);\n}\n/* \u5F02\u5E38\u884C\uFF1A\u6D45\u7EA2\u5E95 + \u5DE6\u4FA7\u7EA2\u6761\uFF0C\u6458\u8981\u7EA2\u52A0\u7C97 */\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__body {\n background: color-mix(in srgb, var(--dsh-kb-blocked) 8%, transparent);\n border-left: 3px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 6px 8px;\n}\n.dsh-kb-timeline__body {\n min-width: 0;\n}\n.dsh-kb-timeline__row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n.dsh-kb-timeline__label {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__label {\n color: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__label {\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-timeline__summary {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--dsh-kb-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__summary {\n color: var(--dsh-kb-blocked);\n font-weight: 600;\n}\n.dsh-kb-timeline__author {\n display: block;\n margin-top: 2px;\n font-size: 11px;\n opacity: 0.7;\n color: var(--dsh-kb-text-tertiary);\n}\n\n.dsh-kb-spec-attachments {\n list-style: none;\n margin: 4px 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.dsh-kb-spec-attachments li {\n display: flex;\n align-items: baseline;\n gap: 6px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-spec-attachment__kind {\n font-size: 11px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 0 4px;\n opacity: 0.8;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dsh-kb-tab * {\n transition-duration: 0ms !important;\n }\n}\n\n/* \u6574\u94FE\u5220\u9664\u6309\u94AE\uFF1A\u9ED8\u8BA4\u9690\u85CF\uFF0Chover \u9700\u6C42\u6807\u9898\u884C\u65F6\u51FA\u73B0\uFF08GUI \u4EC5 human\uFF0C\u4E8C\u6B21\u786E\u8BA4\uFF09 */\n.dsh-kb-chain__delete {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n transition: opacity 150ms ease, color 150ms ease;\n}\n.dsh-kb-chain__title:hover .dsh-kb-chain__delete,\n.dsh-kb-chain__delete:focus-visible { opacity: 0.7; }\n.dsh-kb-chain__delete:hover { opacity: 1; color: var(--dsh-kb-blocked); }\n/* \u5220\u9664\u4E8C\u6B21\u786E\u8BA4\u5F39\u7A97\uFF08\u590D\u7528 rename \u5F39\u7A97\u5916\u58F3/\u5706\u89D2\u5951\u7EA6\uFF09 */\n.dsh-kb-delete-modal__text {\n color: var(--dsh-kb-text-secondary);\n font-size: 13px;\n line-height: 1.5;\n}\n.dsh-kb-delete-modal__error {\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-rename-modal__actions .dsh-kb-delete-confirm {\n border-color: transparent;\n background: var(--dsw-alias-state-error-primary);\n color: #fff;\n}\n/* T7\uFF1A\u94FE\u6807\u9898\u6539\u540D\u94C5\u7B14\u6309\u94AE + \u8F7B\u91CF\u5F39\u7A97\uFF08GUI \u4EC5 human\uFF1B\u89D2\u8272\u5361\u4E0D\u53EF\u6539\u540D\uFF09 */\n.dsh-kb-chain__rename {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0.55;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n}\n.dsh-kb-chain__rename:hover { opacity: 1; }\n.dsh-kb-task__status-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-task__session {\n flex: none;\n padding: 0 6px;\n font-size: 11px;\n line-height: 18px;\n border: 1px solid color-mix(in srgb, currentColor 40%, transparent);\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.85;\n}\n.dsh-kb-task__session:hover {\n opacity: 1;\n}\n.dsh-kb-rename-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background: var(--dsh-kb-mask);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dsh-kb-rename-modal {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 16px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface-elev);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.dsh-kb-rename-modal__label {\n color: var(--dsh-kb-text-primary);\n font-size: 13px;\n font-weight: 600;\n}\n.dsh-kb-rename-modal__input {\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-rename-modal__input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-rename-modal__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n}\n.dsh-kb-rename-modal__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n padding: 4px 14px;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-rename-modal__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-rename-modal__actions .dsh-kb-rename-save {\n border-color: transparent;\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n";
|
|
1797
|
+
var kanban_default = "/* T32\uFF1A\u5361\u7247/\u8FDE\u63A5\u7EBF\u7B49\u5C40\u90E8\u8FC7\u6E21\u4FDD\u6301 120-180ms\uFF1Bprefers-reduced-motion \u5168\u5C40\u5173\u95ED */\n.dsh-kb-tab {\n /* DSH \u8BBE\u8BA1\u4EE4\u724C\uFF08\u6D45/\u6DF1\u8272\u968F body[data-ds-dark-theme] \u81EA\u52A8\u5207\u6362\uFF09\u2014\u2014\u7981\u6B62\u786C\u7F16\u7801\u989C\u8272 */\n --dsh-kb-surface: var(--dsw-alias-bg-layer-1);\n --dsh-kb-surface-elev: var(--dsw-alias-bg-layer-3);\n --dsh-kb-text-primary: var(--dsw-alias-label-primary);\n --dsh-kb-text-secondary: var(--dsw-alias-label-secondary);\n --dsh-kb-text-tertiary: var(--dsw-alias-label-tertiary);\n --dsh-kb-border: var(--dsw-alias-border-l2);\n --dsh-kb-hover: var(--dsw-alias-interactive-bg-hover);\n --dsh-kb-mask: var(--dsw-alias-bg-mask-3);\n --dsh-kb-input: var(--dsw-specific-input-major);\n --dsh-kb-inline-code: var(--dsw-alias-markdown-inline-code);\n /* \u5927\u5706\u89D2\u5951\u7EA6\uFF08\u5BF9\u9F50 DSH \u5361\u7247 16px\uFF09\uFF0C\u540E\u7EED UI \u4E00\u5F8B\u590D\u7528 */\n --dsh-kb-radius-lg: 16px;\n --dsh-kb-radius-md: 10px;\n --dsh-kb-radius-sm: 8px;\n /* \u72B6\u6001\u8272 \u2192 DSH \u8BED\u4E49\u4EE4\u724C */\n --dsh-kb-complete: var(--dsw-alias-state-success-primary);\n --dsh-kb-active: var(--dsw-alias-state-business-primary);\n --dsh-kb-blocked: var(--dsw-alias-state-error-primary);\n --dsh-kb-pending: currentColor;\n /* \u89D2\u8272\u8272\uFF1ADSH \u6709\u7B49\u4EF7\u4EE4\u724C\u5219\u590D\u7528\uFF1Bp/pt/dt \u65E0 DSH \u7B49\u4EF7\u8272\uFF0C\u4FDD\u7559\u539F\u503C */\n --dsh-kb-v: var(--dsw-alias-state-business-primary);\n --dsh-kb-p: #a855f7;\n --dsh-kb-w: var(--dsw-alias-state-success-primary);\n --dsh-kb-d: var(--dsw-alias-state-warn-primary);\n --dsh-kb-pt: #6366f1; /* \u8BA1\u5212\u8BC4\u5BA1\uFF1A\u975B/\u6D45\u84DD */\n --dsh-kb-dt: #ec4899; /* \u5B9E\u73B0\u8BC4\u5BA1\uFF1A\u73AB\u7EA2 */\n height: 100%;\n width: 100%;\n /* \u63A5\u5165\u5BBF\u4E3B\u4F1A\u8BDD\u6D41\u5BBD\u5EA6\u7CFB\u7EDF\uFF1A\u81EA\u9002\u5E94 clamp + \u62D6\u62FD\u504F\u597D\uFF08--dsh-chat-content-width \u7531\n \u5BBF\u4E3B ConversationRoot \u5B9A\u4E49\uFF0C\u62D6\u62FD\u624B\u67C4\u5B98\u65B9\u5DF2\u5B9E\u73B0\uFF09\uFF1B780px \u4EC5\u4E3A\u53D8\u91CF\u7F3A\u5931\u65F6\u7684\u515C\u5E95 */\n min-width: 0;\n max-width: var(--dsh-chat-content-width, 780px);\n margin-inline: auto;\n display: flex;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-base);\n pointer-events: auto;\n font-size: 13px;\n line-height: 1.45;\n overflow: hidden;\n}\n\n.dsh-kb-banner {\n flex: 0 0 auto;\n padding: 6px 12px;\n font-size: 12px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-banner--reconnecting,\n.dsh-kb-banner--loading {\n color: var(--dsh-kb-active);\n}\n.dsh-kb-banner--error {\n color: var(--dsh-kb-blocked);\n}\n\n.dsh-kb-tab-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 8px;\n}\n\n.dsh-kb-loading {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n color: currentColor;\n opacity: 0.7;\n}\n\n.dsh-kb-toolbar {\n position: sticky;\n top: 0;\n z-index: 1;\n padding-bottom: 8px;\n}\n.dsh-kb-toolbar input {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n}\n\n.dsh-kb-rail {\n display: flex;\n flex-direction: column;\n}\n/* \u72B6\u6001\u7B5B\u9009 chip \u7EC4\uFF1A\u6267\u884C\u4E2D/\u963B\u585E/\u5931\u8D25/\u5DF2\u5B8C\u6210\uFF08\u591A\u9009\u5E76\u96C6\uFF1B\u7A7A=\u9ED8\u8BA4\u89C6\u56FE\uFF09 */\n.dsh-kb-filters {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 0 8px;\n}\n.dsh-kb-filter {\n display: inline-flex;\n align-items: center;\n padding: 2px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: transparent;\n color: currentColor;\n font: inherit;\n cursor: pointer;\n user-select: none;\n transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-filter:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-filter--active {\n border-color: var(--dsh-kb-active);\n color: var(--dsh-kb-active);\n background: color-mix(in srgb, var(--dsh-kb-active) 10%, transparent);\n}\n\n.dsh-kb-chain {\n margin-bottom: 10px;\n}\n.dsh-kb-chain__title {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-chain__title:hover {\n background: var(--dsh-kb-hover);\n}\n/* \u6BCF\u6761\u94FE\u8DEF\u524D\u7684\u6298\u53E0\u7BAD\u5934\uFF08\u4E0E DSH \u6298\u53E0\u4EA4\u4E92\u4E00\u81F4\uFF1A\u7EC6 chevron\uFF0C\u5C55\u5F00\u65F6\u65CB\u8F6C\uFF0C150ms \u8FC7\u6E21\uFF09 */\n.dsh-kb-chain__chevron {\n flex: 0 0 auto;\n width: 7px;\n height: 7px;\n border-top: 1.5px solid currentColor;\n border-right: 1.5px solid currentColor;\n transform: rotate(45deg);\n opacity: 0.7;\n transition: transform 150ms ease;\n}\n.dsh-kb-chain__title[aria-expanded='true'] .dsh-kb-chain__chevron {\n transform: rotate(135deg);\n}\n.dsh-kb-chain__name {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-chain__meta {\n flex: 0 0 auto;\n white-space: nowrap;\n opacity: 0.7;\n}\n.dsh-kb-chain__warning {\n padding: 4px 8px;\n margin: 2px 0 6px;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* D23\uFF1A\u94FE\u5B8C\u6210\u9A8C\u6536\u6838\u5BF9\u8B66\u544A\u884C\uFF08completed \u94FE\u672A\u786E\u8BA4\u524D\u963B\u585E\u6700\u7EC8\u6C47\u62A5\uFF09 */\n.dsh-kb-chain__audit {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: normal;\n}\n.dsh-kb-chain__audit span {\n flex: 1 1 auto;\n overflow: hidden;\n}\n.dsh-kb-audit-confirm {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-blocked);\n padding: 2px 10px;\n cursor: pointer;\n font: inherit;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-audit-confirm:hover {\n background: var(--dsh-kb-blocked);\n color: #fff;\n}\n\n.dsh-kb-nodes {\n list-style: none;\n margin: 0;\n padding: 0 0 0 12px;\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n.dsh-kb-node {\n position: relative;\n padding-left: 12px;\n}\n.dsh-kb-node::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 2px;\n background: var(--dsh-kb-pending);\n transition: background-color 150ms ease;\n}\n.dsh-kb-node--complete::before { background: var(--dsh-kb-complete); }\n.dsh-kb-node--active::before { background: var(--dsh-kb-active); }\n.dsh-kb-node--pending::before {\n background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);\n}\n.dsh-kb-node--blocked::before {\n background: repeating-linear-gradient(to bottom, var(--dsh-kb-blocked) 0 4px, transparent 4px 8px);\n}\n\n.dsh-kb-task {\n display: grid;\n grid-template-columns: 22px 1fr auto;\n grid-template-rows: auto auto;\n gap: 2px 8px;\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n margin: 4px 0;\n border: 1px solid transparent;\n border-radius: var(--dsh-kb-radius-lg);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;\n}\n.dsh-kb-task:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-task[data-selected],\n.dsh-kb-task--active {\n border-color: var(--dsh-kb-active);\n}\n/* T32\uFF1A\u5B8C\u6210\u4EFB\u52A1\u4FDD\u7559\u5728\u8F68\u9053\u4F46\u89C6\u89C9\u964D\u6743\uFF1B\u72B6\u6001\u8272\u4E0D\u53D8\u3001\u4E0D\u6574\u5361\u67D3\u8272 */\n.dsh-kb-task--complete {\n opacity: 0.72;\n}\n.dsh-kb-task__title {\n grid-column: 2;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__status {\n grid-column: 3;\n color: currentColor;\n opacity: 0.75;\n}\n.dsh-kb-task__meta {\n grid-column: 2 / 4;\n opacity: 0.6;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn {\n grid-column: 2 / 4;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--dsh-kb-blocked);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task__warn svg {\n flex: 0 0 auto;\n}\n.dsh-kb-task__warn span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-task--complete .dsh-kb-task__status { color: var(--dsh-kb-complete); }\n.dsh-kb-task--blocked .dsh-kb-task__status { color: var(--dsh-kb-blocked); }\n/* D17\uFF1A\u9009\u4E2D\u4EFB\u52A1\u6240\u5728\u94FE\u8DEF\u7684\u4E0A\u6E38/\u5F53\u524D/\u4E0B\u6E38\u8DEF\u5F84\u5361\u9AD8\u4EAE\uFF1B\u4E0D\u6539\u53D8\u8FDE\u63A5\u7EBF\u8BED\u4E49\uFF0C\u9009\u4E2D\u5361\u4FDD\u6301\u5F3A\u8FB9\u6846 */\n.dsh-kb-task--related:not(.dsh-kb-task--active) {\n border-color: color-mix(in srgb, var(--dsh-kb-active) 35%, transparent);\n background: color-mix(in srgb, var(--dsh-kb-active) 6%, transparent);\n}\n\n.dsh-kb-empty {\n padding: 24px 12px;\n text-align: center;\n color: var(--dsh-kb-text-secondary);\n border: 1px dashed var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n}\n\n.dsh-kb-profile {\n grid-row: 1 / 3;\n align-self: start;\n width: 20px;\n height: 20px;\n border-radius: var(--dsh-kb-radius-sm);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n color: #fff;\n}\n.dsh-kb-profile--v { background: var(--dsh-kb-v); }\n.dsh-kb-profile--p { background: var(--dsh-kb-p); }\n.dsh-kb-profile--w { background: var(--dsh-kb-w); }\n.dsh-kb-profile--d { background: var(--dsh-kb-d); }\n.dsh-kb-profile--pt { background: var(--dsh-kb-pt); }\n.dsh-kb-profile--dt { background: var(--dsh-kb-dt); }\n\n/* T27\uFF1A\u4EFB\u52A1\u5361\u5F39\u7A97\uFF08\u539F\u4F4D\u8BE6\u60C5\uFF09\u2014\u2014DSH \u9762\u677F\u98CE\u683C\uFF1A\u5927\u5706\u89D2 + \u62AC\u5347\u8868\u9762 + \u6D45/\u6DF1\u8272\u4EE4\u724C */\n.dsh-kb-detail {\n display: flex;\n flex-direction: column;\n min-height: calc(100% - 16px);\n margin: 8px;\n padding: 12px 16px;\n box-sizing: border-box;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);\n}\n.dsh-kb-detail__header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread) {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n cursor: pointer;\n font: inherit;\n line-height: 1;\n transition: background-color 150ms ease;\n}\n.dsh-kb-detail__header > button:not(.dsh-kb-unread):hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__identity {\n flex: 1 1 auto;\n min-width: 0;\n}\n.dsh-kb-detail__identity strong,\n.dsh-kb-detail__identity span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-detail__actions {\n display: flex;\n gap: 4px;\n flex: 0 0 auto;\n}\n.dsh-kb-detail__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n padding: 4px 10px;\n cursor: pointer;\n font: inherit;\n transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-detail__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail__actions button[data-confirming='true'] {\n border-color: var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-detail__actions button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.dsh-kb-action-form {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-action-form input {\n width: 140px;\n padding: 3px 8px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n font-size: 12px;\n}\n/* \u8BC4\u8BBA\u8F93\u5165\uFF1A\u6309 DSH \u53D1\u9001\u6D88\u606F\u6846\u98CE\u683C\u7EDF\u4E00\uFF08\u5927\u5706\u89D2\u590D\u7528 16px \u5951\u7EA6\u4EE4\u724C\uFF09 */\n.dsh-kb-comment-input {\n display: block;\n width: 100%;\n box-sizing: border-box;\n margin-top: 8px;\n padding: 10px 14px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg); /* \u5927\u5706\u89D2\u53D1\u9001\u6846\uFF1A\u590D\u7528 16px \u5951\u7EA6 */\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-comment-input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-comment-input::placeholder {\n color: var(--dsh-kb-text-tertiary);\n}\n.dsh-kb-unread {\n flex: 0 0 auto;\n border: 1px solid var(--dsh-kb-active);\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsh-kb-active) 12%, transparent);\n color: var(--dsh-kb-active);\n padding: 2px 8px;\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.dsh-kb-action-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n margin: 4px 0;\n border-left: 3px solid var(--dsh-kb-blocked);\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-action-error span {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-action-error button {\n flex: 0 0 auto;\n border: 1px solid currentColor;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: inherit;\n padding: 1px 6px;\n cursor: pointer;\n font: inherit;\n}\n.dsh-kb-detail [role='tablist'] {\n display: flex;\n gap: 4px;\n padding: 8px 0;\n border-bottom: 1px solid var(--dsh-kb-border);\n}\n.dsh-kb-detail [role='tab'] {\n border: 0;\n border-radius: var(--dsh-kb-radius-sm);\n background: transparent;\n color: var(--dsh-kb-text-secondary);\n padding: 4px 10px;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease;\n}\n.dsh-kb-detail [role='tab']:hover {\n color: var(--dsh-kb-text-primary);\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-detail [role='tab'][aria-selected='true'] {\n background: var(--dsh-kb-hover);\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-detail [role='tabpanel'] {\n padding: 8px 0;\n overflow: auto;\n}\n.dsh-kb-detail h4 {\n margin: 8px 0 4px;\n font-size: 12px;\n text-transform: none;\n color: var(--dsh-kb-text-secondary);\n}\n.dsh-kb-detail code {\n background: var(--dsh-kb-inline-code);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 1px 4px;\n}\n.dsh-kb-detail dl {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 4px 8px;\n margin: 8px 0;\n}\n.dsh-kb-detail dt { opacity: 0.7; color: var(--dsh-kb-text-tertiary); }\n.dsh-kb-detail dd { margin: 0; }\n.dsh-kb-detail time { opacity: 0.6; font-size: 12px; margin-inline-end: 4px; }\n\n/* \u8F68\u8FF9 tab \u53EF\u8BFB\u5316\uFF1A\u7269\u6D41\u5F0F\u7EB5\u5411\u65F6\u95F4\u8F74\uFF08\u56DB\u6001\u914D\u8272 + \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1B\u5F02\u5E38\u6574\u884C\u6807\u7EA2\uFF09 */\n.dsh-kb-timeline {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n}\n.dsh-kb-timeline__item {\n position: relative;\n display: grid;\n grid-template-columns: 16px 1fr;\n gap: 8px;\n padding: 0 0 14px;\n}\n.dsh-kb-timeline__item:last-child {\n padding-bottom: 0;\n}\n/* \u7EB5\u5411\u65F6\u95F4\u7EBF\uFF1A\u8D2F\u7A7F\u8282\u70B9\uFF08\u6700\u65B0\u8282\u70B9\u4E0A\u65B9\u7EBF\u4E0D\u5EF6\u4F38\uFF0C\u6A21\u62DF\u7269\u6D41\u5934\u8282\u70B9\uFF09 */\n.dsh-kb-timeline__axis {\n position: relative;\n}\n.dsh-kb-timeline__item:not(:last-child) .dsh-kb-timeline__axis::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 14px;\n bottom: -4px;\n width: 2px;\n transform: translateX(-50%);\n background: var(--dsh-kb-border);\n}\n.dsh-kb-timeline__dot {\n position: relative;\n z-index: 1;\n display: block;\n width: 10px;\n height: 10px;\n /* \u6C34\u5E73\u5C45\u4E2D\u4E8E 16px \u8F74\u5217\uFF08\u4E2D\u5FC3=8px\uFF09\uFF0C\u4E0E left:50% \u8FDE\u63A5\u7EBF\u5BF9\u9F50 */\n margin: 2px auto 0;\n border-radius: 50%;\n border: 2px solid var(--dsh-kb-surface);\n box-sizing: border-box;\n background: var(--dsh-kb-text-tertiary);\n}\n/* \u56DB\u6001\u914D\u8272\uFF1Aneutral \u7070 / running \u84DD / success \u7EFF / exception \u7EA2 */\n.dsh-kb-timeline__item--running .dsh-kb-timeline__dot {\n background: var(--dsh-kb-active);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n background: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n background: var(--dsh-kb-blocked);\n}\n/* \u6700\u65B0\u8282\u70B9\u9AD8\u4EAE\uFF1A\u4E3B\u8272\u5706\u70B9\u653E\u5927 + \u67D4\u548C\u8F89\u5149 */\n.dsh-kb-timeline__item--latest .dsh-kb-timeline__dot {\n width: 12px;\n height: 12px;\n margin-top: 0;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-active) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--success .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-complete) 22%, transparent);\n}\n.dsh-kb-timeline__item--latest.dsh-kb-timeline__item--exception .dsh-kb-timeline__dot {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsh-kb-blocked) 22%, transparent);\n}\n/* \u5F02\u5E38\u884C\uFF1A\u6D45\u7EA2\u5E95 + \u5DE6\u4FA7\u7EA2\u6761\uFF0C\u6458\u8981\u7EA2\u52A0\u7C97 */\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__body {\n background: color-mix(in srgb, var(--dsh-kb-blocked) 8%, transparent);\n border-left: 3px solid var(--dsh-kb-blocked);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 6px 8px;\n}\n.dsh-kb-timeline__body {\n min-width: 0;\n}\n.dsh-kb-timeline__row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n.dsh-kb-timeline__label {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsh-kb-text-primary);\n}\n.dsh-kb-timeline__item--success .dsh-kb-timeline__label {\n color: var(--dsh-kb-complete);\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__label {\n color: var(--dsh-kb-blocked);\n}\n.dsh-kb-timeline__summary {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--dsh-kb-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-timeline__item--exception .dsh-kb-timeline__summary {\n color: var(--dsh-kb-blocked);\n font-weight: 600;\n}\n.dsh-kb-timeline__author {\n display: block;\n margin-top: 2px;\n font-size: 11px;\n opacity: 0.7;\n color: var(--dsh-kb-text-tertiary);\n}\n\n.dsh-kb-spec-attachments {\n list-style: none;\n margin: 4px 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.dsh-kb-spec-attachments li {\n display: flex;\n align-items: baseline;\n gap: 6px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dsh-kb-spec-attachment__kind {\n font-size: 11px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-sm);\n padding: 0 4px;\n opacity: 0.8;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dsh-kb-tab * {\n transition-duration: 0ms !important;\n }\n}\n\n/* \u6574\u94FE\u5220\u9664\u6309\u94AE\uFF1A\u9ED8\u8BA4\u9690\u85CF\uFF0Chover \u9700\u6C42\u6807\u9898\u884C\u65F6\u51FA\u73B0\uFF08GUI \u4EC5 human\uFF0C\u4E8C\u6B21\u786E\u8BA4\uFF09 */\n.dsh-kb-chain__delete {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n transition: opacity 150ms ease, color 150ms ease;\n}\n.dsh-kb-chain__title:hover .dsh-kb-chain__delete,\n.dsh-kb-chain__delete:focus-visible { opacity: 0.7; }\n.dsh-kb-chain__delete:hover { opacity: 1; color: var(--dsh-kb-blocked); }\n/* \u5220\u9664\u4E8C\u6B21\u786E\u8BA4\u5F39\u7A97\uFF08\u590D\u7528 rename \u5F39\u7A97\u5916\u58F3/\u5706\u89D2\u5951\u7EA6\uFF09 */\n.dsh-kb-delete-modal__text {\n color: var(--dsh-kb-text-secondary);\n font-size: 13px;\n line-height: 1.5;\n}\n.dsh-kb-delete-modal__error {\n color: var(--dsh-kb-blocked);\n font-size: 12px;\n}\n.dsh-kb-rename-modal__actions .dsh-kb-delete-confirm {\n border-color: transparent;\n background: var(--dsw-alias-state-error-primary);\n color: #fff;\n}\n/* T7\uFF1A\u94FE\u6807\u9898\u6539\u540D\u94C5\u7B14\u6309\u94AE + \u8F7B\u91CF\u5F39\u7A97\uFF08GUI \u4EC5 human\uFF1B\u89D2\u8272\u5361\u4E0D\u53EF\u6539\u540D\uFF09 */\n.dsh-kb-chain__rename {\n flex: 0 0 auto;\n border: 0;\n background: transparent;\n color: currentColor;\n opacity: 0.55;\n font: inherit;\n line-height: 1;\n padding: 2px 4px;\n cursor: pointer;\n}\n.dsh-kb-chain__rename:hover { opacity: 1; }\n.dsh-kb-task__status-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.dsh-kb-task__session {\n flex: none;\n padding: 0 6px;\n font-size: 11px;\n line-height: 18px;\n border: 1px solid color-mix(in srgb, currentColor 40%, transparent);\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: 0.85;\n}\n.dsh-kb-task__session:hover {\n opacity: 1;\n}\n.dsh-kb-rename-overlay {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background: var(--dsh-kb-mask);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dsh-kb-rename-modal {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 16px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-lg);\n background: var(--dsh-kb-surface-elev);\n color: var(--dsh-kb-text-primary);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.dsh-kb-rename-modal__label {\n color: var(--dsh-kb-text-primary);\n font-size: 13px;\n font-weight: 600;\n}\n.dsh-kb-rename-modal__input {\n padding: 6px 10px;\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: var(--dsh-kb-input);\n color: var(--dsh-kb-text-primary);\n font: inherit;\n}\n.dsh-kb-rename-modal__input:focus {\n outline: none;\n border-color: var(--dsh-kb-active);\n}\n.dsh-kb-rename-modal__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n}\n.dsh-kb-rename-modal__actions button {\n border: 1px solid var(--dsh-kb-border);\n border-radius: var(--dsh-kb-radius-md);\n background: transparent;\n color: var(--dsh-kb-text-primary);\n font: inherit;\n padding: 4px 14px;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-rename-modal__actions button:hover {\n background: var(--dsh-kb-hover);\n}\n.dsh-kb-rename-modal__actions .dsh-kb-rename-save {\n border-color: transparent;\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n/* Swarm \u914D\u7F6E\u9762\u677F\u300C\u8BC4\u5BA1\u5F15\u64CE\uFF08ocr\uFF09\u300D\u5361\uFF1A\u5B89\u88C5\u4E2D spinner \u884C\u4E0E\u72B6\u6001\u884C\uFF08\u6210\u529F\u7EFF / \u8B66\u793A\u9EC4\uFF09 */\n.dsh-kb-config__installing {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 0;\n}\n.dsh-kb-config__installing button {\n margin-left: auto;\n padding: 4px 12px;\n border: 1px solid var(--dsh-kb-config-border, #333);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n.dsh-kb-config__installing-spinner {\n flex: 0 0 auto;\n width: 14px;\n height: 14px;\n border: 2px solid var(--dsw-alias-border-l2, #666);\n border-top-color: transparent;\n border-radius: 50%;\n animation: dsh-kb-ocr-spin 0.9s linear infinite;\n}\n@keyframes dsh-kb-ocr-spin {\n to { transform: rotate(360deg); }\n}\n.dsh-kb-config__ocr-ok { color: var(--dsw-alias-state-success-primary, #2e9e5b); margin: 6px 0; }\n.dsh-kb-config__ocr-warn { color: var(--dsw-alias-state-warning-primary, #b8860b); margin: 6px 0; }\n.dsh-kb-config__installing button,\n.dsh-kb-config__card > button {\n margin-top: 8px;\n}\n.dsh-kb-config__card > button {\n padding: 6px 16px;\n border: 1px solid var(--dsh-kb-config-border, #333);\n border-radius: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__card > button:hover:not([disabled]) { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__card > button[disabled] { opacity: 0.5; cursor: not-allowed; }\n.dsh-kb-config__select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }\n";
|
|
1640
1798
|
|
|
1641
1799
|
// client/config.css
|
|
1642
1800
|
var config_default = ".dsh-kb-config {\n /* \u4E0E kanban.css \u5927\u5706\u89D2\u5951\u7EA6\u5BF9\u9F50\uFF08DSH \u5361\u7247 16px\uFF09 */\n --dsh-kb-config-border: var(--dsw-alias-border-l2, #333);\n --dsh-kb-config-radius-lg: 16px;\n --dsh-kb-config-radius-md: 10px;\n --dsh-kb-config-input: var(--dsw-specific-input-major, rgba(127, 127, 127, 0.12));\n padding: 16px;\n font-size: 13px;\n}\n.dsh-kb-config__card { border: 1px solid var(--dsh-kb-config-border); border-radius: var(--dsh-kb-config-radius-lg); padding: 20px; margin-bottom: 16px; }\n.dsh-kb-config__card h3 { margin: 0 0 14px; }\n\n.dsh-kb-config input,\n.dsh-kb-config select {\n box-sizing: border-box;\n width: 100%;\n padding: 8px 12px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: var(--dsh-kb-config-input);\n color: var(--dsw-alias-label-primary, inherit);\n font: inherit;\n transition: border-color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-config input:focus,\n.dsh-kb-config select:focus {\n outline: none;\n /* \u7126\u70B9/\u9009\u4E2D\u5F3A\u8C03\u8272\u8DDF\u968F\u4E3B\u9898\u524D\u666F\uFF08\u6D45\u8272=\u6697\u3001\u6697\u8272=\u767D\uFF09\uFF0C\u4E0E dsh settings \u8272\u7CFB\u4E00\u81F4 */\n border-color: var(--dsw-alias-label-primary, currentColor);\n}\n\n/* DSH \u98CE\u683C\u4E0B\u62C9\uFF1Atrigger \u884C\uFF08\u503C + \u203A chevron\uFF09+ \u5F39\u51FA\u83DC\u5355\uFF08\u9009\u4E2D\u6253\u52FE\u3001hover \u9AD8\u4EAE\uFF09 */\n.dsh-kb-config__select { position: relative; min-width: 0; }\n.dsh-kb-config__select-trigger {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n padding: 8px 12px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: var(--dsh-kb-config-input);\n color: var(--dsw-alias-label-primary, inherit);\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: border-color 150ms ease, background-color 150ms ease;\n}\n.dsh-kb-config__select-trigger:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__select-trigger[aria-expanded='true'] { border-color: var(--dsw-alias-label-primary, currentColor); }\n.dsh-kb-config__select-placeholder { color: var(--dsw-alias-label-tertiary, #999); }\n.dsh-kb-config__select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dsh-kb-config__select-chevron { flex: 0 0 auto; display: inline-flex; color: var(--dsw-alias-label-tertiary, #999); }\n.dsh-kb-config__menu {\n position: absolute;\n z-index: 30;\n top: calc(100% + 6px);\n left: 0;\n right: 0;\n margin: 0;\n padding: 6px;\n list-style: none;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-lg);\n background: var(--dsw-alias-bg-layer-3, #222);\n color: var(--dsw-alias-label-primary, inherit);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);\n max-height: 260px;\n overflow: auto;\n}\n.dsh-kb-config__option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n border-radius: var(--dsh-kb-config-radius-md);\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__option:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__option[data-selected='true'] { color: var(--dsw-alias-state-business-primary, #4b7bff); }\n.dsh-kb-config__option > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dsh-kb-config__option-check { flex: 0 0 auto; display: inline-flex; }\n\n.dsh-kb-config__label { display: block; margin: 12px 0 6px; font-weight: 600; }\n.dsh-kb-config__help { color: var(--dsw-alias-label-secondary, #888); font-size: 12px; display: block; margin: 6px 0 0; }\n.dsh-kb-config__role { display: grid; grid-template-columns: 32px 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 12px; align-items: center; }\n.dsh-kb-config__src { color: var(--dsw-alias-label-secondary, #888); font-size: 12px; white-space: nowrap; padding-left: 4px; }\n.dsh-kb-config__footer { display: flex; justify-content: flex-end; margin-top: 4px; }\n.dsh-kb-config__footer button {\n padding: 6px 16px;\n border: 1px solid var(--dsh-kb-config-border);\n border-radius: var(--dsh-kb-config-radius-md);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: background-color 150ms ease;\n}\n.dsh-kb-config__footer button:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, 0.12)); }\n.dsh-kb-config__error { color: var(--dsw-alias-state-error-primary, #e5484d); }\n";
|