@joekytc/dsh-swarm 0.1.1 → 0.2.0
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 +3 -3
- package/README.zh-CN.md +3 -3
- package/client/BoardCard.tsx +24 -2
- package/client/ConfigSection.tsx +71 -0
- package/client/ConfigSelect.tsx +69 -0
- package/client/KanbanBoard.tsx +3 -0
- package/client/KanbanTab.tsx +4 -3
- package/client/TaskDrawer.tsx +31 -31
- package/client/WorkflowRail.tsx +3 -1
- package/client/config-store.ts +51 -0
- package/client/config.css +110 -0
- package/client/index.ts +39 -4
- package/client/kanban.css +134 -2
- package/client/session-bridge.ts +39 -0
- package/client/timeline-model.ts +210 -0
- package/client/workflow-model.ts +3 -1
- package/lib/client.js +549 -64
- package/lib/config.d.ts +19 -4
- package/lib/config.js +18 -3
- package/lib/dispatcher/agent-runner.d.ts +28 -6
- package/lib/dispatcher/agent-runner.js +175 -62
- package/lib/dispatcher/chain-auditor.js +4 -1
- package/lib/dispatcher/dispatcher.d.ts +62 -3
- package/lib/dispatcher/dispatcher.js +243 -20
- package/lib/dispatcher/session-events.d.ts +11 -15
- package/lib/dispatcher/session-events.js +17 -5
- package/lib/dispatcher/v-orchestrator.d.ts +42 -9
- package/lib/dispatcher/v-orchestrator.js +236 -28
- package/lib/domain/config-override.d.ts +38 -0
- package/lib/domain/config-override.js +101 -0
- package/lib/domain/delivery-contract.d.ts +3 -2
- package/lib/domain/delivery-contract.js +28 -16
- package/lib/domain/gate-policy.d.ts +26 -0
- package/lib/domain/gate-policy.js +44 -0
- package/lib/domain/kanban-service.d.ts +16 -3
- package/lib/domain/kanban-service.js +41 -6
- package/lib/domain/memory.d.ts +29 -0
- package/lib/domain/memory.js +145 -0
- package/lib/domain/permissions.js +1 -1
- package/lib/domain/planning-checklist.d.ts +5 -0
- package/lib/domain/planning-checklist.js +80 -6
- package/lib/domain/projection.js +2 -1
- package/lib/domain/review-evidence.js +1 -1
- package/lib/domain/state-machine.js +2 -1
- package/lib/domain/types.d.ts +2 -2
- package/lib/index.js +19 -21
- package/lib/roles/clean-fs-tools.d.ts +22 -0
- package/lib/roles/clean-fs-tools.js +118 -0
- package/lib/roles/skill-installer.d.ts +6 -0
- package/lib/roles/skill-installer.js +32 -0
- package/lib/roles/toolsets.d.ts +13 -1
- package/lib/roles/toolsets.js +163 -31
- package/lib/roles/wiki-worker.d.ts +1 -0
- package/lib/roles/wiki-worker.js +10 -2
- package/lib/routes/kanban-http.d.ts +5 -2
- package/lib/routes/kanban-http.js +36 -3
- package/lib/routes/planning-driver.d.ts +7 -6
- package/lib/routes/planning-driver.js +19 -11
- package/lib/routes/prefix-router.d.ts +28 -13
- package/lib/routes/prefix-router.js +66 -1
- package/lib/services/config-provider.d.ts +42 -0
- package/lib/services/config-provider.js +94 -0
- package/lib/services/gate-runner.d.ts +24 -0
- package/lib/services/gate-runner.js +87 -0
- package/lib/services/kanban-provider.d.ts +5 -1
- package/lib/services/kanban-provider.js +40 -2
- package/lib/services/llm-catalog.d.ts +35 -0
- package/lib/services/llm-catalog.js +19 -0
- package/lib/tools/kanban-tools.js +1 -0
- package/lib/tools/main-session-tools.d.ts +17 -2
- package/lib/tools/main-session-tools.js +112 -25
- package/lib/tools/planning-tools.d.ts +9 -0
- package/lib/tools/planning-tools.js +120 -4
- package/lib/tools/prefetch-tools.js +1 -0
- package/lib/tools/spec-card-tools.js +1 -0
- package/lib/tools/wiki-tools.js +5 -4
- package/lib/wiki/kb-linkage.d.ts +9 -2
- package/lib/wiki/kb-linkage.js +3 -3
- package/lib/wiki/local-kb-client.d.ts +14 -0
- package/lib/wiki/local-kb-client.js +101 -0
- package/lib/wiki/local-kb.d.ts +6 -0
- package/lib/wiki/local-kb.js +25 -0
- package/lib/wiki/memory-recall.d.ts +24 -0
- package/lib/wiki/memory-recall.js +62 -0
- package/lib/wiki/page-path.d.ts +10 -1
- package/lib/wiki/page-path.js +31 -8
- package/lib/wiki/wiki-vault-client.d.ts +4 -3
- package/lib/wiki/wiki-vault-client.js +6 -6
- package/package.json +16 -11
- package/personas/kanban-d/preset.yml +1 -1
- package/personas/kanban-dt/agent.cordis.yml +3 -3
- package/personas/kanban-dt/preset.yml +1 -1
- package/personas/kanban-p/agent.cordis.yml +16 -0
- package/personas/kanban-p/preset.yml +1 -1
- package/personas/kanban-pt/agent.cordis.yml +38 -8
- package/personas/kanban-pt/preset.yml +1 -1
- package/personas/kanban-w/agent.cordis.yml +35 -16
- package/personas/kanban-w/preset.yml +1 -1
- package/personas/persona-dt.md +1 -1
- package/personas/persona-p.md +4 -1
- package/personas/persona-pt.md +13 -6
- package/personas/persona-w.md +11 -9
- package/skills/grill-me/SKILL.md +71 -0
- package/skills/llm-wiki-skill/.mise.toml +2 -0
- package/skills/llm-wiki-skill/.nvmrc +1 -0
- package/skills/llm-wiki-skill/AGENTS.md +173 -0
- package/skills/llm-wiki-skill/CHANGELOG.md +548 -0
- package/skills/llm-wiki-skill/CLAUDE.md +152 -0
- package/skills/llm-wiki-skill/HERMES.md +44 -0
- package/skills/llm-wiki-skill/README.en.md +261 -0
- package/skills/llm-wiki-skill/README.md +291 -0
- package/skills/llm-wiki-skill/SKILL.md +1133 -0
- package/skills/llm-wiki-skill/assets/graph-demo.gif +0 -0
- package/skills/llm-wiki-skill/assets/graph-preview.png +0 -0
- package/skills/llm-wiki-skill/deps/LICENSE-d3.txt +13 -0
- package/skills/llm-wiki-skill/deps/LICENSE-marked.txt +44 -0
- package/skills/llm-wiki-skill/deps/LICENSE-purify.txt +568 -0
- package/skills/llm-wiki-skill/deps/LICENSE-roughjs.txt +21 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/SKILL.md +261 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/references/config/first-time-setup.md +106 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/cdp.ts +179 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/constants.ts +13 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/defuddle-converter.ts +58 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/html-to-markdown.ts +135 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/legacy-converter.ts +629 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/main.ts +314 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/markdown-conversion-shared.ts +305 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/media-localizer.ts +317 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/package.json +14 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/paths.ts +29 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/package.json +9 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.test.ts +307 -0
- package/skills/llm-wiki-skill/deps/baoyu-url-to-markdown/scripts/vendor/baoyu-chrome-cdp/src/index.ts +523 -0
- package/skills/llm-wiki-skill/deps/d3.min.js +2 -0
- package/skills/llm-wiki-skill/deps/marked.min.js +6 -0
- package/skills/llm-wiki-skill/deps/purify.min.js +3 -0
- package/skills/llm-wiki-skill/deps/rough.min.js +7 -0
- package/skills/llm-wiki-skill/deps/youtube-transcript/SKILL.md +47 -0
- package/skills/llm-wiki-skill/deps/youtube-transcript/scripts/get_transcript.py +72 -0
- package/skills/llm-wiki-skill/designs/graph-edge-legibility/graph-edge-treatments.html +480 -0
- package/skills/llm-wiki-skill/docs/design/oriental-atlas/DESIGN.md +183 -0
- package/skills/llm-wiki-skill/docs/design/oriental-atlas/README.md +10 -0
- package/skills/llm-wiki-skill/docs/design/oriental-atlas/design-brief.md +170 -0
- package/skills/llm-wiki-skill/docs/design/oriental-atlas/oriental-editorial-atlas.html +1908 -0
- package/skills/llm-wiki-skill/docs/design/oriental-atlas/reviews/result-review.md +68 -0
- package/skills/llm-wiki-skill/docs/graph/2026-06-16-interaction-risk-audit.md +88 -0
- package/skills/llm-wiki-skill/docs/graph/2026-06-16-interaction-test-coverage-map.md +212 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-0-2-baseline.md +86 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-1-3-dom-svg-large-baseline.md +85 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-1-4-disposable-validation-gate.md +97 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-18-phase-2-4-global-renderer-trial-matrix.md +168 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-1-sigma-graphology-trial.md +71 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-2-vis-network-trial.md +78 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-3-aggregation-fallback-trial.md +72 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-phase-6-4-global-renderer-route-decision.md +94 -0
- package/skills/llm-wiki-skill/docs/graph/performance/2026-06-19-sigma-global-production-integration-result.md +102 -0
- package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-dense-wheel.json +9 -0
- package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-dense-wheel.png +0 -0
- package/skills/llm-wiki-skill/docs/graph/performance/artifacts/2026-06-18-phase-0-2/stage-4.5-offline-navigation.png +0 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-15-omp-tool-status-events-design.md +174 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-16-graph-interaction-geometry-design.md +832 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-16-graph-six-layer-architecture-design.md +577 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-17-static-renderer-coordination-split-design.md +172 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-18-large-graph-global-community-design.md +909 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-19-sigma-global-graph-renderer-design.md +360 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-20-paper-ui-port-design.md +162 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-20-paper-ui-v2-shell-alignment-design.md +384 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-21-graph-experience-completion-design.md +534 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-22-chat-auto-scroll-design.md +185 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-22-graph-community-node-visual-design.md +266 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-25-sigma-overlay-refactor-perf-design.md +170 -0
- package/skills/llm-wiki-skill/docs/spark/2026-06-26-global-sigma-community-spotlight-design.md +393 -0
- package/skills/llm-wiki-skill/docs/spark/mockups/2026-06-18-large-graph-global-community-flow.html +746 -0
- package/skills/llm-wiki-skill/install.ps1 +87 -0
- package/skills/llm-wiki-skill/install.sh +722 -0
- package/skills/llm-wiki-skill/package-lock.json +11171 -0
- package/skills/llm-wiki-skill/package.json +24 -0
- package/skills/llm-wiki-skill/packages/graph-engine/package.json +37 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/anim/.gitkeep +1 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/anim/index.ts +179 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/architecture.ts +79 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/diff.ts +121 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/facade.ts +1406 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/graph-node.ts +37 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/index.ts +25 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/layout/edge-geometry.ts +17 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/layout/index.ts +16 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/layout/spatial-index.ts +509 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/atlas.ts +18 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/index.ts +10 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/labels.ts +11 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/layout.ts +81 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/learning.ts +8 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/legacy-helpers.ts +1379 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/queue.ts +7 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/storage.ts +4 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/model/visibility.ts +9 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/.gitkeep +1 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/adapter.ts +443 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/aggregation-containers.ts +64 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-cloud-geometry.ts +178 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-wash.ts +238 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/community-washes.ts +19 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/compat-contract.ts +14 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/controller.ts +705 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/controls.ts +288 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/dom-svg-renderer.ts +180 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/edges.ts +51 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/geometry.ts +380 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/gestures.ts +673 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/graph-renderer-root.ts +387 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/hit-testing.ts +56 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/host-dom.ts +14 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/hover-card.ts +37 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/index.ts +213 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/keyboard.ts +48 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/legend.ts +25 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/minimap.ts +45 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/model.ts +1339 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/node-drag-lifecycle.ts +94 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/nodes.ts +103 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/offline-reader.ts +209 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/overlays-presenter.ts +192 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/overlays.ts +73 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/pin-position.ts +51 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/preview.ts +65 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/relation-focus.ts +91 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-context.ts +85 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-pipeline.ts +871 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/render-styles.ts +1405 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/renderer-surface.ts +75 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/search.ts +57 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-coordinates.ts +44 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-global-drag.ts +246 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-global-renderer.ts +1425 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/sigma-overlay-svg.ts +121 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/simulation-bridge.ts +59 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/state.ts +262 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/toolbar.ts +40 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/render/viewport.ts +336 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/select/.gitkeep +1 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/select/index.ts +189 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/sim/index.ts +372 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/sim/pins.ts +84 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/summary/index.ts +447 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/themes/.gitkeep +1 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/themes/index.ts +8 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/themes/tokens.ts +117 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/types/d3-quadtree.d.ts +22 -0
- package/skills/llm-wiki-skill/packages/graph-engine/src/types.ts +531 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/aggregation-fallback-trial-adapter.test.ts +115 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/aggregation-fallback-trial-adapter.ts +222 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/anim.test.ts +121 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/architecture.test.ts +63 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/community-cloud-geometry.test.ts +86 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/community-wash.test.ts +97 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/diff.test.ts +133 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/facade.test.ts +1369 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/geometry.test.ts +147 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/gestures.test.ts +768 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/graph-layout.test.ts +110 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/helpers.test.ts +287 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/interaction-contract.test.ts +106 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/keyboard.test.ts +59 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/large-fixtures.test.ts +47 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/large-graph-fixtures.ts +420 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/learning.test.ts +259 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/node-drag-lifecycle.test.ts +166 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/overlays.test.ts +115 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/preview.test.ts +56 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/queue.test.ts +114 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/relation-focus.test.ts +115 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/render-model.test.ts +1030 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-adapter-contract.test.ts +271 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-boundary.test.ts +618 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/renderer-lifecycle.test.ts +1711 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/route-continuity.test.ts +284 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/runtime-state.test.ts +281 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/search-and-legend.test.ts +124 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/select.test.ts +168 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-coordinates.test.ts +50 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-global-renderer.test.ts +2210 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-trial-adapter.test.ts +82 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/sigma-trial-adapter.ts +271 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/sim.test.ts +207 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/simulation-bridge.test.ts +96 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/spatial-index.test.ts +222 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/state.test.ts +189 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/summary-contract.test.ts +422 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/themes.test.ts +62 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/toolbar.test.ts +64 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/viewport.test.ts +213 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/vis-network-trial-adapter.test.ts +82 -0
- package/skills/llm-wiki-skill/packages/graph-engine/test/vis-network-trial-adapter.ts +186 -0
- package/skills/llm-wiki-skill/packages/graph-engine/tsconfig.json +17 -0
- package/skills/llm-wiki-skill/packages/graph-engine/vite.config.ts +15 -0
- package/skills/llm-wiki-skill/platforms/claude/CLAUDE.md +37 -0
- package/skills/llm-wiki-skill/platforms/claude/companions/llm-wiki-upgrade/SKILL.md +95 -0
- package/skills/llm-wiki-skill/platforms/codex/AGENTS.md +23 -0
- package/skills/llm-wiki-skill/platforms/hermes/README.md +31 -0
- package/skills/llm-wiki-skill/platforms/openclaw/README.md +31 -0
- package/skills/llm-wiki-skill/scripts/adapter-state.sh +424 -0
- package/skills/llm-wiki-skill/scripts/build-graph-data.sh +395 -0
- package/skills/llm-wiki-skill/scripts/build-graph-html.sh +459 -0
- package/skills/llm-wiki-skill/scripts/cache.sh +352 -0
- package/skills/llm-wiki-skill/scripts/create-source-page.sh +100 -0
- package/skills/llm-wiki-skill/scripts/delete-helper.sh +68 -0
- package/skills/llm-wiki-skill/scripts/graph-analysis.js +732 -0
- package/skills/llm-wiki-skill/scripts/hook-session-start.sh +46 -0
- package/skills/llm-wiki-skill/scripts/init-wiki.sh +95 -0
- package/skills/llm-wiki-skill/scripts/lib/source-signal-eligibility.js +158 -0
- package/skills/llm-wiki-skill/scripts/lint-fix.sh +114 -0
- package/skills/llm-wiki-skill/scripts/lint-runner.sh +217 -0
- package/skills/llm-wiki-skill/scripts/runtime-context.sh +77 -0
- package/skills/llm-wiki-skill/scripts/shared-config.sh +83 -0
- package/skills/llm-wiki-skill/scripts/source-record-contract.tsv +10 -0
- package/skills/llm-wiki-skill/scripts/source-registry.sh +349 -0
- package/skills/llm-wiki-skill/scripts/source-registry.tsv +10 -0
- package/skills/llm-wiki-skill/scripts/source-signal-coverage.js +83 -0
- package/skills/llm-wiki-skill/scripts/validate-step1.sh +144 -0
- package/skills/llm-wiki-skill/scripts/wiki-compat.sh +267 -0
- package/skills/llm-wiki-skill/setup.sh +8 -0
- package/skills/llm-wiki-skill/templates/entity-template.md +30 -0
- package/skills/llm-wiki-skill/templates/graph-styles/wash/footer.html +27 -0
- package/skills/llm-wiki-skill/templates/graph-styles/wash/graph-wash-helpers.js +1326 -0
- package/skills/llm-wiki-skill/templates/graph-styles/wash/graph-wash.js +1009 -0
- package/skills/llm-wiki-skill/templates/graph-styles/wash/header.html +2002 -0
- package/skills/llm-wiki-skill/templates/index-en-template.md +51 -0
- package/skills/llm-wiki-skill/templates/index-template.md +51 -0
- package/skills/llm-wiki-skill/templates/log-en-template.md +11 -0
- package/skills/llm-wiki-skill/templates/log-template.md +11 -0
- package/skills/llm-wiki-skill/templates/overview-en-template.md +41 -0
- package/skills/llm-wiki-skill/templates/overview-template.md +41 -0
- package/skills/llm-wiki-skill/templates/purpose-en-template.md +16 -0
- package/skills/llm-wiki-skill/templates/purpose-template.md +16 -0
- package/skills/llm-wiki-skill/templates/query-template.md +19 -0
- package/skills/llm-wiki-skill/templates/schema-template.md +185 -0
- package/skills/llm-wiki-skill/templates/source-template.md +51 -0
- package/skills/llm-wiki-skill/templates/synthesis-template.md +25 -0
- package/skills/llm-wiki-skill/templates/topic-template.md +35 -0
- package/skills/llm-wiki-skill/tests/adapter-state.sh +338 -0
- package/skills/llm-wiki-skill/tests/browser/graph-aggregation-fallback-trial.ts +737 -0
- package/skills/llm-wiki-skill/tests/browser/graph-community-node-map.mjs +255 -0
- package/skills/llm-wiki-skill/tests/browser/graph-community-wash-interactions.mjs +170 -0
- package/skills/llm-wiki-skill/tests/browser/graph-default-behavior.mjs +630 -0
- package/skills/llm-wiki-skill/tests/browser/graph-density-preview.mjs +53 -0
- package/skills/llm-wiki-skill/tests/browser/graph-html-insights.mjs +41 -0
- package/skills/llm-wiki-skill/tests/browser/graph-large-performance.ts +689 -0
- package/skills/llm-wiki-skill/tests/browser/graph-node-slim.mjs +75 -0
- package/skills/llm-wiki-skill/tests/browser/graph-offline-phase-6.mjs +660 -0
- package/skills/llm-wiki-skill/tests/browser/graph-renderer-trial-shared.ts +291 -0
- package/skills/llm-wiki-skill/tests/browser/graph-sigma-global-production.ts +1437 -0
- package/skills/llm-wiki-skill/tests/browser/graph-sigma-graphology-trial.ts +949 -0
- package/skills/llm-wiki-skill/tests/browser/graph-stage-4-5.mjs +815 -0
- package/skills/llm-wiki-skill/tests/browser/graph-vis-network-trial.ts +762 -0
- package/skills/llm-wiki-skill/tests/browser/graph-workbench-interactions.mjs +730 -0
- package/skills/llm-wiki-skill/tests/browser/validate-graph-trial-result.mjs +149 -0
- package/skills/llm-wiki-skill/tests/expected/graph-data-empty.json +60 -0
- package/skills/llm-wiki-skill/tests/expected/graph-data-sample.json +396 -0
- package/skills/llm-wiki-skill/tests/expected/graph-interactive-basic.html +1736 -0
- package/skills/llm-wiki-skill/tests/expected/lint-output.txt +44 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/index.md +1 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Alpha.md +10 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Beta.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Delta.md +8 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/entities/Gamma.md +8 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/queries/20260422-abc.md +10 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/synthesis/Crystal.md +8 -0
- package/skills/llm-wiki-skill/tests/fixtures/coverage-sample-wiki/wiki/topics/Overview.md +9 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-empty-wiki/wiki/entities/.gitkeep +0 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/purpose.md +3 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Attention.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Decoder.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Encoder.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/GPT.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/entities/Transformer.md +13 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/sources/paper.md +9 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/topics/arch.md +12 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-data-sample-wiki/wiki/topics/finetune.md +9 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-basic/wiki/graph-data.json +40 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-dense/wiki/graph-data.json +3965 -0
- package/skills/llm-wiki-skill/tests/fixtures/graph-interactive-multicomm/wiki/graph-data.json +212 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/index.md +14 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/C++.md +6 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Lonely.md +4 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Other.md +8 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/entities/Real.md +7 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/sources/2026-01-01-test-source.md +15 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/sources/2026-02-01-inline-img.md +12 -0
- package/skills/llm-wiki-skill/tests/fixtures/lint-sample-wiki/wiki/topics/AIbasic.md +3 -0
- package/skills/llm-wiki-skill/tests/graph-aggregation-fallback-trial.regression-1.sh +46 -0
- package/skills/llm-wiki-skill/tests/graph-analysis-helper.regression-1.sh +237 -0
- package/skills/llm-wiki-skill/tests/graph-browser-large-performance.regression-1.sh +39 -0
- package/skills/llm-wiki-skill/tests/graph-browser-stage-4-5.regression-1.sh +163 -0
- package/skills/llm-wiki-skill/tests/graph-build-failures.regression-1.sh +91 -0
- package/skills/llm-wiki-skill/tests/graph-community-node-map.regression-1.sh +107 -0
- package/skills/llm-wiki-skill/tests/graph-community-wash-interactions.regression-1.sh +35 -0
- package/skills/llm-wiki-skill/tests/graph-data-confidence-merge.regression-1.sh +309 -0
- package/skills/llm-wiki-skill/tests/graph-data-source-paths.regression-1.sh +49 -0
- package/skills/llm-wiki-skill/tests/graph-default-behavior.regression-1.sh +35 -0
- package/skills/llm-wiki-skill/tests/graph-html-a11y.regression-1.sh +50 -0
- package/skills/llm-wiki-skill/tests/graph-html-brand-link.regression-1.sh +47 -0
- package/skills/llm-wiki-skill/tests/graph-html-density.regression-1.sh +228 -0
- package/skills/llm-wiki-skill/tests/graph-html-drawer-neighbors.regression-1.sh +47 -0
- package/skills/llm-wiki-skill/tests/graph-html-insights.regression-1.sh +80 -0
- package/skills/llm-wiki-skill/tests/graph-html-long-label.regression-1.sh +92 -0
- package/skills/llm-wiki-skill/tests/graph-html-minimap.regression-1.sh +51 -0
- package/skills/llm-wiki-skill/tests/graph-html-mobile.regression-1.sh +48 -0
- package/skills/llm-wiki-skill/tests/graph-html-oriental-atlas-contract.regression-1.sh +94 -0
- package/skills/llm-wiki-skill/tests/graph-html-oriental-design-contract.regression-1.sh +82 -0
- package/skills/llm-wiki-skill/tests/graph-html-search.regression-1.sh +52 -0
- package/skills/llm-wiki-skill/tests/graph-html-styles.regression-1.sh +66 -0
- package/skills/llm-wiki-skill/tests/graph-html-toolbar.regression-1.sh +62 -0
- package/skills/llm-wiki-skill/tests/graph-offline-phase-6.regression-1.sh +51 -0
- package/skills/llm-wiki-skill/tests/graph-sigma-global-production.regression-1.sh +64 -0
- package/skills/llm-wiki-skill/tests/graph-sigma-graphology-trial.regression-1.sh +46 -0
- package/skills/llm-wiki-skill/tests/graph-vis-network-trial.regression-1.sh +46 -0
- package/skills/llm-wiki-skill/tests/graph-workbench-interactions.regression-1.sh +151 -0
- package/skills/llm-wiki-skill/tests/js/graph-wash-bootstrap.test.js +110 -0
- package/skills/llm-wiki-skill/tests/js/graph-wash-helpers.test.js +296 -0
- package/skills/llm-wiki-skill/tests/js/graph-wash-learning.test.js +260 -0
- package/skills/llm-wiki-skill/tests/js/graph-wash-queue.test.js +115 -0
- package/skills/llm-wiki-skill/tests/js/graph-wash-runtime-state.test.js +282 -0
- package/skills/llm-wiki-skill/tests/js/source-signal-coverage.test.js +48 -0
- package/skills/llm-wiki-skill/tests/js/source-signal-eligibility.test.js +202 -0
- package/skills/llm-wiki-skill/tests/lib/graph-html-engine-helpers.sh +110 -0
- package/skills/llm-wiki-skill/tests/lint-output.regression-1.sh +32 -0
- package/skills/llm-wiki-skill/tests/regression.sh +1754 -0
- package/skills/llm-wiki-skill/workbench/AGENTS.md +110 -0
- package/skills/llm-wiki-skill/workbench/CLAUDE.md +55 -0
- package/skills/llm-wiki-skill/workbench/LICENSE +21 -0
- package/skills/llm-wiki-skill/workbench/PRODUCT.md +1353 -0
- package/skills/llm-wiki-skill/workbench/README.md +30 -0
- package/skills/llm-wiki-skill/workbench/docs/current-kb-retrieval-design.md +587 -0
- package/skills/llm-wiki-skill/workbench/docs/graph-evolution-1-design.md +210 -0
- package/skills/llm-wiki-skill/workbench/docs/stage-2-design.md +1139 -0
- package/skills/llm-wiki-skill/workbench/docs/stage-3-design.md +1269 -0
- package/skills/llm-wiki-skill/workbench/docs/stage-3.5-design.md +1164 -0
- package/skills/llm-wiki-skill/workbench/docs/stage-4-design.md +504 -0
- package/skills/llm-wiki-skill/workbench/docs/stage-4.5-design.md +195 -0
- package/skills/llm-wiki-skill/workbench/docs/superpowers/specs/2026-05-28-resizable-preview-layout-design.md +165 -0
- package/skills/llm-wiki-skill/workbench/docs/superpowers/specs/2026-05-28-settings-panel-scroll-fix.md +50 -0
- package/skills/llm-wiki-skill/workbench/server/package.json +31 -0
- package/skills/llm-wiki-skill/workbench/server/src/agent.ts +457 -0
- package/skills/llm-wiki-skill/workbench/server/src/artifacts.ts +248 -0
- package/skills/llm-wiki-skill/workbench/server/src/auth.ts +164 -0
- package/skills/llm-wiki-skill/workbench/server/src/config.ts +130 -0
- package/skills/llm-wiki-skill/workbench/server/src/conversations.test.ts +159 -0
- package/skills/llm-wiki-skill/workbench/server/src/conversations.ts +270 -0
- package/skills/llm-wiki-skill/workbench/server/src/digest/batch.ts +189 -0
- package/skills/llm-wiki-skill/workbench/server/src/digest/concurrency.test.ts +36 -0
- package/skills/llm-wiki-skill/workbench/server/src/digest/concurrency.ts +31 -0
- package/skills/llm-wiki-skill/workbench/server/src/digest/subagent.ts +91 -0
- package/skills/llm-wiki-skill/workbench/server/src/extensions/artifacts.ts +81 -0
- package/skills/llm-wiki-skill/workbench/server/src/extensions/knowledge-base.ts +263 -0
- package/skills/llm-wiki-skill/workbench/server/src/extensions/new-wiki.ts +42 -0
- package/skills/llm-wiki-skill/workbench/server/src/extensions/synthesis.ts +172 -0
- package/skills/llm-wiki-skill/workbench/server/src/graph-watcher.test.ts +196 -0
- package/skills/llm-wiki-skill/workbench/server/src/graph.test.ts +113 -0
- package/skills/llm-wiki-skill/workbench/server/src/graph.ts +351 -0
- package/skills/llm-wiki-skill/workbench/server/src/index.ts +1148 -0
- package/skills/llm-wiki-skill/workbench/server/src/knowledge-bases.test.ts +30 -0
- package/skills/llm-wiki-skill/workbench/server/src/knowledge-bases.ts +321 -0
- package/skills/llm-wiki-skill/workbench/server/src/pages.test.ts +41 -0
- package/skills/llm-wiki-skill/workbench/server/src/pages.ts +160 -0
- package/skills/llm-wiki-skill/workbench/server/src/retrieval.test.ts +151 -0
- package/skills/llm-wiki-skill/workbench/server/src/retrieval.ts +427 -0
- package/skills/llm-wiki-skill/workbench/server/src/tool-status-events.test.ts +363 -0
- package/skills/llm-wiki-skill/workbench/server/src/tool-status-events.ts +616 -0
- package/skills/llm-wiki-skill/workbench/server/src/wiki-init.test.ts +19 -0
- package/skills/llm-wiki-skill/workbench/server/src/wiki-init.ts +188 -0
- package/skills/llm-wiki-skill/workbench/server/tsconfig.json +10 -0
- package/skills/llm-wiki-skill/workbench/tsconfig.json +20 -0
- package/skills/llm-wiki-skill/workbench/web/README.md +73 -0
- package/skills/llm-wiki-skill/workbench/web/components.json +21 -0
- package/skills/llm-wiki-skill/workbench/web/eslint.config.js +22 -0
- package/skills/llm-wiki-skill/workbench/web/index.html +16 -0
- package/skills/llm-wiki-skill/workbench/web/package.json +54 -0
- package/skills/llm-wiki-skill/workbench/web/src/App.tsx +1195 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/AddExternalDialog.tsx +375 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/AppearancePanel.tsx +158 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ArtifactView.tsx +15 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/BatchDigestPanel.tsx +117 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ChatPanel.tsx +890 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/CommandMenu.tsx +75 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ExportButtons.tsx +58 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/GraphPanel.tsx +800 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/GraphReader.tsx +52 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/GraphSelection.tsx +100 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/GraphSummaryDrawer.tsx +269 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/MainViewTabs.tsx +69 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/MarkdownView.tsx +106 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/NewWikiDialog.tsx +103 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/RefMenu.tsx +44 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/RightDrawer.tsx +298 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/SearchPanel.tsx +165 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/SettingsPanel.tsx +320 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/Sidebar.tsx +354 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ToolHistorySummary.tsx +111 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ToolStatusRunway.tsx +70 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/TopBar.tsx +348 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/renderers/DownloadOnlyRenderer.tsx +88 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/renderers/HtmlRenderer.tsx +92 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ui/button.tsx +52 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ui/command.tsx +50 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ui/dialog.tsx +156 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ui/input.tsx +21 -0
- package/skills/llm-wiki-skill/workbench/web/src/components/ui/tooltip.tsx +57 -0
- package/skills/llm-wiki-skill/workbench/web/src/index.css +4204 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/api.ts +648 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/appearance.ts +114 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/drawer-layout.ts +41 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/drawer-state.ts +168 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/graph-reader.ts +25 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/graph-selection-drawer.ts +35 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/graph-selection.ts +96 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/graph-summary-actions.ts +184 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/legacy-tool-status.ts +113 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/model-roles.ts +20 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/search-filter.ts +104 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/sse.ts +72 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/tool-status-format.ts +170 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/tool-status-model.ts +392 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/utils.ts +10 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/view-status.ts +16 -0
- package/skills/llm-wiki-skill/workbench/web/src/lib/wiki-links.ts +32 -0
- package/skills/llm-wiki-skill/workbench/web/src/main.tsx +10 -0
- package/skills/llm-wiki-skill/workbench/web/test/api.test.ts +61 -0
- package/skills/llm-wiki-skill/workbench/web/test/app-shell-drawer-layout.test.tsx +48 -0
- package/skills/llm-wiki-skill/workbench/web/test/appearance-panel.test.tsx +121 -0
- package/skills/llm-wiki-skill/workbench/web/test/appearance.test.ts +262 -0
- package/skills/llm-wiki-skill/workbench/web/test/chat-host-source.test.tsx +22 -0
- package/skills/llm-wiki-skill/workbench/web/test/chat-panel-auto-scroll.test.tsx +311 -0
- package/skills/llm-wiki-skill/workbench/web/test/chat-panel-bubbles.test.tsx +48 -0
- package/skills/llm-wiki-skill/workbench/web/test/chat-panel-composer.test.tsx +86 -0
- package/skills/llm-wiki-skill/workbench/web/test/chat-panel-tool-status.test.tsx +26 -0
- package/skills/llm-wiki-skill/workbench/web/test/export-batch-paper.test.tsx +101 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-drawer-state.test.ts +257 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-panel-paper.test.tsx +200 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-reader-request.test.ts +32 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-reader.test.ts +62 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-selection-drawer.test.ts +56 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-selection.test.ts +83 -0
- package/skills/llm-wiki-skill/workbench/web/test/graph-summary-actions.test.ts +188 -0
- package/skills/llm-wiki-skill/workbench/web/test/main-view-tabs.test.tsx +34 -0
- package/skills/llm-wiki-skill/workbench/web/test/markdown-view.test.tsx +34 -0
- package/skills/llm-wiki-skill/workbench/web/test/popup-menus.test.tsx +85 -0
- package/skills/llm-wiki-skill/workbench/web/test/render.test.tsx +30 -0
- package/skills/llm-wiki-skill/workbench/web/test/render.tsx +38 -0
- package/skills/llm-wiki-skill/workbench/web/test/right-drawer-graph-summary.test.tsx +287 -0
- package/skills/llm-wiki-skill/workbench/web/test/right-drawer-interactions.test.tsx +182 -0
- package/skills/llm-wiki-skill/workbench/web/test/search-filter.test.ts +65 -0
- package/skills/llm-wiki-skill/workbench/web/test/search-panel.test.tsx +155 -0
- package/skills/llm-wiki-skill/workbench/web/test/setup-dom.ts +66 -0
- package/skills/llm-wiki-skill/workbench/web/test/sidebar-v2-source.test.ts +17 -0
- package/skills/llm-wiki-skill/workbench/web/test/sidebar.test.tsx +110 -0
- package/skills/llm-wiki-skill/workbench/web/test/tool-history-summary.test.tsx +150 -0
- package/skills/llm-wiki-skill/workbench/web/test/tool-status-format.test.ts +107 -0
- package/skills/llm-wiki-skill/workbench/web/test/tool-status-model.test.ts +324 -0
- package/skills/llm-wiki-skill/workbench/web/test/tool-status-runway.test.ts +159 -0
- package/skills/llm-wiki-skill/workbench/web/test/topbar.test.tsx +248 -0
- package/skills/llm-wiki-skill/workbench/web/test/visual/paper-ui.ts +898 -0
- package/skills/llm-wiki-skill/workbench/web/test/wiki-links.test.ts +23 -0
- package/skills/llm-wiki-skill/workbench/web/test-results/paper-ui/actual/.gitkeep +1 -0
- package/skills/llm-wiki-skill/workbench/web/test-results/paper-ui/baseline/.gitkeep +1 -0
- package/skills/llm-wiki-skill/workbench/web/tsconfig.app.json +30 -0
- package/skills/llm-wiki-skill/workbench/web/tsconfig.json +7 -0
- package/skills/llm-wiki-skill/workbench/web/tsconfig.node.json +24 -0
- package/skills/llm-wiki-skill/workbench/web/vite.config.ts +28 -0
package/lib/client.js
CHANGED
|
@@ -33,7 +33,7 @@ window.__ModuleLoader__.load({
|
|
|
33
33
|
module.exports = __toCommonJS(index_exports);
|
|
34
34
|
|
|
35
35
|
// client/KanbanTab.tsx
|
|
36
|
-
var
|
|
36
|
+
var import_react7 = require("react");
|
|
37
37
|
|
|
38
38
|
// src/domain/state-machine.ts
|
|
39
39
|
var TASK_TRANSITIONS = {
|
|
@@ -48,7 +48,8 @@ window.__ModuleLoader__.load({
|
|
|
48
48
|
};
|
|
49
49
|
var CHAIN_TRANSITIONS = {
|
|
50
50
|
planning: { "chain/executing": "executing" },
|
|
51
|
-
executing: { "chain/completed": "completed", "chain/aborted": "aborted" },
|
|
51
|
+
executing: { "chain/completed": "completed", "chain/aborted": "aborted", "chain/blocked": "blocked" },
|
|
52
|
+
blocked: {},
|
|
52
53
|
completed: {},
|
|
53
54
|
aborted: {}
|
|
54
55
|
};
|
|
@@ -76,7 +77,8 @@ window.__ModuleLoader__.load({
|
|
|
76
77
|
}
|
|
77
78
|
case "chain/executing":
|
|
78
79
|
case "chain/completed":
|
|
79
|
-
case "chain/aborted":
|
|
80
|
+
case "chain/aborted":
|
|
81
|
+
case "chain/blocked": {
|
|
80
82
|
const c = state.chains.get(ev.chainId);
|
|
81
83
|
if (!c) throw new Error("projection: unknown chain " + ev.chainId);
|
|
82
84
|
next.chains = new Map(state.chains).set(ev.chainId, { ...c, status: transitionChain(c.status, ev.kind) });
|
|
@@ -352,7 +354,7 @@ window.__ModuleLoader__.load({
|
|
|
352
354
|
}
|
|
353
355
|
|
|
354
356
|
// client/KanbanBoard.tsx
|
|
355
|
-
var
|
|
357
|
+
var import_react6 = require("react");
|
|
356
358
|
|
|
357
359
|
// client/workflow-model.ts
|
|
358
360
|
var CHAIN_FILTERS = ["executing", "blocked", "failed", "completed"];
|
|
@@ -364,7 +366,7 @@ window.__ModuleLoader__.load({
|
|
|
364
366
|
};
|
|
365
367
|
function chainFilterStateOf(chain, chainTasks) {
|
|
366
368
|
const archived = chain.status === "aborted" || chainTasks.length > 0 && chainTasks.every((t) => t.status === "archived");
|
|
367
|
-
const blocked = chainTasks.some((t) => t.status === "blocked");
|
|
369
|
+
const blocked = chain.status === "blocked" || chainTasks.some((t) => t.status === "blocked");
|
|
368
370
|
const failed = chainTasks.some((t) => t.status === "failed");
|
|
369
371
|
return {
|
|
370
372
|
executing: chain.status === "executing" && !blocked && !failed,
|
|
@@ -474,6 +476,7 @@ window.__ModuleLoader__.load({
|
|
|
474
476
|
return set;
|
|
475
477
|
}
|
|
476
478
|
function sortRankOf(chain, tasks) {
|
|
479
|
+
if (chain.status === "blocked") return 0;
|
|
477
480
|
if (tasks.some((t) => t.status === "blocked" || t.status === "failed")) return 0;
|
|
478
481
|
if (chain.status === "executing") return 1;
|
|
479
482
|
if (chain.status === "planning") return 2;
|
|
@@ -528,7 +531,38 @@ window.__ModuleLoader__.load({
|
|
|
528
531
|
}
|
|
529
532
|
|
|
530
533
|
// client/WorkflowRail.tsx
|
|
531
|
-
var
|
|
534
|
+
var import_react4 = require("react");
|
|
535
|
+
|
|
536
|
+
// client/session-bridge.ts
|
|
537
|
+
var import_react2 = require("react");
|
|
538
|
+
var service = null;
|
|
539
|
+
function setSessionsService(next) {
|
|
540
|
+
service = next;
|
|
541
|
+
}
|
|
542
|
+
var EMPTY = /* @__PURE__ */ new Set();
|
|
543
|
+
var cache = { source: void 0, ids: EMPTY };
|
|
544
|
+
function useSessionIds() {
|
|
545
|
+
return (0, import_react2.useSyncExternalStore)(
|
|
546
|
+
(onChange) => service?.list.subscribe(onChange) ?? (() => {
|
|
547
|
+
}),
|
|
548
|
+
() => {
|
|
549
|
+
if (!service) return EMPTY;
|
|
550
|
+
const snap = service.list.getSnapshot();
|
|
551
|
+
if (cache.source !== snap) {
|
|
552
|
+
const next = snap.ids;
|
|
553
|
+
const prev = cache.ids;
|
|
554
|
+
const same = prev.size === next.length && [...next].every((id) => prev.has(id));
|
|
555
|
+
cache = same ? { source: snap, ids: prev } : { source: snap, ids: new Set(next) };
|
|
556
|
+
}
|
|
557
|
+
return cache.ids;
|
|
558
|
+
},
|
|
559
|
+
() => EMPTY
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
function openSession(id) {
|
|
563
|
+
if (!service) throw new Error("sessions service unavailable");
|
|
564
|
+
service.open(id);
|
|
565
|
+
}
|
|
532
566
|
|
|
533
567
|
// client/BoardCard.tsx
|
|
534
568
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -536,6 +570,8 @@ window.__ModuleLoader__.load({
|
|
|
536
570
|
const { view } = props;
|
|
537
571
|
const { task } = view;
|
|
538
572
|
const blocked = view.lineState === "blocked" && view.dependencyLabel.length > 0;
|
|
573
|
+
const sessionIds = useSessionIds();
|
|
574
|
+
const sessionId = task.resumeSessionId ?? task.sessionId;
|
|
539
575
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
540
576
|
"div",
|
|
541
577
|
{
|
|
@@ -554,7 +590,26 @@ window.__ModuleLoader__.load({
|
|
|
554
590
|
children: [
|
|
555
591
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `dsh-kb-profile dsh-kb-profile--${task.assignee}`, children: task.assignee.toUpperCase() }),
|
|
556
592
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__title", children: task.title }),
|
|
557
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dsh-kb-task__status-row", children: [
|
|
594
|
+
sessionIds.has(sessionId) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
595
|
+
"button",
|
|
596
|
+
{
|
|
597
|
+
type: "button",
|
|
598
|
+
className: "dsh-kb-task__session",
|
|
599
|
+
onClick: (e) => {
|
|
600
|
+
e.stopPropagation();
|
|
601
|
+
openSession(sessionId);
|
|
602
|
+
props.onOpenView?.("chat", sessionId);
|
|
603
|
+
window.setTimeout(() => props.onOpenView?.("chat", sessionId), 500);
|
|
604
|
+
},
|
|
605
|
+
onKeyDown: (e) => {
|
|
606
|
+
e.stopPropagation();
|
|
607
|
+
},
|
|
608
|
+
children: "\u4F1A\u8BDD"
|
|
609
|
+
}
|
|
610
|
+
),
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-kb-task__status", children: view.statusLabel })
|
|
612
|
+
] }),
|
|
558
613
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dsh-kb-task__meta", children: [
|
|
559
614
|
view.phase,
|
|
560
615
|
" \xB7 ",
|
|
@@ -575,10 +630,10 @@ window.__ModuleLoader__.load({
|
|
|
575
630
|
}
|
|
576
631
|
|
|
577
632
|
// client/RenameModal.tsx
|
|
578
|
-
var
|
|
633
|
+
var import_react3 = require("react");
|
|
579
634
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
580
635
|
function RenameModal(props) {
|
|
581
|
-
const [value, setValue] = (0,
|
|
636
|
+
const [value, setValue] = (0, import_react3.useState)(props.initialValue);
|
|
582
637
|
const save = () => {
|
|
583
638
|
const next = value.trim();
|
|
584
639
|
if (next) props.onSave(next);
|
|
@@ -630,10 +685,10 @@ window.__ModuleLoader__.load({
|
|
|
630
685
|
function WorkflowRail(props) {
|
|
631
686
|
const searching = props.query.trim().length > 0;
|
|
632
687
|
const visible = props.chains.filter((view) => matches(view, props.query));
|
|
633
|
-
const [renamingChainId, setRenamingChainId] = (0,
|
|
688
|
+
const [renamingChainId, setRenamingChainId] = (0, import_react4.useState)(null);
|
|
634
689
|
const renamingChain = renamingChainId ? props.chains.find((v) => v.chain.id === renamingChainId)?.chain : void 0;
|
|
635
|
-
const [deletingChainId, setDeletingChainId] = (0,
|
|
636
|
-
const [deleteError, setDeleteError] = (0,
|
|
690
|
+
const [deletingChainId, setDeletingChainId] = (0, import_react4.useState)(null);
|
|
691
|
+
const [deleteError, setDeleteError] = (0, import_react4.useState)(null);
|
|
637
692
|
const deletingView = deletingChainId ? props.chains.find((v) => v.chain.id === deletingChainId) : void 0;
|
|
638
693
|
const confirmDelete = async () => {
|
|
639
694
|
if (!deletingChainId) return;
|
|
@@ -737,7 +792,7 @@ window.__ModuleLoader__.load({
|
|
|
737
792
|
] }),
|
|
738
793
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "dsh-kb-audit-confirm", onClick: () => props.onConfirmAudit?.(view.chain.id), children: "\u786E\u8BA4\u4EA7\u7269\u5F52\u5C5E" })
|
|
739
794
|
] }),
|
|
740
|
-
expanded && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dsh-kb-nodes", children: (matched.length > 0 ? matched : view.tasks).map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: `dsh-kb-node dsh-kb-node--${item.lineState}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoardCard, { view: item, onOpen: props.onOpenTask }) }, item.task.id)) })
|
|
795
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dsh-kb-nodes", children: (matched.length > 0 ? matched : view.tasks).map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { className: `dsh-kb-node dsh-kb-node--${item.lineState}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoardCard, { view: item, onOpen: props.onOpenTask, onOpenView: props.onOpenView }) }, item.task.id)) })
|
|
741
796
|
] }, view.chain.id);
|
|
742
797
|
}) }),
|
|
743
798
|
renamingChain && props.onRenameChain && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -787,7 +842,188 @@ window.__ModuleLoader__.load({
|
|
|
787
842
|
}
|
|
788
843
|
|
|
789
844
|
// client/TaskDrawer.tsx
|
|
790
|
-
var
|
|
845
|
+
var import_react5 = require("react");
|
|
846
|
+
|
|
847
|
+
// client/timeline-model.ts
|
|
848
|
+
var EXCEPTION_KINDS = /* @__PURE__ */ new Set([
|
|
849
|
+
"task/blocked",
|
|
850
|
+
"task/failed",
|
|
851
|
+
"task/gate-failed",
|
|
852
|
+
"review/failed",
|
|
853
|
+
"review/gave-up",
|
|
854
|
+
"chain/audit-warning",
|
|
855
|
+
"chain/aborted"
|
|
856
|
+
]);
|
|
857
|
+
var STATUS_OF = {
|
|
858
|
+
"chain/created": "neutral",
|
|
859
|
+
"chain/executing": "running",
|
|
860
|
+
"chain/completed": "success",
|
|
861
|
+
"chain/aborted": "exception",
|
|
862
|
+
"chain/blocked": "exception",
|
|
863
|
+
"chain/root-task-set": "neutral",
|
|
864
|
+
"chain/audit-warning": "exception",
|
|
865
|
+
"chain/audit-confirmed": "neutral",
|
|
866
|
+
"chain/title-updated": "neutral",
|
|
867
|
+
"spec-card/created": "neutral",
|
|
868
|
+
"spec-card/edited": "neutral",
|
|
869
|
+
"spec-card/approved": "success",
|
|
870
|
+
"task/created": "neutral",
|
|
871
|
+
"task/claimed": "running",
|
|
872
|
+
"task/heartbeat": "running",
|
|
873
|
+
"task/commented": "neutral",
|
|
874
|
+
"task/completed": "success",
|
|
875
|
+
"task/blocked": "exception",
|
|
876
|
+
"task/unblocked": "neutral",
|
|
877
|
+
"task/archived": "neutral",
|
|
878
|
+
"task/failed": "exception",
|
|
879
|
+
"task/gate-passed": "success",
|
|
880
|
+
// P1 实测闸
|
|
881
|
+
"task/gate-failed": "exception",
|
|
882
|
+
"task/renamed": "neutral",
|
|
883
|
+
"review/passed": "success",
|
|
884
|
+
"review/failed": "exception",
|
|
885
|
+
"review/gave-up": "exception"
|
|
886
|
+
};
|
|
887
|
+
function timelineStatusOf(kind) {
|
|
888
|
+
return STATUS_OF[kind] ?? "neutral";
|
|
889
|
+
}
|
|
890
|
+
var KIND_LABEL = {
|
|
891
|
+
"chain/created": "\u94FE\u8DEF\u521B\u5EFA",
|
|
892
|
+
"chain/executing": "\u94FE\u8DEF\u5F00\u59CB\u6267\u884C",
|
|
893
|
+
"chain/completed": "\u94FE\u8DEF\u5B8C\u6210",
|
|
894
|
+
"chain/aborted": "\u94FE\u8DEF\u4E2D\u6B62",
|
|
895
|
+
"chain/blocked": "\u94FE\u8DEF\u963B\u585E",
|
|
896
|
+
"chain/root-task-set": "\u8BBE\u4E3A\u6839\u4EFB\u52A1",
|
|
897
|
+
"chain/audit-warning": "\u8D8A\u6743\u8B66\u544A",
|
|
898
|
+
"chain/audit-confirmed": "\u8D8A\u6743\u5DF2\u786E\u8BA4",
|
|
899
|
+
"chain/title-updated": "\u94FE\u8DEF\u6539\u540D",
|
|
900
|
+
"spec-card/created": "\u89C4\u683C\u5361\u521B\u5EFA",
|
|
901
|
+
"spec-card/edited": "\u89C4\u683C\u5361\u7F16\u8F91",
|
|
902
|
+
"spec-card/approved": "\u89C4\u683C\u5361\u6279\u51C6",
|
|
903
|
+
"task/created": "\u4EFB\u52A1\u521B\u5EFA",
|
|
904
|
+
"task/claimed": "\u4EFB\u52A1\u8BA4\u9886",
|
|
905
|
+
"task/heartbeat": "\u4EFB\u52A1\u5FC3\u8DF3",
|
|
906
|
+
"task/commented": "\u8BC4\u8BBA",
|
|
907
|
+
"task/completed": "\u4EFB\u52A1\u5B8C\u6210",
|
|
908
|
+
"task/blocked": "\u4EFB\u52A1\u963B\u585E",
|
|
909
|
+
"task/unblocked": "\u89E3\u9664\u963B\u585E",
|
|
910
|
+
"task/archived": "\u4EFB\u52A1\u5F52\u6863",
|
|
911
|
+
"task/failed": "\u4EFB\u52A1\u5931\u8D25",
|
|
912
|
+
"task/gate-passed": "\u5B9E\u6D4B\u95F8\u901A\u8FC7",
|
|
913
|
+
// P1 实测闸
|
|
914
|
+
"task/gate-failed": "\u5B9E\u6D4B\u95F8\u5931\u8D25",
|
|
915
|
+
"task/renamed": "\u4EFB\u52A1\u6539\u540D",
|
|
916
|
+
"review/passed": "\u8BC4\u5BA1\u901A\u8FC7",
|
|
917
|
+
"review/failed": "\u8BC4\u5BA1\u9A73\u56DE",
|
|
918
|
+
"review/gave-up": "\u8BC4\u5BA1\u8D85\u9650\u653E\u5F03"
|
|
919
|
+
};
|
|
920
|
+
var AUTHOR_NAME = {
|
|
921
|
+
v: "orchestrator",
|
|
922
|
+
p: "planner",
|
|
923
|
+
w: "wiki-bridge",
|
|
924
|
+
d: "fullstack-dev",
|
|
925
|
+
pt: "plan-review",
|
|
926
|
+
dt: "impl-review",
|
|
927
|
+
system: "\u7CFB\u7EDF",
|
|
928
|
+
human: "\u4F60"
|
|
929
|
+
};
|
|
930
|
+
function eventLabelOf(kind) {
|
|
931
|
+
return KIND_LABEL[kind] ?? kind;
|
|
932
|
+
}
|
|
933
|
+
function isExceptionEvent(e) {
|
|
934
|
+
return EXCEPTION_KINDS.has(e.kind);
|
|
935
|
+
}
|
|
936
|
+
function authorNameOf(author) {
|
|
937
|
+
return AUTHOR_NAME[author] ?? author;
|
|
938
|
+
}
|
|
939
|
+
function asRecord(value) {
|
|
940
|
+
return typeof value === "object" && value !== null ? value : {};
|
|
941
|
+
}
|
|
942
|
+
function strField(rec, key) {
|
|
943
|
+
const v = rec[key];
|
|
944
|
+
return typeof v === "string" ? v : "";
|
|
945
|
+
}
|
|
946
|
+
function truncate(text, max = 120) {
|
|
947
|
+
return text.length <= max ? text : `${text.slice(0, max)}\u2026`;
|
|
948
|
+
}
|
|
949
|
+
function eventSummary(e) {
|
|
950
|
+
const payload = asRecord(e.payload);
|
|
951
|
+
switch (e.kind) {
|
|
952
|
+
case "task/completed": {
|
|
953
|
+
const summary = truncate(strField(payload, "summary"));
|
|
954
|
+
return summary;
|
|
955
|
+
}
|
|
956
|
+
case "task/blocked":
|
|
957
|
+
case "task/failed":
|
|
958
|
+
return truncate(strField(payload, "reason"));
|
|
959
|
+
case "task/gate-passed":
|
|
960
|
+
case "task/gate-failed":
|
|
961
|
+
return truncate(strField(payload, "detail"));
|
|
962
|
+
case "task/commented":
|
|
963
|
+
return truncate(strField(payload, "body"));
|
|
964
|
+
case "task/renamed":
|
|
965
|
+
case "chain/title-updated": {
|
|
966
|
+
const from = strField(payload, "from");
|
|
967
|
+
const to = strField(payload, "to");
|
|
968
|
+
return from || to ? `${from} \u2192 ${to}` : "";
|
|
969
|
+
}
|
|
970
|
+
case "review/passed":
|
|
971
|
+
case "review/failed":
|
|
972
|
+
case "review/gave-up": {
|
|
973
|
+
const evidence = asRecord(payload["evidence"]);
|
|
974
|
+
const verdict = strField(evidence, "verdict") || strField(payload, "verdict");
|
|
975
|
+
const issues = Array.isArray(evidence["issues"]) ? evidence["issues"].length : void 0;
|
|
976
|
+
const parts = [];
|
|
977
|
+
if (verdict) parts.push(`verdict: ${verdict}`);
|
|
978
|
+
if (issues !== void 0) parts.push(`issues: ${issues}`);
|
|
979
|
+
const reason = strField(payload, "reason");
|
|
980
|
+
if (reason) parts.push(reason);
|
|
981
|
+
return truncate(parts.join(" \xB7 "));
|
|
982
|
+
}
|
|
983
|
+
default:
|
|
984
|
+
return "";
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
function foldTimeline(events) {
|
|
988
|
+
const sorted = [...events].sort((a, b) => b.seq - a.seq);
|
|
989
|
+
const items = [];
|
|
990
|
+
for (const e of sorted) {
|
|
991
|
+
if (e.kind !== "task/heartbeat") {
|
|
992
|
+
items.push({
|
|
993
|
+
seq: e.seq,
|
|
994
|
+
kind: e.kind,
|
|
995
|
+
label: eventLabelOf(e.kind),
|
|
996
|
+
author: authorNameOf(e.author),
|
|
997
|
+
at: e.at,
|
|
998
|
+
summary: eventSummary(e),
|
|
999
|
+
exception: isExceptionEvent(e),
|
|
1000
|
+
status: timelineStatusOf(e.kind)
|
|
1001
|
+
});
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
const prev = items[items.length - 1];
|
|
1005
|
+
if (prev && prev.kind === "task/heartbeat") {
|
|
1006
|
+
prev.count = (prev.count ?? 1) + 1;
|
|
1007
|
+
prev.lastAt = e.at;
|
|
1008
|
+
} else {
|
|
1009
|
+
items.push({
|
|
1010
|
+
seq: e.seq,
|
|
1011
|
+
kind: e.kind,
|
|
1012
|
+
label: eventLabelOf(e.kind),
|
|
1013
|
+
author: authorNameOf(e.author),
|
|
1014
|
+
at: e.at,
|
|
1015
|
+
lastAt: e.at,
|
|
1016
|
+
count: 1,
|
|
1017
|
+
summary: "",
|
|
1018
|
+
exception: false,
|
|
1019
|
+
status: timelineStatusOf(e.kind)
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return items;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
// client/TaskDrawer.tsx
|
|
791
1027
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
792
1028
|
var ROLE_NAME = {
|
|
793
1029
|
v: "orchestrator",
|
|
@@ -814,8 +1050,8 @@ window.__ModuleLoader__.load({
|
|
|
814
1050
|
}
|
|
815
1051
|
function TaskDrawer(props) {
|
|
816
1052
|
const { task, events, handoff, specCard, chain } = props;
|
|
817
|
-
const [tab, setTab] = (0,
|
|
818
|
-
const [pending, setPending] = (0,
|
|
1053
|
+
const [tab, setTab] = (0, import_react5.useState)("overview");
|
|
1054
|
+
const [pending, setPending] = (0, import_react5.useState)(null);
|
|
819
1055
|
const timeline = events.filter((e) => e.taskId === task.id).toSorted((a, b) => a.seq - b.seq);
|
|
820
1056
|
const comments = timeline.filter((e) => e.kind === "task/commented");
|
|
821
1057
|
const submitComment = (el) => {
|
|
@@ -830,13 +1066,6 @@ window.__ModuleLoader__.load({
|
|
|
830
1066
|
window.setTimeout(() => setPending((current) => current?.kind === "archive" ? null : current), 3e3);
|
|
831
1067
|
}
|
|
832
1068
|
};
|
|
833
|
-
const submitPayload = (kind) => {
|
|
834
|
-
if (pending?.kind !== kind || !pending.value.trim()) return;
|
|
835
|
-
const value = pending.value;
|
|
836
|
-
setPending(null);
|
|
837
|
-
if (kind === "block") props.onAction({ type: "block", taskId: task.id, reason: value });
|
|
838
|
-
else props.onAction({ type: "complete", taskId: task.id, summary: value });
|
|
839
|
-
};
|
|
840
1069
|
const submitArchive = () => {
|
|
841
1070
|
if (pending?.kind !== "archive") return;
|
|
842
1071
|
setPending(null);
|
|
@@ -861,21 +1090,9 @@ window.__ModuleLoader__.load({
|
|
|
861
1090
|
" \u6761\u65B0\u66F4\u65B0"
|
|
862
1091
|
] }) : null,
|
|
863
1092
|
!props.readOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-detail__actions", children: [
|
|
864
|
-
task.status === "running" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => arm("complete"), children: "\u5B8C\u6210" }),
|
|
865
|
-
task.status === "running" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => arm("block"), children: "\u963B\u585E" }),
|
|
866
1093
|
task.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => props.onAction({ type: "unblock", taskId: task.id }), children: "\u89E3\u9664\u963B\u585E" }),
|
|
867
1094
|
task.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => props.onAction({ type: "retry", taskId: task.id }), children: "\u91CD\u8BD5" }),
|
|
868
|
-
["done", "failed", "blocked"].includes(task.status) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "data-confirming": pending?.kind === "archive" || void 0, onClick: pending?.kind === "archive" ? submitArchive : () => arm("archive"), children: pending?.kind === "archive" ? "\u786E\u8BA4\u5F52\u6863" : "\u5F52\u6863" })
|
|
869
|
-
pending?.kind === "complete" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "dsh-kb-action-form", children: [
|
|
870
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { "aria-label": "\u4EA4\u63A5\u6458\u8981", value: pending.value, onChange: (e) => setPending({ kind: "complete", value: e.target.value }), placeholder: "\u4EA4\u63A5\u6458\u8981" }),
|
|
871
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", disabled: !pending.value.trim(), onClick: () => submitPayload("complete"), children: "\u786E\u8BA4\u5B8C\u6210" }),
|
|
872
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => setPending(null), children: "\u53D6\u6D88" })
|
|
873
|
-
] }),
|
|
874
|
-
pending?.kind === "block" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "dsh-kb-action-form", children: [
|
|
875
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", { "aria-label": "\u963B\u585E\u539F\u56E0", value: pending.value, onChange: (e) => setPending({ kind: "block", value: e.target.value }), placeholder: "\u963B\u585E\u539F\u56E0" }),
|
|
876
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", disabled: !pending.value.trim(), onClick: () => submitPayload("block"), children: "\u786E\u8BA4\u963B\u585E" }),
|
|
877
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", onClick: () => setPending(null), children: "\u53D6\u6D88" })
|
|
878
|
-
] })
|
|
1095
|
+
["done", "failed", "blocked"].includes(task.status) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "data-confirming": pending?.kind === "archive" || void 0, onClick: pending?.kind === "archive" ? submitArchive : () => arm("archive"), children: pending?.kind === "archive" ? "\u786E\u8BA4\u5F52\u6863" : "\u5F52\u6863" })
|
|
879
1096
|
] })
|
|
880
1097
|
] }),
|
|
881
1098
|
props.actionError?.taskId === task.id && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-action-error", role: "alert", children: [
|
|
@@ -921,17 +1138,28 @@ window.__ModuleLoader__.load({
|
|
|
921
1138
|
] }),
|
|
922
1139
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: task.body || "\u65E0\u9644\u52A0\u4EFB\u52A1\u63CF\u8FF0" })
|
|
923
1140
|
] }),
|
|
924
|
-
tab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("section", { role: "tabpanel", children:
|
|
925
|
-
|
|
926
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
927
|
-
"
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1141
|
+
tab === "timeline" && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("section", { role: "tabpanel", children: (() => {
|
|
1142
|
+
const items = foldTimeline(timeline);
|
|
1143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ol", { className: "dsh-kb-timeline", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1144
|
+
"li",
|
|
1145
|
+
{
|
|
1146
|
+
className: `dsh-kb-timeline__item dsh-kb-timeline__item--${item.status}${i === 0 ? " dsh-kb-timeline__item--latest" : ""}`,
|
|
1147
|
+
"data-exception": item.exception || void 0,
|
|
1148
|
+
children: [
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dsh-kb-timeline__axis", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "dsh-kb-timeline__dot", "aria-hidden": "true" }) }),
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-timeline__body", children: [
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "dsh-kb-timeline__row", children: [
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { className: "dsh-kb-timeline__label", children: item.count ? `${item.label}\uFF08${item.count} \u6B21\uFF09` : item.label }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("time", { dateTime: new Date(item.at).toISOString(), children: formatTime(item.at) })
|
|
1154
|
+
] }),
|
|
1155
|
+
item.summary && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "dsh-kb-timeline__summary", title: item.summary, children: item.summary }),
|
|
1156
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "dsh-kb-timeline__author", children: item.author })
|
|
1157
|
+
] })
|
|
1158
|
+
]
|
|
1159
|
+
},
|
|
1160
|
+
item.seq
|
|
1161
|
+
)) });
|
|
1162
|
+
})() }),
|
|
935
1163
|
tab === "handoff" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { role: "tabpanel", children: [
|
|
936
1164
|
props.parentTasks && props.parentTasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
937
1165
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h4", { children: "\u7236\u4EFB\u52A1\u539F\u6587" }),
|
|
@@ -1005,17 +1233,17 @@ window.__ModuleLoader__.load({
|
|
|
1005
1233
|
}
|
|
1006
1234
|
function KanbanBoard(props) {
|
|
1007
1235
|
const { board } = props.snapshot;
|
|
1008
|
-
const [collapsed, setCollapsed] = (0,
|
|
1009
|
-
const [query, setQuery] = (0,
|
|
1010
|
-
const [statusFilter, setStatusFilter] = (0,
|
|
1011
|
-
const [selectedId, setSelectedId] = (0,
|
|
1012
|
-
const [failedAction, setFailedAction] = (0,
|
|
1013
|
-
const listRef = (0,
|
|
1014
|
-
const saved = (0,
|
|
1015
|
-
const snapshotRef = (0,
|
|
1236
|
+
const [collapsed, setCollapsed] = (0, import_react6.useState)(() => defaultCollapsed());
|
|
1237
|
+
const [query, setQuery] = (0, import_react6.useState)("");
|
|
1238
|
+
const [statusFilter, setStatusFilter] = (0, import_react6.useState)(/* @__PURE__ */ new Set());
|
|
1239
|
+
const [selectedId, setSelectedId] = (0, import_react6.useState)(() => history.state?.kanbanTaskId ?? null);
|
|
1240
|
+
const [failedAction, setFailedAction] = (0, import_react6.useState)(null);
|
|
1241
|
+
const listRef = (0, import_react6.useRef)(null);
|
|
1242
|
+
const saved = (0, import_react6.useRef)({ collapsed: [], scrollTop: 0 });
|
|
1243
|
+
const snapshotRef = (0, import_react6.useRef)(props.snapshot);
|
|
1016
1244
|
snapshotRef.current = props.snapshot;
|
|
1017
|
-
const detailOpenedSeq = (0,
|
|
1018
|
-
(0,
|
|
1245
|
+
const detailOpenedSeq = (0, import_react6.useRef)(null);
|
|
1246
|
+
(0, import_react6.useEffect)(() => {
|
|
1019
1247
|
const onPop = () => {
|
|
1020
1248
|
const id = history.state?.kanbanTaskId ?? null;
|
|
1021
1249
|
detailOpenedSeq.current = id ? snapshotRef.current.lastSeq : null;
|
|
@@ -1030,14 +1258,14 @@ window.__ModuleLoader__.load({
|
|
|
1030
1258
|
window.addEventListener("popstate", onPop);
|
|
1031
1259
|
return () => window.removeEventListener("popstate", onPop);
|
|
1032
1260
|
}, []);
|
|
1033
|
-
(0,
|
|
1261
|
+
(0, import_react6.useEffect)(() => {
|
|
1034
1262
|
const onKey = (e) => {
|
|
1035
1263
|
if (e.key === "Escape" && selectedId) history.back();
|
|
1036
1264
|
};
|
|
1037
1265
|
window.addEventListener("keydown", onKey);
|
|
1038
1266
|
return () => window.removeEventListener("keydown", onKey);
|
|
1039
1267
|
}, [selectedId]);
|
|
1040
|
-
const views = (0,
|
|
1268
|
+
const views = (0, import_react6.useMemo)(
|
|
1041
1269
|
() => board ? deriveWorkflowBoard(board, { selectedTaskId: selectedId, now: Date.now(), statusFilter }) : [],
|
|
1042
1270
|
[board, selectedId, statusFilter]
|
|
1043
1271
|
);
|
|
@@ -1130,6 +1358,7 @@ window.__ModuleLoader__.load({
|
|
|
1130
1358
|
onToggleFilter: toggleFilter,
|
|
1131
1359
|
onToggleChain: toggleChain,
|
|
1132
1360
|
onOpenTask: openTask,
|
|
1361
|
+
onOpenView: props.onOpenView,
|
|
1133
1362
|
onConfirmAudit: (chainId) => void runAction({ type: "confirm-audit", chainId }),
|
|
1134
1363
|
onRenameChain: (chainId, title) => void runAction({ type: "rename", chainId, title }),
|
|
1135
1364
|
onDeleteChain: async (chainId) => {
|
|
@@ -1156,9 +1385,9 @@ window.__ModuleLoader__.load({
|
|
|
1156
1385
|
// client/KanbanTab.tsx
|
|
1157
1386
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1158
1387
|
function KanbanTab(props = {}) {
|
|
1159
|
-
const own = (0,
|
|
1388
|
+
const own = (0, import_react7.useMemo)(() => props.store ?? createBoardStore(), [props.store]);
|
|
1160
1389
|
const snapshot = useKanbanBoard(own);
|
|
1161
|
-
(0,
|
|
1390
|
+
(0, import_react7.useEffect)(() => {
|
|
1162
1391
|
if (props.store) return;
|
|
1163
1392
|
void own.start();
|
|
1164
1393
|
return () => {
|
|
@@ -1167,18 +1396,258 @@ window.__ModuleLoader__.load({
|
|
|
1167
1396
|
}, [own, props.store]);
|
|
1168
1397
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "dsh-kb-tab", role: "region", "aria-label": "\u770B\u677F", children: [
|
|
1169
1398
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ConnectionBanner, { connection: snapshot.connection, lastSuccessAt: snapshot.lastSuccessAt, onRetry: () => void own.retry() }),
|
|
1170
|
-
snapshot.board ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(KanbanBoard, { snapshot, postAction: (action) => own.postAction(action), onResync: () => own.retry() }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "dsh-kb-loading", children: "\u52A0\u8F7D\u770B\u677F\u2026" })
|
|
1399
|
+
snapshot.board ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(KanbanBoard, { snapshot, onOpenView: props.openView, postAction: (action) => own.postAction(action), onResync: () => own.retry() }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "dsh-kb-loading", children: "\u52A0\u8F7D\u770B\u677F\u2026" })
|
|
1400
|
+
] });
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
// client/ConfigSection.tsx
|
|
1404
|
+
var import_react9 = require("react");
|
|
1405
|
+
|
|
1406
|
+
// client/config-store.ts
|
|
1407
|
+
var SWARM_CONFIG_NS = "swarm-config";
|
|
1408
|
+
function createConfigStore(fetchImpl) {
|
|
1409
|
+
let state = { effective: { wikiVault: { baseUrl: "", pagePrefix: "" }, roles: { models: {} } }, sources: {}, catalog: { providers: [], models: {} }, saving: false, error: null };
|
|
1410
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1411
|
+
const setState = (patch) => {
|
|
1412
|
+
state = { ...state, ...patch };
|
|
1413
|
+
for (const l of [...listeners]) l();
|
|
1414
|
+
};
|
|
1415
|
+
const get = () => state;
|
|
1416
|
+
const subscribe = (listener) => {
|
|
1417
|
+
listeners.add(listener);
|
|
1418
|
+
return () => {
|
|
1419
|
+
listeners.delete(listener);
|
|
1420
|
+
};
|
|
1421
|
+
};
|
|
1422
|
+
const load = async () => {
|
|
1423
|
+
const [cfg, cat] = await Promise.all([
|
|
1424
|
+
fetchImpl("/kanban/config").then((r) => r.json()),
|
|
1425
|
+
fetchImpl("/kanban/llm-catalog").then((r) => r.json())
|
|
1426
|
+
]);
|
|
1427
|
+
setState({ effective: cfg.effective, sources: cfg.sources, catalog: cat });
|
|
1428
|
+
};
|
|
1429
|
+
const save = async (snap) => {
|
|
1430
|
+
setState({ saving: true, error: null });
|
|
1431
|
+
try {
|
|
1432
|
+
const r = await fetchImpl("/kanban/config", {
|
|
1433
|
+
method: "PUT",
|
|
1434
|
+
headers: { "Content-Type": "application/json" },
|
|
1435
|
+
body: JSON.stringify(snap)
|
|
1436
|
+
});
|
|
1437
|
+
const d = await r.json();
|
|
1438
|
+
if (!r.ok) {
|
|
1439
|
+
setState({ error: (d.fields ?? []).join(", ") || "save failed" });
|
|
1440
|
+
return false;
|
|
1441
|
+
}
|
|
1442
|
+
setState({ effective: d.effective, sources: d.sources });
|
|
1443
|
+
return true;
|
|
1444
|
+
} catch (e) {
|
|
1445
|
+
setState({ error: String(e) });
|
|
1446
|
+
return false;
|
|
1447
|
+
} finally {
|
|
1448
|
+
setState({ saving: false });
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
const reset = async () => {
|
|
1452
|
+
const r = await fetchImpl("/kanban/config/reset", { method: "POST" }).then((x) => x.json());
|
|
1453
|
+
setState({ effective: r.effective, sources: r.sources });
|
|
1454
|
+
return r;
|
|
1455
|
+
};
|
|
1456
|
+
return { get, subscribe, load, save, reset };
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// client/ConfigSelect.tsx
|
|
1460
|
+
var import_react8 = require("react");
|
|
1461
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1462
|
+
function ConfigSelect({ value, options, placeholder, onChange, onCommit }) {
|
|
1463
|
+
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
1464
|
+
const rootRef = (0, import_react8.useRef)(null);
|
|
1465
|
+
(0, import_react8.useEffect)(() => {
|
|
1466
|
+
if (!open) return;
|
|
1467
|
+
const onDocDown = (e) => {
|
|
1468
|
+
if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
|
|
1469
|
+
};
|
|
1470
|
+
const onKey = (e) => {
|
|
1471
|
+
if (e.key === "Escape") setOpen(false);
|
|
1472
|
+
};
|
|
1473
|
+
document.addEventListener("mousedown", onDocDown);
|
|
1474
|
+
document.addEventListener("keydown", onKey);
|
|
1475
|
+
return () => {
|
|
1476
|
+
document.removeEventListener("mousedown", onDocDown);
|
|
1477
|
+
document.removeEventListener("keydown", onKey);
|
|
1478
|
+
};
|
|
1479
|
+
}, [open]);
|
|
1480
|
+
const current = options.find((o) => o.value === value);
|
|
1481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "dsh-kb-config__select", ref: rootRef, children: [
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1483
|
+
"button",
|
|
1484
|
+
{
|
|
1485
|
+
type: "button",
|
|
1486
|
+
className: "dsh-kb-config__select-trigger",
|
|
1487
|
+
"aria-haspopup": "listbox",
|
|
1488
|
+
"aria-expanded": open,
|
|
1489
|
+
onClick: () => setOpen((v) => !v),
|
|
1490
|
+
children: [
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: current ? void 0 : "dsh-kb-config__select-placeholder", children: current?.label ?? placeholder }),
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "dsh-kb-config__select-chevron", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 16 16", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1493
|
+
"path",
|
|
1494
|
+
{
|
|
1495
|
+
d: "M6 3.5 10.5 8 6 12.5",
|
|
1496
|
+
fill: "none",
|
|
1497
|
+
stroke: "currentColor",
|
|
1498
|
+
strokeWidth: "1.5",
|
|
1499
|
+
strokeLinecap: "round",
|
|
1500
|
+
strokeLinejoin: "round"
|
|
1501
|
+
}
|
|
1502
|
+
) }) })
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
),
|
|
1506
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { className: "dsh-kb-config__menu", role: "listbox", children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1507
|
+
"button",
|
|
1508
|
+
{
|
|
1509
|
+
type: "button",
|
|
1510
|
+
role: "option",
|
|
1511
|
+
"aria-selected": o.value === value,
|
|
1512
|
+
className: "dsh-kb-config__option",
|
|
1513
|
+
"data-selected": o.value === value || void 0,
|
|
1514
|
+
onClick: () => {
|
|
1515
|
+
onChange(o.value);
|
|
1516
|
+
setOpen(false);
|
|
1517
|
+
onCommit?.();
|
|
1518
|
+
},
|
|
1519
|
+
children: [
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: o.label }),
|
|
1521
|
+
o.value === value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "dsh-kb-config__option-check", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1522
|
+
"path",
|
|
1523
|
+
{
|
|
1524
|
+
d: "M3 8.5 6.5 12 13 4.5",
|
|
1525
|
+
fill: "none",
|
|
1526
|
+
stroke: "currentColor",
|
|
1527
|
+
strokeWidth: "1.5",
|
|
1528
|
+
strokeLinecap: "round",
|
|
1529
|
+
strokeLinejoin: "round"
|
|
1530
|
+
}
|
|
1531
|
+
) }) })
|
|
1532
|
+
]
|
|
1533
|
+
}
|
|
1534
|
+
) }, o.value || "__empty__")) })
|
|
1535
|
+
] });
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
// client/ConfigSection.tsx
|
|
1539
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1540
|
+
var ROLES = ["v", "p", "w", "d", "pt", "dt"];
|
|
1541
|
+
function ConfigSection({ fetchImpl, close }) {
|
|
1542
|
+
const storeRef = (0, import_react9.useRef)(null);
|
|
1543
|
+
if (!storeRef.current) storeRef.current = createConfigStore(fetchImpl ?? ((...args) => fetch(...args)));
|
|
1544
|
+
const store = storeRef.current;
|
|
1545
|
+
const state = (0, import_react9.useSyncExternalStore)(store.subscribe, store.get);
|
|
1546
|
+
const [draft, setDraft] = (0, import_react9.useState)(null);
|
|
1547
|
+
(0, import_react9.useEffect)(() => {
|
|
1548
|
+
void store.load().then(() => setDraft(store.get().effective));
|
|
1549
|
+
}, [store]);
|
|
1550
|
+
if (!draft) return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config", children: "\u52A0\u8F7D\u4E2D\u2026" });
|
|
1551
|
+
const commit = (next) => {
|
|
1552
|
+
setDraft(next);
|
|
1553
|
+
void store.save(next);
|
|
1554
|
+
};
|
|
1555
|
+
const setModel = (r, patch) => {
|
|
1556
|
+
const prev = draft.roles.models[r] ?? { provider: "", model: "", reasoningEffort: "" };
|
|
1557
|
+
commit({ ...draft, roles: { models: { ...draft.roles.models, [r]: { ...prev, ...patch } } } });
|
|
1558
|
+
};
|
|
1559
|
+
const onBlur = () => {
|
|
1560
|
+
void store.save(draft);
|
|
1561
|
+
};
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config", children: [
|
|
1563
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u77E5\u8BC6\u5E93" }),
|
|
1565
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "baseUrl" }),
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1567
|
+
"input",
|
|
1568
|
+
{
|
|
1569
|
+
value: draft.wikiVault.baseUrl,
|
|
1570
|
+
onBlur,
|
|
1571
|
+
onChange: (e) => setDraft({ ...draft, wikiVault: { ...draft.wikiVault, baseUrl: e.target.value } })
|
|
1572
|
+
}
|
|
1573
|
+
),
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "llm-wiki \u77E5\u8BC6\u5E93\u5916\u94FE HTTP \u5730\u5740\uFF08\u5982 http://192.168.122.111:3000\uFF09\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u672C\u5730 llm-wiki \u515C\u5E95" }),
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "dsh-kb-config__label", children: "pagePrefix" }),
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1577
|
+
"input",
|
|
1578
|
+
{
|
|
1579
|
+
value: draft.wikiVault.pagePrefix,
|
|
1580
|
+
onBlur,
|
|
1581
|
+
onChange: (e) => setDraft({ ...draft, wikiVault: { ...draft.wikiVault, pagePrefix: e.target.value } })
|
|
1582
|
+
}
|
|
1583
|
+
),
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__help", children: "llm-wiki \u9875\u9762\u8DEF\u5F84\u524D\u7F00\uFF08\u5982 projects/\uFF09" })
|
|
1585
|
+
] }),
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "dsh-kb-config__card", children: [
|
|
1587
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "\u6A21\u578B\u94FE" }),
|
|
1588
|
+
ROLES.map((r) => {
|
|
1589
|
+
const m = draft.roles.models[r] ?? { provider: "", model: "", reasoningEffort: "" };
|
|
1590
|
+
const providerModels = state.catalog.models[m.provider] ?? [];
|
|
1591
|
+
const efforts = providerModels.find((x) => x.id === m.model)?.efforts ?? [];
|
|
1592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "dsh-kb-config__role", children: [
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { children: r }),
|
|
1594
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1595
|
+
ConfigSelect,
|
|
1596
|
+
{
|
|
1597
|
+
value: m.provider,
|
|
1598
|
+
placeholder: "\u9009\u62E9 provider",
|
|
1599
|
+
options: state.catalog.providers.map((p) => ({ value: p.id, label: p.name })),
|
|
1600
|
+
onChange: (v) => {
|
|
1601
|
+
if (v !== m.provider) setModel(r, { provider: v, model: "", reasoningEffort: "" });
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
),
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1606
|
+
ConfigSelect,
|
|
1607
|
+
{
|
|
1608
|
+
value: m.model,
|
|
1609
|
+
placeholder: "\u9009\u62E9\u6A21\u578B",
|
|
1610
|
+
options: providerModels.map((x) => ({ value: x.id, label: x.name })),
|
|
1611
|
+
onChange: (v) => {
|
|
1612
|
+
if (v !== m.model) setModel(r, { model: v, reasoningEffort: "" });
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
),
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1617
|
+
ConfigSelect,
|
|
1618
|
+
{
|
|
1619
|
+
value: m.reasoningEffort,
|
|
1620
|
+
placeholder: "\u8DDF\u968F\u9ED8\u8BA4",
|
|
1621
|
+
options: efforts.map((x) => ({ value: x.id, label: x.name })),
|
|
1622
|
+
onChange: (v) => {
|
|
1623
|
+
if (v !== m.reasoningEffort) setModel(r, { reasoningEffort: v });
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
),
|
|
1627
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "dsh-kb-config__src", children: state.sources[`roles.models.${r}.model`] === "override" ? "\u5DF2\u8986\u76D6" : "\u7EE7\u627F" })
|
|
1628
|
+
] }, r);
|
|
1629
|
+
})
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__footer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { onClick: () => {
|
|
1632
|
+
void store.reset().then((r) => setDraft(r.effective));
|
|
1633
|
+
}, children: "\u91CD\u7F6E" }) }),
|
|
1634
|
+
state.error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "dsh-kb-config__error", children: state.error })
|
|
1171
1635
|
] });
|
|
1172
1636
|
}
|
|
1173
1637
|
|
|
1174
1638
|
// client/kanban.css
|
|
1175
|
-
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 min-width: 715px; /* \u770B\u677F\u6700\u5C0F\u5BBD\u5EA6 */\n max-width: 780px; /* \u770B\u677F\u6700\u5927\u5BBD\u5EA6 */\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.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-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";
|
|
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";
|
|
1640
|
+
|
|
1641
|
+
// client/config.css
|
|
1642
|
+
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";
|
|
1176
1643
|
|
|
1177
1644
|
// client/index.ts
|
|
1178
1645
|
var name = "kanban-board";
|
|
1179
|
-
var inject = ["slots"];
|
|
1646
|
+
var inject = ["slots", "sessions"];
|
|
1180
1647
|
function apply(ctx) {
|
|
1648
|
+
setSessionsService(ctx.sessions);
|
|
1181
1649
|
let style = null;
|
|
1650
|
+
let configStyle = null;
|
|
1182
1651
|
if (typeof document !== "undefined") {
|
|
1183
1652
|
style = document.head.querySelector("style[data-dsh-swarm]");
|
|
1184
1653
|
if (!style) {
|
|
@@ -1187,6 +1656,13 @@ window.__ModuleLoader__.load({
|
|
|
1187
1656
|
style.textContent = kanban_default;
|
|
1188
1657
|
document.head.appendChild(style);
|
|
1189
1658
|
}
|
|
1659
|
+
configStyle = document.head.querySelector("style[data-dsh-swarm-config]");
|
|
1660
|
+
if (!configStyle) {
|
|
1661
|
+
configStyle = document.createElement("style");
|
|
1662
|
+
configStyle.setAttribute("data-dsh-swarm-config", "");
|
|
1663
|
+
configStyle.textContent = config_default;
|
|
1664
|
+
document.head.appendChild(configStyle);
|
|
1665
|
+
}
|
|
1190
1666
|
}
|
|
1191
1667
|
ctx.slots.inject(
|
|
1192
1668
|
"conversation.view",
|
|
@@ -1195,8 +1671,17 @@ window.__ModuleLoader__.load({
|
|
|
1195
1671
|
KanbanTab
|
|
1196
1672
|
)
|
|
1197
1673
|
);
|
|
1674
|
+
ctx.slots.inject(
|
|
1675
|
+
"settings.section",
|
|
1676
|
+
() => ctx.slots.register(
|
|
1677
|
+
{ name: "settings.section", id: SWARM_CONFIG_NS, order: 30, label: "Swarm \u914D\u7F6E" },
|
|
1678
|
+
ConfigSection
|
|
1679
|
+
)
|
|
1680
|
+
);
|
|
1198
1681
|
return () => {
|
|
1199
1682
|
if (style) style.remove();
|
|
1683
|
+
if (configStyle) configStyle.remove();
|
|
1684
|
+
setSessionsService(null);
|
|
1200
1685
|
};
|
|
1201
1686
|
}
|
|
1202
1687
|
|