@jetcrab/pi-desk-todo

In-memory progress tool and composer widget for Pi Desk

Packages

Package details

extension

Install @jetcrab/pi-desk-todo from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@jetcrab/pi-desk-todo
Package
@jetcrab/pi-desk-todo
Version
1.0.6
Published
Oct 29, 2026
Downloads
678/mo · 678/wk
Author
jetcrab
License
Apache-2.0
Types
extension
Size
37.7 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@jetcrab/pi-desk-todo

在 Pi Desk 输入框上方展示当前工作的实际进度,使用单层任务列表,支持并行和阻塞。Todo 不是开发计划或执行依据,应随实际情况调整。

模型调用 todo 工具,每次提交完整内容,替换当前展示:

{
  "title": "接口迁移",
  "items": [
    { "id": "review", "title": "核对接口", "status": 2 },
    { "id": "verify", "title": "验证调用", "status": 1 }
  ]
}

每项使用 { id, title, status, note? },不支持嵌套。状态:0 待开始、1 进行中、2 已完成、3 受阻;受阻须提供 note。列表内 ID 唯一,最多100个任务、64KiB。

进度变化时直接更新摘要、计数和已展开的任务列表,不自动弹出提示。悬停或聚焦摘要查看完整任务列表,点击保持展开。右侧 × 同步隐藏当前会话的展示,内容仍在服务端会话内存中;再次登记会替换并重新显示。

仅更新界面不会更新已有会话的工具参数;会话加载新 Native 代码后才使用单层参数。旧会话返回的二级快照在界面中摊平显示。

旧会话未加载 Todo 查询方法时,挂件静默隐藏,不显示同步错误,也不自动重载会话;方法可用后,通过后续进度通知或连接恢复重新同步。

不保存可恢复Todo快照,不从聊天历史恢复;会话运行态重启、重载或Pi树导航后为空。普通工具调用参数仍可能存在于Pi聊天历史中。

同时提供原生Pi扩展与Pi Desk界面。界面需要支持 registerWidget 与SDK PluginPopover 的宿主;纯Pi模式仍可登记进度,但没有网页挂件。不要同时启用另一个同名 todo 工具。