@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
|
@@ -17,10 +17,8 @@ export function createChannelProjection(state, deps) {
|
|
|
17
17
|
let streaming;
|
|
18
18
|
/** The in-progress reasoning row; `undefined` when no reasoning is streaming. */
|
|
19
19
|
let reasoning;
|
|
20
|
-
/** Reasoning rows sealed
|
|
21
|
-
*
|
|
22
|
-
* them (WebUI AssistantMarkdown keepOpen parity: thinking holds open
|
|
23
|
-
* through the whole in-flight turn, tool-call steps included). */
|
|
20
|
+
/** Reasoning rows sealed this turn. Full mode keeps them expanded until
|
|
21
|
+
* turn/end without leaving their streaming spinner active. */
|
|
24
22
|
const sealedReasoning = [];
|
|
25
23
|
/** Wall-clock start of the current reasoning row (durationMs on settle). */
|
|
26
24
|
let reasoningStart = 0;
|
|
@@ -222,6 +220,7 @@ export function createChannelProjection(state, deps) {
|
|
|
222
220
|
lastReasoningRow.step === step) {
|
|
223
221
|
reasoning = lastReasoningRow.row;
|
|
224
222
|
reasoning.streaming = true;
|
|
223
|
+
reasoning.thinkingOpen = false;
|
|
225
224
|
touchRow(reasoning);
|
|
226
225
|
const sealedIdx = sealedReasoning.indexOf(reasoning);
|
|
227
226
|
if (sealedIdx !== -1)
|
|
@@ -241,7 +240,7 @@ export function createChannelProjection(state, deps) {
|
|
|
241
240
|
}
|
|
242
241
|
return reasoning;
|
|
243
242
|
};
|
|
244
|
-
/**
|
|
243
|
+
/** Settle live reasoning the moment the model moves PAST
|
|
245
244
|
* thinking — the answer's first text token or a tool call — not at
|
|
246
245
|
* `assistant/message` (end of step). A long reply pushes the thinking
|
|
247
246
|
* block into terminal scrollback long before the message seals, and
|
|
@@ -249,14 +248,15 @@ export function createChannelProjection(state, deps) {
|
|
|
249
248
|
* so a late fold leaves a stale unfolded preview frozen above the
|
|
250
249
|
* window — the user scrolls up and the thinking looks "not folded".
|
|
251
250
|
* Folding while the block still sits in the live window keeps the
|
|
252
|
-
* shrink inside the diff engine's reachable region.
|
|
253
|
-
*
|
|
254
|
-
const
|
|
255
|
-
if (reasoning === undefined
|
|
251
|
+
* shrink inside the diff engine's reachable region. Full mode keeps the
|
|
252
|
+
* settled block open separately, so its spinner can stop immediately. */
|
|
253
|
+
const settleLiveReasoning = (where) => {
|
|
254
|
+
if (reasoning === undefined)
|
|
256
255
|
return;
|
|
257
256
|
const duration = Math.max(0, Date.now() - reasoningStart);
|
|
258
257
|
reasoning.durationMs = duration;
|
|
259
258
|
reasoning.streaming = false;
|
|
259
|
+
reasoning.thinkingOpen = state.thinkingFold === 'full';
|
|
260
260
|
touchRow(reasoning);
|
|
261
261
|
sealedReasoning.push(reasoning);
|
|
262
262
|
reasoning = undefined;
|
|
@@ -271,11 +271,13 @@ export function createChannelProjection(state, deps) {
|
|
|
271
271
|
const folded = sealedReasoning.length + (reasoning !== undefined ? 1 : 0);
|
|
272
272
|
for (const row of sealedReasoning) {
|
|
273
273
|
row.streaming = false;
|
|
274
|
+
row.thinkingOpen = false;
|
|
274
275
|
touchRow(row);
|
|
275
276
|
}
|
|
276
277
|
sealedReasoning.length = 0;
|
|
277
278
|
if (reasoning !== undefined) {
|
|
278
279
|
reasoning.streaming = false;
|
|
280
|
+
reasoning.thinkingOpen = false;
|
|
279
281
|
reasoning.durationMs = Math.max(0, Date.now() - reasoningStart);
|
|
280
282
|
touchRow(reasoning);
|
|
281
283
|
}
|
|
@@ -402,9 +404,9 @@ export function createChannelProjection(state, deps) {
|
|
|
402
404
|
if (chunk.type === 'text-delta') {
|
|
403
405
|
if (chunk.text) {
|
|
404
406
|
// Fold the thinking preview while it is still in the live
|
|
405
|
-
// window (see
|
|
407
|
+
// window (see settleLiveReasoning) — before this text grows the
|
|
406
408
|
// transcript and pushes the block into scrollback.
|
|
407
|
-
|
|
409
|
+
settleLiveReasoning('first text token');
|
|
408
410
|
const key = stepKey(turn, step);
|
|
409
411
|
const row = assistantRowsByStep.get(key) ?? ensureStreaming(seq);
|
|
410
412
|
assistantRowsByStep.set(key, row);
|
|
@@ -494,29 +496,28 @@ export function createChannelProjection(state, deps) {
|
|
|
494
496
|
appendRow({ id: deps.rowIds.value, kind: 'compact', text: summary });
|
|
495
497
|
deps.rowIds.value += 1;
|
|
496
498
|
}
|
|
497
|
-
// The
|
|
498
|
-
//
|
|
499
|
-
//
|
|
500
|
-
// the
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
499
|
+
// The checkpoint replaces the whole pre-compact surface. Occupancy
|
|
500
|
+
// needs no rewriting here: the official token meter folds this same
|
|
501
|
+
// event and reprices the surface by its logged shadow price, so the
|
|
502
|
+
// channel's `contextOccupancy` drops the moment the checkpoint lands
|
|
503
|
+
// (the projection's change feed republishes the footer). The old
|
|
504
|
+
// chars/4 rewrite below was a worse estimate of a number the host
|
|
505
|
+
// already knows: it ignored the retained tail the official
|
|
506
|
+
// `compaction-basic` keeps (default `retainRatio` 0.16), ignored the
|
|
507
|
+
// tool catalog, and could not see the summary's real size.
|
|
508
|
+
//
|
|
509
|
+
// The SEGMENTED bar keeps its own heuristic composition (system +
|
|
510
|
+
// the summary prompt): it describes what the surface is made of,
|
|
511
|
+
// never the occupancy total.
|
|
507
512
|
state.contextSegments = {
|
|
508
513
|
system: state.contextSegments.system,
|
|
509
|
-
prompt:
|
|
514
|
+
prompt: estimateTokens(summary),
|
|
510
515
|
assistant: 0,
|
|
511
516
|
thinking: 0,
|
|
512
517
|
tools: 0,
|
|
513
518
|
};
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
output: 0,
|
|
517
|
-
cacheRead: 0,
|
|
518
|
-
cacheWrite: 0,
|
|
519
|
-
};
|
|
519
|
+
// The latch must release: compaction is the remediation for a low
|
|
520
|
+
// context, so the warning has to be able to fire again afterwards.
|
|
520
521
|
deps.resetContextWarning();
|
|
521
522
|
break;
|
|
522
523
|
}
|
|
@@ -665,15 +666,15 @@ export function createChannelProjection(state, deps) {
|
|
|
665
666
|
streaming = undefined;
|
|
666
667
|
if (reasoning !== undefined) {
|
|
667
668
|
// Backstop fold: reasoning whose step ended with no text token
|
|
668
|
-
// and no tool call (
|
|
669
|
+
// and no tool call (settleLiveReasoning handles those earlier —
|
|
669
670
|
// while the block is still in the repaintable live window;
|
|
670
671
|
// here a long reply may already have pushed it into scrollback,
|
|
671
672
|
// where the shrink cannot be repainted). `full` mode
|
|
672
673
|
// (/settings opt-in) keeps the block expanded until turn settle
|
|
673
674
|
// — settleStreaming folds the sealed rows then.
|
|
674
675
|
reasoning.durationMs = Math.max(0, Date.now() - reasoningStart);
|
|
675
|
-
|
|
676
|
-
|
|
676
|
+
reasoning.streaming = false;
|
|
677
|
+
reasoning.thinkingOpen = state.thinkingFold === 'full';
|
|
677
678
|
touchRow(reasoning);
|
|
678
679
|
sealedReasoning.push(reasoning);
|
|
679
680
|
logForDebugging(`thinking: step sealed (${reasoning.durationMs}ms), expanded until turn/end`);
|
|
@@ -795,8 +796,8 @@ export function createChannelProjection(state, deps) {
|
|
|
795
796
|
}
|
|
796
797
|
// Reasoning that led to a tool call is done thinking — fold the
|
|
797
798
|
// preview now, before the tool card grows the transcript past it
|
|
798
|
-
// (see
|
|
799
|
-
|
|
799
|
+
// (see settleLiveReasoning).
|
|
800
|
+
settleLiveReasoning('tool call');
|
|
800
801
|
const card = {
|
|
801
802
|
id: deps.rowIds.value,
|
|
802
803
|
kind: 'tool',
|
|
@@ -943,12 +944,16 @@ export function createChannelProjection(state, deps) {
|
|
|
943
944
|
tpsTurnDecodeTokens = 0;
|
|
944
945
|
tpsTurnSampled = false;
|
|
945
946
|
}
|
|
947
|
+
// Occupancy is evaluated on EVERY turn end, not only a completed one:
|
|
948
|
+
// the request that overflowed the window is exactly the one whose turn
|
|
949
|
+
// ends as an error (it writes no successful usage sample at all), and
|
|
950
|
+
// an aborted turn has still grown the surface. Replay drains a resumed
|
|
951
|
+
// session's history through the projector; its totals describe the
|
|
952
|
+
// past, not a live context-low state.
|
|
953
|
+
if (!replaying)
|
|
954
|
+
deps.checkContextWarning();
|
|
946
955
|
const reason = event.data.reason;
|
|
947
956
|
if (reason.kind === 'completed') {
|
|
948
|
-
// Replay drains a resumed session's history through the projector;
|
|
949
|
-
// its totals describe the past, not a live context-low state.
|
|
950
|
-
if (!replaying)
|
|
951
|
-
deps.checkContextWarning();
|
|
952
957
|
break;
|
|
953
958
|
}
|
|
954
959
|
if (reason.kind === 'aborted' || reason.kind === 'interrupted') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAU5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAG9C,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACtD,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,IAAI;QAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACjE,OAAO,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAA;IACjF,GAAG,IAAI,MAAM,CAAA;IACb,KAAK,IAAI,MAAM,CAAA;IACf,QAAQ,IAAI,MAAM,CAAA;IAClB,aAAa,IAAI,MAAM,GAAG,SAAS,CAAA;IACnC,YAAY,IAAI,MAAM,CAAA;I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cuB,MAAM,EAAE;yBA2BJ,MAAM,GAAG,IAAI;yBAmCb,MAAM,GAAG,QAAQ,GAAG,IAAI;sBAY3B,MAAM,EAAE;wBA2CJ,MAAM,KAAG,MAAM,EAAE;EAM7C"}
|
|
@@ -3,7 +3,7 @@ import { join } from 'node:path';
|
|
|
3
3
|
import { collectAdapterDiagnostics } from '../../adapter/kernel/diagnostics.js';
|
|
4
4
|
import { fetchBalance } from '../../deepseekBalance.js';
|
|
5
5
|
import { t } from '../../i18n.js';
|
|
6
|
-
import { credentialRefDeclared } from '../../utils/credentials.js';
|
|
6
|
+
import { credentialRefDeclared, dshHomeDir } from '../../utils/credentials.js';
|
|
7
7
|
import { homeDir } from '../../utils/paths.js';
|
|
8
8
|
import { sessionsRoots } from '../compat/index.js';
|
|
9
9
|
import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
|
|
@@ -137,9 +137,18 @@ export function createReportActions(ctx, deps) {
|
|
|
137
137
|
t('doctor-context-window', { window: deps.contextWindow() ?? t('doctor-unknown') }),
|
|
138
138
|
`${t('doctor-session', { id: deps.capture().agent.id })}${deps.sessionTitle() ? ` · ${deps.sessionTitle()}` : ''}`,
|
|
139
139
|
];
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
// The same two config candidates as the launcher's doctor, resolved the same
|
|
141
|
+
// way. `~/.dsh-tui/cordis.yml` is the bare-composition root config
|
|
142
|
+
// (`dsh --config cordis.yml`): a profile install does not use it and nothing
|
|
143
|
+
// reads it, so its absence is normal — list it only when the user kept one.
|
|
144
|
+
// The profile patch hangs off `$DSH_HOME ?? ~/.dsh` plus the launcher's own
|
|
145
|
+
// profile name; a hardcoded `~/.dsh` named a different file whenever
|
|
146
|
+
// `DSH_HOME` was set. The two doctors must not diverge.
|
|
147
|
+
const legacyConfig = join(homeDir(), '.dsh-tui/cordis.yml');
|
|
148
|
+
if (existsSync(legacyConfig))
|
|
149
|
+
lines.push(t('doctor-config', { candidate: legacyConfig, state: '✓' }));
|
|
150
|
+
const profileConfig = join(dshHomeDir(), 'profiles', 'dsh-tui', 'cordis.patch.yml');
|
|
151
|
+
lines.push(t('doctor-config', { candidate: profileConfig, state: existsSync(profileConfig) ? '✓' : t('doctor-config-missing') }));
|
|
143
152
|
for (const dir of sessionsRoots())
|
|
144
153
|
lines.push(t('doctor-storage', { dir, state: existsSync(dir) ? '✓' : t('doctor-storage-uninit') }));
|
|
145
154
|
const pluginHost = ctx.get('tuiPluginHost');
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { ChannelState } from './types.js';
|
|
2
|
-
export type SessionResetState = Pick<ChannelState, 'rows' | 'todos' | 'pending' | 'goal' | 'sessionTitle' | 'sessionColor' | 'tokens' | 'mainCost' | 'subagentCost' | 'responseChars' | 'activeToolCount' | 'lastUserText' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'tps' | 'tpsSamples' | 'lastUsage' | 'contextSegments'
|
|
2
|
+
export type SessionResetState = Pick<ChannelState, 'rows' | 'todos' | 'pending' | 'goal' | 'sessionTitle' | 'sessionColor' | 'tokens' | 'mainCost' | 'subagentCost' | 'responseChars' | 'activeToolCount' | 'lastUserText' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'tps' | 'tpsSamples' | 'lastUsage' | 'contextSegments'
|
|
3
|
+
/** Staged "Send to Chat" contexts belong to the composer that staged them:
|
|
4
|
+
* an adopted session must never carry the previous conversation's chips
|
|
5
|
+
* (or hand its model a panel context the user staged elsewhere). */
|
|
6
|
+
| 'attachedContexts'>;
|
|
3
7
|
/**
|
|
4
8
|
* Reset the projection facts shared by every foreground session adoption.
|
|
5
9
|
* Target-specific route, cwd, preset, loaded-context and status fields stay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-reset.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-reset.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,SAAS,GACT,YAAY,GACZ,eAAe,GACf,aAAa,GACb,KAAK,GACL,YAAY,GACZ,WAAW,GACX,iBAAiB,
|
|
1
|
+
{"version":3,"file":"session-reset.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-reset.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,SAAS,GACT,YAAY,GACZ,eAAe,GACf,aAAa,GACb,KAAK,GACL,YAAY,GACZ,WAAW,GACX,iBAAiB;AACnB;;qEAEqE;GACnE,kBAAkB,CACrB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EACzB,cAAc,EAAE,MAAM,IAAI,EAC1B,cAAc,EAAE,MAAM,IAAI,EAC1B,SAAS,EAAE,MAAM,IAAI,GACpB,IAAI,CA4CN"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { ContextPressureSource } from '../context-occupancy.js';
|
|
2
3
|
import type { SessionModeSpec } from '../../sessionModes.js';
|
|
3
|
-
import { type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../../tuiDisplayPrefs.js';
|
|
4
|
+
import { type JobGroupFoldMode, type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../../tuiDisplayPrefs.js';
|
|
4
5
|
import { type SplashFontSetting } from '../../components/splashFonts.js';
|
|
5
6
|
import type { ChannelState } from './types.js';
|
|
6
7
|
/** Launch configuration belongs to channel construction, not the composition root. */
|
|
@@ -14,6 +15,20 @@ export interface ChannelLaunchOptions {
|
|
|
14
15
|
* projection value only arrives on change, so a resumed session needs this
|
|
15
16
|
* read to render its line before the next event lands. */
|
|
16
17
|
seedActivity?: (session: unknown) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Official context-occupancy source (see `dsh-adapter/context-occupancy.ts`).
|
|
20
|
+
*
|
|
21
|
+
* `read` is a cached map lookup — never a projection fold — so the channel's
|
|
22
|
+
* `contextOccupancy` accessor may call it per read; `subscribe` is the
|
|
23
|
+
* projection's own change feed, which republishes occupancy when it moves
|
|
24
|
+
* between session events (a compaction rewriting the surface, the prompt
|
|
25
|
+
* growing). Absent → the channel falls back to the last request's billed
|
|
26
|
+
* sample, which is what a composition without the token meter must do.
|
|
27
|
+
*/
|
|
28
|
+
contextPressure?: ContextPressureSource;
|
|
29
|
+
/** Read that source's current value when a session binds (see
|
|
30
|
+
* {@link ChannelLaunchOptions.contextPressure}). */
|
|
31
|
+
seedContextOccupancy?: (session: unknown) => void;
|
|
17
32
|
activityFrames?: string;
|
|
18
33
|
/** Settings namespace this boot registered its section under: the Config
|
|
19
34
|
* owner's Loader id (`resolveSettingsNamespace`), which is NOT always the
|
|
@@ -23,6 +38,7 @@ export interface ChannelLaunchOptions {
|
|
|
23
38
|
settingsNs?: string;
|
|
24
39
|
diffLayout?: 'auto' | 'split' | 'unified';
|
|
25
40
|
thinkingFold?: 'preview' | 'full';
|
|
41
|
+
jobGroupFold?: JobGroupFoldMode;
|
|
26
42
|
toolBackground?: ToolBackground;
|
|
27
43
|
scrollGutter?: ScrollGutterMode;
|
|
28
44
|
pageMargin?: PageMarginSetting;
|
|
@@ -39,7 +55,9 @@ export interface ChannelLaunchOptions {
|
|
|
39
55
|
/** Maid portrait for the header splash (settings `dsh-tui.whaleGirl`;
|
|
40
56
|
* off by default). */
|
|
41
57
|
whaleGirl?: boolean;
|
|
42
|
-
minimal
|
|
58
|
+
/** Minimal UI (settings key `dsh-tui.minimal`, 极简界面 / "Minimal UI"):
|
|
59
|
+
* purely a decoration switch. NOT the kernel agent preset `minimal`. */
|
|
60
|
+
minimalUi?: boolean;
|
|
43
61
|
contextBar?: boolean;
|
|
44
62
|
configuredPreset?: string;
|
|
45
63
|
configuredProvider?: string;
|
|
@@ -60,5 +78,5 @@ export declare function createInitialChannelView(options: ChannelLaunchOptions,
|
|
|
60
78
|
sessionId: string;
|
|
61
79
|
mode: ChannelState['mode'];
|
|
62
80
|
cwdDescription: string;
|
|
63
|
-
}): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | '
|
|
81
|
+
}): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'jobGroupFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
|
|
64
82
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAkH,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,0BA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B,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GACjF,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,GAC1G,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,GACzG,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,GAC9E,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,iBAAiB,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,GAAG,gBAAgB,GAAG,WAAW,CACpI,CA4BA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
|
|
1
|
+
import { normalizeJobGroupFold, normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
|
|
2
2
|
import { normalizeActivityPreset } from '../../components/activityFrames.js';
|
|
3
3
|
import { normalizeSplashFont } from '../../components/splashFonts.js';
|
|
4
4
|
/**
|
|
@@ -20,11 +20,12 @@ export function createInitialChannelView(options, input) {
|
|
|
20
20
|
configuredModel: options.configuredModel, configuredPreset: options.configuredPreset,
|
|
21
21
|
configuredActivityFrames: options.configuredActivityFrames, configuredLang: options.configuredLang,
|
|
22
22
|
diffLayout: options.diffLayout ?? 'auto', thinkingFold: options.thinkingFold ?? 'preview',
|
|
23
|
+
jobGroupFold: normalizeJobGroupFold(options.jobGroupFold),
|
|
23
24
|
toolBackground: normalizeToolBackground(options.toolBackground), scrollGutter: normalizeScrollGutter(options.scrollGutter),
|
|
24
25
|
pageMargin: normalizePageMargin(options.pageMargin), foldTerminalCommand: options.foldTerminalCommand === true,
|
|
25
26
|
promptSessionLabel: options.promptSessionLabel === true, expandEditor: options.expandEditor !== false,
|
|
26
27
|
smoothStreaming: options.smoothStreaming !== false, statusBar: normalizeStatusBar(options.statusBar),
|
|
27
|
-
whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont),
|
|
28
|
+
whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), minimalUi: options.minimalUi === true, activityEnabled: options.activity !== false,
|
|
28
29
|
contextBarEnabled: options.contextBar !== false, agentPreset: options.agentPreset, goal: undefined,
|
|
29
30
|
todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined,
|
|
30
31
|
tps: undefined, tpsSamples: [], contextSegments: { system: 0, prompt: 0, assistant: 0, thinking: 0, tools: 0 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/subagent-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EAAE,qBAAqB,EAAsB,MAAM,iBAAiB,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAyC,MAAM,YAAY,CAAA;AAGrF,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,YAAY,CAAC,CAAA;AACxG,UAAU,sBAAsB;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,KAAK,IAAI,KAAK,CAAA;IACd,SAAS,IAAI;QAAE,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,CAAA;IAC9E,2EAA2E;IAC3E,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;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AAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,SAAS,CAAA;CAC7H;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,eAAe,EAAE,IAAI,EAAE,sBAAsB;;;;wBAuDvE,MAAM;;4BACT,OAAO,SAAS;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;yBAe9C,OAAO,SAAS,oBAAoB,GAAG,OAAO;kBAIrD,UAAU,QA0OH;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAG,IAAI,CA1O9C,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,IAAI;gBAC9D,UAAU,QA+PH;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,KAAG,IAAI,CA/PnE,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,IAAI;2BAC/C,OAAO;6BACL,SAAS,OAAO,EAAE;;;;kBA5CxB,KAAK,KAAG,IAAI;qBAIT,KAAK,KAAG,IAAI;kBAkDpB,KAAK;;;EAItB"}
|
|
@@ -158,6 +158,7 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
158
158
|
}
|
|
159
159
|
const view = {
|
|
160
160
|
agentId: sub.agentId, runId: sub.runId, description: sub.description,
|
|
161
|
+
...(sub.mode === undefined ? {} : { mode: sub.mode }),
|
|
161
162
|
provider: sub.provider, model: sub.model || 'default', effort: sub.effort,
|
|
162
163
|
status: sub.status, startedAt: sub.startedAt, completedAt: sub.completedAt,
|
|
163
164
|
durationMs: sub.completedAt ? sub.completedAt - sub.startedAt : Date.now() - sub.startedAt,
|
|
@@ -276,6 +277,7 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
276
277
|
live: running,
|
|
277
278
|
provider: info.provider ?? child?.options?.provider,
|
|
278
279
|
model: child?.options?.model,
|
|
280
|
+
...(info.mode === undefined ? {} : { mode: info.mode }),
|
|
279
281
|
});
|
|
280
282
|
if (info.runId !== undefined)
|
|
281
283
|
store.patch(childId, { runId: info.runId });
|
|
@@ -311,9 +313,12 @@ function createSessionSubagentProjection(getState, deps) {
|
|
|
311
313
|
else if (ev.type === 'subagent/catalog') {
|
|
312
314
|
if (childId === undefined)
|
|
313
315
|
return;
|
|
316
|
+
const rawMode = typeof data.mode === 'string' ? data.mode : undefined;
|
|
314
317
|
discover(childId, {
|
|
315
318
|
label: typeof data.label === 'string' ? data.label : undefined,
|
|
316
319
|
childCreatedAt: typeof data.childCreatedAt === 'number' ? data.childCreatedAt : eventTime(event),
|
|
320
|
+
// v0 rows carry no mode; v1 also retains 'unknown' children.
|
|
321
|
+
...(rawMode === 'one-shot' || rawMode === 'continuable' || rawMode === 'unknown' ? { mode: rawMode } : {}),
|
|
317
322
|
});
|
|
318
323
|
}
|
|
319
324
|
else if (ev.type === 'tool-workflow/agent-start') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChannelUi } from '../../adapter/ports/channel-ui.js';
|
|
2
2
|
import type { ChatRow, ToolCallView, ToolResultView, NotificationItem, TodoPanelItem, PendingMessage } from '../../adapter/ports/channel-view.js';
|
|
3
|
-
export type { ChatRow, ToolRow, ToolCallView, ToolFileDiff, ToolResultView, SubagentRow, JobRow, TokenUsage, TokenBucket, CostTokenBuckets, SessionCostByModel, SubagentCostEntry, NotificationItem, ChannelGoal, TodoPanelItem, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, PendingMessage, SubagentControl, JobControl, StagedImageInput, StagedImageAdjustment, StagedImageHandle, ComposerImageRef, ComposerSubmission, ExternalCommandOutcome, TranscriptImage, ResumeResult, EffortOption, PermissionPresetSnapshot, PermissionPresetAvailability, PermissionPresetOption, PermissionPresetCurrent, PresetOption, SkillInfo, CredentialStatus, AgentViewRow, AgentViewStatus, AgentViewDispatchResult, BackgroundResult } from '../../adapter/ports/channel-view.js';
|
|
3
|
+
export type { ChatRow, ToolRow, ToolCallView, ToolFileDiff, ToolResultView, SubagentRow, JobGroupRow, JobRow, TokenUsage, TokenBucket, CostTokenBuckets, SessionCostByModel, SubagentCostEntry, NotificationItem, ChannelGoal, TodoPanelItem, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, PendingMessage, SubagentControl, JobControl, StagedImageInput, StagedImageAdjustment, StagedImageHandle, ComposerImageRef, ComposerSubmission, ExternalCommandOutcome, TranscriptImage, ResumeResult, EffortOption, PermissionPresetSnapshot, PermissionPresetAvailability, PermissionPresetOption, PermissionPresetCurrent, PresetOption, SkillInfo, CredentialStatus, AgentViewRow, AgentViewStatus, AgentViewDispatchResult, BackgroundResult } from '../../adapter/ports/channel-view.js';
|
|
4
4
|
import { type ContentBlock, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
5
5
|
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
6
6
|
import { type BackgroundJobState } from '../jobs.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAW,YAAY,EAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAW,YAAY,EAAgB,cAAc,EAAsH,gBAAgB,EAA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M,qBAAqB,GAAG,qBAAqB,CAAA;AAEzD,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;QAC9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;QACpC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;QACrC;gFACwE;QACxE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;QAClC,6BAA6B;QAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;QAC/B,QAAQ,CAAC,UAAU,EAAE,SAAS,qBAAqB,EAAE,CAAA;KACtD,CAAA;IACD,SAAS,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,qBAAqB,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAA;CAClI;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA;KAAE,CAAA;CAC/C;AAED,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
|
@@ -2,7 +2,24 @@ import { type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
|
2
2
|
import type { TokenUsage } from './types.js';
|
|
3
3
|
/** 全零 token 累计(新会话 / 复位用)。 */
|
|
4
4
|
export declare function emptyTokenUsage(): TokenUsage;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Context-bar token estimate for model-visible text: a per-code-point weighted
|
|
7
|
+
* count by script class (see the rates above), rounded up.
|
|
8
|
+
*
|
|
9
|
+
* Pure and deterministic: non-negative, zero only for the empty string, and
|
|
10
|
+
* monotonic — appending characters never lowers the result. A single call on
|
|
11
|
+
* pure ASCII input is exactly the old `ceil(length / 4)` (there is an explicit
|
|
12
|
+
* fast path), so per-message English numbers are unchanged; note that a caller
|
|
13
|
+
* which used to sum characters and round once now rounds per call, so summing
|
|
14
|
+
* this estimator over messages can differ from the legacy total by at most one
|
|
15
|
+
* token per call (ASCII-only sums included). ANSI escapes are NOT stripped: they
|
|
16
|
+
* are ASCII, and the provider tokenizes the literal message bytes rather than
|
|
17
|
+
* the rendered cells.
|
|
18
|
+
*
|
|
19
|
+
* @param text - Model-visible text (a prompt, an assistant block, a tool
|
|
20
|
+
* result); widths are irrelevant here, this counts characters, not cells.
|
|
21
|
+
* @returns The estimated token count (0 for empty input).
|
|
22
|
+
*/
|
|
6
23
|
export declare function estimateTokens(text: string): number;
|
|
7
24
|
/** Whether one stream chunk advances the first-token/decode boundary. */
|
|
8
25
|
export declare function isTokenDelta(chunk: StreamChunk): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,8BAA8B;AAC9B,wBAAgB,eAAe,IAAI,UAAU,CAS5C;
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,8BAA8B;AAC9B,wBAAgB,eAAe,IAAI,UAAU,CAS5C;AA+DD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBnD;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAUxD;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAU1D;AAED,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMpE"}
|
|
@@ -9,9 +9,104 @@ export function emptyTokenUsage() {
|
|
|
9
9
|
idle: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
/*
|
|
13
|
+
* Script-class rates for the context bar's local token estimate.
|
|
14
|
+
*
|
|
15
|
+
* pi-nano-context's original `text.length / 4` is an English heuristic: BPE
|
|
16
|
+
* vocabularies pack roughly four ASCII characters into one token, but CJK text
|
|
17
|
+
* runs ~1–1.5 characters per token (one ideograph is one or two tokens), so the
|
|
18
|
+
* English rate under-counted Chinese/Korean/Japanese sessions by ~3x — the
|
|
19
|
+
* segmented bar, its hover breakdown and everything derived from these numbers
|
|
20
|
+
* were squeezed flat against the real occupancy reading (issue #1170).
|
|
21
|
+
*
|
|
22
|
+
* These are ESTIMATES, not metering: no tokenizer is consulted, and the guess
|
|
23
|
+
* cannot see the provider vocabulary, the request envelope (role markers, tool
|
|
24
|
+
* JSON, image blocks) or a cached prefix that the next request will not resend
|
|
25
|
+
* in full. The authoritative occupancy is the harness `contextPressure`
|
|
26
|
+
* projection (`projectedTokens ?? pressureTokens`, see
|
|
27
|
+
* `dsh-adapter/context-occupancy.ts`); these numbers only describe what the
|
|
28
|
+
* segmented bar is made of and must never be summed into that total.
|
|
29
|
+
*/
|
|
30
|
+
/** ASCII, including control bytes and ANSI escapes: ~4 characters per token. */
|
|
31
|
+
const CHARS_PER_TOKEN_ASCII = 4;
|
|
32
|
+
/** CJK ideographs, kana, Hangul, Bopomofo, Yi, CJK punctuation and full-width
|
|
33
|
+
* forms: ~1.4 characters per token (the midpoint of the measured 1–1.5 band). */
|
|
34
|
+
const CHARS_PER_TOKEN_CJK = 1.4;
|
|
35
|
+
/** Everything else — accented Latin, Cyrillic, Greek, Arabic, Hebrew, Thai,
|
|
36
|
+
* Devanagari, emoji — deliberately conservative at 2 characters per token:
|
|
37
|
+
* denser scripts (Thai, Devanagari) and multi-token emoji clusters still come
|
|
38
|
+
* out low, while lighter ones are over-counted rather than under-counted. */
|
|
39
|
+
const CHARS_PER_TOKEN_OTHER = 2;
|
|
40
|
+
/** Cheapest possible "does this text need script classification at all" test. */
|
|
41
|
+
const NON_ASCII_RE = /[^\x00-\x7f]/;
|
|
42
|
+
/**
|
|
43
|
+
* Whether one code point belongs to a script BPE vocabularies pack at roughly
|
|
44
|
+
* one token per character or two. Emoji are deliberately excluded (they land in
|
|
45
|
+
* the `OTHER` rate): they are not East Asian wide *text*, and a ZWJ cluster is
|
|
46
|
+
* several code points the tokenizer may charge several tokens for.
|
|
47
|
+
*/
|
|
48
|
+
function isDenseScript(codePoint) {
|
|
49
|
+
return ((codePoint >= 0x1100 && codePoint <= 0x11ff) // Hangul Jamo
|
|
50
|
+
|| (codePoint >= 0x2e80 && codePoint <= 0x303f) // CJK radicals … CJK symbols and punctuation
|
|
51
|
+
|| (codePoint >= 0x3040 && codePoint <= 0x33ff) // kana, Bopomofo, Hangul compat jamo, enclosed/compat CJK
|
|
52
|
+
|| (codePoint >= 0x3400 && codePoint <= 0x4dbf) // CJK unified ideographs extension A
|
|
53
|
+
|| (codePoint >= 0x4e00 && codePoint <= 0x9fff) // CJK unified ideographs
|
|
54
|
+
|| (codePoint >= 0xa000 && codePoint <= 0xa4cf) // Yi syllables and radicals
|
|
55
|
+
|| (codePoint >= 0xa960 && codePoint <= 0xa97f) // Hangul Jamo Extended-A
|
|
56
|
+
|| (codePoint >= 0xac00 && codePoint <= 0xd7af) // Hangul syllables
|
|
57
|
+
|| (codePoint >= 0xd7b0 && codePoint <= 0xd7ff) // Hangul Jamo Extended-B
|
|
58
|
+
|| (codePoint >= 0xf900 && codePoint <= 0xfaff) // CJK compatibility ideographs
|
|
59
|
+
|| (codePoint >= 0xfe30 && codePoint <= 0xfe4f) // CJK compatibility forms
|
|
60
|
+
|| (codePoint >= 0xfe50 && codePoint <= 0xfe6f) // small form variants (CJK punctuation variants)
|
|
61
|
+
|| (codePoint >= 0xff00 && codePoint <= 0xff60) // full-width forms
|
|
62
|
+
|| (codePoint >= 0xff61 && codePoint <= 0xffdc) // half-width kana, half-width Hangul, half-width CJK punctuation
|
|
63
|
+
|| (codePoint >= 0xffe0 && codePoint <= 0xffe6) // full-width signs
|
|
64
|
+
|| (codePoint >= 0x1f200 && codePoint <= 0x1f2ff) // enclosed ideographic supplement
|
|
65
|
+
|| (codePoint >= 0x20000 && codePoint <= 0x3fffd) // CJK extensions B–G
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Context-bar token estimate for model-visible text: a per-code-point weighted
|
|
70
|
+
* count by script class (see the rates above), rounded up.
|
|
71
|
+
*
|
|
72
|
+
* Pure and deterministic: non-negative, zero only for the empty string, and
|
|
73
|
+
* monotonic — appending characters never lowers the result. A single call on
|
|
74
|
+
* pure ASCII input is exactly the old `ceil(length / 4)` (there is an explicit
|
|
75
|
+
* fast path), so per-message English numbers are unchanged; note that a caller
|
|
76
|
+
* which used to sum characters and round once now rounds per call, so summing
|
|
77
|
+
* this estimator over messages can differ from the legacy total by at most one
|
|
78
|
+
* token per call (ASCII-only sums included). ANSI escapes are NOT stripped: they
|
|
79
|
+
* are ASCII, and the provider tokenizes the literal message bytes rather than
|
|
80
|
+
* the rendered cells.
|
|
81
|
+
*
|
|
82
|
+
* @param text - Model-visible text (a prompt, an assistant block, a tool
|
|
83
|
+
* result); widths are irrelevant here, this counts characters, not cells.
|
|
84
|
+
* @returns The estimated token count (0 for empty input).
|
|
85
|
+
*/
|
|
13
86
|
export function estimateTokens(text) {
|
|
14
|
-
|
|
87
|
+
if (text === '')
|
|
88
|
+
return 0;
|
|
89
|
+
// Fast path: ASCII-only text is exactly the legacy rate, and the regex scan
|
|
90
|
+
// keeps the overwhelmingly common English case cheaper than a code-point walk.
|
|
91
|
+
if (!NON_ASCII_RE.test(text))
|
|
92
|
+
return Math.ceil(text.length / CHARS_PER_TOKEN_ASCII);
|
|
93
|
+
let ascii = 0;
|
|
94
|
+
let dense = 0;
|
|
95
|
+
let other = 0;
|
|
96
|
+
for (const character of text) {
|
|
97
|
+
// `for…of` walks code points, so a surrogate pair (emoji, CJK extension B+)
|
|
98
|
+
// counts once instead of twice.
|
|
99
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
100
|
+
if (codePoint < 0x80)
|
|
101
|
+
ascii += 1;
|
|
102
|
+
else if (isDenseScript(codePoint))
|
|
103
|
+
dense += 1;
|
|
104
|
+
else
|
|
105
|
+
other += 1;
|
|
106
|
+
}
|
|
107
|
+
return Math.ceil(ascii / CHARS_PER_TOKEN_ASCII
|
|
108
|
+
+ dense / CHARS_PER_TOKEN_CJK
|
|
109
|
+
+ other / CHARS_PER_TOKEN_OTHER);
|
|
15
110
|
}
|
|
16
111
|
/** Whether one stream chunk advances the first-token/decode boundary. */
|
|
17
112
|
export function isTokenDelta(chunk) {
|
|
@@ -18,6 +18,6 @@ export declare function createChannel(ctx: Context, initialAgent: Agent, options
|
|
|
18
18
|
export type { ChannelLaunchOptions } from './channel/state.js';
|
|
19
19
|
export { expandMentions } from './channel/mentions.js';
|
|
20
20
|
export { sessionCwdMatches } from './channel/paths.js';
|
|
21
|
-
export type { AgentViewDispatchResult, AgentViewRow, AgentViewStatus, BackgroundResult, Channel, ChannelGoal, ChannelState, ChatRow, ComposerImageRef, ComposerSubmission, CredentialStatus, EffortOption, ExternalCommandOutcome, JobControl, JobRow, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, MentionAttachments, MentionExpansion, MentionFs, NotificationItem, PendingMessage, PermissionPresetAvailability, PermissionPresetCurrent, PermissionPresetOption, PermissionPresetSnapshot, PresetOption, ResumeResult, SkillInfo, StagedImageHandle, StagedImageInput, SubagentControl, SubagentRow, TodoPanelItem, TokenBucket, TokenUsage, ToolCallView, ToolFileDiff, ToolResultView, ToolRow, ToolViewPresenter, TranscriptImage } from './channel/types.js';
|
|
21
|
+
export type { AgentViewDispatchResult, AgentViewRow, AgentViewStatus, BackgroundResult, Channel, ChannelGoal, ChannelState, ChatRow, ComposerImageRef, ComposerSubmission, CredentialStatus, EffortOption, ExternalCommandOutcome, JobControl, JobGroupRow, JobRow, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, MentionAttachments, MentionExpansion, MentionFs, NotificationItem, PendingMessage, PermissionPresetAvailability, PermissionPresetCurrent, PermissionPresetOption, PermissionPresetSnapshot, PresetOption, ResumeResult, SkillInfo, StagedImageHandle, StagedImageInput, SubagentControl, SubagentRow, TodoPanelItem, TokenBucket, TokenUsage, ToolCallView, ToolFileDiff, ToolResultView, ToolRow, ToolViewPresenter, TranscriptImage } from './channel/types.js';
|
|
22
22
|
export { emptyTokenUsage } from './channel/usage.js';
|
|
23
23
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/channel.ts"],"names":[],"mappings":"AAUA,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AA+BxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,KAAK,KAAK,EAAqE,MAAM,w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