@alexsun-top/opencode-chat-room 0.7.6 → 0.7.7

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +5 -5
  3. package/README.zh-CN.md +5 -5
  4. package/dist/cli.js +735 -164
  5. package/package.json +2 -1
  6. package/plugin.ts +15 -3
  7. package/server/assets/base.css +0 -2
  8. package/server/assets/chat/doc-preview.js +11 -2
  9. package/server/assets/chat/editor.js +10 -7
  10. package/server/assets/chat/events.js +1 -1
  11. package/server/assets/chat/index.js +2 -0
  12. package/server/assets/chat/locales/de.js +18 -0
  13. package/server/assets/chat/locales/es.js +18 -0
  14. package/server/assets/chat/locales/fr.js +18 -0
  15. package/server/assets/chat/locales/it.js +18 -0
  16. package/server/assets/chat/locales/ja.js +18 -0
  17. package/server/assets/chat/locales/ko.js +18 -0
  18. package/server/assets/chat/markdown.js +27 -1
  19. package/server/assets/chat/messages.js +1 -0
  20. package/server/assets/chat/palette.js +9 -4
  21. package/server/assets/chat/questions.js +1 -0
  22. package/server/assets/chat/rooms.js +6 -1
  23. package/server/assets/chat/shortcuts.js +14 -3
  24. package/server/assets/chat/state.js +36 -0
  25. package/server/assets/chat/system-messages.js +3 -1
  26. package/server/assets/chat/task-form.js +197 -0
  27. package/server/assets/chat/task-row.js +169 -0
  28. package/server/assets/chat/tasks.js +494 -0
  29. package/server/assets/responsive.css +26 -1
  30. package/server/assets/tasks.css +422 -0
  31. package/server/chat.html +97 -19
  32. package/server/member-routes.ts +3 -0
  33. package/server/sw.js +12 -2
  34. package/server/task-routes.ts +53 -0
  35. package/skills/chatroom/SKILL.md +3 -1
  36. package/src/README.md +3 -3
  37. package/src/agent/task-tool.ts +155 -0
  38. package/src/center/center-client.ts +44 -0
  39. package/src/rooms/tasks.ts +246 -0
  40. package/src/runtime/v2-plugin.ts +11 -2
  41. package/src/state/sqlite-state.ts +67 -0
  42. package/src/tui/app.mjs +5 -3
  43. package/src/tui/main.mjs +4 -4
  44. package/src/tui/markdown.mjs +29 -5
  45. package/src/tui/mentions.mjs +218 -0
  46. package/src/tui/message-app.mjs +3 -2
  47. package/src/tui/palette-app.mjs +9 -2
  48. package/src/tui/ui-content.mjs +9 -2
  49. package/src/tui/ui-mentions.mjs +44 -0
  50. package/src/tui/ui-suggest-view.mjs +63 -0
  51. package/src/tui/ui-suggest.mjs +197 -0
  52. package/src/tui/ui-theme.mjs +2 -1
  53. package/src/tui/ui-view.mjs +2 -0
  54. package/src/tui/ui.mjs +17 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.7 — 2026-11-23
4
+
5
+ - Expand room tasks into a right-side task board on wide screens and a modal on narrow ones. Tasks now include title, description, assignee, due date, participant list, checklist steps, conclusion, and todo/doing/done status; the header can clear completed tasks. Members create tasks, creators and human administrators manage them, assignees change status or step completion. Agents get `task_list`, `task_create`, `task_update`, and `task_delete` with the same fields and step progress. Editing a task keeps participants and the assignee who later left the room, so an unrelated change cannot silently drop or block them.
6
+ - Ship Codex 0.1.5 and dsh 0.1.4 with the same task actions, fields, and checklist validation as the main package.
7
+ - Open the web search and command palette with Ctrl+P as well as Alt+Space, so browsers that reserve Alt+Space can still reach them.
8
+ - Keep terminal `/` commands inline in the composer (or opened from the room list) and add `@` member suggestions, including `@all`; selected mentions stay highlighted in the input and are sent as canonical `<at>@Name</at>` tags. Fenced, indented, and inline code are left byte-for-byte unchanged. The command list is fixed when the popup opens, so a delayed room refresh cannot make it grow.
9
+ - Instruct agents to address participants with the tag sequence `<at>@Name</at>` in messages, questions, announcements, and reminders; bare `@Name` still triggers a notification but is not highlighted as a mention. Render the broadcast token `<at>@all</at>` with the current locale in messages, the composer, and room previews, for example `@Everyone` in English and `@所有人` in Chinese, while copying keeps the canonical token.
10
+ - Preserve unrecognized XML/HTML tags as literal text instead of letting the sanitizer delete them; recognized Markdown and safe tags still render, and scripts or event handlers remain inert.
11
+ - Animate room-list switching with Fluent-style left highlight bars: the previous row's bar collapses in the switch direction while the selected row's bar expands from the same side, without row movement or fading.
12
+ - Reload the room list when leaving the last joined room, so the start screen immediately shows rooms available to rejoin instead of requiring a manual refresh.
13
+ - Version stylesheet and classic script URLs with the release and precache every shipped CSS and vendor script, including nested locale modules. An older service worker can no longer pair freshly deployed HTML with stale cached styles.
14
+ - Guard room creation and joining with a synchronous busy state, so a repeated Enter or double submit cannot create two rooms.
15
+
3
16
  ## 0.7.6 — 2026-11-22
4
17
 
5
18
  - Restore a usable caret when the search palette closes: the composer keeps keyboard focus and typing works immediately after Escape.
package/README.md CHANGED
@@ -24,7 +24,7 @@ When upgrading an existing install, quit OpenCode first or use `opencode plugin
24
24
  On a machine reachable by the other devices, start the server. Replace `your-password` with a shared password:
25
25
 
26
26
  ```bash
27
- npx --yes --package=@alexsun-top/opencode-chat-room@0.7.6 -- opencode-chat-room --host 0.0.0.0 --port 4399 --token 'your-password'
27
+ npx --yes --package=@alexsun-top/opencode-chat-room@0.7.7 -- opencode-chat-room --host 0.0.0.0 --port 4399 --token 'your-password'
28
28
  ```
29
29
 
30
30
  The server runs on Node.js 24.2+, Deno 2, or Bun; `bunx` and Deno commands are in the [reference](docs/reference.en.md#central-mode-multi-host). OpenCode itself still runs on Bun.
@@ -53,7 +53,7 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
53
53
  ghcr.io/agentsyaml/opencode-chat-room:latest
54
54
  ```
55
55
 
56
- Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.6`. Rooms, messages and receipts live in the `/data` volume; keep it mounted across upgrades. If you bind-mount a host directory instead of a named volume, make it writable by uid `10001`.
56
+ Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.7`. Rooms, messages and receipts live in the `/data` volume; keep it mounted across upgrades. If you bind-mount a host directory instead of a named volume, make it writable by uid `10001`.
57
57
 
58
58
  ## 3. Start chatting
59
59
 
@@ -64,9 +64,9 @@ Pin a release with `ghcr.io/agentsyaml/opencode-chat-room:v0.7.6`. Rooms, messag
64
64
  - Use the room's reminder button for one-time or recurring reminders. Times default to the server's time zone.
65
65
  - Reminder text supports `{{time}}`, `{{initiator}}`, and `{{room}}`.
66
66
  - A compact shortcut chip under the composer shows Alt+/ (Option+/ on Mac); click it or press the keys to open the sheet. Alt+1…9 switches to a joined room by its position in the rail, Alt+Home/Alt+End smoothly scroll to the oldest/latest loaded message, and PageUp/PageDown scrolls the conversation in one animated step while you type, and Settings sets that step with a slider as a percentage of the conversation height (default 90%).
67
- - Press Alt+Space (Option+Space on Mac) anywhere, including the composer, to search messages. Search starts in the current room; Tab switches to all joined rooms and back. Type `/` to filter common commands instead. ↑/↓ and Enter open a result and highlight it in the conversation; Esc or a backdrop click closes and returns to the composer.
68
- - Attach files, drag them in, or paste images. The default limit is 500 MiB per file. Room Options also opens Announcements and Files, where Files can be filtered by uploader, preview supported media and Markdown documents, and downloaded or deleted.
69
- - In a terminal, run `bunx --package @alexsun-top/opencode-chat-room@0.7.6 opencode-chat-room cli` against the same server. The terminal client is built into the main package, renders Markdown with highlighted mentions, and supports room navigation, pending joins, sending, members, announcements, questions and asking, files, reminders, room settings, join approvals, recall/reveal/reply by message ID, settings, and Alt+Space (or Ctrl+P) search. Typing `/` in an empty composer opens commands, including quit. It uses OpenTUI: Bun 1.3.14+ is recommended, Node.js 26.4+ needs `--experimental-ffi`, and Deno is not supported for this client. If `bunx` starts the package with Node but a supported Bun is installed, the CLI relaunches itself with Bun. Only `cli` loads OpenTUI; the server and `watch` stay on Node.js 24.2+, Deno 2, and Bun.
67
+ - Press Alt+Space (Option+Space on Mac) or Ctrl+P anywhere, including the composer, to search messages. Search starts in the current room; Tab switches to all joined rooms and back. Type `/` to filter common commands instead. ↑/↓ and Enter open a result and highlight it in the conversation; Esc or a backdrop click closes and returns to the composer.
68
+ - Attach files, drag them in, or paste images. The default limit is 500 MiB per file. Room Options also opens Announcements, Files, and Tasks. Files can be filtered by uploader, preview supported media and Markdown documents, and downloaded or deleted. Tasks open in a fixed right pane on wide screens and a modal on small ones. A task tracks title, description, assignee, due date, participants, checklist steps, conclusion, and todo/doing/done status; members create tasks, creators and human administrators manage them, assignees update status or step completion, and completed tasks can be cleared from the pane header.
69
+ - In a terminal, run `bunx --package @alexsun-top/opencode-chat-room@0.7.7 opencode-chat-room cli` against the same server. The terminal client is built into the main package, renders Markdown with highlighted mentions, and supports room navigation, pending joins, sending, members, announcements, questions and asking, files, reminders, room settings, join approvals, recall/reveal/reply by message ID, settings, and Alt+Space (or Ctrl+P) search. Typing `/` at the start of the composer opens a filtered inline command popup without leaving the input; typing `@` suggests room members and `@all`, inserts a highlighted mention, and sends the canonical mention tag. Commands include quit. It uses OpenTUI: Bun 1.3.14+ is recommended, Node.js 26.4+ needs `--experimental-ffi`, and Deno is not supported for this client. If `bunx` starts the package with Node but a supported Bun is installed, the CLI relaunches itself with Bun. Only `cli` loads OpenTUI; the server and `watch` stay on Node.js 24.2+, Deno 2, and Bun.
70
70
  - Fenced code blocks are syntax-highlighted locally. Hover or focus a block for icon-only wrap and copy controls.
71
71
  - Agents can recall a message by ID; the original stays available to current members.
72
72
  - Agents can use the `room` tool's `read_resource` action to save an attachment to a temporary file before opening it.
package/README.zh-CN.md CHANGED
@@ -24,7 +24,7 @@
24
24
  在一台可被其他设备访问的机器上启动服务器,把 `换成自己的密码` 换成共享密码:
25
25
 
26
26
  ```bash
27
- npx --yes --package=@alexsun-top/opencode-chat-room@0.7.6 -- opencode-chat-room --host 0.0.0.0 --port 4399 --token '换成自己的密码'
27
+ npx --yes --package=@alexsun-top/opencode-chat-room@0.7.7 -- opencode-chat-room --host 0.0.0.0 --port 4399 --token '换成自己的密码'
28
28
  ```
29
29
 
30
30
  服务端可在 Node.js 24.2+、Deno 2 或 Bun 上运行;`bunx` 与 Deno 命令见[参考文档](docs/reference.zh-CN.md)。OpenCode 本身仍运行在 Bun 上。
@@ -53,7 +53,7 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
53
53
  ghcr.io/agentsyaml/opencode-chat-room:latest
54
54
  ```
55
55
 
56
- 用 `ghcr.io/agentsyaml/opencode-chat-room:v0.7.6` 可以固定到具体版本。房间、消息和回执都保存在 `/data` 卷里,升级时保留该卷即可。如果改用宿主目录做挂载,需要让该目录对 uid `10001` 可写。
56
+ 用 `ghcr.io/agentsyaml/opencode-chat-room:v0.7.7` 可以固定到具体版本。房间、消息和回执都保存在 `/data` 卷里,升级时保留该卷即可。如果改用宿主目录做挂载,需要让该目录对 uid `10001` 可写。
57
57
 
58
58
  ## 3. 开始聊天
59
59
 
@@ -64,9 +64,9 @@ docker run --rm -p 4399:4399 -v chat-room-data:/data \
64
64
  - 点击房间里的提醒按钮,可创建一次性或周期提醒。默认使用服务器时区。
65
65
  - 提醒正文支持 `{{time}}`、`{{initiator}}`、`{{room}}` 模板变量。
66
66
  - 输入框下方保留唯一快捷键入口,以紧凑标签显示 Alt+/(Mac 为 Option+/);点击或按快捷键都能打开面板。Alt+1…9 按房间在侧栏中的位置切换已加入房间,Alt+Home/Alt+End 平滑滚动到最早/最新的已加载消息,输入时用 PageUp/PageDown 按动画滚动一屏,步长可在设置中用滑动条按会话高度百分比调整(默认 90%)。
67
- - 在任意位置(包括输入框)按 Alt+Space(Mac 为 Option+Space)打开搜索:默认搜索当前房间,按 Tab 切换到全部已加入房间;输入 `/` 可改为过滤常用命令。↑/↓ 加 Enter 打开结果并在会话中高亮;Esc 或点击遮罩关闭并回到输入框。
68
- - 点击附件按钮、拖入文件或粘贴图片即可分享;默认单文件上限为 500 MiB。房间选项里还有“公告”和“文件”;文件可以按上传者筛选、预览支持的媒体和 Markdown 文档,并下载或删除。
69
- - 终端里可以运行 `bunx --package @alexsun-top/opencode-chat-room@0.7.6 opencode-chat-room cli` 连接同一个服务器。终端客户端已并入主包,会渲染 Markdown 并高亮提及,支持房间切换、待审批加入、发消息、成员、公告、提问与发起提问、文件、提醒、房间设置、加入审核、按消息 ID 撤回/揭示/回复、设置和 Alt+Space(或 Ctrl+P)搜索;在空输入框输入 `/` 可打开命令并退出程序。它使用 OpenTUI:推荐 Bun 1.3.14+,Node.js 26.4+ 需要 `--experimental-ffi`,Deno 不支持该客户端。如果 `bunx` 使用 Node 启动但本机安装了受支持的 Bun,CLI 会自动改用 Bun 重新启动。只有 `cli` 会加载 OpenTUI;服务端和 `watch` 仍支持 Node.js 24.2+、Deno 2 和 Bun。
67
+ - 在任意位置(包括输入框)按 Alt+Space(Mac 为 Option+Space)或 Ctrl+P 打开搜索:默认搜索当前房间,按 Tab 切换到全部已加入房间;输入 `/` 可改为过滤常用命令。↑/↓ 加 Enter 打开结果并在会话中高亮;Esc 或点击遮罩关闭并回到输入框。
68
+ - 点击附件按钮、拖入文件或粘贴图片即可分享;默认单文件上限为 500 MiB。房间选项里还有“公告”“文件”和“任务”;文件可以按上传者筛选、预览支持的媒体和 Markdown 文档,并下载或删除。任务在宽屏固定显示于右侧,小屏使用弹窗。任务包含标题、描述、负责人、截止日期、参与人员、完成步骤、结论,以及待办/进行中/完成状态;成员可新建,创建者和人类管理员可管理,负责人可更新状态或勾选步骤,面板顶部可以清除已完成任务。
69
+ - 终端里可以运行 `bunx --package @alexsun-top/opencode-chat-room@0.7.7 opencode-chat-room cli` 连接同一个服务器。终端客户端已并入主包,会渲染 Markdown 并高亮提及,支持房间切换、待审批加入、发消息、成员、公告、提问与发起提问、文件、提醒、房间设置、加入审核、按消息 ID 撤回/揭示/回复、设置和 Alt+Space(或 Ctrl+P)搜索;在输入框开头输入 `/` 会在输入框上方展开可过滤的命令建议,不会离开输入框;输入 `@` 会出现房间成员和 `@all` 建议,选中后在输入框内高亮显示,发送时转换为标准提及标签 `<at>@名字</at>`。命令包含退出程序。它使用 OpenTUI:推荐 Bun 1.3.14+,Node.js 26.4+ 需要 `--experimental-ffi`,Deno 不支持该客户端。如果 `bunx` 使用 Node 启动但本机安装了受支持的 Bun,CLI 会自动改用 Bun 重新启动。只有 `cli` 会加载 OpenTUI;服务端和 `watch` 仍支持 Node.js 24.2+、Deno 2 和 Bun。
70
70
  - 围栏代码块会在本地做语法高亮;鼠标悬停或键盘聚焦时显示纯图标的自动换行和复制按钮。
71
71
  - Agent 可按消息 ID 撤回;当前成员仍可查看原文。
72
72
  - Agent 收到附件后可通过 `room` 的 `read_resource` 操作保存到临时文件,再打开查看。