@deepseek-harness-tui/dsh-tui 0.11.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -8
- package/assets/deepy/README.md +60 -0
- package/assets/deepy/frames.json +1 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whaleGirl/README.md +7 -0
- package/assets/whaleGirl/frames.json +1 -0
- package/assets/whaleGirl/img/building/00.png +0 -0
- package/assets/whaleGirl/img/building/01.png +0 -0
- package/assets/whaleGirl/img/building/02.png +0 -0
- package/assets/whaleGirl/img/building/03.png +0 -0
- package/assets/whaleGirl/img/building/04.png +0 -0
- package/assets/whaleGirl/img/building/05.png +0 -0
- package/assets/whaleGirl/img/building/06.png +0 -0
- package/assets/whaleGirl/img/building/07.png +0 -0
- package/assets/whaleGirl/img/building/08.png +0 -0
- package/assets/whaleGirl/img/building/09.png +0 -0
- package/assets/whaleGirl/img/building/10.png +0 -0
- package/assets/whaleGirl/img/building/11.png +0 -0
- package/assets/whaleGirl/img/building/12.png +0 -0
- package/assets/whaleGirl/img/building/13.png +0 -0
- package/assets/whaleGirl/img/building/14.png +0 -0
- package/assets/whaleGirl/img/building/15.png +0 -0
- package/assets/whaleGirl/img/building/16.png +0 -0
- package/assets/whaleGirl/img/building/17.png +0 -0
- package/assets/whaleGirl/img/building/18.png +0 -0
- package/assets/whaleGirl/img/building/19.png +0 -0
- package/assets/whaleGirl/img/building/20.png +0 -0
- package/assets/whaleGirl/img/building/21.png +0 -0
- package/assets/whaleGirl/img/building/22.png +0 -0
- package/assets/whaleGirl/img/building/23.png +0 -0
- package/assets/whaleGirl/img/carrying/00.png +0 -0
- package/assets/whaleGirl/img/carrying/01.png +0 -0
- package/assets/whaleGirl/img/carrying/02.png +0 -0
- package/assets/whaleGirl/img/carrying/03.png +0 -0
- package/assets/whaleGirl/img/carrying/04.png +0 -0
- package/assets/whaleGirl/img/carrying/05.png +0 -0
- package/assets/whaleGirl/img/carrying/06.png +0 -0
- package/assets/whaleGirl/img/carrying/07.png +0 -0
- package/assets/whaleGirl/img/compacting/00.png +0 -0
- package/assets/whaleGirl/img/compacting/01.png +0 -0
- package/assets/whaleGirl/img/compacting/02.png +0 -0
- package/assets/whaleGirl/img/compacting/03.png +0 -0
- package/assets/whaleGirl/img/compacting/04.png +0 -0
- package/assets/whaleGirl/img/compacting/05.png +0 -0
- package/assets/whaleGirl/img/compacting/06.png +0 -0
- package/assets/whaleGirl/img/compacting/07.png +0 -0
- package/assets/whaleGirl/img/compacting/08.png +0 -0
- package/assets/whaleGirl/img/compacting/09.png +0 -0
- package/assets/whaleGirl/img/conducting/00.png +0 -0
- package/assets/whaleGirl/img/conducting/01.png +0 -0
- package/assets/whaleGirl/img/conducting/02.png +0 -0
- package/assets/whaleGirl/img/conducting/03.png +0 -0
- package/assets/whaleGirl/img/conducting/04.png +0 -0
- package/assets/whaleGirl/img/conducting/05.png +0 -0
- package/assets/whaleGirl/img/conducting/06.png +0 -0
- package/assets/whaleGirl/img/conducting/07.png +0 -0
- package/assets/whaleGirl/img/conducting/08.png +0 -0
- package/assets/whaleGirl/img/conducting/09.png +0 -0
- package/assets/whaleGirl/img/conducting/10.png +0 -0
- package/assets/whaleGirl/img/conducting/11.png +0 -0
- package/assets/whaleGirl/img/drag/00.png +0 -0
- package/assets/whaleGirl/img/drag/01.png +0 -0
- package/assets/whaleGirl/img/drag/02.png +0 -0
- package/assets/whaleGirl/img/drag/03.png +0 -0
- package/assets/whaleGirl/img/drag/04.png +0 -0
- package/assets/whaleGirl/img/drag/05.png +0 -0
- package/assets/whaleGirl/img/drag/06.png +0 -0
- package/assets/whaleGirl/img/drag/07.png +0 -0
- package/assets/whaleGirl/img/drag/08.png +0 -0
- package/assets/whaleGirl/img/drag/09.png +0 -0
- package/assets/whaleGirl/img/error/00.png +0 -0
- package/assets/whaleGirl/img/error/01.png +0 -0
- package/assets/whaleGirl/img/error/02.png +0 -0
- package/assets/whaleGirl/img/error/03.png +0 -0
- package/assets/whaleGirl/img/error/04.png +0 -0
- package/assets/whaleGirl/img/error/05.png +0 -0
- package/assets/whaleGirl/img/error/06.png +0 -0
- package/assets/whaleGirl/img/error/07.png +0 -0
- package/assets/whaleGirl/img/error/08.png +0 -0
- package/assets/whaleGirl/img/error/09.png +0 -0
- package/assets/whaleGirl/img/happy/00.png +0 -0
- package/assets/whaleGirl/img/happy/01.png +0 -0
- package/assets/whaleGirl/img/happy/02.png +0 -0
- package/assets/whaleGirl/img/happy/03.png +0 -0
- package/assets/whaleGirl/img/happy/04.png +0 -0
- package/assets/whaleGirl/img/happy/05.png +0 -0
- package/assets/whaleGirl/img/happy/06.png +0 -0
- package/assets/whaleGirl/img/happy/07.png +0 -0
- package/assets/whaleGirl/img/happy/08.png +0 -0
- package/assets/whaleGirl/img/happy/09.png +0 -0
- package/assets/whaleGirl/img/happy/10.png +0 -0
- package/assets/whaleGirl/img/idle/00.png +0 -0
- package/assets/whaleGirl/img/idle/01.png +0 -0
- package/assets/whaleGirl/img/idle/02.png +0 -0
- package/assets/whaleGirl/img/idle/03.png +0 -0
- package/assets/whaleGirl/img/idle/04.png +0 -0
- package/assets/whaleGirl/img/idle/05.png +0 -0
- package/assets/whaleGirl/img/idle/06.png +0 -0
- package/assets/whaleGirl/img/idle/07.png +0 -0
- package/assets/whaleGirl/img/idle/08.png +0 -0
- package/assets/whaleGirl/img/idle/09.png +0 -0
- package/assets/whaleGirl/img/idle/10.png +0 -0
- package/assets/whaleGirl/img/idle/11.png +0 -0
- package/assets/whaleGirl/img/idle/12.png +0 -0
- package/assets/whaleGirl/img/idle/13.png +0 -0
- package/assets/whaleGirl/img/idle/14.png +0 -0
- package/assets/whaleGirl/img/idle/15.png +0 -0
- package/assets/whaleGirl/img/idle/16.png +0 -0
- package/assets/whaleGirl/img/idle/17.png +0 -0
- package/assets/whaleGirl/img/idle/18.png +0 -0
- package/assets/whaleGirl/img/idle/19.png +0 -0
- package/assets/whaleGirl/img/idle/20.png +0 -0
- package/assets/whaleGirl/img/idle-look/00.png +0 -0
- package/assets/whaleGirl/img/idle-look/01.png +0 -0
- package/assets/whaleGirl/img/idle-look/02.png +0 -0
- package/assets/whaleGirl/img/idle-look/03.png +0 -0
- package/assets/whaleGirl/img/idle-look/04.png +0 -0
- package/assets/whaleGirl/img/idle-look/05.png +0 -0
- package/assets/whaleGirl/img/idle-look/06.png +0 -0
- package/assets/whaleGirl/img/idle-look/07.png +0 -0
- package/assets/whaleGirl/img/idle-look/08.png +0 -0
- package/assets/whaleGirl/img/idle-look/09.png +0 -0
- package/assets/whaleGirl/img/idle-look/10.png +0 -0
- package/assets/whaleGirl/img/idle-look/11.png +0 -0
- package/assets/whaleGirl/img/idle-look/12.png +0 -0
- package/assets/whaleGirl/img/idle-spout/00.png +0 -0
- package/assets/whaleGirl/img/idle-spout/01.png +0 -0
- package/assets/whaleGirl/img/idle-spout/02.png +0 -0
- package/assets/whaleGirl/img/idle-spout/03.png +0 -0
- package/assets/whaleGirl/img/idle-spout/04.png +0 -0
- package/assets/whaleGirl/img/idle-spout/05.png +0 -0
- package/assets/whaleGirl/img/idle-spout/06.png +0 -0
- package/assets/whaleGirl/img/idle-spout/07.png +0 -0
- package/assets/whaleGirl/img/idle-spout/08.png +0 -0
- package/assets/whaleGirl/img/idle-spout/09.png +0 -0
- package/assets/whaleGirl/img/idle-spout/10.png +0 -0
- package/assets/whaleGirl/img/music/00.png +0 -0
- package/assets/whaleGirl/img/music/01.png +0 -0
- package/assets/whaleGirl/img/music/02.png +0 -0
- package/assets/whaleGirl/img/music/03.png +0 -0
- package/assets/whaleGirl/img/music/04.png +0 -0
- package/assets/whaleGirl/img/music/05.png +0 -0
- package/assets/whaleGirl/img/music/06.png +0 -0
- package/assets/whaleGirl/img/music/07.png +0 -0
- package/assets/whaleGirl/img/notification/00.png +0 -0
- package/assets/whaleGirl/img/notification/01.png +0 -0
- package/assets/whaleGirl/img/notification/02.png +0 -0
- package/assets/whaleGirl/img/notification/03.png +0 -0
- package/assets/whaleGirl/img/notification/04.png +0 -0
- package/assets/whaleGirl/img/notification/05.png +0 -0
- package/assets/whaleGirl/img/notification/06.png +0 -0
- package/assets/whaleGirl/img/notification/07.png +0 -0
- package/assets/whaleGirl/img/poke-left/00.png +0 -0
- package/assets/whaleGirl/img/poke-left/01.png +0 -0
- package/assets/whaleGirl/img/poke-left/02.png +0 -0
- package/assets/whaleGirl/img/poke-left/03.png +0 -0
- package/assets/whaleGirl/img/poke-left/04.png +0 -0
- package/assets/whaleGirl/img/poke-left/05.png +0 -0
- package/assets/whaleGirl/img/poke-left/06.png +0 -0
- package/assets/whaleGirl/img/poke-left/07.png +0 -0
- package/assets/whaleGirl/img/poke-left/08.png +0 -0
- package/assets/whaleGirl/img/poke-left/09.png +0 -0
- package/assets/whaleGirl/img/poke-left/10.png +0 -0
- package/assets/whaleGirl/img/poke-right/00.png +0 -0
- package/assets/whaleGirl/img/poke-right/01.png +0 -0
- package/assets/whaleGirl/img/poke-right/02.png +0 -0
- package/assets/whaleGirl/img/poke-right/03.png +0 -0
- package/assets/whaleGirl/img/poke-right/04.png +0 -0
- package/assets/whaleGirl/img/poke-right/05.png +0 -0
- package/assets/whaleGirl/img/poke-right/06.png +0 -0
- package/assets/whaleGirl/img/poke-right/07.png +0 -0
- package/assets/whaleGirl/img/poke-right/08.png +0 -0
- package/assets/whaleGirl/img/poke-right/09.png +0 -0
- package/assets/whaleGirl/img/poke-right/10.png +0 -0
- package/assets/whaleGirl/img/sleeping/00.png +0 -0
- package/assets/whaleGirl/img/sleeping/01.png +0 -0
- package/assets/whaleGirl/img/sleeping/02.png +0 -0
- package/assets/whaleGirl/img/sleeping/03.png +0 -0
- package/assets/whaleGirl/img/sleeping/04.png +0 -0
- package/assets/whaleGirl/img/sleeping/05.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/00.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/01.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/02.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/03.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/04.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/05.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/06.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/07.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/08.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/09.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/10.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/11.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/12.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/13.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/14.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/15.png +0 -0
- package/assets/whaleGirl/img/swim/00.png +0 -0
- package/assets/whaleGirl/img/swim/01.png +0 -0
- package/assets/whaleGirl/img/swim/02.png +0 -0
- package/assets/whaleGirl/img/swim/03.png +0 -0
- package/assets/whaleGirl/img/swim/04.png +0 -0
- package/assets/whaleGirl/img/swim/05.png +0 -0
- package/assets/whaleGirl/img/swim/06.png +0 -0
- package/assets/whaleGirl/img/swim/07.png +0 -0
- package/assets/whaleGirl/img/thinking/00.png +0 -0
- package/assets/whaleGirl/img/thinking/01.png +0 -0
- package/assets/whaleGirl/img/thinking/02.png +0 -0
- package/assets/whaleGirl/img/thinking/03.png +0 -0
- package/assets/whaleGirl/img/thinking/04.png +0 -0
- package/assets/whaleGirl/img/thinking/05.png +0 -0
- package/assets/whaleGirl/img/thinking/06.png +0 -0
- package/assets/whaleGirl/img/thinking/07.png +0 -0
- package/assets/whaleGirl/img/thinking/08.png +0 -0
- package/assets/whaleGirl/img/thinking/09.png +0 -0
- package/assets/whaleGirl/img/thinking/10.png +0 -0
- package/assets/whaleGirl/img/thinking/11.png +0 -0
- package/assets/whaleGirl/img/thinking/12.png +0 -0
- package/assets/whaleGirl/img/thinking/13.png +0 -0
- package/assets/whaleGirl/img/thinking/14.png +0 -0
- package/assets/whaleGirl/img/thinking/15.png +0 -0
- package/assets/whaleGirl/img/thinking/16.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/00.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/01.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/02.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/03.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/04.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/05.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/06.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/07.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/08.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/09.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/10.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/11.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/12.png +0 -0
- package/assets/whaleGirl/img/tickle/00.png +0 -0
- package/assets/whaleGirl/img/tickle/01.png +0 -0
- package/assets/whaleGirl/img/tickle/02.png +0 -0
- package/assets/whaleGirl/img/tickle/03.png +0 -0
- package/assets/whaleGirl/img/tickle/04.png +0 -0
- package/assets/whaleGirl/img/tickle/05.png +0 -0
- package/assets/whaleGirl/img/tickle/06.png +0 -0
- package/assets/whaleGirl/img/tickle/07.png +0 -0
- package/assets/whaleGirl/img/tickle/08.png +0 -0
- package/assets/whaleGirl/img/tickle/09.png +0 -0
- package/assets/whaleGirl/img/tickle/10.png +0 -0
- package/assets/whaleGirl/img/tickle/11.png +0 -0
- package/assets/whaleGirl/img/tickle/12.png +0 -0
- package/assets/whaleGirl/img/tickle/13.png +0 -0
- package/assets/whaleGirl/img/timings.json +1 -0
- package/assets/whaleGirl/img/typing/00.png +0 -0
- package/assets/whaleGirl/img/typing/01.png +0 -0
- package/assets/whaleGirl/img/typing/02.png +0 -0
- package/assets/whaleGirl/img/typing/03.png +0 -0
- package/assets/whaleGirl/img/typing/04.png +0 -0
- package/assets/whaleGirl/img/typing/05.png +0 -0
- package/assets/whaleGirl/img/typing/06.png +0 -0
- package/assets/whaleGirl/img/typing/07.png +0 -0
- package/assets/whaleGirl/img/typing/08.png +0 -0
- package/assets/whaleGirl/img/typing/09.png +0 -0
- package/assets/whaleGirl/img/typing/10.png +0 -0
- package/assets/whaleGirl/img/typing/11.png +0 -0
- package/assets/whaleGirl/img/typing/12.png +0 -0
- package/assets/whaleGirl/img/typing/13.png +0 -0
- package/assets/whaleGirl/img/waking/00.png +0 -0
- package/assets/whaleGirl/img/waking/01.png +0 -0
- package/assets/whaleGirl/img/waking/02.png +0 -0
- package/assets/whaleGirl/img/waking/03.png +0 -0
- package/assets/whaleGirl/img/waking/04.png +0 -0
- package/assets/whaleGirl/img/waking/05.png +0 -0
- package/assets/whaleGirl/img/waking/06.png +0 -0
- package/assets/whaleGirl/img/waking/07.png +0 -0
- package/assets/whaleGirl/img/waking/08.png +0 -0
- package/assets/whaleGirl/img/waking/09.png +0 -0
- package/assets/whaleGirl/img/waking/10.png +0 -0
- package/bin/dsh-tui.js +38 -6
- package/cordis.patch.yml +31 -6
- package/guide/dsh-tui-guide/SKILL.md +37 -0
- package/guide/dsh-tui-guide/configuration.en.md +415 -0
- package/guide/dsh-tui-guide/configuration.md +354 -0
- package/guide/dsh-tui-guide/getting-started.en.md +401 -0
- package/guide/dsh-tui-guide/getting-started.md +399 -0
- package/guide/dsh-tui-guide/interaction.en.md +738 -0
- package/guide/dsh-tui-guide/interaction.md +793 -0
- package/guide/dsh-tui-guide/migrate.en.md +166 -0
- package/guide/dsh-tui-guide/migrate.md +132 -0
- package/guide/dsh-tui-guide/plugins.en.md +78 -0
- package/guide/dsh-tui-guide/plugins.md +64 -0
- package/guide/dsh-tui-guide/themes.en.md +197 -0
- package/guide/dsh-tui-guide/themes.md +188 -0
- package/guide/dsh-tui-guide/user-guide.en.md +711 -0
- package/guide/dsh-tui-guide/user-guide.md +666 -0
- package/guide/dsh-tui-guide/vscode.en.md +301 -0
- package/guide/dsh-tui-guide/vscode.md +272 -0
- package/lib/settings.json +219 -5
- package/lib/types/adapter/channel/ui-policy.d.ts +7 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +18 -1
- package/lib/types/adapter/index.d.ts +1 -1
- package/lib/types/adapter/index.js +1 -1
- package/lib/types/adapter/kernel/host-facade.d.ts +4 -1
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
- package/lib/types/adapter/kernel/host-facade.js +8 -1
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +13 -0
- package/lib/types/adapter/kernel/slices/index.d.ts +1 -0
- package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -1
- package/lib/types/adapter/kernel/slices/index.js +3 -0
- package/lib/types/adapter/kernel/slices/panels.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/panels.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/panels.js +14 -0
- package/lib/types/adapter/ports/channel-capabilities.d.ts +48 -0
- package/lib/types/adapter/ports/channel-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-capabilities.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +10 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +2 -1
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +91 -4
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +137 -9
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +1 -1
- package/lib/types/adapter/ports/channel.js +1 -1
- package/lib/types/adapter/ports/descriptor.d.ts +1 -1
- package/lib/types/adapter/ports/descriptor.js +1 -1
- package/lib/types/adapter/ports/index.d.ts +1 -1
- package/lib/types/adapter/ports/index.js +1 -1
- package/lib/types/adapter/ports/panels.d.ts +28 -0
- package/lib/types/adapter/ports/panels.d.ts.map +1 -0
- package/lib/types/adapter/ports/panels.js +8 -0
- package/lib/types/adapter/ports/workspace.d.ts +1 -1
- package/lib/types/adapter/ports/workspace.js +1 -1
- package/lib/types/adapter/spec/index.d.ts +2 -2
- package/lib/types/adapter/spec/index.js +2 -2
- package/lib/types/adapter/spec/profile.d.ts +6 -6
- package/lib/types/adapter/spec/profile.d.ts.map +1 -1
- package/lib/types/adapter/spec/profile.js +6 -6
- package/lib/types/adapter/spec/protocol-constants.d.ts +3 -3
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +5 -5
- package/lib/types/adapter/spec/tui-contributions.d.ts +4 -4
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +5 -5
- package/lib/types/adapter/standard/descriptor.js +1 -1
- package/lib/types/adapter/standard/index.d.ts +3 -3
- package/lib/types/adapter/standard/index.js +3 -3
- package/lib/types/adapter/standard/registry.d.ts +3 -2
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +6 -5
- package/lib/types/adapter/standard/tui-extension.d.ts +1 -1
- package/lib/types/adapter/standard/tui-extension.js +1 -1
- package/lib/types/adapter/upstream/index.d.ts +1 -0
- package/lib/types/adapter/upstream/index.d.ts.map +1 -1
- package/lib/types/adapter/upstream/index.js +1 -0
- package/lib/types/adapter/upstream/panels-driver.d.ts +18 -0
- package/lib/types/adapter/upstream/panels-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/panels-driver.js +159 -0
- package/lib/types/api.d.ts +2 -0
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/api.js +3 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +12 -4
- package/lib/types/components/ActivityLine.d.ts +6 -9
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityLine.js +7 -8
- package/lib/types/components/Chat/JobCard.d.ts +27 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +128 -33
- package/lib/types/components/Chat/JobGroupHeader.d.ts +27 -0
- package/lib/types/components/Chat/JobGroupHeader.d.ts.map +1 -0
- package/lib/types/components/Chat/JobGroupHeader.js +62 -0
- package/lib/types/components/Chat/SubagentMessage.js +6 -6
- package/lib/types/components/GoalTodoPanel.d.ts +13 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +55 -14
- package/lib/types/components/JobsPanel.d.ts +42 -2
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +220 -40
- package/lib/types/components/LogoV2.d.ts +43 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +42 -15
- package/lib/types/components/MessageList.d.ts +8 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +215 -21
- package/lib/types/components/OverlayAbove.d.ts +11 -1
- package/lib/types/components/OverlayAbove.d.ts.map +1 -1
- package/lib/types/components/OverlayAbove.js +2 -12
- package/lib/types/components/PageMargin.d.ts.map +1 -1
- package/lib/types/components/PageMargin.js +3 -1
- package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
- package/lib/types/components/PluginSceneBoundary.js +1 -1
- package/lib/types/components/PresetPicker.d.ts +4 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +5 -1
- package/lib/types/components/PromptInput.d.ts +20 -22
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +425 -157
- package/lib/types/components/SearchBox.d.ts +22 -5
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +17 -13
- package/lib/types/components/StarPrompt.d.ts +6 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +45 -0
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +24 -9
- package/lib/types/components/SubagentDashboard.d.ts +18 -3
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +53 -5
- package/lib/types/components/SubagentDetailScene.d.ts +7 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +160 -13
- package/lib/types/components/SurfaceEdges.d.ts +21 -0
- package/lib/types/components/SurfaceEdges.d.ts.map +1 -0
- package/lib/types/components/SurfaceEdges.js +7 -0
- package/lib/types/components/ThemePicker.d.ts +9 -0
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +74 -10
- package/lib/types/components/ThemePreviewPane.d.ts +26 -0
- package/lib/types/components/ThemePreviewPane.d.ts.map +1 -0
- package/lib/types/components/ThemePreviewPane.js +99 -0
- package/lib/types/components/WhaleGirl.d.ts +6 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -1
- package/lib/types/components/WhaleGirl.js +18 -0
- package/lib/types/components/design-system/Divider.d.ts.map +1 -1
- package/lib/types/components/design-system/Divider.js +14 -9
- package/lib/types/components/launchpadActions.d.ts +73 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -0
- package/lib/types/components/launchpadActions.js +111 -0
- package/lib/types/components/launchpadLayout.d.ts +62 -0
- package/lib/types/components/launchpadLayout.d.ts.map +1 -0
- package/lib/types/components/launchpadLayout.js +176 -0
- package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
- package/lib/types/components/onboardingModel.d.ts +83 -0
- package/lib/types/components/onboardingModel.d.ts.map +1 -0
- package/lib/types/components/onboardingModel.js +128 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts +17 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/InfoPanel.js +124 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts +45 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelBar.js +104 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts +21 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.js +30 -0
- package/lib/types/components/sidePanel/PanelHost.d.ts +36 -0
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelHost.js +81 -0
- package/lib/types/components/sidePanel/PanelPicker.d.ts +24 -0
- package/lib/types/components/sidePanel/PanelPicker.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelPicker.js +45 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts +55 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelStore.js +109 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +31 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelColumn.js +70 -0
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +54 -0
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelLayout.js +81 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +43 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +26 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts +7 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.js +263 -0
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts +4 -0
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/WorkspacePanel.js +171 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts +3 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -0
- package/lib/types/components/sidePanel/builtinPanels.js +229 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +53 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +528 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +32 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.js +103 -0
- package/lib/types/components/sidePanel/companion/deepy.d.ts +75 -0
- package/lib/types/components/sidePanel/companion/deepy.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/deepy.js +222 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts +176 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/mood.js +212 -0
- package/lib/types/components/sidePanel/companion/pose.d.ts +43 -0
- package/lib/types/components/sidePanel/companion/pose.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/pose.js +34 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts +102 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/skins.js +408 -0
- package/lib/types/components/sidePanel/dimensions.d.ts +60 -0
- package/lib/types/components/sidePanel/dimensions.d.ts.map +1 -0
- package/lib/types/components/sidePanel/dimensions.js +75 -0
- package/lib/types/components/sidePanel/jobsFocusStore.d.ts +21 -0
- package/lib/types/components/sidePanel/jobsFocusStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/jobsFocusStore.js +30 -0
- package/lib/types/components/sidePanel/panelBridge.d.ts +44 -0
- package/lib/types/components/sidePanel/panelBridge.d.ts.map +1 -0
- package/lib/types/components/sidePanel/panelBridge.js +55 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts +22 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.js +148 -0
- package/lib/types/components/sidePanel/types.d.ts +110 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -0
- package/lib/types/components/sidePanel/types.js +1 -0
- package/lib/types/components/sidePanel/usePanelInput.d.ts +5 -0
- package/lib/types/components/sidePanel/usePanelInput.d.ts.map +1 -0
- package/lib/types/components/sidePanel/usePanelInput.js +44 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts +47 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/useSidePanel.js +284 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
- package/lib/types/components/trajectory/MiniWake.js +9 -3
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +3 -2
- package/lib/types/deepseekPricing.d.ts +10 -9
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +18 -11
- package/lib/types/dsh-adapter/channel/attached-context.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/attached-context.js +109 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +43 -0
- package/lib/types/dsh-adapter/channel/capabilities.d.ts +82 -0
- package/lib/types/dsh-adapter/channel/capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/capabilities.js +165 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +8 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +4 -12
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -4
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +13 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +18 -1
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +55 -9
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -10
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +26 -8
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +42 -37
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +13 -4
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +1 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +21 -3
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +3 -2
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +5 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +18 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +97 -2
- package/lib/types/dsh-adapter/channel.d.ts +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +72 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts +204 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
- package/lib/types/dsh-adapter/context-occupancy.js +299 -0
- package/lib/types/dsh-adapter/contract.d.ts +19 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +33 -3
- package/lib/types/dsh-adapter/index.d.ts +32 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +20 -1
- package/lib/types/dsh-adapter/jobs.d.ts +82 -16
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +104 -9
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
- package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
- package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
- package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
- package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
- package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
- package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
- package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
- package/lib/types/dsh-adapter/panel-runtime-registry.d.ts +39 -0
- package/lib/types/dsh-adapter/panel-runtime-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/panel-runtime-registry.js +84 -0
- package/lib/types/dsh-adapter/panels.d.ts +251 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -0
- package/lib/types/dsh-adapter/panels.js +407 -0
- package/lib/types/dsh-adapter/plugin-host.js +1 -1
- package/lib/types/dsh-adapter/plugin.d.ts +25 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +241 -44
- package/lib/types/dsh-adapter/presets.d.ts +26 -4
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +29 -5
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +6 -2
- package/lib/types/dsh-adapter/startup-args.d.ts +8 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -0
- package/lib/types/dsh-adapter/startup-args.js +34 -0
- package/lib/types/dsh-adapter/subagents.d.ts +1 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +10 -1
- package/lib/types/history.d.ts +24 -7
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +77 -18
- package/lib/types/i18n.d.ts +908 -33
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +355 -17
- package/lib/types/ink/components/App.d.ts +14 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +71 -61
- package/lib/types/ink/components/TerminalSizeContext.d.ts +7 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.d.ts +11 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +8 -2
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-viewport.js +3 -1
- package/lib/types/ink/ink.d.ts +18 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +51 -8
- package/lib/types/ink/output.d.ts +10 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +3 -3
- package/lib/types/ink/parse-keypress.d.ts +71 -3
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +815 -133
- package/lib/types/ink/render-node-to-output.d.ts +1 -1
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +37 -5
- package/lib/types/ink/screen.d.ts +26 -1
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +96 -1
- package/lib/types/ink/selection.d.ts +23 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +102 -26
- package/lib/types/ink/sixel-codec.d.ts +11 -0
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +42 -8
- package/lib/types/ink/terminal-querier.d.ts +25 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +42 -0
- package/lib/types/ink/update-overflow-guard.d.ts +24 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +25 -3
- package/lib/types/math/renderer.d.ts +2 -0
- package/lib/types/math/renderer.d.ts.map +1 -1
- package/lib/types/math/renderer.js +4 -0
- package/lib/types/minimalUiMode.d.ts +19 -0
- package/lib/types/minimalUiMode.d.ts.map +1 -0
- package/lib/types/minimalUiMode.js +23 -0
- package/lib/types/oauth.d.ts +5 -10
- package/lib/types/oauth.d.ts.map +1 -1
- package/lib/types/oauth.js +5 -10
- package/lib/types/onboardingPrefs.d.ts +52 -0
- package/lib/types/onboardingPrefs.d.ts.map +1 -0
- package/lib/types/onboardingPrefs.js +107 -0
- package/lib/types/panels.d.ts +4 -0
- package/lib/types/panels.d.ts.map +1 -0
- package/lib/types/panels.js +4 -0
- package/lib/types/screens/Chat.d.ts +25 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1149 -302
- package/lib/types/screens/Launchpad.d.ts +194 -0
- package/lib/types/screens/Launchpad.d.ts.map +1 -0
- package/lib/types/screens/Launchpad.js +607 -0
- package/lib/types/screens/Onboarding.d.ts +37 -0
- package/lib/types/screens/Onboarding.d.ts.map +1 -0
- package/lib/types/screens/Onboarding.js +492 -0
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +18 -12
- package/lib/types/screens/StatusLine.d.ts +4 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +43 -25
- package/lib/types/screens/StatusMetrics.d.ts +22 -0
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +20 -0
- package/lib/types/screens/chatOverlay.d.ts +18 -1
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +3 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +1 -2
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +4 -2
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +7 -3
- package/lib/types/settings/definitions.d.ts +93 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +87 -4
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +13 -7
- package/lib/types/tuiDisplayPrefs.d.ts +42 -2
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +74 -0
- package/lib/types/update.d.ts +53 -9
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +103 -46
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +8 -1
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +25 -6
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +5 -1
- package/lib/types/utils/draftWordBoundary.d.ts +23 -0
- package/lib/types/utils/draftWordBoundary.d.ts.map +1 -0
- package/lib/types/utils/draftWordBoundary.js +161 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -1
- package/lib/types/utils/fileTarget.js +7 -9
- package/lib/types/utils/inputPaste.d.ts +62 -0
- package/lib/types/utils/inputPaste.d.ts.map +1 -0
- package/lib/types/utils/inputPaste.js +111 -0
- package/lib/types/utils/intl.d.ts +8 -0
- package/lib/types/utils/intl.d.ts.map +1 -1
- package/lib/types/utils/intl.js +11 -0
- package/lib/types/utils/keymap.d.ts +13 -3
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +27 -5
- package/lib/types/utils/pastedImagePath.d.ts +8 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +29 -5
- package/package.json +128 -106
- package/presets/liangshen/agent.cordis.yml +4 -1
- package/presets/liangshen/preset.yml +1 -1
- package/{dsh-ecosystem-spec → tui-profile}/registry/README.md +1 -1
- package/{dsh-ecosystem-spec → tui-profile}/registry/registry-0.15.json +1 -1
- package/lib/types/minimalMode.d.ts +0 -13
- package/lib/types/minimalMode.d.ts.map +0 -1
- package/lib/types/minimalMode.js +0 -17
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/decision-events-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/scene-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/settings-section-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/tui-channel-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/workspace-provider-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/host-descriptor.tui.example.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/permissions-0.1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/conformance-claim.schema.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/effect-ledger-record.schema.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/host-descriptor.schema.json +0 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useSidePanel: the whole side-panel controller in one hook (design doc
|
|
3
|
+
* §16.5 — Chat.tsx only gains one hook call, one keyboard delegation line,
|
|
4
|
+
* and one runCommand case).
|
|
5
|
+
*
|
|
6
|
+
* State split:
|
|
7
|
+
* - splitEnabled / open / ratio / panels live in the module-level live
|
|
8
|
+
* stores (tuiDisplayPrefs) so /settings, cordis.yml and key toggles all
|
|
9
|
+
* write the same place and the layout re-renders above the channel's
|
|
10
|
+
* version bump;
|
|
11
|
+
* - focus / zoom / activePanelId are Chat-session React state (they never
|
|
12
|
+
* persist: a restart opens on the first enabled panel, focus in chat).
|
|
13
|
+
*
|
|
14
|
+
* Keyboard priority (v2.1 contract): Chat's modal guards (approval /
|
|
15
|
+
* question / dialog / fullscreen scenes) run first, then this controller's
|
|
16
|
+
* GLOBAL shortcuts (sidePanel, sidePanelZoom — both focuses), then — when
|
|
17
|
+
* the focus is in the right column — the active panel's own keys (Phase 3
|
|
18
|
+
* dispatcher), then the host fallback below (panel switching, zoom,
|
|
19
|
+
* resize, Esc). Plain Ctrl combos fall through to Chat so interrupt /
|
|
20
|
+
* exit / redraw keep working from the panel.
|
|
21
|
+
*/
|
|
22
|
+
import React from 'react';
|
|
23
|
+
import { actionMatches } from '../../utils/keymap.js';
|
|
24
|
+
import { applySidePanelOpen, applySidePanelRatio, getSidePanelOpen, getSidePanelPanels, getSidePanelRatio, getSidePanelSplitEnabled, parseSidePanelIds, SIDE_PANEL_ID_PATTERN, subscribeSidePanelOpen, subscribeSidePanelPanels, subscribeSidePanelRatio, subscribeSidePanelSplitEnabled, } from '../../tuiDisplayPrefs.js';
|
|
25
|
+
import { canSplit, nudgeRatio, resolveSidePanelGeometry, RESIZE_STEP_COLUMNS, } from './dimensions.js';
|
|
26
|
+
import { panelBridgeRequests, panelBridgeState } from './panelBridge.js';
|
|
27
|
+
function useLive(subscribe, get) {
|
|
28
|
+
return React.useSyncExternalStore(subscribe, get);
|
|
29
|
+
}
|
|
30
|
+
export function useSidePanel(options) {
|
|
31
|
+
const { columns, fullscreen, editorOpen } = options;
|
|
32
|
+
const splitEnabled = useLive(subscribeSidePanelSplitEnabled, getSidePanelSplitEnabled);
|
|
33
|
+
const openSetting = useLive(subscribeSidePanelOpen, getSidePanelOpen);
|
|
34
|
+
const ratio = useLive(subscribeSidePanelRatio, getSidePanelRatio);
|
|
35
|
+
const panelsCsv = useLive(subscribeSidePanelPanels, getSidePanelPanels);
|
|
36
|
+
const [focus, setFocus] = React.useState('chat');
|
|
37
|
+
const [zoom, setZoom] = React.useState(false);
|
|
38
|
+
const [activeIdState, setActiveIdState] = React.useState(undefined);
|
|
39
|
+
// Panel 键盘分发器(v2.1:活动 Panel 的业务键先吃,宿主回退键兜底)。
|
|
40
|
+
// 稳定引用:注册表本身放 ref,runtime 对象在整个会话期不变。
|
|
41
|
+
const inputHandlersRef = React.useRef(new Map());
|
|
42
|
+
const runtime = React.useMemo(() => ({
|
|
43
|
+
registerInput: (panelId, handler, enabled) => {
|
|
44
|
+
inputHandlersRef.current.set(panelId, { handler, enabled });
|
|
45
|
+
return () => {
|
|
46
|
+
if (inputHandlersRef.current.get(panelId)?.handler === handler) {
|
|
47
|
+
inputHandlersRef.current.delete(panelId);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
dispatchKey: (panelId, input, key) => {
|
|
52
|
+
const entry = inputHandlersRef.current.get(panelId);
|
|
53
|
+
if (entry === undefined || !entry.enabled)
|
|
54
|
+
return false;
|
|
55
|
+
return entry.handler(input, key) === true;
|
|
56
|
+
},
|
|
57
|
+
}), []);
|
|
58
|
+
const enabledPanelIds = React.useMemo(() => parseSidePanelIds(panelsCsv), [panelsCsv]);
|
|
59
|
+
const activePanelId = activeIdState !== undefined && enabledPanelIds.includes(activeIdState)
|
|
60
|
+
? activeIdState
|
|
61
|
+
: enabledPanelIds[0];
|
|
62
|
+
const splitAvailable = fullscreen && !editorOpen && splitEnabled && canSplit(columns);
|
|
63
|
+
const open = openSetting && splitAvailable;
|
|
64
|
+
const geometry = React.useMemo(() => resolveSidePanelGeometry({ columns, open, zoom, ratio }), [columns, open, zoom, ratio]);
|
|
65
|
+
const split = geometry !== null;
|
|
66
|
+
const chatColumns = geometry?.chat ?? columns;
|
|
67
|
+
const panelColumns = geometry?.panel ?? 0;
|
|
68
|
+
const focusChat = React.useCallback(() => setFocus('chat'), []);
|
|
69
|
+
const focusPanel = React.useCallback(() => setFocus('panel'), []);
|
|
70
|
+
const toggleSmart = React.useCallback(() => {
|
|
71
|
+
if (!splitAvailable)
|
|
72
|
+
return;
|
|
73
|
+
if (!getSidePanelOpen()) {
|
|
74
|
+
applySidePanelOpen(true);
|
|
75
|
+
setFocus('panel');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (focus === 'chat') {
|
|
79
|
+
setFocus('panel');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
applySidePanelOpen(false);
|
|
83
|
+
setFocus('chat');
|
|
84
|
+
}, [splitAvailable, focus]);
|
|
85
|
+
const toggleOpen = React.useCallback(() => {
|
|
86
|
+
const next = !getSidePanelOpen();
|
|
87
|
+
applySidePanelOpen(next);
|
|
88
|
+
if (!next)
|
|
89
|
+
setFocus('chat');
|
|
90
|
+
}, []);
|
|
91
|
+
const toggleZoom = React.useCallback(() => {
|
|
92
|
+
setZoom(previous => !previous);
|
|
93
|
+
}, []);
|
|
94
|
+
const nudge = React.useCallback((deltaColumns) => {
|
|
95
|
+
applySidePanelRatio(nudgeRatio(columns, getSidePanelRatio(), deltaColumns));
|
|
96
|
+
}, [columns]);
|
|
97
|
+
const openPanel = React.useCallback((id, opts) => {
|
|
98
|
+
if (!parseSidePanelIds(getSidePanelPanels()).includes(id))
|
|
99
|
+
return;
|
|
100
|
+
setActiveIdState(id);
|
|
101
|
+
applySidePanelOpen(true);
|
|
102
|
+
if (opts?.focus !== false)
|
|
103
|
+
setFocus('panel');
|
|
104
|
+
}, []);
|
|
105
|
+
const cyclePanel = React.useCallback((delta) => {
|
|
106
|
+
const ids = parseSidePanelIds(getSidePanelPanels());
|
|
107
|
+
if (ids.length === 0)
|
|
108
|
+
return;
|
|
109
|
+
const current = activeIdState !== undefined && ids.includes(activeIdState)
|
|
110
|
+
? activeIdState
|
|
111
|
+
: ids[0];
|
|
112
|
+
const index = ids.indexOf(current);
|
|
113
|
+
const next = ids[(index + delta + ids.length) % ids.length];
|
|
114
|
+
setActiveIdState(next);
|
|
115
|
+
}, [activeIdState]);
|
|
116
|
+
const command = React.useCallback((raw) => {
|
|
117
|
+
const arg = raw.trim().toLowerCase();
|
|
118
|
+
if (arg === '') {
|
|
119
|
+
if (!splitAvailable)
|
|
120
|
+
return false;
|
|
121
|
+
applySidePanelOpen(true);
|
|
122
|
+
setFocus('panel');
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
if (arg === 'toggle') {
|
|
126
|
+
toggleOpen();
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
if (arg === 'focus') {
|
|
130
|
+
if (!splitAvailable)
|
|
131
|
+
return false;
|
|
132
|
+
applySidePanelOpen(true);
|
|
133
|
+
setFocus('panel');
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
if (arg === 'zoom') {
|
|
137
|
+
if (!splitAvailable)
|
|
138
|
+
return false;
|
|
139
|
+
applySidePanelOpen(true);
|
|
140
|
+
setZoom(previous => !previous);
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
if (SIDE_PANEL_ID_PATTERN.test(arg) && parseSidePanelIds(getSidePanelPanels()).includes(arg)) {
|
|
144
|
+
if (!splitAvailable)
|
|
145
|
+
return false;
|
|
146
|
+
setActiveIdState(arg);
|
|
147
|
+
applySidePanelOpen(true);
|
|
148
|
+
setFocus('panel');
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}, [splitAvailable, toggleOpen]);
|
|
153
|
+
const handleKey = React.useCallback((input, key, event) => {
|
|
154
|
+
const stop = () => event?.stopImmediatePropagation?.();
|
|
155
|
+
if (actionMatches('sidePanel', input, key)) {
|
|
156
|
+
if (!splitAvailable)
|
|
157
|
+
return false;
|
|
158
|
+
toggleSmart();
|
|
159
|
+
stop();
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
if (actionMatches('sidePanelZoom', input, key)) {
|
|
163
|
+
if (!split)
|
|
164
|
+
return false;
|
|
165
|
+
toggleZoom();
|
|
166
|
+
stop();
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
if (focus !== 'panel')
|
|
170
|
+
return false;
|
|
171
|
+
// Panel-focused keys. Ctrl/Alt combos fall through to Chat
|
|
172
|
+
// (interrupt, exit, redraw and the other global actions keep working
|
|
173
|
+
// from the panel); plain keys are the panel surface's own. Esc is the
|
|
174
|
+
// exception: this ink reports a lone ESC as { escape, meta }, so the
|
|
175
|
+
// meta pass-through must NOT claim it — Esc belongs to the panel
|
|
176
|
+
// first (Detail → Dashboard) and then to the host fallback (→ chat).
|
|
177
|
+
if (key.ctrl === true || (key.meta === true && key.escape !== true))
|
|
178
|
+
return false;
|
|
179
|
+
// v2.1 第一棒:活动 Panel 的业务键优先(Subagent Detail 的 ←/→ 翻页、
|
|
180
|
+
// Esc 返回 Dashboard 都先由它自己决定);它没吃才轮到宿主回退键。
|
|
181
|
+
if (activePanelId !== undefined && runtime.dispatchKey(activePanelId, input, key)) {
|
|
182
|
+
stop();
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
if (key.escape === true) {
|
|
186
|
+
setFocus('chat');
|
|
187
|
+
stop();
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
if (key.leftArrow === true || input === '[') {
|
|
191
|
+
cyclePanel(-1);
|
|
192
|
+
stop();
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
if (key.rightArrow === true || input === ']') {
|
|
196
|
+
cyclePanel(1);
|
|
197
|
+
stop();
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
if (input === 'z') {
|
|
201
|
+
toggleZoom();
|
|
202
|
+
stop();
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
if (input === '+' || input === '=') {
|
|
206
|
+
nudge(-RESIZE_STEP_COLUMNS);
|
|
207
|
+
stop();
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
if (input === '-' || input === '_') {
|
|
211
|
+
nudge(RESIZE_STEP_COLUMNS);
|
|
212
|
+
stop();
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
if (input >= '1' && input <= '9') {
|
|
216
|
+
const ids = parseSidePanelIds(getSidePanelPanels());
|
|
217
|
+
const target = ids[Number.parseInt(input, 10) - 1];
|
|
218
|
+
if (target !== undefined)
|
|
219
|
+
setActiveIdState(target);
|
|
220
|
+
stop();
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
// Every other plain key: swallowed — the right column owns the
|
|
224
|
+
// keyboard while focused (Phase 3 dispatches to the active panel first).
|
|
225
|
+
stop();
|
|
226
|
+
return true;
|
|
227
|
+
}, [splitAvailable, split, focus, activePanelId, runtime, toggleSmart, toggleZoom, cyclePanel, nudge]);
|
|
228
|
+
// ctx.tuiPanels 的 UI 通道(设计文档 §18.2):bridge 只在 Chat 挂载期间
|
|
229
|
+
// 有消费者(open() 无消费者时向插件返回 false);请求在本地启用集合里
|
|
230
|
+
// 裁决,state 回写供服务侧 close()/focus() 判断当前 active。
|
|
231
|
+
React.useEffect(() => {
|
|
232
|
+
panelBridgeRequests.attach();
|
|
233
|
+
return () => { panelBridgeRequests.detach(); };
|
|
234
|
+
}, []);
|
|
235
|
+
const bridgeViewRef = React.useRef({ open, activePanelId, enabledPanelIds, splitAvailable, openPanel });
|
|
236
|
+
bridgeViewRef.current = { open, activePanelId, enabledPanelIds, splitAvailable, openPanel };
|
|
237
|
+
React.useEffect(() => panelBridgeRequests.subscribe(request => {
|
|
238
|
+
const view = bridgeViewRef.current;
|
|
239
|
+
if (request.kind === 'open') {
|
|
240
|
+
// 未启用的 Panel(含已撤下的注册)直接忽略——open() 的布尔返回
|
|
241
|
+
// 只承诺请求已送达活的 Chat 控制器。
|
|
242
|
+
if (!view.enabledPanelIds.includes(request.id))
|
|
243
|
+
return;
|
|
244
|
+
if (!view.splitAvailable)
|
|
245
|
+
return;
|
|
246
|
+
view.openPanel(request.id, { focus: true });
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (request.kind === 'focus') {
|
|
250
|
+
if (view.open && view.activePanelId === request.id)
|
|
251
|
+
setFocus('panel');
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (view.activePanelId === request.id) {
|
|
255
|
+
applySidePanelOpen(false);
|
|
256
|
+
setFocus('chat');
|
|
257
|
+
}
|
|
258
|
+
}), []);
|
|
259
|
+
React.useEffect(() => {
|
|
260
|
+
panelBridgeState.set({ open, activePanelId, focus });
|
|
261
|
+
}, [open, activePanelId, focus]);
|
|
262
|
+
return {
|
|
263
|
+
geometry,
|
|
264
|
+
split,
|
|
265
|
+
chatColumns,
|
|
266
|
+
panelColumns,
|
|
267
|
+
splitAvailable,
|
|
268
|
+
open,
|
|
269
|
+
zoom,
|
|
270
|
+
focus,
|
|
271
|
+
activePanelId,
|
|
272
|
+
enabledPanelIds,
|
|
273
|
+
runtime,
|
|
274
|
+
focusChat,
|
|
275
|
+
focusPanel,
|
|
276
|
+
toggleSmart,
|
|
277
|
+
toggleOpen,
|
|
278
|
+
toggleZoom,
|
|
279
|
+
nudge,
|
|
280
|
+
openPanel,
|
|
281
|
+
command,
|
|
282
|
+
handleKey,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
@@ -11,7 +11,7 @@ import type { WaveBand } from '../../dsh-adapter/types.js';
|
|
|
11
11
|
* @returns Glyph count, or 0 when the strip should not render at all.
|
|
12
12
|
*/
|
|
13
13
|
export declare function miniWakeWidth(columns: number): number;
|
|
14
|
-
export declare function MiniWake({ band, hint, tick, }: {
|
|
14
|
+
export declare function MiniWake({ band, hint, tick, onOpen, hoverHint, }: {
|
|
15
15
|
/** The session projected onto {@link miniWakeWidth} columns. */
|
|
16
16
|
band: WaveBand;
|
|
17
17
|
/**
|
|
@@ -20,5 +20,15 @@ export declare function MiniWake({ band, hint, tick, }: {
|
|
|
20
20
|
*/
|
|
21
21
|
hint?: string;
|
|
22
22
|
tick: number;
|
|
23
|
+
/**
|
|
24
|
+
* Open the trajectory scene. The strip is the conversation's permanent
|
|
25
|
+
* pointer at that second view, so pointing AT it and clicking is the
|
|
26
|
+
* gesture the affordance implies — the key chord stays as the alternative,
|
|
27
|
+
* not the only way in.
|
|
28
|
+
*/
|
|
29
|
+
onOpen?: () => void;
|
|
30
|
+
/** Key chord revealed while the pointer rests on the strip (the first-run
|
|
31
|
+
* hint has already retired by then). */
|
|
32
|
+
hoverHint?: string;
|
|
23
33
|
}): React.ReactNode;
|
|
24
34
|
//# sourceMappingURL=MiniWake.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiniWake.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/MiniWake.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,4BAA4B,CAAA;AAwCvE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,IAAI,EACJ,IAAI,
|
|
1
|
+
{"version":3,"file":"MiniWake.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/MiniWake.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,4BAA4B,CAAA;AAwCvE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,GACV,EAAE;IACD,gEAAgE;IAChE,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB;6CACyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,CAmDlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import chalk from 'chalk';
|
|
3
|
-
import { Box, Text, useTheme } from '../../ui.js';
|
|
4
|
+
import { Box, NoSelect, Text, useTheme } from '../../ui.js';
|
|
4
5
|
import { getTheme } from '../../theme.js';
|
|
5
6
|
import { alive, mix } from '../../trajectory/motion.js';
|
|
6
7
|
import { parseRGB } from '../Spinner/spinnerUtils.js';
|
|
@@ -59,9 +60,10 @@ export function miniWakeWidth(columns) {
|
|
|
59
60
|
return 8;
|
|
60
61
|
return 0;
|
|
61
62
|
}
|
|
62
|
-
export function MiniWake({ band, hint, tick, }) {
|
|
63
|
+
export function MiniWake({ band, hint, tick, onOpen, hoverHint, }) {
|
|
63
64
|
const [themeName] = useTheme();
|
|
64
65
|
const theme = getTheme(themeName);
|
|
66
|
+
const [hovered, setHovered] = React.useState(false);
|
|
65
67
|
if (band.buckets.length === 0)
|
|
66
68
|
return null;
|
|
67
69
|
const logFloor = Math.log1p(Math.max(0, band.floor));
|
|
@@ -85,7 +87,11 @@ export function MiniWake({ band, hint, tick, }) {
|
|
|
85
87
|
const colour = failed ? theme.error : channelColor(dominantChannel(bucket), theme);
|
|
86
88
|
strip += chalk.hex(toHex(colour))(shown >= BLOCKS.length ? FULL : BLOCKS[shown - 1]);
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
// The hint slot narrates the affordance: first-run chord, then — while the
|
|
91
|
+
// pointer is on the strip — the chord again, because that is the moment the
|
|
92
|
+
// user is asking "what does this thing do".
|
|
93
|
+
const shownHint = hint ?? (hovered && onOpen !== undefined ? hoverHint : undefined);
|
|
94
|
+
return (_jsx(NoSelect, { children: _jsxs(Box, { flexShrink: 0, flexDirection: "row", gap: 1, onClick: onOpen, onMouseEnter: onOpen !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onOpen !== undefined ? () => setHovered(false) : undefined, children: [_jsx(Text, { children: strip }), shownHint !== undefined ? _jsx(Text, { color: hovered && hint === undefined ? 'accent' : 'subtle', children: shownHint }) : null] }) }));
|
|
89
95
|
}
|
|
90
96
|
/** Theme colour → `#rrggbb`, the form chalk needs. */
|
|
91
97
|
function toHex(colour) {
|
|
@@ -14,13 +14,15 @@ import type { ContextMenuEvent } from '../../ink/events/context-menu-event.js';
|
|
|
14
14
|
* session rows resolve them: a row must be exactly two lines at every terminal
|
|
15
15
|
* width, and a wrapped row destroys the alignment a list is scanned by.
|
|
16
16
|
*/
|
|
17
|
-
export declare function HomeWorkspaceRow({ title, path, home, sessionCount, present, selected, focused, width, onSelect, onMenu, }: {
|
|
17
|
+
export declare function HomeWorkspaceRow({ title, path, home, sessionCount, historyOnly, present, selected, focused, width, onSelect, onMenu, }: {
|
|
18
18
|
title: string;
|
|
19
19
|
/** Canonical directory path recorded in the ledger. */
|
|
20
20
|
path: string;
|
|
21
21
|
/** Home directory, for collapsing the path to `~`. */
|
|
22
22
|
home: string;
|
|
23
23
|
sessionCount: number;
|
|
24
|
+
/** Derived from session history, without a workspace registration. */
|
|
25
|
+
historyOnly?: boolean;
|
|
24
26
|
/** False when the recorded directory no longer exists. */
|
|
25
27
|
present: boolean;
|
|
26
28
|
/** Whether this workspace's sessions are the ones on the right. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeWorkspaceRow.d.ts","sourceRoot":"","sources":["../../../../src/components/workspaces/HomeWorkspaceRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAG9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAA;IAChB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IAClC,mDAAmD;IACnD,MAAM,CAAC,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"HomeWorkspaceRow.d.ts","sourceRoot":"","sources":["../../../../src/components/workspaces/HomeWorkspaceRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAG9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,WAAmB,EACnB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAA;IAChB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IAClC,mDAAmD;IACnD,MAAM,CAAC,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CAwClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CAoBlB"}
|
|
@@ -16,7 +16,7 @@ import { formatProject, spreadRow, truncateWidth } from '../../sessions/format.j
|
|
|
16
16
|
* session rows resolve them: a row must be exactly two lines at every terminal
|
|
17
17
|
* width, and a wrapped row destroys the alignment a list is scanned by.
|
|
18
18
|
*/
|
|
19
|
-
export function HomeWorkspaceRow({ title, path, home, sessionCount, present, selected, focused, width, onSelect, onMenu, }) {
|
|
19
|
+
export function HomeWorkspaceRow({ title, path, home, sessionCount, historyOnly = false, present, selected, focused, width, onSelect, onMenu, }) {
|
|
20
20
|
const [hovered, setHovered] = useState(false);
|
|
21
21
|
const body = Math.max(8, width - 4);
|
|
22
22
|
// The presence marker leads the badge on purpose: `spreadRow` may truncate
|
|
@@ -25,7 +25,8 @@ export function HomeWorkspaceRow({ title, path, home, sessionCount, present, sel
|
|
|
25
25
|
// the pane, the missing directory is not).
|
|
26
26
|
const count = t('home-sessions-count', { n: sessionCount });
|
|
27
27
|
const badge = present ? count : `${t('home-workspace-missing')} · ${count}`;
|
|
28
|
-
const
|
|
28
|
+
const name = historyOnly ? `${t('supervisor-history-only')} · ${title}` : title;
|
|
29
|
+
const heading = spreadRow(`${selected ? '▣' : '▢'} ${name}`, `${selected ? '✓ ' : ''}${badge}`, body);
|
|
29
30
|
const detail = formatProject(path, home);
|
|
30
31
|
// The cursor (green) outranks the selection ring (green); both outrank the
|
|
31
32
|
// idle colour. Blue is not part of this ladder at all — see the background.
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
export type CnyPerMillion = readonly [number, number];
|
|
18
18
|
/** 一个官方模型的完整价目(人民币/百万 tokens)。 */
|
|
19
19
|
export interface DeepSeekModelPrice {
|
|
20
|
-
/**
|
|
20
|
+
/** 输入(缓存未命中)单价;缓存写入量按此价另计。 */
|
|
21
21
|
inputMiss: CnyPerMillion;
|
|
22
|
-
/**
|
|
22
|
+
/** 输入(缓存命中)单价。 */
|
|
23
23
|
inputHit: CnyPerMillion;
|
|
24
24
|
/** 输出。 */
|
|
25
25
|
output: CnyPerMillion;
|
|
@@ -63,11 +63,12 @@ export interface CostTokenBuckets {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* 估算本会话花费拆分(人民币,元):高峰桶按高峰价、空闲桶按空闲价。
|
|
66
|
-
* 公式(每桶):
|
|
67
|
-
* + output ×
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
66
|
+
* 公式(每桶):input × 输入未命中价 + cacheRead × 输入命中价
|
|
67
|
+
* + cacheWrite × 输入未命中价 + output × 输出价。DSH 的 TokenUsage 契约里
|
|
68
|
+
* 这四个计数是**互斥分项**——input 即未命中输入,缓存读/写各自另计——所以
|
|
69
|
+
* 四项直接相加,不做 input 与 cacheRead 之间的抵扣。模型未收录或所有 token
|
|
70
|
+
* 均为零时返回 undefined(调用方不显示金额)。这是**估算**,不是账单——
|
|
71
|
+
* 定价可能变动,以 DeepSeek 平台账单为准。
|
|
71
72
|
* @param tokens - 按计价时段分桶的会话累计 token。
|
|
72
73
|
* @param model - 当前模型 id(前缀匹配价目)。
|
|
73
74
|
*/
|
|
@@ -88,8 +89,8 @@ export declare function emptyCostBuckets(): CostTokenBuckets;
|
|
|
88
89
|
export declare function cloneCostBuckets(buckets: CostTokenBuckets): CostTokenBuckets;
|
|
89
90
|
/**
|
|
90
91
|
* 把一笔 usage 按计价时段累加进分桶(in-place)。durable 事件按发生时刻
|
|
91
|
-
*
|
|
92
|
-
*
|
|
92
|
+
* 落桶,峰/谷单价不同;四个计数按 DSH 的 TokenUsage 契约互斥累加
|
|
93
|
+
* (cacheRead 计价时按命中价、cacheWrite 按未命中价,见 costSplit)。
|
|
93
94
|
*/
|
|
94
95
|
export declare function addUsageToCostBuckets(buckets: CostTokenBuckets, usage: CostUsageDelta, peak: boolean): void;
|
|
95
96
|
/** 一笔待计价用量:provider 决定官方与否,model 查价目,buckets 为峰谷分桶。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepseekPricing.d.ts","sourceRoot":"","sources":["../../src/deepseekPricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErD,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,
|
|
1
|
+
{"version":3,"file":"deepseekPricing.d.ts","sourceRoot":"","sources":["../../src/deepseekPricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErD,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,SAAS,EAAE,aAAa,CAAA;IACxB,kBAAkB;IAClB,QAAQ,EAAE,aAAa,CAAA;IACvB,UAAU;IACV,MAAM,EAAE,aAAa,CAAA;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAoB9E,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAIxD,CAAA;AAED,gDAAgD;AAChD,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAE,IAAiB,GAAG,OAAO,CAM3D;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAU3E;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAA;IACrB,IAAI,EAAE,eAAe,CAAA;CACtB;AAmCD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAc3D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAEpB;AAED,yDAAyD;AACzD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAErD,6BAA6B;AAC7B,wBAAgB,gBAAgB,IAAI,gBAAgB,CAKnD;AAED,oCAAoC;AACpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAK5E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,OAAO,GACZ,IAAI,CAMN;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CACrC;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC;+CAC2C;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,gBAAgB;IAChB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,iBAAiB;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,iBAAiB;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAaD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,OAAO,GAAE,mBAAwB,GAChC,mBAAmB,GAAG,SAAS,CA8BjC;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAA;IACtE,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS;QAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;KACnC,EAAE,GAAG,SAAS,CAAA;IACf;4CACwC;IACxC,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5C;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAgBpF;AAED,qEAAqE;AACrE,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,mBAAwB,GAChC,mBAAmB,GAAG,SAAS,CAEjC"}
|
|
@@ -94,9 +94,11 @@ function costSplit(tokens, price) {
|
|
|
94
94
|
const costOf = (bucket, rateIndex) => {
|
|
95
95
|
const input = Math.max(0, bucket.input);
|
|
96
96
|
const output = Math.max(0, bucket.output);
|
|
97
|
-
const cacheRead = Math.max(0,
|
|
98
|
-
|
|
97
|
+
const cacheRead = Math.max(0, bucket.cacheRead);
|
|
98
|
+
const cacheWrite = Math.max(0, bucket.cacheWrite);
|
|
99
|
+
return input * price.inputMiss[rateIndex]
|
|
99
100
|
+ cacheRead * price.inputHit[rateIndex]
|
|
101
|
+
+ cacheWrite * price.inputMiss[rateIndex]
|
|
100
102
|
+ output * price.output[rateIndex];
|
|
101
103
|
};
|
|
102
104
|
return {
|
|
@@ -106,11 +108,12 @@ function costSplit(tokens, price) {
|
|
|
106
108
|
}
|
|
107
109
|
/**
|
|
108
110
|
* 估算本会话花费拆分(人民币,元):高峰桶按高峰价、空闲桶按空闲价。
|
|
109
|
-
* 公式(每桶):
|
|
110
|
-
* + output ×
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
111
|
+
* 公式(每桶):input × 输入未命中价 + cacheRead × 输入命中价
|
|
112
|
+
* + cacheWrite × 输入未命中价 + output × 输出价。DSH 的 TokenUsage 契约里
|
|
113
|
+
* 这四个计数是**互斥分项**——input 即未命中输入,缓存读/写各自另计——所以
|
|
114
|
+
* 四项直接相加,不做 input 与 cacheRead 之间的抵扣。模型未收录或所有 token
|
|
115
|
+
* 均为零时返回 undefined(调用方不显示金额)。这是**估算**,不是账单——
|
|
116
|
+
* 定价可能变动,以 DeepSeek 平台账单为准。
|
|
114
117
|
* @param tokens - 按计价时段分桶的会话累计 token。
|
|
115
118
|
* @param model - 当前模型 id(前缀匹配价目)。
|
|
116
119
|
*/
|
|
@@ -152,8 +155,8 @@ export function cloneCostBuckets(buckets) {
|
|
|
152
155
|
}
|
|
153
156
|
/**
|
|
154
157
|
* 把一笔 usage 按计价时段累加进分桶(in-place)。durable 事件按发生时刻
|
|
155
|
-
*
|
|
156
|
-
*
|
|
158
|
+
* 落桶,峰/谷单价不同;四个计数按 DSH 的 TokenUsage 契约互斥累加
|
|
159
|
+
* (cacheRead 计价时按命中价、cacheWrite 按未命中价,见 costSplit)。
|
|
157
160
|
*/
|
|
158
161
|
export function addUsageToCostBuckets(buckets, usage, peak) {
|
|
159
162
|
const bucket = peak ? buckets.peak : buckets.idle;
|
|
@@ -162,11 +165,15 @@ export function addUsageToCostBuckets(buckets, usage, peak) {
|
|
|
162
165
|
bucket.cacheRead += usage.cacheRead ?? 0;
|
|
163
166
|
bucket.cacheWrite += usage.cacheWrite ?? 0;
|
|
164
167
|
}
|
|
165
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* 分桶里的计价 token 总数(两桶合计):DSH 的 TokenUsage 契约里四个计数是
|
|
170
|
+
* **互斥分项**(input 只含未命中输入,缓存读/写各自另计),故四项全量相加。
|
|
171
|
+
*/
|
|
166
172
|
function bucketTokenTotal(buckets) {
|
|
167
173
|
const peak = buckets.peak ?? EMPTY_TOTALS;
|
|
168
174
|
const idle = buckets.idle ?? EMPTY_TOTALS;
|
|
169
|
-
return peak.input + peak.output +
|
|
175
|
+
return peak.input + peak.output + peak.cacheRead + peak.cacheWrite
|
|
176
|
+
+ idle.input + idle.output + idle.cacheRead + idle.cacheWrite;
|
|
170
177
|
}
|
|
171
178
|
/**
|
|
172
179
|
* 多模型桶计价纯函数:逐条目查价求和,金额按 scope 拆成主会话/子代理,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AttachedContext } from '../../adapter/ports/channel-view.js';
|
|
2
|
+
import type { MentionExpansion } from './types.js';
|
|
3
|
+
/** What a panel hands to {@link AttachedContextRegistry.attach}: the staged
|
|
4
|
+
* projection minus the fields the channel derives itself (id/chars/truncated). */
|
|
5
|
+
export type AttachedContextInput = Pick<AttachedContext, 'source' | 'sourceId' | 'title' | 'content'>;
|
|
6
|
+
/**
|
|
7
|
+
* Cell the registry writes through — the live ChannelState. The list is
|
|
8
|
+
* REPLACED on every change (never mutated in place), which is both what the
|
|
9
|
+
* projection wants (a fresh array per revision) and what the port's readonly
|
|
10
|
+
* element type allows the channel state to hold.
|
|
11
|
+
*/
|
|
12
|
+
export interface AttachedContextHolder {
|
|
13
|
+
attachedContexts: readonly AttachedContext[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Build one model-facing block, shaped like the selection channel's
|
|
17
|
+
* `<attached-file …>`: escaped attributes, one body, the close tag. The
|
|
18
|
+
* attribute values reuse `escapeSnippetAttr` — a title or source id carrying
|
|
19
|
+
* `"`/`&`/`<`/`>` must not break out of the attribute or smuggle markup
|
|
20
|
+
* into the model-facing block.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildAttachedContextBlock(context: AttachedContext): string;
|
|
23
|
+
/**
|
|
24
|
+
* Append every staged context as its own block, in stage order (the order the
|
|
25
|
+
* chips render in), after the typed text and every other attachment. The caller
|
|
26
|
+
* passes the ENQUEUE-time snapshot: a panel that stages something while the
|
|
27
|
+
* delivery FIFO is parked can never ride along with a message it was not typed
|
|
28
|
+
* for. Returns how many blocks were appended (telemetry/assertions).
|
|
29
|
+
*/
|
|
30
|
+
export declare function appendAttachedContextBlocks(blocks: MentionExpansion['blocks'], contexts: readonly AttachedContext[]): number;
|
|
31
|
+
/** The ChannelState-facing surface (projection writes + the two actions). */
|
|
32
|
+
export interface AttachedContextRegistry {
|
|
33
|
+
/** Stage (or re-stage) one panel context; see the REPLACE note below. */
|
|
34
|
+
attach(input: AttachedContextInput): void;
|
|
35
|
+
/** Drop one staged context by id (unknown id = no-op, no emit). */
|
|
36
|
+
detach(id: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Take-and-clear in one step: the submission that captured the snapshot owns
|
|
39
|
+
* exactly those contexts. Splitting snapshot/clear would let a second
|
|
40
|
+
* submission — or a queued skill command — capture chips the first one
|
|
41
|
+
* already spent (the draft takes the same "spent at submit" semantics).
|
|
42
|
+
*/
|
|
43
|
+
consume(): readonly AttachedContext[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Registry behind `ChannelUi.attachedContexts` / `attachContext` /
|
|
47
|
+
* `detachContext`. It owns no state of its own: every entry lives in the
|
|
48
|
+
* channel state's array, so the session-scoped reset that clears the other
|
|
49
|
+
* projections (`resetSessionProjection`) clears this one by assignment.
|
|
50
|
+
*
|
|
51
|
+
* Duplicate `sourceId` + `title` REPLACES the existing entry (keeping its id
|
|
52
|
+
* and position) instead of stacking a second chip: a panel row re-sent after it
|
|
53
|
+
* changed — or sent twice by a double 's' keypress — is the same attachment, and
|
|
54
|
+
* a stable id keeps chip keys and any future detach-by-sender valid across the
|
|
55
|
+
* update. Distinct titles under one id stay separate chips.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createAttachedContextRegistry(holder: () => AttachedContextHolder, emit: () => void): AttachedContextRegistry;
|
|
58
|
+
//# sourceMappingURL=attached-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attached-context.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/attached-context.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;mFACmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;AAErG;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAA;CAC7C;AAcD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAG1E;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAClC,QAAQ,EAAE,SAAS,eAAe,EAAE,GACnC,MAAM,CAKR;AAED,6EAA6E;AAC7E,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,MAAM,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAAA;IACzC,mEAAmE;IACnE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;;;OAKG;IACH,OAAO,IAAI,SAAS,eAAe,EAAE,CAAA;CACtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,qBAAqB,EACnC,IAAI,EAAE,MAAM,IAAI,GACf,uBAAuB,CA4CzB"}
|