dsh-project-tasks 0.1.0 → 0.1.3
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 +54 -18
- package/README.zh.md +41 -14
- package/docs/screenshot-dark.png +0 -0
- package/docs/screenshot-light.png +0 -0
- package/lib/client.js +130 -3
- package/lib/client.js.map +1 -1
- package/lib/index.js +18 -8
- package/lib/types/client/locales.d.ts +5 -0
- package/lib/types/store.d.ts +2 -0
- package/lib/types/types.d.ts +5 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -3,23 +3,44 @@
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
5
|
A [DSH (DeepSeek Harness)](https://github.com/deepseek-ai/deepseek-harness) bundle
|
|
6
|
-
plugin that adds a **Task board**: a
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
plugin that adds a **Task board**: a multi-column kanban of tasks that **belong to a
|
|
7
|
+
project (a workspace directory)**. You create and manage tasks on the board; an
|
|
8
|
+
**agent pulls a project's pending tasks, executes them, and moves them to review**
|
|
9
|
+
through `task_board_*` tools — a host-authoritative task ledger the model and the
|
|
10
|
+
board share.
|
|
11
11
|
|
|
12
12
|
- **Project-scoped**: every task is owned by a project path; the agent works "the
|
|
13
13
|
tasks of the project it is running in" by default.
|
|
14
|
-
- **
|
|
14
|
+
- **Full lifecycle**: `draft → ready → in_progress → review → done`, plus a `blocked`
|
|
15
|
+
side state. A human accepts a review (→ done) or rejects it (→ in_progress).
|
|
16
|
+
- **Priorities**: low / normal / high, sorted high-first, with a priority filter.
|
|
17
|
+
- **Agent round-trip**: `task_board_list` → `task_board_claim` →
|
|
18
|
+
`task_board_complete` (→ review), plus `task_board_update` for out-of-band moves.
|
|
15
19
|
A system-prompt section teaches the model the flow.
|
|
20
|
+
- **Auto-dispatch**: an optional poller claims `ready` tasks and dispatches a real
|
|
21
|
+
agent session to execute each one.
|
|
22
|
+
- **Archive**: done tasks can be archived (hidden from the board, restorable); the
|
|
23
|
+
Done column collapses with a "show more".
|
|
16
24
|
- **Host-authoritative, durable**: tasks persist in the Host (`storage-domain`); the
|
|
17
25
|
board updates live over SSE as the agent works.
|
|
18
26
|
- **No setup**: install, and the board appears in the sidebar.
|
|
19
27
|
|
|
20
|
-
##
|
|
28
|
+
## Screenshots
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
| Light | Dark |
|
|
31
|
+
|---|---|
|
|
32
|
+
|  |  |
|
|
33
|
+
|
|
34
|
+
## Board columns
|
|
35
|
+
|
|
36
|
+
| Column | State | Meaning |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| 待定 / Draft | `draft` | Not yet finalized. |
|
|
39
|
+
| 待处理 / Ready | `ready` | Confirmed and actionable (an agent may pick it up). |
|
|
40
|
+
| 进行中 / In progress | `in_progress` | Being worked on (owned by a session). |
|
|
41
|
+
| 待验证 / Review | `review` | Work done, awaiting human verification. |
|
|
42
|
+
| 已完成 / Done | `done` | Verified complete. |
|
|
43
|
+
| 阻断 / Blocked | `blocked` | Waiting on a dependency; remembers the state to restore. |
|
|
23
44
|
|
|
24
45
|
## Install
|
|
25
46
|
|
|
@@ -33,11 +54,24 @@ inserts its loader row automatically.
|
|
|
33
54
|
|
|
34
55
|
## Using it
|
|
35
56
|
|
|
36
|
-
- **Create a task**: header **New task** →
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
57
|
+
- **Create a task**: header **New task** → project (workspace), title, optional
|
|
58
|
+
description, priority (low / normal / high), optional "mark ready now", and an
|
|
59
|
+
optional **reuse idle session** toggle (off by default; when on, auto-dispatch
|
|
60
|
+
continues in an idle session of the same project instead of creating a new one).
|
|
61
|
+
- **Move**: each card has status-appropriate actions — Draft → **Confirm ready**;
|
|
62
|
+
Ready → **▶ Start**; In progress → **Complete for review**; Review → **Accept** /
|
|
63
|
+
**Reject**; any → **Block** / **Unblock**.
|
|
64
|
+
- **Edit / delete**: the ✏️ button edits title, description, and priority inline;
|
|
65
|
+
the × button deletes (click twice to confirm).
|
|
66
|
+
- **Prioritize**: tasks are ordered high → normal → low within each column; a
|
|
67
|
+
priority filter narrows the board.
|
|
68
|
+
- **Archive**: Done cards offer **Archive**; the Done column header offers
|
|
69
|
+
**Archive all**; the header **Archived** toggle opens the archive view (with
|
|
70
|
+
restore). The Done column shows the latest 10 with a "show more".
|
|
40
71
|
- **Filter**: the project selector narrows the board to one project or all.
|
|
72
|
+
- **Auto-claim / dispatch**: the header **Auto-claim** toggle (on by default) makes a
|
|
73
|
+
background poller claim `ready` tasks and **dispatch a real agent session** in the
|
|
74
|
+
task's workspace to execute each one; it moves to Review when done.
|
|
41
75
|
- **Let the agent do it**: in any session, say e.g. *"处理 erp 项目的待办任务"* — the
|
|
42
76
|
agent calls `task_board_list` (a short project name like `erp` matches by suffix),
|
|
43
77
|
`task_board_claim`s each task, does the work, then `task_board_complete`s it with a
|
|
@@ -47,9 +81,10 @@ inserts its loader row automatically.
|
|
|
47
81
|
|
|
48
82
|
| Tool | Purpose |
|
|
49
83
|
|---|---|
|
|
50
|
-
| `task_board_list({ project?, status? })` | List
|
|
51
|
-
| `task_board_claim({ id })` | Claim a task (
|
|
52
|
-
| `task_board_complete({ id, summary, files? })` |
|
|
84
|
+
| `task_board_list({ project?, status? })` | List a project's `ready` + `in_progress` tasks (default `pending`). Omit `project` to use the current session working directory; a short name matches a known project by suffix. Returns id, status, priority, title, and full description, highest priority first. |
|
|
85
|
+
| `task_board_claim({ id })` | Claim a `draft`/`ready` task (`→ in_progress`), recording the calling session as owner. Blocked and in-review tasks cannot be claimed. |
|
|
86
|
+
| `task_board_complete({ id, summary, files? })` | Mark the work finished (`→ review`) with a concise summary and optional touched files. A human still accepts or rejects it. |
|
|
87
|
+
| `task_board_update({ id, status, reason? })` | Out-of-band moves: set `blocked` (with a reason), `ready` from `draft`, `in_progress` (reject a review), or `done` (accept). |
|
|
53
88
|
|
|
54
89
|
Plus a system-prompt **section** that instructs the model how to pull and process a
|
|
55
90
|
project's tasks (process one at a time, prefer higher priority, never fabricate a
|
|
@@ -58,9 +93,10 @@ completion).
|
|
|
58
93
|
## How it works
|
|
59
94
|
|
|
60
95
|
- **Host half** (`src/index.ts`): owns the task domain (`storage-domain`, a
|
|
61
|
-
`dsh_task_board` unit), registers the
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
`dsh_task_board` unit), registers the tools + the prompt section, and registers
|
|
97
|
+
`/taskboard` HTTP + SSE routes on `ctx.webServer`. Task ownership derives from the
|
|
98
|
+
calling session's working directory. The auto-claim poller creates a session in the
|
|
99
|
+
task's workspace and prompts it to run the task.
|
|
64
100
|
- **Browser half** (`src/client/`): the kanban page. It reads/writes
|
|
65
101
|
`/taskboard/api/*` same-origin and subscribes to `/taskboard/events` (SSE) for live
|
|
66
102
|
updates.
|
package/README.zh.md
CHANGED
|
@@ -3,20 +3,37 @@
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
5
|
一个 [DSH(DeepSeek Harness)](https://github.com/deepseek-ai/deepseek-harness) 的
|
|
6
|
-
bundle 插件:增加一块
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
共享。
|
|
6
|
+
bundle 插件:增加一块 **任务看板**——多列看板,每个任务**归属一个项目(workspace 目录)**。
|
|
7
|
+
你在看板上建任务、管理任务;**agent 通过 `task_board_*` 工具拉取指定项目的待处理任务、
|
|
8
|
+
执行、并转入待验证**——一份 Host 权威的任务台账,模型与看板共享。
|
|
10
9
|
|
|
11
10
|
- **按项目归属**:每个任务属于一个项目路径;agent 默认处理"它所在项目的任务"。
|
|
12
|
-
-
|
|
13
|
-
|
|
11
|
+
- **完整生命周期**:`待定 → 待处理 → 进行中 → 待验证 → 已完成`,另有 `阻断` 侧态。
|
|
12
|
+
人工对「待验证」验收通过(→ 已完成)或退回(→ 进行中)。
|
|
13
|
+
- **优先级**:低 / 中 / 高,按高→低排序,并支持优先级筛选。
|
|
14
|
+
- **agent 闭环**:`task_board_list` → `task_board_claim` → `task_board_complete`
|
|
15
|
+
(→ 待验证),另有 `task_board_update` 处理其他移动。系统提示里附有使用指引。
|
|
16
|
+
- **自动派发**:可选的轮询把「待处理」任务领取并**真的派发一个 agent 会话来执行**。
|
|
17
|
+
- **归档**:已完成任务可归档(从看板隐藏,可恢复);已完成列默认折叠,可展开。
|
|
14
18
|
- **Host 权威、持久**:任务存于 Host(`storage-domain`);agent 干活时看板通过 SSE 实时刷新。
|
|
15
19
|
- **零配置**:装上即用,侧边栏出现「任务看板」。
|
|
16
20
|
|
|
17
21
|
## 截图
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
| 浅色 | 深色 |
|
|
24
|
+
|---|---|
|
|
25
|
+
|  |  |
|
|
26
|
+
|
|
27
|
+
## 看板列
|
|
28
|
+
|
|
29
|
+
| 列 | 状态 | 含义 |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| 待定 | `draft` | 还没定稿。 |
|
|
32
|
+
| 待处理 | `ready` | 已确认可处理(agent 可领取)。 |
|
|
33
|
+
| 进行中 | `in_progress` | 正在做(某会话持有)。 |
|
|
34
|
+
| 待验证 | `review` | 做完了,等人工验收。 |
|
|
35
|
+
| 已完成 | `done` | 验收通过。 |
|
|
36
|
+
| 阻断 | `blocked` | 被依赖卡住;记住待恢复的状态。 |
|
|
20
37
|
|
|
21
38
|
## 安装
|
|
22
39
|
|
|
@@ -29,9 +46,18 @@ dsh plugin --profile web add dsh-project-tasks
|
|
|
29
46
|
|
|
30
47
|
## 使用
|
|
31
48
|
|
|
32
|
-
- **建任务**:顶部 **新建任务** →
|
|
33
|
-
|
|
49
|
+
- **建任务**:顶部 **新建任务** → 选项目(工作区)、标题、可选描述、优先级(低/中/高)、
|
|
50
|
+
可选「直接标记为待处理」,以及可选的 **复用空闲会话**(默认不勾:勾上后自动派发时,
|
|
51
|
+
若同项目有空闲会话就在其继续,而不是新建)。
|
|
52
|
+
- **推进**:卡片按状态给不同动作——待定 → **确认处理**;待处理 → **▶ 开始**;进行中 →
|
|
53
|
+
**完成待验收**;待验证 → **验收通过** / **退回**;任意 → **阻断** / **解除阻断**。
|
|
54
|
+
- **编辑 / 删除**:✏️ 按钮就地编辑标题、描述、优先级;× 按钮删除(点两次确认)。
|
|
55
|
+
- **优先级**:每列内按 高 → 中 → 低 排序;顶部有优先级筛选。
|
|
56
|
+
- **归档**:已完成卡有 **归档**;已完成列头有 **全部归档**;顶部 **归档** 开关进入归档视图
|
|
57
|
+
(可恢复)。已完成列默认只显示最新 10 个,可展开。
|
|
34
58
|
- **筛选**:项目下拉把看板收窄到某项目或全部。
|
|
59
|
+
- **自动认领/派发**:顶部 **自动认领** 开关(默认开)会让后台把「待处理」任务领取,并在
|
|
60
|
+
该项目工作区**派发一个真实 agent 会话**去执行,完成后转入「待验证」。
|
|
35
61
|
- **交给 agent**:在任意会话里说「处理 erp 项目的待办任务」——agent 调 `task_board_list`
|
|
36
62
|
(短项目名 `erp` 会按后缀匹配)、逐条 `task_board_claim` 领取、完成后
|
|
37
63
|
`task_board_complete` 写摘要。看板实时反映。
|
|
@@ -40,9 +66,10 @@ dsh plugin --profile web add dsh-project-tasks
|
|
|
40
66
|
|
|
41
67
|
| 工具 | 作用 |
|
|
42
68
|
|---|---|
|
|
43
|
-
| `task_board_list({ project?, status? })` |
|
|
44
|
-
| `task_board_claim({ id })` |
|
|
45
|
-
| `task_board_complete({ id, summary, files? })` |
|
|
69
|
+
| `task_board_list({ project?, status? })` | 列某项目的 `ready` + `in_progress` 任务(默认 `pending`)。省略 `project` 用当前会话工作目录;短名按后缀匹配已知项目。返回 id、状态、优先级、标题、完整描述,高优先级在前。 |
|
|
70
|
+
| `task_board_claim({ id })` | 领取 `draft`/`ready` 任务(`→ 进行中`),记录调用会话为负责人。阻断/待验证中的任务不可领取。 |
|
|
71
|
+
| `task_board_complete({ id, summary, files? })` | 标记工作完成(`→ 待验证`),写简明摘要与(可选)改动文件。仍需人工验收。 |
|
|
72
|
+
| `task_board_update({ id, status, reason? })` | 其他移动:设为 `blocked`(可带原因)、从 `draft` 置 `ready`、置 `in_progress`(退回待验证)、或置 `done`(验收)。 |
|
|
46
73
|
|
|
47
74
|
外加系统提示 **section**,告诉模型如何拉取并处理某项目的任务(逐个处理、优先高优先级、
|
|
48
75
|
不得虚构完成)。
|
|
@@ -50,8 +77,8 @@ dsh plugin --profile web add dsh-project-tasks
|
|
|
50
77
|
## 工作原理
|
|
51
78
|
|
|
52
79
|
- **Host 半边**(`src/index.ts`):持有任务 domain(`storage-domain`,unit `dsh_task_board`),
|
|
53
|
-
|
|
54
|
-
|
|
80
|
+
注册工具 + 提示 section,并在 `ctx.webServer` 上注册 `/taskboard` HTTP + SSE 路由。
|
|
81
|
+
任务归属取自调用会话的工作目录。自动认领轮询会在任务所属工作区建会话并提示其执行任务。
|
|
55
82
|
- **浏览器半边**(`src/client/`):看板页。同源读写 `/taskboard/api/*`,订阅
|
|
56
83
|
`/taskboard/events`(SSE)实时更新。
|
|
57
84
|
- **bundle patch**(`cordis.patch.yml`):插入插件行;node 半边在 host 跑,`dsh.client`
|
|
Binary file
|
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -95,7 +95,7 @@ window.__ModuleLoader__.load({
|
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region \0dsh-css:/Users/hyper/Documents/hyper/project/extensions/dsh-task-board/src/client/TaskBoardPage.module.css.mjs
|
|
98
|
-
const css = ".UxClrW_page{background:var(--dsw-alias-bg-base);flex-direction:column;height:100%;display:flex;overflow:hidden}.UxClrW_header{flex:none;justify-content:space-between;align-items:flex-start;gap:16px;padding:24px 28px 0;display:flex}.UxClrW_headerLeft{min-width:0}.UxClrW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:20px;font-weight:600}.UxClrW_subtitle{color:var(--dsw-alias-label-tertiary);margin:3px 0 0;font-size:12.5px}.UxClrW_headerRight{flex:none;align-items:center;gap:8px;display:flex}.UxClrW_projectPicker{align-items:center;gap:6px;display:inline-flex}.UxClrW_projectLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}.UxClrW_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);max-width:240px;height:30px;color:var(--dsw-alias-label-secondary);border-radius:8px;padding:0 8px;font-size:12.5px}.UxClrW_refresh,.UxClrW_newBtn,.UxClrW_ghostBtn{cursor:pointer;white-space:nowrap;border-radius:8px;align-items:center;gap:6px;height:30px;padding:0 12px;font-size:12.5px;display:inline-flex}.UxClrW_refresh,.UxClrW_ghostBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary)}.UxClrW_refresh:hover,.UxClrW_ghostBtn:hover{background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_newBtn{background:var(--dsw-alias-button-primary-fill,#2f6feb);color:var(--dsw-alias-label-primary-inverted,#fff);border:none;font-weight:550}.UxClrW_newBtn:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,#2f6feb)}.UxClrW_newBtn:disabled{opacity:.45;cursor:not-allowed}.UxClrW_error{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);border-radius:8px;margin:12px 28px 0;padding:8px 12px;font-size:12.5px}.UxClrW_draft{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1,#00000005);border-radius:12px;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 28px 0;padding:12px;display:flex}.UxClrW_input{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);min-width:160px;height:30px;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 10px;font-size:12.5px}.UxClrW_input:focus-visible,.UxClrW_select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#2f6feb);outline-offset:1px}.UxClrW_board{flex:1;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));align-items:start;gap:14px;padding:16px 28px 40px;display:grid;overflow-y:auto}.UxClrW_loading{color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.UxClrW_column{background:var(--dsw-alias-bg-layer-1,#00000005);border-radius:14px;flex-direction:column;gap:10px;min-width:0;padding:12px;display:flex}.UxClrW_columnDone{opacity:.96}.UxClrW_columnHeader{align-items:center;gap:8px;padding:2px 4px 6px;display:flex}.UxClrW_columnDot{background:var(--dsw-alias-label-tertiary);border-radius:50%;width:8px;height:8px}.UxClrW_columnDot[data-status=todo]{background:var(--dsw-alias-label-tertiary)}.UxClrW_columnDot[data-status=in_progress]{background:var(--dsw-alias-brand-primary,#2f6feb)}.UxClrW_columnDot[data-status=done]{background:var(--dsw-alias-state-business-primary,#10a37f)}.UxClrW_columnTitle{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;font-weight:600}.UxClrW_columnCount{min-width:20px;height:18px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);border-radius:999px;justify-content:center;align-items:center;padding:0 6px;font-size:11px;font-weight:600;display:inline-flex}.UxClrW_columnEmpty{color:var(--dsw-alias-label-tertiary);margin:8px 4px;font-size:12px}.UxClrW_cardList{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.UxClrW_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);border-radius:11px;flex-direction:column;gap:7px;padding:11px 12px;display:flex}.UxClrW_cardHigh{border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary,#b7791f) 45%, var(--dsw-alias-border-l2))}.UxClrW_cardTop{align-items:baseline;gap:8px;display:flex}.UxClrW_cardTitle{min-width:0;color:var(--dsw-alias-label-primary);word-break:break-word;flex:1;font-size:13px;font-weight:550}.UxClrW_cardAge{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.UxClrW_cardDesc{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;word-break:break-word;margin:0;font-size:12px;line-height:1.45}.UxClrW_cardMeta{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:6px;font-size:11px;display:flex}.UxClrW_projectBadge{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;padding:1px 7px}.UxClrW_priorityBadge{border-radius:6px;padding:1px 7px}.UxClrW_priorityBadge[data-p=high]{color:var(--dsw-alias-state-warn-primary,#b7791f);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary,#b7791f) 14%, transparent)}.UxClrW_priorityBadge[data-p=low]{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_claimed{color:var(--dsw-alias-label-tertiary)}.UxClrW_doneSummary{border-top:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);word-break:break-word;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;margin:0;padding-top:6px;font-size:11.5px;line-height:1.45;display:-webkit-box;overflow:hidden}.UxClrW_doneSummary:hover,.UxClrW_doneSummary:focus-visible{-webkit-line-clamp:unset;line-clamp:unset;overflow:visible}.UxClrW_cardActions{align-items:center;gap:6px;display:flex}.UxClrW_iconBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);min-width:26px;height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;padding:0 6px;font-size:12px;display:inline-flex}.UxClrW_iconBtn:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_iconBtn:disabled{opacity:.35;cursor:not-allowed}.UxClrW_deleteBtn:hover{color:var(--dsw-alias-state-error-primary)}.UxClrW_deleteConfirm{color:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);font-size:11px}@media (width<=900px){.UxClrW_board{grid-template-columns:minmax(0,1fr)}}.UxClrW_autoToggle{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);cursor:pointer;white-space:nowrap;border-radius:8px;align-items:center;gap:7px;height:30px;padding:0 10px;display:inline-flex}.UxClrW_autoInput{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.UxClrW_autoSwitch{background:var(--dsw-alias-border-l3,#c8c8cc);border-radius:999px;flex:none;width:28px;height:16px;transition:background .14s;position:relative}.UxClrW_autoSwitch:after{content:\"\";background:var(--dsw-static-neutral-00,#fff);border-radius:50%;width:12px;height:12px;transition:transform .14s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000040}.UxClrW_autoInput:checked+.UxClrW_autoSwitch{background:var(--dsw-alias-state-business-primary,#2f6feb)}.UxClrW_autoInput:checked+.UxClrW_autoSwitch:after{transform:translate(12px)}.UxClrW_autoInput:focus-visible+.UxClrW_autoSwitch{outline:2px solid var(--dsw-alias-brand-primary,#2f6feb);outline-offset:2px}.UxClrW_autoLabel{color:var(--dsw-alias-label-secondary);font-size:12.5px}.UxClrW_readyToggle{color:var(--dsw-alias-label-secondary);white-space:nowrap;align-items:center;gap:6px;font-size:12px;display:inline-flex}.UxClrW_cardActions{flex-wrap:wrap;align-items:center;gap:6px;margin-top:2px;display:flex}.UxClrW_actionBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;border-radius:6px;padding:0 9px;font-size:11.5px}.UxClrW_actionBtn:hover{background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_actionPrimary{background:var(--dsw-alias-button-primary-fill,#2f6feb);color:var(--dsw-alias-label-primary-inverted,#fff);border:none;font-weight:550}.UxClrW_actionPrimary:hover{background:var(--dsw-alias-button-primary-hover,#2f6feb)}.UxClrW_actionGhost{color:var(--dsw-alias-label-tertiary)}.UxClrW_columnBlocked{background:color-mix(in srgb, var(--dsw-alias-state-error-primary,#d33) 6%, transparent)}.UxClrW_cardBlocked{border-color:color-mix(in srgb, var(--dsw-alias-state-error-primary,#d33) 40%, var(--dsw-alias-border-l2))}.UxClrW_blockReason{color:var(--dsw-alias-state-error-primary);margin:0;font-size:11.5px}.UxClrW_columnDot[data-status=draft]{background:var(--dsw-alias-label-tertiary)}.UxClrW_columnDot[data-status=ready]{background:var(--dsw-alias-state-warn-primary,#b7791f)}.UxClrW_columnDot[data-status=review]{background:var(--dsw-alias-state-business-tertiary,#2f6feb)}.UxClrW_columnDot[data-status=blocked]{background:var(--dsw-alias-state-error-primary,#d33)}.UxClrW_deleteBtn{margin-left:auto}.UxClrW_tabActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.UxClrW_columnAction{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:6px;margin-left:auto;padding:0 7px;font-size:10.5px}.UxClrW_columnAction:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.UxClrW_moreBtn{border:1px dashed var(--dsw-alias-border-l2);height:26px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border-radius:8px;align-self:flex-start;margin-top:4px;padding:0 10px;font-size:12px}.UxClrW_moreBtn:hover{color:var(--dsw-alias-label-secondary);border-style:solid}.UxClrW_archivePane{flex:1;max-width:900px;padding:16px 28px 40px;overflow-y:auto}.UxClrW_archiveHead{align-items:center;gap:8px;margin-bottom:12px;display:flex}.UxClrW_archiveTitle{color:var(--dsw-alias-label-secondary);margin:0;font-size:15px;font-weight:600}";
|
|
98
|
+
const css = ".UxClrW_page{background:var(--dsw-alias-bg-base);flex-direction:column;height:100%;display:flex;overflow:hidden}.UxClrW_header{flex:none;justify-content:space-between;align-items:flex-start;gap:16px;padding:24px 28px 0;display:flex}.UxClrW_headerLeft{min-width:0}.UxClrW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:20px;font-weight:600}.UxClrW_subtitle{color:var(--dsw-alias-label-tertiary);margin:3px 0 0;font-size:12.5px}.UxClrW_headerRight{flex:none;align-items:center;gap:8px;display:flex}.UxClrW_projectPicker{align-items:center;gap:6px;display:inline-flex}.UxClrW_projectLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}.UxClrW_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);max-width:240px;height:30px;color:var(--dsw-alias-label-secondary);border-radius:8px;padding:0 8px;font-size:12.5px}.UxClrW_refresh,.UxClrW_newBtn,.UxClrW_ghostBtn{cursor:pointer;white-space:nowrap;border-radius:8px;align-items:center;gap:6px;height:30px;padding:0 12px;font-size:12.5px;display:inline-flex}.UxClrW_refresh,.UxClrW_ghostBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary)}.UxClrW_refresh:hover,.UxClrW_ghostBtn:hover{background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_newBtn{background:var(--dsw-alias-button-primary-fill,#2f6feb);color:var(--dsw-alias-label-primary-inverted,#fff);border:none;font-weight:550}.UxClrW_newBtn:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,#2f6feb)}.UxClrW_newBtn:disabled{opacity:.45;cursor:not-allowed}.UxClrW_error{color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);border-radius:8px;margin:12px 28px 0;padding:8px 12px;font-size:12.5px}.UxClrW_draft{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1,#00000005);border-radius:12px;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 28px 0;padding:12px;display:flex}.UxClrW_input{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);min-width:160px;height:30px;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 10px;font-size:12.5px}.UxClrW_input:focus-visible,.UxClrW_select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#2f6feb);outline-offset:1px}.UxClrW_board{flex:1;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));align-items:start;gap:14px;padding:16px 28px 40px;display:grid;overflow-y:auto}.UxClrW_loading{color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.UxClrW_column{background:var(--dsw-alias-bg-layer-1,#00000005);border-radius:14px;flex-direction:column;gap:10px;min-width:0;padding:12px;display:flex}.UxClrW_columnDone{opacity:.96}.UxClrW_columnHeader{align-items:center;gap:8px;padding:2px 4px 6px;display:flex}.UxClrW_columnDot{background:var(--dsw-alias-label-tertiary);border-radius:50%;width:8px;height:8px}.UxClrW_columnDot[data-status=todo]{background:var(--dsw-alias-label-tertiary)}.UxClrW_columnDot[data-status=in_progress]{background:var(--dsw-alias-brand-primary,#2f6feb)}.UxClrW_columnDot[data-status=done]{background:var(--dsw-alias-state-business-primary,#10a37f)}.UxClrW_columnTitle{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;font-weight:600}.UxClrW_columnCount{min-width:20px;height:18px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);border-radius:999px;justify-content:center;align-items:center;padding:0 6px;font-size:11px;font-weight:600;display:inline-flex}.UxClrW_columnEmpty{color:var(--dsw-alias-label-tertiary);margin:8px 4px;font-size:12px}.UxClrW_cardList{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.UxClrW_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);border-radius:11px;flex-direction:column;gap:7px;padding:11px 12px;display:flex}.UxClrW_cardHigh{border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary,#b7791f) 45%, var(--dsw-alias-border-l2))}.UxClrW_cardTop{align-items:baseline;gap:8px;display:flex}.UxClrW_cardTitle{min-width:0;color:var(--dsw-alias-label-primary);word-break:break-word;flex:1;font-size:13px;font-weight:550}.UxClrW_cardAge{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.UxClrW_cardDesc{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;word-break:break-word;margin:0;font-size:12px;line-height:1.45}.UxClrW_cardMeta{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:6px;font-size:11px;display:flex}.UxClrW_projectBadge{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;padding:1px 7px}.UxClrW_priorityBadge{border-radius:6px;padding:1px 7px}.UxClrW_priorityBadge[data-p=high]{color:var(--dsw-alias-state-warn-primary,#b7791f);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary,#b7791f) 14%, transparent)}.UxClrW_priorityBadge[data-p=low]{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_claimed{color:var(--dsw-alias-label-tertiary)}.UxClrW_doneSummary{border-top:1px dashed var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);word-break:break-word;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;margin:0;padding-top:6px;font-size:11.5px;line-height:1.45;display:-webkit-box;overflow:hidden}.UxClrW_doneSummary:hover,.UxClrW_doneSummary:focus-visible{-webkit-line-clamp:unset;line-clamp:unset;overflow:visible}.UxClrW_cardActions{align-items:center;gap:6px;display:flex}.UxClrW_iconBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);min-width:26px;height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;padding:0 6px;font-size:12px;display:inline-flex}.UxClrW_iconBtn:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_iconBtn:disabled{opacity:.35;cursor:not-allowed}.UxClrW_deleteBtn:hover{color:var(--dsw-alias-state-error-primary)}.UxClrW_deleteConfirm{color:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary);font-size:11px}@media (width<=900px){.UxClrW_board{grid-template-columns:minmax(0,1fr)}}.UxClrW_autoToggle{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);cursor:pointer;white-space:nowrap;border-radius:8px;align-items:center;gap:7px;height:30px;padding:0 10px;display:inline-flex}.UxClrW_autoInput{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.UxClrW_autoSwitch{background:var(--dsw-alias-border-l3,#c8c8cc);border-radius:999px;flex:none;width:28px;height:16px;transition:background .14s;position:relative}.UxClrW_autoSwitch:after{content:\"\";background:var(--dsw-static-neutral-00,#fff);border-radius:50%;width:12px;height:12px;transition:transform .14s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000040}.UxClrW_autoInput:checked+.UxClrW_autoSwitch{background:var(--dsw-alias-state-business-primary,#2f6feb)}.UxClrW_autoInput:checked+.UxClrW_autoSwitch:after{transform:translate(12px)}.UxClrW_autoInput:focus-visible+.UxClrW_autoSwitch{outline:2px solid var(--dsw-alias-brand-primary,#2f6feb);outline-offset:2px}.UxClrW_autoLabel{color:var(--dsw-alias-label-secondary);font-size:12.5px}.UxClrW_readyToggle{color:var(--dsw-alias-label-secondary);white-space:nowrap;align-items:center;gap:6px;font-size:12px;display:inline-flex}.UxClrW_cardActions{flex-wrap:wrap;align-items:center;gap:6px;margin-top:2px;display:flex}.UxClrW_actionBtn{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;border-radius:6px;padding:0 9px;font-size:11.5px}.UxClrW_actionBtn:hover{background:var(--dsw-alias-interactive-bg-hover)}.UxClrW_actionPrimary{background:var(--dsw-alias-button-primary-fill,#2f6feb);color:var(--dsw-alias-label-primary-inverted,#fff);border:none;font-weight:550}.UxClrW_actionPrimary:hover{background:var(--dsw-alias-button-primary-hover,#2f6feb)}.UxClrW_actionGhost{color:var(--dsw-alias-label-tertiary)}.UxClrW_columnBlocked{background:color-mix(in srgb, var(--dsw-alias-state-error-primary,#d33) 6%, transparent)}.UxClrW_cardBlocked{border-color:color-mix(in srgb, var(--dsw-alias-state-error-primary,#d33) 40%, var(--dsw-alias-border-l2))}.UxClrW_blockReason{color:var(--dsw-alias-state-error-primary);margin:0;font-size:11.5px}.UxClrW_columnDot[data-status=draft]{background:var(--dsw-alias-label-tertiary)}.UxClrW_columnDot[data-status=ready]{background:var(--dsw-alias-state-warn-primary,#b7791f)}.UxClrW_columnDot[data-status=review]{background:var(--dsw-alias-state-business-tertiary,#2f6feb)}.UxClrW_columnDot[data-status=blocked]{background:var(--dsw-alias-state-error-primary,#d33)}.UxClrW_deleteBtn{margin-left:auto}.UxClrW_tabActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.UxClrW_columnAction{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);height:20px;color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:6px;margin-left:auto;padding:0 7px;font-size:10.5px}.UxClrW_columnAction:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.UxClrW_moreBtn{border:1px dashed var(--dsw-alias-border-l2);height:26px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border-radius:8px;align-self:flex-start;margin-top:4px;padding:0 10px;font-size:12px}.UxClrW_moreBtn:hover{color:var(--dsw-alias-label-secondary);border-style:solid}.UxClrW_archivePane{flex:1;max-width:900px;padding:16px 28px 40px;overflow-y:auto}.UxClrW_archiveHead{align-items:center;gap:8px;margin-bottom:12px;display:flex}.UxClrW_archiveTitle{color:var(--dsw-alias-label-secondary);margin:0;font-size:15px;font-weight:600}.UxClrW_editTextarea{resize:vertical;height:auto;min-height:54px;padding:6px 10px;font-family:inherit;line-height:1.4}@media (width<=640px){.UxClrW_header{flex-direction:column;align-items:stretch;gap:10px;padding:16px 16px 0}.UxClrW_headerLeft{min-width:0}.UxClrW_headerRight{flex-wrap:wrap;gap:8px}.UxClrW_projectPicker{flex:100%}.UxClrW_select{width:100%}.UxClrW_board{gap:12px;padding:12px 16px 32px}.UxClrW_draft{flex-direction:column;align-items:stretch}.UxClrW_input,.UxClrW_draft .UxClrW_select{width:100%}.UxClrW_archivePane{padding:12px 16px 32px}.UxClrW_column{padding:10px}.UxClrW_card{padding:9px}}@media (width<=420px){.UxClrW_header{padding:12px 12px 0}.UxClrW_board{gap:10px;padding:10px 12px 28px}.UxClrW_title{font-size:18px}.UxClrW_subtitle{font-size:12px}.UxClrW_autoToggle{height:28px;padding:0 8px}.UxClrW_actionBtn{height:30px;font-size:12.5px}.UxClrW_iconBtn{min-width:30px;height:30px}}";
|
|
99
99
|
const tagId = "dsh-project-tasks/TaskBoardPage.module.css";
|
|
100
100
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
101
101
|
const tag = document.createElement("style");
|
|
@@ -141,6 +141,7 @@ window.__ModuleLoader__.load({
|
|
|
141
141
|
"deleteConfirm": "UxClrW_deleteConfirm",
|
|
142
142
|
"doneSummary": "UxClrW_doneSummary",
|
|
143
143
|
"draft": "UxClrW_draft",
|
|
144
|
+
"editTextarea": "UxClrW_editTextarea",
|
|
144
145
|
"error": "UxClrW_error",
|
|
145
146
|
"ghostBtn": "UxClrW_ghostBtn",
|
|
146
147
|
"header": "UxClrW_header",
|
|
@@ -228,6 +229,7 @@ window.__ModuleLoader__.load({
|
|
|
228
229
|
const [draftDesc, setDraftDesc] = (0, react.useState)("");
|
|
229
230
|
const [draftPriority, setDraftPriority] = (0, react.useState)("normal");
|
|
230
231
|
const [draftReady, setDraftReady] = (0, react.useState)(false);
|
|
232
|
+
const [draftReuseIdle, setDraftReuseIdle] = (0, react.useState)(false);
|
|
231
233
|
const [confirmDeleteId, setConfirmDeleteId] = (0, react.useState)(void 0);
|
|
232
234
|
const [showArchived, setShowArchived] = (0, react.useState)(false);
|
|
233
235
|
const [doneExpanded, setDoneExpanded] = (0, react.useState)(false);
|
|
@@ -281,6 +283,7 @@ window.__ModuleLoader__.load({
|
|
|
281
283
|
setDraftDesc("");
|
|
282
284
|
setDraftPriority("normal");
|
|
283
285
|
setDraftReady(false);
|
|
286
|
+
setDraftReuseIdle(false);
|
|
284
287
|
};
|
|
285
288
|
const submitDraft = async () => {
|
|
286
289
|
const title = draftTitle.trim();
|
|
@@ -291,7 +294,8 @@ window.__ModuleLoader__.load({
|
|
|
291
294
|
title,
|
|
292
295
|
...draftDesc.trim() === "" ? {} : { description: draftDesc.trim() },
|
|
293
296
|
priority: draftPriority,
|
|
294
|
-
status: draftReady ? "ready" : "draft"
|
|
297
|
+
status: draftReady ? "ready" : "draft",
|
|
298
|
+
reuseIdle: draftReuseIdle
|
|
295
299
|
});
|
|
296
300
|
setDrafting(false);
|
|
297
301
|
});
|
|
@@ -509,6 +513,17 @@ window.__ModuleLoader__.load({
|
|
|
509
513
|
}
|
|
510
514
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("new.readyNow") })]
|
|
511
515
|
}),
|
|
516
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
517
|
+
className: TaskBoardPage_module_css_default.readyToggle,
|
|
518
|
+
title: t("new.reuseIdleHint"),
|
|
519
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
520
|
+
type: "checkbox",
|
|
521
|
+
checked: draftReuseIdle,
|
|
522
|
+
onChange: (e) => {
|
|
523
|
+
setDraftReuseIdle(e.target.checked);
|
|
524
|
+
}
|
|
525
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("new.reuseIdle") })]
|
|
526
|
+
}),
|
|
512
527
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
513
528
|
type: "button",
|
|
514
529
|
className: TaskBoardPage_module_css_default.newBtn,
|
|
@@ -561,6 +576,12 @@ window.__ModuleLoader__.load({
|
|
|
561
576
|
status: status2
|
|
562
577
|
}));
|
|
563
578
|
},
|
|
579
|
+
onSave: (patch) => {
|
|
580
|
+
run(() => updateTask({
|
|
581
|
+
id: task.id,
|
|
582
|
+
...patch
|
|
583
|
+
}));
|
|
584
|
+
},
|
|
564
585
|
onDelete: () => {
|
|
565
586
|
remove(task.id);
|
|
566
587
|
}
|
|
@@ -622,6 +643,12 @@ window.__ModuleLoader__.load({
|
|
|
622
643
|
status: status2
|
|
623
644
|
}));
|
|
624
645
|
},
|
|
646
|
+
onSave: (patch) => {
|
|
647
|
+
run(() => updateTask({
|
|
648
|
+
id: task.id,
|
|
649
|
+
...patch
|
|
650
|
+
}));
|
|
651
|
+
},
|
|
625
652
|
onDelete: () => {
|
|
626
653
|
remove(task.id);
|
|
627
654
|
}
|
|
@@ -652,7 +679,27 @@ window.__ModuleLoader__.load({
|
|
|
652
679
|
}
|
|
653
680
|
/** One task card with lifecycle-appropriate actions. */
|
|
654
681
|
function TaskCard(props) {
|
|
655
|
-
const { task, now, confirming, t, onAction, onStatus, onDelete } = props;
|
|
682
|
+
const { task, now, confirming, t, onAction, onStatus, onDelete, onSave } = props;
|
|
683
|
+
const [editing, setEditing] = (0, react.useState)(false);
|
|
684
|
+
const [eTitle, setETitle] = (0, react.useState)(task.title);
|
|
685
|
+
const [eDesc, setEDesc] = (0, react.useState)(task.description ?? "");
|
|
686
|
+
const [ePriority, setEPriority] = (0, react.useState)(task.priority);
|
|
687
|
+
const beginEdit = () => {
|
|
688
|
+
setETitle(task.title);
|
|
689
|
+
setEDesc(task.description ?? "");
|
|
690
|
+
setEPriority(task.priority);
|
|
691
|
+
setEditing(true);
|
|
692
|
+
};
|
|
693
|
+
const commitEdit = () => {
|
|
694
|
+
const title = eTitle.trim();
|
|
695
|
+
if (title === "") return;
|
|
696
|
+
onSave({
|
|
697
|
+
title,
|
|
698
|
+
...eDesc.trim() === "" ? {} : { description: eDesc.trim() },
|
|
699
|
+
priority: ePriority
|
|
700
|
+
});
|
|
701
|
+
setEditing(false);
|
|
702
|
+
};
|
|
656
703
|
const btn = (label, onClick, cls) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
657
704
|
type: "button",
|
|
658
705
|
className: clsx(TaskBoardPage_module_css_default.actionBtn, cls),
|
|
@@ -692,6 +739,68 @@ window.__ModuleLoader__.load({
|
|
|
692
739
|
}, TaskBoardPage_module_css_default.actionPrimary)];
|
|
693
740
|
break;
|
|
694
741
|
}
|
|
742
|
+
if (editing) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
743
|
+
className: TaskBoardPage_module_css_default.card,
|
|
744
|
+
children: [
|
|
745
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
746
|
+
className: TaskBoardPage_module_css_default.input,
|
|
747
|
+
value: eTitle,
|
|
748
|
+
onChange: (e) => {
|
|
749
|
+
setETitle(e.target.value);
|
|
750
|
+
},
|
|
751
|
+
placeholder: t("new.placeholder.title"),
|
|
752
|
+
"aria-label": "title"
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
755
|
+
className: clsx(TaskBoardPage_module_css_default.input, TaskBoardPage_module_css_default.editTextarea),
|
|
756
|
+
value: eDesc,
|
|
757
|
+
onChange: (e) => {
|
|
758
|
+
setEDesc(e.target.value);
|
|
759
|
+
},
|
|
760
|
+
placeholder: t("new.placeholder.description"),
|
|
761
|
+
"aria-label": "description"
|
|
762
|
+
}),
|
|
763
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
764
|
+
className: TaskBoardPage_module_css_default.select,
|
|
765
|
+
value: ePriority,
|
|
766
|
+
onChange: (e) => {
|
|
767
|
+
setEPriority(e.target.value);
|
|
768
|
+
},
|
|
769
|
+
"aria-label": "priority",
|
|
770
|
+
children: [
|
|
771
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
772
|
+
value: "low",
|
|
773
|
+
children: t("priority.low")
|
|
774
|
+
}),
|
|
775
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
776
|
+
value: "normal",
|
|
777
|
+
children: t("priority.normal")
|
|
778
|
+
}),
|
|
779
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
780
|
+
value: "high",
|
|
781
|
+
children: t("priority.high")
|
|
782
|
+
})
|
|
783
|
+
]
|
|
784
|
+
}),
|
|
785
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
786
|
+
className: TaskBoardPage_module_css_default.cardActions,
|
|
787
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
788
|
+
type: "button",
|
|
789
|
+
className: clsx(TaskBoardPage_module_css_default.actionBtn, TaskBoardPage_module_css_default.actionPrimary),
|
|
790
|
+
disabled: eTitle.trim() === "",
|
|
791
|
+
onClick: commitEdit,
|
|
792
|
+
children: t("edit.save")
|
|
793
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
794
|
+
type: "button",
|
|
795
|
+
className: TaskBoardPage_module_css_default.actionBtn,
|
|
796
|
+
onClick: () => {
|
|
797
|
+
setEditing(false);
|
|
798
|
+
},
|
|
799
|
+
children: t("edit.cancel")
|
|
800
|
+
})]
|
|
801
|
+
})
|
|
802
|
+
]
|
|
803
|
+
});
|
|
695
804
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
696
805
|
className: clsx(TaskBoardPage_module_css_default.card, task.priority === "high" && TaskBoardPage_module_css_default.cardHigh, task.status === "blocked" && TaskBoardPage_module_css_default.cardBlocked),
|
|
697
806
|
children: [
|
|
@@ -748,6 +857,14 @@ window.__ModuleLoader__.load({
|
|
|
748
857
|
}, TaskBoardPage_module_css_default.actionGhost) : task.status !== "blocked" && btn(t("act.block"), () => {
|
|
749
858
|
onAction("block");
|
|
750
859
|
}, TaskBoardPage_module_css_default.actionGhost),
|
|
860
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
861
|
+
type: "button",
|
|
862
|
+
className: TaskBoardPage_module_css_default.iconBtn,
|
|
863
|
+
"aria-label": t("card.edit"),
|
|
864
|
+
title: t("card.edit"),
|
|
865
|
+
onClick: beginEdit,
|
|
866
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 12 })
|
|
867
|
+
}),
|
|
751
868
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
752
869
|
type: "button",
|
|
753
870
|
className: clsx(TaskBoardPage_module_css_default.iconBtn, confirming && TaskBoardPage_module_css_default.deleteConfirm),
|
|
@@ -794,6 +911,8 @@ window.__ModuleLoader__.load({
|
|
|
794
911
|
"new.placeholder.description": "描述(可选)",
|
|
795
912
|
"new.projectPrompt": "选择项目",
|
|
796
913
|
"new.readyNow": "直接标记为待处理",
|
|
914
|
+
"new.reuseIdle": "复用空闲会话",
|
|
915
|
+
"new.reuseIdleHint": "自动派发时,若该项目有空闲会话则在其上继续,而不是新建会话(默认不勾选)",
|
|
797
916
|
"new.submit": "创建",
|
|
798
917
|
"new.cancel": "取消",
|
|
799
918
|
"priority.label": "优先级",
|
|
@@ -832,6 +951,9 @@ window.__ModuleLoader__.load({
|
|
|
832
951
|
"card.claimedBy": "由 {session} 领取",
|
|
833
952
|
"card.doneSummary": "完成摘要:{summary}",
|
|
834
953
|
"card.blockedReason": "阻断原因:{reason}",
|
|
954
|
+
"card.edit": "编辑任务",
|
|
955
|
+
"edit.save": "保存",
|
|
956
|
+
"edit.cancel": "取消",
|
|
835
957
|
"card.delete": "删除任务",
|
|
836
958
|
"card.confirmDelete": "再次点击确认",
|
|
837
959
|
"card.noSummary": "(无摘要)",
|
|
@@ -860,6 +982,8 @@ window.__ModuleLoader__.load({
|
|
|
860
982
|
"new.placeholder.description": "Description (optional)",
|
|
861
983
|
"new.projectPrompt": "Choose a project",
|
|
862
984
|
"new.readyNow": "Mark ready now",
|
|
985
|
+
"new.reuseIdle": "Reuse idle session",
|
|
986
|
+
"new.reuseIdleHint": "On auto-dispatch, continue in an idle session in the same project instead of creating a new one (off by default)",
|
|
863
987
|
"new.submit": "Create",
|
|
864
988
|
"new.cancel": "Cancel",
|
|
865
989
|
"priority.label": "Priority",
|
|
@@ -898,6 +1022,9 @@ window.__ModuleLoader__.load({
|
|
|
898
1022
|
"card.claimedBy": "Claimed by {session}",
|
|
899
1023
|
"card.doneSummary": "Summary: {summary}",
|
|
900
1024
|
"card.blockedReason": "Blocked: {reason}",
|
|
1025
|
+
"card.edit": "Edit task",
|
|
1026
|
+
"edit.save": "Save",
|
|
1027
|
+
"edit.cancel": "Cancel",
|
|
901
1028
|
"card.delete": "Delete task",
|
|
902
1029
|
"card.confirmDelete": "Click again to confirm",
|
|
903
1030
|
"card.noSummary": "(no summary)",
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["css","IconRefreshOutlineRegular","IconPlusOutlineRegular","IconCloseOutlineRegular","IconChecklistOutlineRegular"],"sources":["../../../../source/deepseek-harness/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/client/api.ts","../src/client/TaskBoardPage.tsx","../src/client/TaskBoardIcon.tsx","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/** Browser client for the /taskboard host routes: typed fetch wrappers\n * (same origin as the GUI) plus the SSE subscription that keeps the board live. */\nimport type { BoardState, CreateTaskBody, DeleteTaskBody, TaskDto, UpdateTaskBody } from '../types.ts'\n\n/** Path prefix owning every task-board route. */\nconst BASE = '/taskboard'\n\n/** Unwrap the `{ok, ...}` envelope, throwing on a transport or payload error. */\nasync function unwrap<T>(pending: Promise<Response>): Promise<T> {\n const res = await pending\n let body: unknown\n try {\n body = await res.json()\n } catch {\n throw new Error(`task-board: HTTP ${res.status}`)\n }\n const record = body as { ok?: boolean; error?: string }\n if (!res.ok || record.ok !== true) throw new Error(record.error ?? `task-board: HTTP ${res.status}`)\n return body as T\n}\n\nconst post = (path: string, body: unknown, signal?: AbortSignal): Promise<Response> =>\n fetch(`${BASE}${path}`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(body),\n ...(signal === undefined ? {} : { signal }),\n })\n\n/** Read the full board snapshot. */\nexport async function fetchState(signal?: AbortSignal): Promise<BoardState> {\n const body = await unwrap<{ state: BoardState }>(fetch(`${BASE}/api/state`, signal === undefined ? {} : { signal }))\n return body.state\n}\n\n/** Create a task. */\nexport async function createTask(input: CreateTaskBody): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/create', input))\n return body.task\n}\n\n/** Update a task (title/description/priority/status/doneSummary/doneFiles). */\nexport async function updateTask(input: UpdateTaskBody): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/update', input))\n return body.task\n}\n\n/** Delete a task. */\nexport async function deleteTask(id: string): Promise<boolean> {\n const body = await unwrap<{ deleted: boolean }>(post('/api/delete', { id } satisfies DeleteTaskBody))\n return body.deleted\n}\n\n/** Run a lifecycle action (start/verify/reject/block/unblock) on a task. */\nexport async function taskAction(id: string, action: NonNullable<UpdateTaskBody['action']>, reason?: string): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/update', { id, action, ...(reason === undefined ? {} : { blockedReason: reason }) }))\n return body.task\n}\n\n/** Archive every done task (optionally scoped to a project); returns the count. */\nexport async function archiveDone(project?: string): Promise<number> {\n const body = await unwrap<{ archived: number }>(post('/api/archive-done', project === undefined ? {} : { project }))\n return body.archived\n}\n\n/** Enable/disable the background auto-claim poller. */\nexport async function setAutoClaim(enabled: boolean): Promise<boolean> {\n const body = await unwrap<{ autoClaim: boolean }>(post('/api/auto-claim', { enabled }))\n return body.autoClaim\n}\n\n/**\n * Subscribe to the board's live state over SSE.\n * @param onState - called with every pushed board state (including the opening one).\n * @returns a function closing the connection.\n */\nexport function subscribeBoard(onState: (state: BoardState) => void): () => void {\n const source = new EventSource(`${BASE}/events`)\n source.onmessage = (event) => {\n try {\n const frame = JSON.parse(event.data) as { type?: string; state?: BoardState }\n if (frame.type === 'state' && frame.state !== undefined) onState(frame.state)\n } catch { /* ignore malformed frame */ }\n }\n // On error EventSource auto-reconnects; the opening frame resyncs state.\n return () => { source.close() }\n}\n","/**\n * DSH Task Board page: a kanban of project tasks across the full lifecycle —\n * Draft · Ready · In progress · Review · Done · Blocked. The human creates and\n * moves tasks; an agent processes a project's ready/in-progress tasks via the\n * `task_board_*` tools; the board stays live over SSE.\n */\nimport { useEffect, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport {\n IconCloseOutlineRegular,\n IconPlusOutlineRegular,\n IconRefreshOutlineRegular,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, PropsRuntime, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { BoardState, TaskDto, TaskPriority, TaskStatus } from '../types.ts'\nimport { archiveDone, createTask, deleteTask, fetchState, setAutoClaim, subscribeBoard, taskAction, updateTask } from './api.ts'\nimport type { TaskBoardKey } from './locales.ts'\nimport css from './TaskBoardPage.module.css'\n\n/** Minimal workspace-list snapshot the page reads (paths + titles). */\nexport interface WorkspaceListView {\n readonly items: readonly { readonly path: string; readonly title: string }[]\n}\n\n/** Injected services the page uses. */\nexport interface TaskBoardInjected {\n /** Workspace list, for the project selector and default project. */\n readonly useWorkspaces: SnapshotSelectorHook<WorkspaceListView>\n /** The current session's working directory (its project), when known. */\n readonly currentProject?: string | undefined\n}\n\n/** Root-scoped page props. */\nexport type TaskBoardPageProps = PropsRuntime<'main'> & TaskBoardInjected & PropsLocale<'taskBoard'>\n\n/** Columns in board order. */\nconst COLUMNS: readonly TaskStatus[] = ['draft', 'ready', 'in_progress', 'review', 'done', 'blocked']\n\n/** How many done cards show before the Done column collapses. */\nconst DONE_COLLAPSED = 10\n\n/** Last path segment of a directory. */\nfunction baseName(path: string): string {\n const parts = path.replace(/\\\\/g, '/').split('/').filter(Boolean)\n return parts[parts.length - 1] ?? path\n}\n\n/** Relative \"updated\" label. */\nfunction ageLabel(updatedAt: number, now: number, t: (k: TaskBoardKey, p?: Record<string, string | number>) => string): string {\n const diff = Math.max(0, now - updatedAt)\n const min = 60_000\n if (diff < min) return t('time.now')\n if (diff < 60 * min) return t('time.minutes', { n: Math.floor(diff / min) })\n if (diff < 24 * 60 * min) return t('time.hours', { n: Math.floor(diff / (60 * min)) })\n return t('time.days', { n: Math.floor(diff / (24 * 60 * min)) })\n}\n\n/**\n * Render the task board.\n * @param props - injected services and copy.\n * @returns the global task-board page.\n */\nexport function TaskBoardPage(props: TaskBoardPageProps) {\n const { useWorkspaces, currentProject, t } = props\n const workspaceSnapshot = useWorkspaces(state => state)\n const projects = useMemo(() => {\n const seen = new Set<string>()\n const out: { path: string; title: string }[] = []\n for (const item of workspaceSnapshot.items) {\n if (item.path === '' || seen.has(item.path)) continue\n seen.add(item.path)\n out.push({ path: item.path, title: item.title })\n }\n return out\n }, [workspaceSnapshot])\n\n const [board, setBoard] = useState<BoardState | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const [now, setNow] = useState(() => Date.now())\n const [projectFilter, setProjectFilter] = useState<string>('all')\n const [priorityFilter, setPriorityFilter] = useState<'all' | TaskPriority>('all')\n const [drafting, setDrafting] = useState(false)\n const [draftProject, setDraftProject] = useState('')\n const [draftTitle, setDraftTitle] = useState('')\n const [draftDesc, setDraftDesc] = useState('')\n const [draftPriority, setDraftPriority] = useState<TaskPriority>('normal')\n const [draftReady, setDraftReady] = useState(false)\n const [confirmDeleteId, setConfirmDeleteId] = useState<string | undefined>(undefined)\n const [showArchived, setShowArchived] = useState(false)\n const [doneExpanded, setDoneExpanded] = useState(false)\n\n useEffect(() => {\n const timer = setInterval(() => { setNow(Date.now()) }, 30_000)\n return () => { clearInterval(timer) }\n }, [])\n\n useEffect(() => {\n let alive = true\n fetchState().then(state => { if (alive) { setBoard(state); setError(undefined) } }).catch(e => { if (alive) setError(e instanceof Error ? e.message : String(e)) })\n const close = subscribeBoard(state => { setBoard(state); setError(undefined) })\n return () => { alive = false; close() }\n }, [])\n\n const refresh = async (): Promise<void> => {\n try { setBoard(await fetchState()); setError(undefined) } catch (e) { setError(e instanceof Error ? e.message : String(e)) }\n }\n const run = async (op: () => Promise<unknown>): Promise<void> => {\n try { await op() } catch (e) { setError(e instanceof Error ? e.message : String(e)) }\n }\n\n const defaultProject = currentProject !== undefined && currentProject !== '' ? currentProject : (projects[0]?.path ?? '')\n const openDraft = (): void => {\n setDrafting(true); setDraftProject(defaultProject); setDraftTitle(''); setDraftDesc(''); setDraftPriority('normal'); setDraftReady(false)\n }\n const submitDraft = async (): Promise<void> => {\n const title = draftTitle.trim()\n if (title === '' || draftProject === '') return\n await run(async () => {\n await createTask({ project: draftProject, title, ...(draftDesc.trim() === '' ? {} : { description: draftDesc.trim() }), priority: draftPriority, status: draftReady ? 'ready' : 'draft' })\n setDrafting(false)\n })\n }\n const remove = async (id: string): Promise<void> => {\n if (confirmDeleteId !== id) { setConfirmDeleteId(id); return }\n setConfirmDeleteId(undefined)\n await run(() => deleteTask(id))\n }\n\n const tasks = board?.tasks ?? []\n const inProject = (task: TaskDto): boolean => projectFilter === 'all' || task.project === projectFilter\n const inPriority = (task: TaskDto): boolean => priorityFilter === 'all' || task.priority === priorityFilter\n // Live board excludes archived; the archive view lists only archived.\n const visible = tasks.filter(task => task.archived !== true && inProject(task) && inPriority(task))\n const archivedTasks = tasks.filter(task => task.archived === true && inProject(task))\n .sort((a, b) => b.updatedAt - a.updatedAt)\n const rank = (p: TaskPriority): number => (p === 'high' ? 2 : p === 'normal' ? 1 : 0)\n // Highest priority first within each column, then most recently updated.\n const byStatus = (status: TaskStatus): TaskDto[] =>\n visible.filter(task => task.status === status)\n .sort((a, b) => (rank(b.priority) - rank(a.priority)) || (b.updatedAt - a.updatedAt))\n const autoClaim = board?.autoClaim === true\n\n return (\n <section className={css.page} aria-label={t('page.title')} data-testid=\"task-board-page\">\n <header className={css.header}>\n <div className={css.headerLeft}>\n <h1 className={css.title}>{t('page.title')}</h1>\n <p className={css.subtitle}>{t('page.subtitle')}</p>\n </div>\n <div className={css.headerRight}>\n <label className={css.autoToggle} title={t('auto.hint')}>\n <input type=\"checkbox\" className={css.autoInput} checked={autoClaim} onChange={e => { void run(() => setAutoClaim(e.target.checked)) }} />\n <span className={css.autoSwitch} aria-hidden=\"true\" />\n <span className={css.autoLabel}>{t('auto.label')}</span>\n </label>\n <label className={css.projectPicker}>\n <span className={css.projectLabel}>{t('priority.label')}</span>\n <select className={css.select} value={priorityFilter} onChange={e => { setPriorityFilter(e.target.value as 'all' | TaskPriority) }}>\n <option value=\"all\">{t('priority.all')}</option>\n <option value=\"high\">{t('priority.high')}</option>\n <option value=\"normal\">{t('priority.normal')}</option>\n <option value=\"low\">{t('priority.low')}</option>\n </select>\n </label>\n <label className={css.projectPicker}>\n <span className={css.projectLabel}>{t('project.label')}</span>\n <select className={css.select} value={projectFilter} onChange={e => { setProjectFilter(e.target.value) }}>\n <option value=\"all\">{t('project.all')}</option>\n {projects.map(p => <option key={p.path} value={p.path}>{p.title} · {baseName(p.path)}</option>)}\n </select>\n </label>\n <button type=\"button\" className={css.refresh} aria-label={t('refresh')} onClick={() => { void refresh() }}>\n <IconRefreshOutlineRegular size={13} />{t('refresh')}\n </button>\n <button type=\"button\" className={clsx(css.refresh, showArchived && css.tabActive)} onClick={() => { setShowArchived(v => !v) }}>{showArchived ? t('archive.back') : t('archive.open')}</button>\n <button type=\"button\" className={css.newBtn} onClick={openDraft}><IconPlusOutlineRegular size={13} />{t('new.action')}</button>\n </div>\n </header>\n\n {error !== undefined && <div className={css.error} role=\"alert\">{t('error.load', { message: error })}</div>}\n\n {drafting && (\n <div className={css.draft}>\n <select className={css.select} value={draftProject} onChange={e => { setDraftProject(e.target.value) }} aria-label={t('new.projectPrompt')}>\n {projects.length === 0 && <option value=\"\">{t('new.projectPrompt')}</option>}\n {projects.map(p => <option key={p.path} value={p.path}>{p.title} · {baseName(p.path)}</option>)}\n </select>\n <input className={css.input} placeholder={t('new.placeholder.title')} value={draftTitle} onChange={e => { setDraftTitle(e.target.value) }} />\n <input className={css.input} placeholder={t('new.placeholder.description')} value={draftDesc} onChange={e => { setDraftDesc(e.target.value) }} />\n <select className={css.select} value={draftPriority} onChange={e => { setDraftPriority(e.target.value as TaskPriority) }} aria-label=\"priority\">\n <option value=\"low\">{t('priority.low')}</option><option value=\"normal\">{t('priority.normal')}</option><option value=\"high\">{t('priority.high')}</option>\n </select>\n <label className={css.readyToggle}>\n <input type=\"checkbox\" checked={draftReady} onChange={e => { setDraftReady(e.target.checked) }} />\n <span>{t('new.readyNow')}</span>\n </label>\n <button type=\"button\" className={css.newBtn} disabled={draftTitle.trim() === '' || draftProject === ''} onClick={() => { void submitDraft() }}>{t('new.submit')}</button>\n <button type=\"button\" className={css.ghostBtn} onClick={() => { setDrafting(false) }}>{t('new.cancel')}</button>\n </div>\n )}\n\n {board === undefined && error === undefined\n ? <div className={css.loading}>{t('loading')}</div>\n : showArchived\n ? (\n <div className={css.archivePane}>\n <div className={css.archiveHead}>\n <h2 className={css.archiveTitle}>{t('archive.title')}</h2>\n <span className={css.columnCount}>{archivedTasks.length}</span>\n </div>\n {archivedTasks.length === 0\n ? <p className={css.columnEmpty}>{t('archive.empty')}</p>\n : (\n <ul className={css.cardList}>\n {archivedTasks.map(task => (\n <TaskCard key={task.id} task={task} now={now} t={t} confirming={confirmDeleteId === task.id}\n onAction={action => { void run(() => taskAction(task.id, action)) }}\n onStatus={status2 => { void run(() => updateTask({ id: task.id, status: status2 })) }}\n onDelete={() => { void remove(task.id) }} />\n ))}\n </ul>\n )}\n </div>\n )\n : (\n <div className={css.board}>\n {COLUMNS.map(status => {\n const all = byStatus(status)\n const isDone = status === 'done'\n const collapsed = isDone && !doneExpanded && all.length > DONE_COLLAPSED\n const items = collapsed ? all.slice(0, DONE_COLLAPSED) : all\n return (\n <section key={status} className={clsx(css.column, status === 'blocked' && css.columnBlocked, isDone && css.columnDone)} aria-label={t(`column.${status}` as TaskBoardKey)}>\n <header className={css.columnHeader}>\n <span className={css.columnDot} data-status={status} aria-hidden=\"true\" />\n <h2 className={css.columnTitle}>{t(`column.${status}` as TaskBoardKey)}</h2>\n <span className={css.columnCount}>{all.length}</span>\n {isDone && all.length > 0 && (\n <button type=\"button\" className={css.columnAction} onClick={() => { void run(() => archiveDone(projectFilter === 'all' ? undefined : projectFilter)) }}>{t('archive.allDone')}</button>\n )}\n </header>\n {items.length === 0\n ? <p className={css.columnEmpty}>{t(`column.empty.${status}` as TaskBoardKey)}</p>\n : (\n <ul className={css.cardList}>\n {items.map(task => (\n <TaskCard key={task.id} task={task} now={now} t={t} confirming={confirmDeleteId === task.id}\n onAction={action => { void run(() => taskAction(task.id, action)) }}\n onStatus={status2 => { void run(() => updateTask({ id: task.id, status: status2 })) }}\n onDelete={() => { void remove(task.id) }} />\n ))}\n </ul>\n )}\n {collapsed && (\n <button type=\"button\" className={css.moreBtn} onClick={() => { setDoneExpanded(true) }}>\n {t('archive.showMore', { n: all.length - DONE_COLLAPSED })}\n </button>\n )}\n {isDone && doneExpanded && all.length > DONE_COLLAPSED && (\n <button type=\"button\" className={css.moreBtn} onClick={() => { setDoneExpanded(false) }}>{t('archive.showLess')}</button>\n )}\n </section>\n )\n })}\n </div>\n )}\n </section>\n )\n}\n\n/** One task card with lifecycle-appropriate actions. */\nfunction TaskCard(props: {\n readonly task: TaskDto\n readonly now: number\n readonly confirming: boolean\n readonly t: (k: TaskBoardKey, p?: Record<string, string | number>) => string\n readonly onAction: (action: 'start' | 'verify' | 'reject' | 'block' | 'unblock' | 'archive' | 'unarchive') => void\n readonly onStatus: (status: TaskStatus) => void\n readonly onDelete: () => void\n}) {\n const { task, now, confirming, t, onAction, onStatus, onDelete } = props\n const btn = (label: string, onClick: () => void, cls?: string): JSX.Element => (\n <button type=\"button\" className={clsx(css.actionBtn, cls)} onClick={onClick}>{label}</button>\n )\n let actions: JSX.Element[]\n switch (task.status) {\n case 'draft':\n actions = [btn(t('act.confirmReady'), () => { onStatus('ready') }, css.actionPrimary)]\n break\n case 'ready':\n actions = [btn(t('act.start'), () => { onAction('start') }, css.actionPrimary)]\n break\n case 'in_progress':\n actions = [btn(t('act.complete'), () => { onStatus('review') }, css.actionPrimary)]\n break\n case 'review':\n actions = [btn(t('act.verify'), () => { onAction('verify') }, css.actionPrimary), btn(t('act.reject'), () => { onAction('reject') })]\n break\n case 'done':\n actions = []\n break\n case 'blocked':\n actions = [btn(t('act.unblock'), () => { onAction('unblock') }, css.actionPrimary)]\n break\n }\n return (\n <li className={clsx(css.card, task.priority === 'high' && css.cardHigh, task.status === 'blocked' && css.cardBlocked)}>\n <div className={css.cardTop}>\n <span className={css.cardTitle}>{task.title}</span>\n <span className={css.cardAge}>{ageLabel(task.updatedAt, now, t)}</span>\n </div>\n {task.description !== undefined && task.description !== '' && <p className={css.cardDesc}>{task.description}</p>}\n <div className={css.cardMeta}>\n <span className={css.projectBadge} title={task.project}>{baseName(task.project)}</span>\n {task.priority !== 'normal' && <span className={css.priorityBadge} data-p={task.priority}>{t(`priority.${task.priority}` as TaskBoardKey)}</span>}\n {task.claimedBy !== undefined && <span className={css.claimed}>{t('card.claimedBy', { session: task.claimedBy.sessionId.slice(0, 12) })}</span>}\n </div>\n {task.status === 'blocked' && task.blockedReason !== undefined && <p className={css.blockReason}>{t('card.blockedReason', { reason: task.blockedReason })}</p>}\n {(task.status === 'review' || task.status === 'done') && (\n <p className={css.doneSummary} title={task.doneSummary}>{t('card.doneSummary', { summary: task.doneSummary ?? t('card.noSummary') })}</p>\n )}\n <div className={css.cardActions}>\n {actions}\n {task.archived === true\n ? btn(t('act.unarchive'), () => { onAction('unarchive') })\n : task.status === 'done'\n ? btn(t('act.archive'), () => { onAction('archive') }, css.actionGhost)\n : task.status !== 'blocked' && btn(t('act.block'), () => { onAction('block') }, css.actionGhost)}\n <button type=\"button\" className={clsx(css.iconBtn, confirming && css.deleteConfirm)} aria-label={confirming ? t('card.confirmDelete') : t('card.delete')} onClick={onDelete}>\n {confirming ? t('card.confirmDelete') : <IconCloseOutlineRegular size={12} />}\n </button>\n </div>\n </li>\n )\n}\n","/** Decorative occupant for the Task board sidebar entry. */\nimport { IconChecklistOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\n\n/**\n * Render the checklist glyph at the size the sidebar asks for; the sidebar owns\n * the accessible navigation label.\n * @param props - the sidebar's icon share.\n * @returns decorative checklist icon.\n */\nexport function TaskBoardIcon({ size }: PropsRuntime<'sidebar.panellist'>) {\n return <IconChecklistOutlineRegular size={size} />\n}\n","/** `taskBoard` namespace dictionaries. */\n\n/** Dictionary namespace owned by this plugin. */\nexport const NS = 'taskBoard'\n\n/** Simplified Chinese dictionary (source of truth for keys). */\nexport const zh = {\n 'panel.label': '任务看板',\n 'page.title': '任务看板',\n 'page.subtitle': '按项目维护任务,交给 agent 领取执行,完成后人工验收',\n 'refresh': '刷新',\n 'loading': '加载中…',\n 'auto.label': '自动认领',\n 'auto.hint': '开启后,后台定时把「待处理」的任务自动转到「进行中」(供 agent 拉取执行)',\n 'project.label': '项目',\n 'project.all': '全部项目',\n 'project.unknown': '未知项目',\n 'new.action': '新建任务',\n 'new.placeholder.title': '任务标题',\n 'new.placeholder.description': '描述(可选)',\n 'new.projectPrompt': '选择项目',\n 'new.readyNow': '直接标记为待处理',\n 'new.submit': '创建',\n 'new.cancel': '取消',\n 'priority.label': '优先级',\n 'priority.all': '全部',\n 'priority.low': '低',\n 'priority.normal': '中',\n 'priority.high': '高',\n 'column.draft': '待定',\n 'column.ready': '待处理',\n 'column.in_progress': '进行中',\n 'column.review': '待验证',\n 'column.done': '已完成',\n 'column.blocked': '阻断',\n 'column.empty.draft': '没有待定的任务',\n 'column.empty.ready': '没有待处理的任务',\n 'column.empty.in_progress': '没有进行中的任务',\n 'column.empty.review': '没有待验证的任务',\n 'column.empty.done': '还没有已完成的任务',\n 'column.empty.blocked': '没有被阻断的任务',\n 'act.confirmReady': '确认处理',\n 'act.start': '▶ 开始',\n 'act.complete': '完成待验收',\n 'act.verify': '验收通过',\n 'act.reject': '退回',\n 'act.block': '阻断',\n 'act.unblock': '解除阻断',\n 'act.archive': '归档',\n 'act.unarchive': '取消归档',\n 'archive.open': '归档',\n 'archive.back': '返回看板',\n 'archive.title': '已归档任务',\n 'archive.empty': '没有已归档的任务',\n 'archive.allDone': '全部归档',\n 'archive.showMore': '展开其余 {n} 个',\n 'archive.showLess': '收起',\n\n 'card.claimedBy': '由 {session} 领取',\n 'card.doneSummary': '完成摘要:{summary}',\n 'card.blockedReason': '阻断原因:{reason}',\n 'card.delete': '删除任务',\n 'card.confirmDelete': '再次点击确认',\n 'card.noSummary': '(无摘要)',\n 'empty.title': '还没有任务',\n 'empty.hint': '点右上角「新建任务」,或在下方选择项目后创建第一个任务。',\n 'error.load': '操作失败:{message}',\n 'time.now': '刚刚',\n 'time.minutes': '{n} 分钟前',\n 'time.hours': '{n} 小时前',\n 'time.days': '{n} 天前',\n}\n\n/** Type keyed by the Chinese dictionary. */\nexport type TaskBoardKey = keyof typeof zh\n\n/** English dictionary (must match every key). */\nexport const en: Record<TaskBoardKey, string> = {\n 'panel.label': 'Task board',\n 'page.title': 'Task board',\n 'page.subtitle': 'Project tasks an agent can pull, execute, and that a human verifies',\n 'refresh': 'Refresh',\n 'loading': 'Loading…',\n 'auto.label': 'Auto-claim',\n 'auto.hint': 'When on, a background poller moves \"ready\" tasks to \"in progress\" for an agent to pick up.',\n 'project.label': 'Project',\n 'project.all': 'All projects',\n 'project.unknown': 'Unknown project',\n 'new.action': 'New task',\n 'new.placeholder.title': 'Task title',\n 'new.placeholder.description': 'Description (optional)',\n 'new.projectPrompt': 'Choose a project',\n 'new.readyNow': 'Mark ready now',\n 'new.submit': 'Create',\n 'new.cancel': 'Cancel',\n 'priority.label': 'Priority',\n 'priority.all': 'All',\n 'priority.low': 'Low',\n 'priority.normal': 'Normal',\n 'priority.high': 'High',\n 'column.draft': 'Draft',\n 'column.ready': 'Ready',\n 'column.in_progress': 'In progress',\n 'column.review': 'Review',\n 'column.done': 'Done',\n 'column.blocked': 'Blocked',\n 'column.empty.draft': 'No drafts',\n 'column.empty.ready': 'Nothing ready',\n 'column.empty.in_progress': 'Nothing in progress',\n 'column.empty.review': 'Nothing awaiting review',\n 'column.empty.done': 'Nothing completed yet',\n 'column.empty.blocked': 'Nothing blocked',\n 'act.confirmReady': 'Confirm ready',\n 'act.start': '▶ Start',\n 'act.complete': 'Complete for review',\n 'act.verify': 'Accept',\n 'act.reject': 'Reject',\n 'act.block': 'Block',\n 'act.unblock': 'Unblock',\n 'act.archive': 'Archive',\n 'act.unarchive': 'Restore',\n 'archive.open': 'Archived',\n 'archive.back': 'Back to board',\n 'archive.title': 'Archived tasks',\n 'archive.empty': 'No archived tasks',\n 'archive.allDone': 'Archive all',\n 'archive.showMore': 'Show {n} more',\n 'archive.showLess': 'Show less',\n\n 'card.claimedBy': 'Claimed by {session}',\n 'card.doneSummary': 'Summary: {summary}',\n 'card.blockedReason': 'Blocked: {reason}',\n 'card.delete': 'Delete task',\n 'card.confirmDelete': 'Click again to confirm',\n 'card.noSummary': '(no summary)',\n 'empty.title': 'No tasks yet',\n 'empty.hint': 'Use \"New task\" in the header, or pick a project and create the first one.',\n 'error.load': 'Action failed: {message}',\n 'time.now': 'just now',\n 'time.minutes': '{n}m ago',\n 'time.hours': '{n}h ago',\n 'time.days': '{n}d ago',\n}\n","/**\n * DSH Task Board, browser half: contributes one global page in the root `main`\n * slot plus its sidebar entry. The page is a three-column kanban of project\n * tasks that talks to the Host `/taskboard` routes and stays live over SSE.\n *\n * Tasks are attributed to a project (workspace path); the human creates and\n * manages them, and an agent processes a project's pending tasks via the\n * Host-side `task_board_*` tools (see the package's Host half).\n */\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-workspace/client'\nimport type { MainPanelId } from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\nimport { TaskBoardPage, type TaskBoardInjected, type WorkspaceListView } from './TaskBoardPage.tsx'\nimport { TaskBoardIcon } from './TaskBoardIcon.tsx'\nimport { en, NS, zh, type TaskBoardKey } from './locales.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Task board copy. */\n 'taskBoard': TaskBoardKey\n }\n}\n\nexport type { TaskBoardPageProps, TaskBoardInjected } from './TaskBoardPage.tsx'\n\n/** Stable main-panel id for the task board page. */\nconst PANEL_ID = 'taskBoard' as MainPanelId\n\n/** Injected face as returned by the factory (before hooks are synthesized). */\ninterface TaskBoardInjectedRaw extends Omit<TaskBoardInjected, 'useWorkspaces'> {\n readonly hooks: { readonly workspaces: HostObservable<WorkspaceListView> }\n}\n\n/**\n * Required services: the slot registry and dictionaries, the layout that owns\n * the main-panel selection, and the workspace list for the project selector.\n */\nexport const inject = ['slots', 'locale', 'layout', 'workspaces']\n\n/**\n * Client plugin body: register the dictionaries, the global task board page, and\n * the sidebar entry that selects it.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-task-board: dictionaries')\n const t = ctx.locale.bind(NS)\n\n // The global page body. Renders whenever the layout selects `taskBoard`.\n ctx.slots.inject('main', () => ctx.slots.register({\n name: 'main',\n key: PANEL_ID,\n locale: NS,\n inject: (): TaskBoardInjectedRaw => ({\n hooks: { workspaces: ctx.workspaces.list as unknown as HostObservable<WorkspaceListView> },\n // The current session's project is optional; the page falls back to the\n // project picker's first workspace.\n currentProject: undefined,\n }),\n }, TaskBoardPage))\n\n // Sidebar navigation row selecting the page.\n ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({\n name: 'sidebar.panellist',\n id: PANEL_ID,\n order: 6,\n locale: NS,\n label: () => t('panel.label'),\n }, TaskBoardIcon))\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;EAAA,SAAS,EAAE,GAAE;GAAC,IAAI,GAAE,GAAE,IAAE;GAAG,IAAG,YAAU,OAAO,KAAG,YAAU,OAAO,GAAE,KAAG;QAAO,IAAG,YAAU,OAAO,GAAE,IAAG,MAAM,QAAQ,CAAC,GAAE;IAAC,IAAI,IAAE,EAAE;IAAO,KAAI,IAAE,GAAE,IAAE,GAAE,KAAI,EAAE,OAAK,IAAE,EAAE,EAAE,EAAE,OAAK,MAAI,KAAG,MAAK,KAAG;GAAE,OAAM,KAAI,KAAK,GAAE,EAAE,OAAK,MAAI,KAAG,MAAK,KAAG;GAAG,OAAO;EAAC;EAAC,SAAgB,OAAM;GAAC,KAAI,IAAI,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,KAAI,CAAC,IAAE,UAAU,QAAM,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;GAAG,OAAO;EAAC;;;;ECK/W,MAAM,OAAO;;EAGb,eAAe,OAAU,SAAwC;GAC/D,MAAM,MAAM,MAAM;GAClB,IAAI;GACJ,IAAI;IACF,OAAO,MAAM,IAAI,KAAK;GACxB,QAAQ;IACN,MAAM,IAAI,MAAM,oBAAoB,IAAI,QAAQ;GAClD;GACA,MAAM,SAAS;GACf,IAAI,CAAC,IAAI,MAAM,OAAO,OAAO,MAAM,MAAM,IAAI,MAAM,OAAO,SAAS,oBAAoB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AAc;GACd,cAAc;GACd,aAAa;GACb,eAAe;GACf,eAAe;GACf,iBAAiB;GACjB,gBAAgB;GAChB,gBAAgB;GAChB,iBAAiB;GACjB,iBAAiB;GACjB,mBAAmB;GACnB,oBAAoB;GACpB,oBAAoB;GAEpB,kBAAkB;GAClB,oBAAoB;GACpB,sBAAsB;GACtB,eAAe;GACf,sBAAsB;GACtB,kBAAkB;GAClB,eAAe;GACf,cAAc;GACd,cAAc;GACd,YAAY;GACZ,gBAAgB;GAChB,cAAc;GACd,aAAa;EACf;;;;EC/GA,MAAM,WAAW;;;;;EAWjB,MAAa,SAAS;GAAC;GAAS;GAAU;GAAU;EAAY;;;;;;EAOhE,SAAgB,MAAM,KAA0B;GAC9C,IAAI,aAAa,IAAI,OAAO,SAAS,IAAI;IAAE;IAAI;GAAG,CAAC,GAAG,8BAA8B;GACpF,MAAM,IAAI,IAAI,OAAO,KAAK,EAAE;GAG5B,IAAI,MAAM,OAAO,cAAc,IAAI,MAAM,SAAS;IAChD,MAAM;IACN,KAAK;IACL,QAAQ;IACR,eAAqC;KACnC,OAAO,EAAE,YAAY,IAAI,WAAW,KAAqD;KAGzF,gBAAgB,KAAA;IAClB;GACF,GAAG,aAAa,CAAC;GAGjB,IAAI,MAAM,OAAO,2BAA2B,IAAI,MAAM,SAAS;IAC7D,MAAM;IACN,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,aAAa,EAAE,aAAa;GAC9B,GAAG,aAAa,CAAC;EACnB"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["css","IconRefreshOutlineRegular","IconPlusOutlineRegular","IconEditOutlineRegular","IconCloseOutlineRegular","IconChecklistOutlineRegular"],"sources":["../../../../source/deepseek-harness/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/client/api.ts","../src/client/TaskBoardPage.tsx","../src/client/TaskBoardIcon.tsx","../src/client/locales.ts","../src/client/index.ts"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/** Browser client for the /taskboard host routes: typed fetch wrappers\n * (same origin as the GUI) plus the SSE subscription that keeps the board live. */\nimport type { BoardState, CreateTaskBody, DeleteTaskBody, TaskDto, UpdateTaskBody } from '../types.ts'\n\n/** Path prefix owning every task-board route. */\nconst BASE = '/taskboard'\n\n/** Unwrap the `{ok, ...}` envelope, throwing on a transport or payload error. */\nasync function unwrap<T>(pending: Promise<Response>): Promise<T> {\n const res = await pending\n let body: unknown\n try {\n body = await res.json()\n } catch {\n throw new Error(`task-board: HTTP ${res.status}`)\n }\n const record = body as { ok?: boolean; error?: string }\n if (!res.ok || record.ok !== true) throw new Error(record.error ?? `task-board: HTTP ${res.status}`)\n return body as T\n}\n\nconst post = (path: string, body: unknown, signal?: AbortSignal): Promise<Response> =>\n fetch(`${BASE}${path}`, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(body),\n ...(signal === undefined ? {} : { signal }),\n })\n\n/** Read the full board snapshot. */\nexport async function fetchState(signal?: AbortSignal): Promise<BoardState> {\n const body = await unwrap<{ state: BoardState }>(fetch(`${BASE}/api/state`, signal === undefined ? {} : { signal }))\n return body.state\n}\n\n/** Create a task. */\nexport async function createTask(input: CreateTaskBody): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/create', input))\n return body.task\n}\n\n/** Update a task (title/description/priority/status/doneSummary/doneFiles). */\nexport async function updateTask(input: UpdateTaskBody): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/update', input))\n return body.task\n}\n\n/** Delete a task. */\nexport async function deleteTask(id: string): Promise<boolean> {\n const body = await unwrap<{ deleted: boolean }>(post('/api/delete', { id } satisfies DeleteTaskBody))\n return body.deleted\n}\n\n/** Run a lifecycle action (start/verify/reject/block/unblock) on a task. */\nexport async function taskAction(id: string, action: NonNullable<UpdateTaskBody['action']>, reason?: string): Promise<TaskDto> {\n const body = await unwrap<{ task: TaskDto }>(post('/api/update', { id, action, ...(reason === undefined ? {} : { blockedReason: reason }) }))\n return body.task\n}\n\n/** Archive every done task (optionally scoped to a project); returns the count. */\nexport async function archiveDone(project?: string): Promise<number> {\n const body = await unwrap<{ archived: number }>(post('/api/archive-done', project === undefined ? {} : { project }))\n return body.archived\n}\n\n/** Enable/disable the background auto-claim poller. */\nexport async function setAutoClaim(enabled: boolean): Promise<boolean> {\n const body = await unwrap<{ autoClaim: boolean }>(post('/api/auto-claim', { enabled }))\n return body.autoClaim\n}\n\n/**\n * Subscribe to the board's live state over SSE.\n * @param onState - called with every pushed board state (including the opening one).\n * @returns a function closing the connection.\n */\nexport function subscribeBoard(onState: (state: BoardState) => void): () => void {\n const source = new EventSource(`${BASE}/events`)\n source.onmessage = (event) => {\n try {\n const frame = JSON.parse(event.data) as { type?: string; state?: BoardState }\n if (frame.type === 'state' && frame.state !== undefined) onState(frame.state)\n } catch { /* ignore malformed frame */ }\n }\n // On error EventSource auto-reconnects; the opening frame resyncs state.\n return () => { source.close() }\n}\n","/**\n * DSH Task Board page: a kanban of project tasks across the full lifecycle —\n * Draft · Ready · In progress · Review · Done · Blocked. The human creates and\n * moves tasks; an agent processes a project's ready/in-progress tasks via the\n * `task_board_*` tools; the board stays live over SSE.\n */\nimport { useEffect, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport {\n IconCloseOutlineRegular,\n IconEditOutlineRegular,\n IconPlusOutlineRegular,\n IconRefreshOutlineRegular,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, PropsRuntime, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { BoardState, TaskDto, TaskPriority, TaskStatus } from '../types.ts'\nimport { archiveDone, createTask, deleteTask, fetchState, setAutoClaim, subscribeBoard, taskAction, updateTask } from './api.ts'\nimport type { TaskBoardKey } from './locales.ts'\nimport css from './TaskBoardPage.module.css'\n\n/** Minimal workspace-list snapshot the page reads (paths + titles). */\nexport interface WorkspaceListView {\n readonly items: readonly { readonly path: string; readonly title: string }[]\n}\n\n/** Injected services the page uses. */\nexport interface TaskBoardInjected {\n /** Workspace list, for the project selector and default project. */\n readonly useWorkspaces: SnapshotSelectorHook<WorkspaceListView>\n /** The current session's working directory (its project), when known. */\n readonly currentProject?: string | undefined\n}\n\n/** Root-scoped page props. */\nexport type TaskBoardPageProps = PropsRuntime<'main'> & TaskBoardInjected & PropsLocale<'taskBoard'>\n\n/** Columns in board order. */\nconst COLUMNS: readonly TaskStatus[] = ['draft', 'ready', 'in_progress', 'review', 'done', 'blocked']\n\n/** How many done cards show before the Done column collapses. */\nconst DONE_COLLAPSED = 10\n\n/** Last path segment of a directory. */\nfunction baseName(path: string): string {\n const parts = path.replace(/\\\\/g, '/').split('/').filter(Boolean)\n return parts[parts.length - 1] ?? path\n}\n\n/** Relative \"updated\" label. */\nfunction ageLabel(updatedAt: number, now: number, t: (k: TaskBoardKey, p?: Record<string, string | number>) => string): string {\n const diff = Math.max(0, now - updatedAt)\n const min = 60_000\n if (diff < min) return t('time.now')\n if (diff < 60 * min) return t('time.minutes', { n: Math.floor(diff / min) })\n if (diff < 24 * 60 * min) return t('time.hours', { n: Math.floor(diff / (60 * min)) })\n return t('time.days', { n: Math.floor(diff / (24 * 60 * min)) })\n}\n\n/**\n * Render the task board.\n * @param props - injected services and copy.\n * @returns the global task-board page.\n */\nexport function TaskBoardPage(props: TaskBoardPageProps) {\n const { useWorkspaces, currentProject, t } = props\n const workspaceSnapshot = useWorkspaces(state => state)\n const projects = useMemo(() => {\n const seen = new Set<string>()\n const out: { path: string; title: string }[] = []\n for (const item of workspaceSnapshot.items) {\n if (item.path === '' || seen.has(item.path)) continue\n seen.add(item.path)\n out.push({ path: item.path, title: item.title })\n }\n return out\n }, [workspaceSnapshot])\n\n const [board, setBoard] = useState<BoardState | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const [now, setNow] = useState(() => Date.now())\n const [projectFilter, setProjectFilter] = useState<string>('all')\n const [priorityFilter, setPriorityFilter] = useState<'all' | TaskPriority>('all')\n const [drafting, setDrafting] = useState(false)\n const [draftProject, setDraftProject] = useState('')\n const [draftTitle, setDraftTitle] = useState('')\n const [draftDesc, setDraftDesc] = useState('')\n const [draftPriority, setDraftPriority] = useState<TaskPriority>('normal')\n const [draftReady, setDraftReady] = useState(false)\n const [draftReuseIdle, setDraftReuseIdle] = useState(false)\n const [confirmDeleteId, setConfirmDeleteId] = useState<string | undefined>(undefined)\n const [showArchived, setShowArchived] = useState(false)\n const [doneExpanded, setDoneExpanded] = useState(false)\n\n useEffect(() => {\n const timer = setInterval(() => { setNow(Date.now()) }, 30_000)\n return () => { clearInterval(timer) }\n }, [])\n\n useEffect(() => {\n let alive = true\n fetchState().then(state => { if (alive) { setBoard(state); setError(undefined) } }).catch(e => { if (alive) setError(e instanceof Error ? e.message : String(e)) })\n const close = subscribeBoard(state => { setBoard(state); setError(undefined) })\n return () => { alive = false; close() }\n }, [])\n\n const refresh = async (): Promise<void> => {\n try { setBoard(await fetchState()); setError(undefined) } catch (e) { setError(e instanceof Error ? e.message : String(e)) }\n }\n const run = async (op: () => Promise<unknown>): Promise<void> => {\n try { await op() } catch (e) { setError(e instanceof Error ? e.message : String(e)) }\n }\n\n const defaultProject = currentProject !== undefined && currentProject !== '' ? currentProject : (projects[0]?.path ?? '')\n const openDraft = (): void => {\n setDrafting(true); setDraftProject(defaultProject); setDraftTitle(''); setDraftDesc(''); setDraftPriority('normal'); setDraftReady(false); setDraftReuseIdle(false)\n }\n const submitDraft = async (): Promise<void> => {\n const title = draftTitle.trim()\n if (title === '' || draftProject === '') return\n await run(async () => {\n await createTask({ project: draftProject, title, ...(draftDesc.trim() === '' ? {} : { description: draftDesc.trim() }), priority: draftPriority, status: draftReady ? 'ready' : 'draft', reuseIdle: draftReuseIdle })\n setDrafting(false)\n })\n }\n const remove = async (id: string): Promise<void> => {\n if (confirmDeleteId !== id) { setConfirmDeleteId(id); return }\n setConfirmDeleteId(undefined)\n await run(() => deleteTask(id))\n }\n\n const tasks = board?.tasks ?? []\n const inProject = (task: TaskDto): boolean => projectFilter === 'all' || task.project === projectFilter\n const inPriority = (task: TaskDto): boolean => priorityFilter === 'all' || task.priority === priorityFilter\n // Live board excludes archived; the archive view lists only archived.\n const visible = tasks.filter(task => task.archived !== true && inProject(task) && inPriority(task))\n const archivedTasks = tasks.filter(task => task.archived === true && inProject(task))\n .sort((a, b) => b.updatedAt - a.updatedAt)\n const rank = (p: TaskPriority): number => (p === 'high' ? 2 : p === 'normal' ? 1 : 0)\n // Highest priority first within each column, then most recently updated.\n const byStatus = (status: TaskStatus): TaskDto[] =>\n visible.filter(task => task.status === status)\n .sort((a, b) => (rank(b.priority) - rank(a.priority)) || (b.updatedAt - a.updatedAt))\n const autoClaim = board?.autoClaim === true\n\n return (\n <section className={css.page} aria-label={t('page.title')} data-testid=\"task-board-page\">\n <header className={css.header}>\n <div className={css.headerLeft}>\n <h1 className={css.title}>{t('page.title')}</h1>\n <p className={css.subtitle}>{t('page.subtitle')}</p>\n </div>\n <div className={css.headerRight}>\n <label className={css.autoToggle} title={t('auto.hint')}>\n <input type=\"checkbox\" className={css.autoInput} checked={autoClaim} onChange={e => { void run(() => setAutoClaim(e.target.checked)) }} />\n <span className={css.autoSwitch} aria-hidden=\"true\" />\n <span className={css.autoLabel}>{t('auto.label')}</span>\n </label>\n <label className={css.projectPicker}>\n <span className={css.projectLabel}>{t('priority.label')}</span>\n <select className={css.select} value={priorityFilter} onChange={e => { setPriorityFilter(e.target.value as 'all' | TaskPriority) }}>\n <option value=\"all\">{t('priority.all')}</option>\n <option value=\"high\">{t('priority.high')}</option>\n <option value=\"normal\">{t('priority.normal')}</option>\n <option value=\"low\">{t('priority.low')}</option>\n </select>\n </label>\n <label className={css.projectPicker}>\n <span className={css.projectLabel}>{t('project.label')}</span>\n <select className={css.select} value={projectFilter} onChange={e => { setProjectFilter(e.target.value) }}>\n <option value=\"all\">{t('project.all')}</option>\n {projects.map(p => <option key={p.path} value={p.path}>{p.title} · {baseName(p.path)}</option>)}\n </select>\n </label>\n <button type=\"button\" className={css.refresh} aria-label={t('refresh')} onClick={() => { void refresh() }}>\n <IconRefreshOutlineRegular size={13} />{t('refresh')}\n </button>\n <button type=\"button\" className={clsx(css.refresh, showArchived && css.tabActive)} onClick={() => { setShowArchived(v => !v) }}>{showArchived ? t('archive.back') : t('archive.open')}</button>\n <button type=\"button\" className={css.newBtn} onClick={openDraft}><IconPlusOutlineRegular size={13} />{t('new.action')}</button>\n </div>\n </header>\n\n {error !== undefined && <div className={css.error} role=\"alert\">{t('error.load', { message: error })}</div>}\n\n {drafting && (\n <div className={css.draft}>\n <select className={css.select} value={draftProject} onChange={e => { setDraftProject(e.target.value) }} aria-label={t('new.projectPrompt')}>\n {projects.length === 0 && <option value=\"\">{t('new.projectPrompt')}</option>}\n {projects.map(p => <option key={p.path} value={p.path}>{p.title} · {baseName(p.path)}</option>)}\n </select>\n <input className={css.input} placeholder={t('new.placeholder.title')} value={draftTitle} onChange={e => { setDraftTitle(e.target.value) }} />\n <input className={css.input} placeholder={t('new.placeholder.description')} value={draftDesc} onChange={e => { setDraftDesc(e.target.value) }} />\n <select className={css.select} value={draftPriority} onChange={e => { setDraftPriority(e.target.value as TaskPriority) }} aria-label=\"priority\">\n <option value=\"low\">{t('priority.low')}</option><option value=\"normal\">{t('priority.normal')}</option><option value=\"high\">{t('priority.high')}</option>\n </select>\n <label className={css.readyToggle}>\n <input type=\"checkbox\" checked={draftReady} onChange={e => { setDraftReady(e.target.checked) }} />\n <span>{t('new.readyNow')}</span>\n </label>\n <label className={css.readyToggle} title={t('new.reuseIdleHint')}>\n <input type=\"checkbox\" checked={draftReuseIdle} onChange={e => { setDraftReuseIdle(e.target.checked) }} />\n <span>{t('new.reuseIdle')}</span>\n </label>\n <button type=\"button\" className={css.newBtn} disabled={draftTitle.trim() === '' || draftProject === ''} onClick={() => { void submitDraft() }}>{t('new.submit')}</button>\n <button type=\"button\" className={css.ghostBtn} onClick={() => { setDrafting(false) }}>{t('new.cancel')}</button>\n </div>\n )}\n\n {board === undefined && error === undefined\n ? <div className={css.loading}>{t('loading')}</div>\n : showArchived\n ? (\n <div className={css.archivePane}>\n <div className={css.archiveHead}>\n <h2 className={css.archiveTitle}>{t('archive.title')}</h2>\n <span className={css.columnCount}>{archivedTasks.length}</span>\n </div>\n {archivedTasks.length === 0\n ? <p className={css.columnEmpty}>{t('archive.empty')}</p>\n : (\n <ul className={css.cardList}>\n {archivedTasks.map(task => (\n <TaskCard key={task.id} task={task} now={now} t={t} confirming={confirmDeleteId === task.id}\n onAction={action => { void run(() => taskAction(task.id, action)) }}\n onStatus={status2 => { void run(() => updateTask({ id: task.id, status: status2 })) }}\n onSave={patch => { void run(() => updateTask({ id: task.id, ...patch })) }}\n onDelete={() => { void remove(task.id) }} />\n ))}\n </ul>\n )}\n </div>\n )\n : (\n <div className={css.board}>\n {COLUMNS.map(status => {\n const all = byStatus(status)\n const isDone = status === 'done'\n const collapsed = isDone && !doneExpanded && all.length > DONE_COLLAPSED\n const items = collapsed ? all.slice(0, DONE_COLLAPSED) : all\n return (\n <section key={status} className={clsx(css.column, status === 'blocked' && css.columnBlocked, isDone && css.columnDone)} aria-label={t(`column.${status}` as TaskBoardKey)}>\n <header className={css.columnHeader}>\n <span className={css.columnDot} data-status={status} aria-hidden=\"true\" />\n <h2 className={css.columnTitle}>{t(`column.${status}` as TaskBoardKey)}</h2>\n <span className={css.columnCount}>{all.length}</span>\n {isDone && all.length > 0 && (\n <button type=\"button\" className={css.columnAction} onClick={() => { void run(() => archiveDone(projectFilter === 'all' ? undefined : projectFilter)) }}>{t('archive.allDone')}</button>\n )}\n </header>\n {items.length === 0\n ? <p className={css.columnEmpty}>{t(`column.empty.${status}` as TaskBoardKey)}</p>\n : (\n <ul className={css.cardList}>\n {items.map(task => (\n <TaskCard key={task.id} task={task} now={now} t={t} confirming={confirmDeleteId === task.id}\n onAction={action => { void run(() => taskAction(task.id, action)) }}\n onStatus={status2 => { void run(() => updateTask({ id: task.id, status: status2 })) }}\n onSave={patch => { void run(() => updateTask({ id: task.id, ...patch })) }}\n onDelete={() => { void remove(task.id) }} />\n ))}\n </ul>\n )}\n {collapsed && (\n <button type=\"button\" className={css.moreBtn} onClick={() => { setDoneExpanded(true) }}>\n {t('archive.showMore', { n: all.length - DONE_COLLAPSED })}\n </button>\n )}\n {isDone && doneExpanded && all.length > DONE_COLLAPSED && (\n <button type=\"button\" className={css.moreBtn} onClick={() => { setDoneExpanded(false) }}>{t('archive.showLess')}</button>\n )}\n </section>\n )\n })}\n </div>\n )}\n </section>\n )\n}\n\n/** One task card with lifecycle-appropriate actions. */\nfunction TaskCard(props: {\n readonly task: TaskDto\n readonly now: number\n readonly confirming: boolean\n readonly t: (k: TaskBoardKey, p?: Record<string, string | number>) => string\n readonly onAction: (action: 'start' | 'verify' | 'reject' | 'block' | 'unblock' | 'archive' | 'unarchive') => void\n readonly onStatus: (status: TaskStatus) => void\n readonly onDelete: () => void\n readonly onSave: (patch: { title: string; description?: string; priority: TaskPriority }) => void\n}) {\n const { task, now, confirming, t, onAction, onStatus, onDelete, onSave } = props\n const [editing, setEditing] = useState(false)\n const [eTitle, setETitle] = useState(task.title)\n const [eDesc, setEDesc] = useState(task.description ?? '')\n const [ePriority, setEPriority] = useState<TaskPriority>(task.priority)\n const beginEdit = (): void => { setETitle(task.title); setEDesc(task.description ?? ''); setEPriority(task.priority); setEditing(true) }\n const commitEdit = (): void => {\n const title = eTitle.trim()\n if (title === '') return\n onSave({ title, ...(eDesc.trim() === '' ? {} : { description: eDesc.trim() }), priority: ePriority })\n setEditing(false)\n }\n const btn = (label: string, onClick: () => void, cls?: string): JSX.Element => (\n <button type=\"button\" className={clsx(css.actionBtn, cls)} onClick={onClick}>{label}</button>\n )\n let actions: JSX.Element[]\n switch (task.status) {\n case 'draft':\n actions = [btn(t('act.confirmReady'), () => { onStatus('ready') }, css.actionPrimary)]\n break\n case 'ready':\n actions = [btn(t('act.start'), () => { onAction('start') }, css.actionPrimary)]\n break\n case 'in_progress':\n actions = [btn(t('act.complete'), () => { onStatus('review') }, css.actionPrimary)]\n break\n case 'review':\n actions = [btn(t('act.verify'), () => { onAction('verify') }, css.actionPrimary), btn(t('act.reject'), () => { onAction('reject') })]\n break\n case 'done':\n actions = []\n break\n case 'blocked':\n actions = [btn(t('act.unblock'), () => { onAction('unblock') }, css.actionPrimary)]\n break\n }\n if (editing) {\n return (\n <li className={css.card}>\n <input className={css.input} value={eTitle} onChange={e => { setETitle(e.target.value) }} placeholder={t('new.placeholder.title')} aria-label=\"title\" />\n <textarea className={clsx(css.input, css.editTextarea)} value={eDesc} onChange={e => { setEDesc(e.target.value) }} placeholder={t('new.placeholder.description')} aria-label=\"description\" />\n <select className={css.select} value={ePriority} onChange={e => { setEPriority(e.target.value as TaskPriority) }} aria-label=\"priority\">\n <option value=\"low\">{t('priority.low')}</option><option value=\"normal\">{t('priority.normal')}</option><option value=\"high\">{t('priority.high')}</option>\n </select>\n <div className={css.cardActions}>\n <button type=\"button\" className={clsx(css.actionBtn, css.actionPrimary)} disabled={eTitle.trim() === ''} onClick={commitEdit}>{t('edit.save')}</button>\n <button type=\"button\" className={css.actionBtn} onClick={() => { setEditing(false) }}>{t('edit.cancel')}</button>\n </div>\n </li>\n )\n }\n return (\n <li className={clsx(css.card, task.priority === 'high' && css.cardHigh, task.status === 'blocked' && css.cardBlocked)}>\n <div className={css.cardTop}>\n <span className={css.cardTitle}>{task.title}</span>\n <span className={css.cardAge}>{ageLabel(task.updatedAt, now, t)}</span>\n </div>\n {task.description !== undefined && task.description !== '' && <p className={css.cardDesc}>{task.description}</p>}\n <div className={css.cardMeta}>\n <span className={css.projectBadge} title={task.project}>{baseName(task.project)}</span>\n {task.priority !== 'normal' && <span className={css.priorityBadge} data-p={task.priority}>{t(`priority.${task.priority}` as TaskBoardKey)}</span>}\n {task.claimedBy !== undefined && <span className={css.claimed}>{t('card.claimedBy', { session: task.claimedBy.sessionId.slice(0, 12) })}</span>}\n </div>\n {task.status === 'blocked' && task.blockedReason !== undefined && <p className={css.blockReason}>{t('card.blockedReason', { reason: task.blockedReason })}</p>}\n {(task.status === 'review' || task.status === 'done') && (\n <p className={css.doneSummary} title={task.doneSummary}>{t('card.doneSummary', { summary: task.doneSummary ?? t('card.noSummary') })}</p>\n )}\n <div className={css.cardActions}>\n {actions}\n {task.archived === true\n ? btn(t('act.unarchive'), () => { onAction('unarchive') })\n : task.status === 'done'\n ? btn(t('act.archive'), () => { onAction('archive') }, css.actionGhost)\n : task.status !== 'blocked' && btn(t('act.block'), () => { onAction('block') }, css.actionGhost)}\n <button type=\"button\" className={css.iconBtn} aria-label={t('card.edit')} title={t('card.edit')} onClick={beginEdit}>\n <IconEditOutlineRegular size={12} />\n </button>\n <button type=\"button\" className={clsx(css.iconBtn, confirming && css.deleteConfirm)} aria-label={confirming ? t('card.confirmDelete') : t('card.delete')} onClick={onDelete}>\n {confirming ? t('card.confirmDelete') : <IconCloseOutlineRegular size={12} />}\n </button>\n </div>\n </li>\n )\n}\n","/** Decorative occupant for the Task board sidebar entry. */\nimport { IconChecklistOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\n\n/**\n * Render the checklist glyph at the size the sidebar asks for; the sidebar owns\n * the accessible navigation label.\n * @param props - the sidebar's icon share.\n * @returns decorative checklist icon.\n */\nexport function TaskBoardIcon({ size }: PropsRuntime<'sidebar.panellist'>) {\n return <IconChecklistOutlineRegular size={size} />\n}\n","/** `taskBoard` namespace dictionaries. */\n\n/** Dictionary namespace owned by this plugin. */\nexport const NS = 'taskBoard'\n\n/** Simplified Chinese dictionary (source of truth for keys). */\nexport const zh = {\n 'panel.label': '任务看板',\n 'page.title': '任务看板',\n 'page.subtitle': '按项目维护任务,交给 agent 领取执行,完成后人工验收',\n 'refresh': '刷新',\n 'loading': '加载中…',\n 'auto.label': '自动认领',\n 'auto.hint': '开启后,后台定时把「待处理」的任务自动转到「进行中」(供 agent 拉取执行)',\n 'project.label': '项目',\n 'project.all': '全部项目',\n 'project.unknown': '未知项目',\n 'new.action': '新建任务',\n 'new.placeholder.title': '任务标题',\n 'new.placeholder.description': '描述(可选)',\n 'new.projectPrompt': '选择项目',\n 'new.readyNow': '直接标记为待处理',\n 'new.reuseIdle': '复用空闲会话',\n 'new.reuseIdleHint': '自动派发时,若该项目有空闲会话则在其上继续,而不是新建会话(默认不勾选)',\n 'new.submit': '创建',\n 'new.cancel': '取消',\n 'priority.label': '优先级',\n 'priority.all': '全部',\n 'priority.low': '低',\n 'priority.normal': '中',\n 'priority.high': '高',\n 'column.draft': '待定',\n 'column.ready': '待处理',\n 'column.in_progress': '进行中',\n 'column.review': '待验证',\n 'column.done': '已完成',\n 'column.blocked': '阻断',\n 'column.empty.draft': '没有待定的任务',\n 'column.empty.ready': '没有待处理的任务',\n 'column.empty.in_progress': '没有进行中的任务',\n 'column.empty.review': '没有待验证的任务',\n 'column.empty.done': '还没有已完成的任务',\n 'column.empty.blocked': '没有被阻断的任务',\n 'act.confirmReady': '确认处理',\n 'act.start': '▶ 开始',\n 'act.complete': '完成待验收',\n 'act.verify': '验收通过',\n 'act.reject': '退回',\n 'act.block': '阻断',\n 'act.unblock': '解除阻断',\n 'act.archive': '归档',\n 'act.unarchive': '取消归档',\n 'archive.open': '归档',\n 'archive.back': '返回看板',\n 'archive.title': '已归档任务',\n 'archive.empty': '没有已归档的任务',\n 'archive.allDone': '全部归档',\n 'archive.showMore': '展开其余 {n} 个',\n 'archive.showLess': '收起',\n\n 'card.claimedBy': '由 {session} 领取',\n 'card.doneSummary': '完成摘要:{summary}',\n 'card.blockedReason': '阻断原因:{reason}',\n 'card.edit': '编辑任务',\n 'edit.save': '保存',\n 'edit.cancel': '取消',\n 'card.delete': '删除任务',\n 'card.confirmDelete': '再次点击确认',\n 'card.noSummary': '(无摘要)',\n 'empty.title': '还没有任务',\n 'empty.hint': '点右上角「新建任务」,或在下方选择项目后创建第一个任务。',\n 'error.load': '操作失败:{message}',\n 'time.now': '刚刚',\n 'time.minutes': '{n} 分钟前',\n 'time.hours': '{n} 小时前',\n 'time.days': '{n} 天前',\n}\n\n/** Type keyed by the Chinese dictionary. */\nexport type TaskBoardKey = keyof typeof zh\n\n/** English dictionary (must match every key). */\nexport const en: Record<TaskBoardKey, string> = {\n 'panel.label': 'Task board',\n 'page.title': 'Task board',\n 'page.subtitle': 'Project tasks an agent can pull, execute, and that a human verifies',\n 'refresh': 'Refresh',\n 'loading': 'Loading…',\n 'auto.label': 'Auto-claim',\n 'auto.hint': 'When on, a background poller moves \"ready\" tasks to \"in progress\" for an agent to pick up.',\n 'project.label': 'Project',\n 'project.all': 'All projects',\n 'project.unknown': 'Unknown project',\n 'new.action': 'New task',\n 'new.placeholder.title': 'Task title',\n 'new.placeholder.description': 'Description (optional)',\n 'new.projectPrompt': 'Choose a project',\n 'new.readyNow': 'Mark ready now',\n 'new.reuseIdle': 'Reuse idle session',\n 'new.reuseIdleHint': 'On auto-dispatch, continue in an idle session in the same project instead of creating a new one (off by default)',\n 'new.submit': 'Create',\n 'new.cancel': 'Cancel',\n 'priority.label': 'Priority',\n 'priority.all': 'All',\n 'priority.low': 'Low',\n 'priority.normal': 'Normal',\n 'priority.high': 'High',\n 'column.draft': 'Draft',\n 'column.ready': 'Ready',\n 'column.in_progress': 'In progress',\n 'column.review': 'Review',\n 'column.done': 'Done',\n 'column.blocked': 'Blocked',\n 'column.empty.draft': 'No drafts',\n 'column.empty.ready': 'Nothing ready',\n 'column.empty.in_progress': 'Nothing in progress',\n 'column.empty.review': 'Nothing awaiting review',\n 'column.empty.done': 'Nothing completed yet',\n 'column.empty.blocked': 'Nothing blocked',\n 'act.confirmReady': 'Confirm ready',\n 'act.start': '▶ Start',\n 'act.complete': 'Complete for review',\n 'act.verify': 'Accept',\n 'act.reject': 'Reject',\n 'act.block': 'Block',\n 'act.unblock': 'Unblock',\n 'act.archive': 'Archive',\n 'act.unarchive': 'Restore',\n 'archive.open': 'Archived',\n 'archive.back': 'Back to board',\n 'archive.title': 'Archived tasks',\n 'archive.empty': 'No archived tasks',\n 'archive.allDone': 'Archive all',\n 'archive.showMore': 'Show {n} more',\n 'archive.showLess': 'Show less',\n\n 'card.claimedBy': 'Claimed by {session}',\n 'card.doneSummary': 'Summary: {summary}',\n 'card.blockedReason': 'Blocked: {reason}',\n 'card.edit': 'Edit task',\n 'edit.save': 'Save',\n 'edit.cancel': 'Cancel',\n 'card.delete': 'Delete task',\n 'card.confirmDelete': 'Click again to confirm',\n 'card.noSummary': '(no summary)',\n 'empty.title': 'No tasks yet',\n 'empty.hint': 'Use \"New task\" in the header, or pick a project and create the first one.',\n 'error.load': 'Action failed: {message}',\n 'time.now': 'just now',\n 'time.minutes': '{n}m ago',\n 'time.hours': '{n}h ago',\n 'time.days': '{n}d ago',\n}\n","/**\n * DSH Task Board, browser half: contributes one global page in the root `main`\n * slot plus its sidebar entry. The page is a three-column kanban of project\n * tasks that talks to the Host `/taskboard` routes and stays live over SSE.\n *\n * Tasks are attributed to a project (workspace path); the human creates and\n * manages them, and an agent processes a project's pending tasks via the\n * Host-side `task_board_*` tools (see the package's Host half).\n */\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-workspace/client'\nimport type { MainPanelId } from '@deepseek-ai/dsh-client-ui-layout/client'\nimport type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots'\nimport { TaskBoardPage, type TaskBoardInjected, type WorkspaceListView } from './TaskBoardPage.tsx'\nimport { TaskBoardIcon } from './TaskBoardIcon.tsx'\nimport { en, NS, zh, type TaskBoardKey } from './locales.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Task board copy. */\n 'taskBoard': TaskBoardKey\n }\n}\n\nexport type { TaskBoardPageProps, TaskBoardInjected } from './TaskBoardPage.tsx'\n\n/** Stable main-panel id for the task board page. */\nconst PANEL_ID = 'taskBoard' as MainPanelId\n\n/** Injected face as returned by the factory (before hooks are synthesized). */\ninterface TaskBoardInjectedRaw extends Omit<TaskBoardInjected, 'useWorkspaces'> {\n readonly hooks: { readonly workspaces: HostObservable<WorkspaceListView> }\n}\n\n/**\n * Required services: the slot registry and dictionaries, the layout that owns\n * the main-panel selection, and the workspace list for the project selector.\n */\nexport const inject = ['slots', 'locale', 'layout', 'workspaces']\n\n/**\n * Client plugin body: register the dictionaries, the global task board page, and\n * the sidebar entry that selects it.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-task-board: dictionaries')\n const t = ctx.locale.bind(NS)\n\n // The global page body. Renders whenever the layout selects `taskBoard`.\n ctx.slots.inject('main', () => ctx.slots.register({\n name: 'main',\n key: PANEL_ID,\n locale: NS,\n inject: (): TaskBoardInjectedRaw => ({\n hooks: { workspaces: ctx.workspaces.list as unknown as HostObservable<WorkspaceListView> },\n // The current session's project is optional; the page falls back to the\n // project picker's first workspace.\n currentProject: undefined,\n }),\n }, TaskBoardPage))\n\n // Sidebar navigation row selecting the page.\n ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({\n name: 'sidebar.panellist',\n id: PANEL_ID,\n order: 6,\n locale: NS,\n label: () => t('panel.label'),\n }, TaskBoardI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sB;GACtB,4BAA4B;GAC5B,uBAAuB;GACvB,qBAAqB;GACrB,wBAAwB;GACxB,oBAAoB;GACpB,aAAa;GACb,gBAAgB;GAChB,cAAc;GACd,cAAc;GACd,aAAa;GACb,eAAe;GACf,eAAe;GACf,iBAAiB;GACjB,gBAAgB;GAChB,gBAAgB;GAChB,iBAAiB;GACjB,iBAAiB;GACjB,mBAAmB;GACnB,oBAAoB;GACpB,oBAAoB;GAEpB,kBAAkB;GAClB,oBAAoB;GACpB,sBAAsB;GACtB,aAAa;GACb,aAAa;GACb,eAAe;GACf,eAAe;GACf,sBAAsB;GACtB,kBAAkB;GAClB,eAAe;GACf,cAAc;GACd,cAAc;GACd,YAAY;GACZ,gBAAgB;GAChB,cAAc;GACd,aAAa;EACf;;;;ECzHA,MAAM,WAAW;;;;;EAWjB,MAAa,SAAS;GAAC;GAAS;GAAU;GAAU;EAAY;;;;;;EAOhE,SAAgB,MAAM,KAA0B;GAC9C,IAAI,aAAa,IAAI,OAAO,SAAS,IAAI;IAAE;IAAI;GAAG,CAAC,GAAG,8BAA8B;GACpF,MAAM,IAAI,IAAI,OAAO,KAAK,EAAE;GAG5B,IAAI,MAAM,OAAO,cAAc,IAAI,MAAM,SAAS;IAChD,MAAM;IACN,KAAK;IACL,QAAQ;IACR,eAAqC;KACnC,OAAO,EAAE,YAAY,IAAI,WAAW,KAAqD;KAGzF,gBAAgB,KAAA;IAClB;GACF,GAAG,aAAa,CAAC;GAGjB,IAAI,MAAM,OAAO,2BAA2B,IAAI,MAAM,SAAS;IAC7D,MAAM;IACN,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,aAAa,EAAE,aAAa;GAC9B,GAAG,aAAa,CAAC;EACnB"}
|
package/lib/index.js
CHANGED
|
@@ -11313,7 +11313,8 @@ const taskBoardDomain = defineDomain({
|
|
|
11313
11313
|
"done"
|
|
11314
11314
|
]).optional(),
|
|
11315
11315
|
blockedReason: string().optional(),
|
|
11316
|
-
archived: boolean().optional()
|
|
11316
|
+
archived: boolean().optional(),
|
|
11317
|
+
reuseIdle: boolean().optional()
|
|
11317
11318
|
})) }
|
|
11318
11319
|
});
|
|
11319
11320
|
/** Generate a short, sortable-ish task id. */
|
|
@@ -11422,7 +11423,8 @@ var TaskStore = class {
|
|
|
11422
11423
|
priority: input.priority ?? "normal",
|
|
11423
11424
|
createdAt: now,
|
|
11424
11425
|
updatedAt: now,
|
|
11425
|
-
...input.description === void 0 || input.description === "" ? {} : { description: input.description }
|
|
11426
|
+
...input.description === void 0 || input.description === "" ? {} : { description: input.description },
|
|
11427
|
+
...input.reuseIdle === true ? { reuseIdle: true } : {}
|
|
11426
11428
|
};
|
|
11427
11429
|
if (task.title === "") throw new Error("task title must not be empty");
|
|
11428
11430
|
await this.table.put(task.id, task);
|
|
@@ -11611,7 +11613,8 @@ function registerTaskBoardRoutes(ctx, store) {
|
|
|
11611
11613
|
title: body.title,
|
|
11612
11614
|
...body.description === void 0 ? {} : { description: body.description },
|
|
11613
11615
|
...body.priority === void 0 ? {} : { priority: body.priority },
|
|
11614
|
-
...body.status === "ready" ? { status: "ready" } : {}
|
|
11616
|
+
...body.status === "ready" ? { status: "ready" } : {},
|
|
11617
|
+
...body.reuseIdle === true ? { reuseIdle: true } : {}
|
|
11615
11618
|
})
|
|
11616
11619
|
});
|
|
11617
11620
|
} catch (error) {
|
|
@@ -11960,12 +11963,19 @@ async function apply(ctx) {
|
|
|
11960
11963
|
async function dispatchTask(ctx, store, task) {
|
|
11961
11964
|
const controller = ctx.get("sessionController");
|
|
11962
11965
|
if (controller === void 0) return;
|
|
11963
|
-
const
|
|
11964
|
-
const wanted = task.project
|
|
11965
|
-
const workspace = registry?.list().find((ws) => ws.path.replace(/\\/g, "/").replace(/\/+$/, "") === wanted);
|
|
11966
|
+
const norm = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
11967
|
+
const wanted = norm(task.project);
|
|
11966
11968
|
try {
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
+
let sessionId;
|
|
11970
|
+
if (task.reuseIdle === true) try {
|
|
11971
|
+
const candidate = (await controller.list({}, new AbortController().signal)).items.filter((item) => item.blank !== true && item.running !== true && item.parentSessionId === void 0 && item.cwd !== void 0 && norm(item.cwd) === wanted).at(0);
|
|
11972
|
+
if (candidate !== void 0) sessionId = candidate.sessionId;
|
|
11973
|
+
} catch {}
|
|
11974
|
+
if (sessionId === void 0) {
|
|
11975
|
+
const workspace = ctx.get("workspaceRegistry")?.list().find((ws) => norm(ws.path) === wanted);
|
|
11976
|
+
const created = await controller.create(workspace !== void 0 ? { workspaceId: workspace.id } : { cwd: task.project });
|
|
11977
|
+
sessionId = created.agent?.id ?? created.sessionId ?? created.value?.sessionId;
|
|
11978
|
+
}
|
|
11969
11979
|
if (sessionId === void 0) return;
|
|
11970
11980
|
await store.claim(task.id, sessionId);
|
|
11971
11981
|
const prompt = `Automatically dispatched: please complete task ${task.id} ("${task.title}") on the task board. Use task_board_list to confirm it, keep it claimed, do the described work, then task_board_complete with a concise summary and the files you touched.`;
|
|
@@ -18,6 +18,8 @@ export declare const zh: {
|
|
|
18
18
|
'new.placeholder.description': string;
|
|
19
19
|
'new.projectPrompt': string;
|
|
20
20
|
'new.readyNow': string;
|
|
21
|
+
'new.reuseIdle': string;
|
|
22
|
+
'new.reuseIdleHint': string;
|
|
21
23
|
'new.submit': string;
|
|
22
24
|
'new.cancel': string;
|
|
23
25
|
'priority.label': string;
|
|
@@ -56,6 +58,9 @@ export declare const zh: {
|
|
|
56
58
|
'card.claimedBy': string;
|
|
57
59
|
'card.doneSummary': string;
|
|
58
60
|
'card.blockedReason': string;
|
|
61
|
+
'card.edit': string;
|
|
62
|
+
'edit.save': string;
|
|
63
|
+
'edit.cancel': string;
|
|
59
64
|
'card.delete': string;
|
|
60
65
|
'card.confirmDelete': string;
|
|
61
66
|
'card.noSummary': string;
|
package/lib/types/store.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const taskBoardDomain: {
|
|
|
23
23
|
blockedFrom?: "draft" | "ready" | "in_progress" | "review" | "done" | undefined;
|
|
24
24
|
blockedReason?: string | undefined;
|
|
25
25
|
archived?: boolean | undefined;
|
|
26
|
+
reuseIdle?: boolean | undefined;
|
|
26
27
|
}>;
|
|
27
28
|
};
|
|
28
29
|
};
|
|
@@ -74,6 +75,7 @@ export declare class TaskStore {
|
|
|
74
75
|
description?: string;
|
|
75
76
|
priority?: Task['priority'];
|
|
76
77
|
status?: Extract<TaskStatus, 'draft' | 'ready'>;
|
|
78
|
+
reuseIdle?: boolean;
|
|
77
79
|
}, now?: number): Promise<TaskDto>;
|
|
78
80
|
/** Patch a task; status is free-form (the store does not enforce a graph). */
|
|
79
81
|
update(id: string, patch: Partial<Omit<Task, 'id' | 'project' | 'createdAt'>> & Record<string, unknown>, now?: number): Promise<TaskDto>;
|
package/lib/types/types.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export interface Task {
|
|
|
38
38
|
readonly blockedReason?: string;
|
|
39
39
|
/** Archived tasks are hidden from the board columns and shown in the archive view. */
|
|
40
40
|
readonly archived?: boolean;
|
|
41
|
+
/** Whether auto-dispatch should reuse an idle session in the project instead of creating a new one. */
|
|
42
|
+
readonly reuseIdle?: boolean;
|
|
41
43
|
}
|
|
42
44
|
/** Zod schema guarding every durable task record as read/written by the domain. */
|
|
43
45
|
export declare const taskSchema: z.ZodObject<{
|
|
@@ -75,6 +77,7 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
75
77
|
}>>;
|
|
76
78
|
blockedReason: z.ZodOptional<z.ZodString>;
|
|
77
79
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
reuseIdle: z.ZodOptional<z.ZodBoolean>;
|
|
78
81
|
}, z.core.$strip>;
|
|
79
82
|
/** Browser-facing task DTO (identical shape to the durable record). */
|
|
80
83
|
export type TaskDto = Task;
|
|
@@ -94,6 +97,8 @@ export interface CreateTaskBody {
|
|
|
94
97
|
readonly priority?: TaskPriority;
|
|
95
98
|
/** Initial status; defaults to `draft`. */
|
|
96
99
|
readonly status?: Extract<TaskStatus, 'draft' | 'ready'>;
|
|
100
|
+
/** Reuse an idle session in the project on dispatch (default false = new session). */
|
|
101
|
+
readonly reuseIdle?: boolean;
|
|
97
102
|
}
|
|
98
103
|
/** Update-task request body (partial, status changes supported). */
|
|
99
104
|
export interface UpdateTaskBody {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-project-tasks",
|
|
3
3
|
"description": "Project task board for DSH: create tasks that belong to a project (workspace), let an agent pull a project's pending tasks, execute them, and mark them done — a three-column kanban (Todo / In progress / Done) with a host-authoritative task ledger and task_board_* agent tools.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "hyper",
|
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
"cordis.patch.yml",
|
|
52
52
|
"README.md",
|
|
53
53
|
"README.zh.md",
|
|
54
|
-
"LICENSE"
|
|
54
|
+
"LICENSE",
|
|
55
|
+
"docs/screenshot-light.png",
|
|
56
|
+
"docs/screenshot-dark.png"
|
|
55
57
|
],
|
|
56
58
|
"dsh": {
|
|
57
59
|
"bundle": {
|