@deepseek-harness-tui/dsh-tui 0.12.0 → 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 +41 -5
- 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 +8 -3
- package/cordis.patch.yml +7 -1
- package/guide/dsh-tui-guide/configuration.en.md +6 -1
- package/guide/dsh-tui-guide/configuration.md +6 -1
- package/guide/dsh-tui-guide/getting-started.en.md +6 -3
- package/guide/dsh-tui-guide/getting-started.md +4 -2
- package/guide/dsh-tui-guide/interaction.en.md +68 -4
- package/guide/dsh-tui-guide/interaction.md +49 -3
- package/guide/dsh-tui-guide/plugins.en.md +16 -6
- package/guide/dsh-tui-guide/plugins.md +14 -6
- package/guide/dsh-tui-guide/themes.en.md +7 -2
- package/guide/dsh-tui-guide/themes.md +5 -2
- package/guide/dsh-tui-guide/user-guide.en.md +124 -21
- package/guide/dsh-tui-guide/user-guide.md +96 -16
- package/lib/settings.json +215 -1
- package/lib/types/adapter/channel/ui-policy.d.ts +6 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +14 -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-ui.d.ts +62 -2
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +94 -0
- 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 +18 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +90 -22
- 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/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 +147 -14
- 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 +212 -18
- 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/PromptInput.d.ts +20 -22
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +413 -156
- 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/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +17 -2
- 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 +54 -5
- 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/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/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/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/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/mode-actions.d.ts +0 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +7 -2
- 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 +0 -1
- 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 +9 -1
- 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 +18 -2
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +2 -1
- 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 +56 -3
- 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 +14 -0
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +24 -0
- 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/migrate/sessionize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
- 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 +17 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +169 -32
- package/lib/types/dsh-adapter/presets.d.ts +26 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +29 -7
- 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/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 +734 -15
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +302 -6
- 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 +62 -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 +36 -3
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +262 -108
- 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/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/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 +22 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1126 -299
- 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.map +1 -1
- package/lib/types/screens/StatusLine.js +32 -14
- 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 +83 -0
- package/lib/types/tips.js +5 -5
- 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 +101 -44
- 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/package.json +19 -8
- 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/{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,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* panelBridge:ctx.tuiPanels 服务(dsh-adapter,Cordis 侧)与 useSidePanel
|
|
3
|
+
* (Chat 侧控制器)之间的小型 module-level 通道(设计文档 §18.2)。
|
|
4
|
+
*
|
|
5
|
+
* 照 jobsFocusStore 的形状刻意做成两个三行 store,而不是塞进 PanelStore
|
|
6
|
+
* (那是注册表/badge 的家)或 SidePanelRuntimeContext(useSidePanel 不该
|
|
7
|
+
* 知道插件业务):
|
|
8
|
+
* - state:Chat 每次渲染后回写 { open, activePanelId, focus },服务侧
|
|
9
|
+
* close()/focus() 据此判断;
|
|
10
|
+
* - requests:服务侧 open/focus/close 的请求队列(nonce 保证同 id 重复
|
|
11
|
+
* 请求也能重新触发),useSidePanel 订阅并在自己的启用集合里裁决。
|
|
12
|
+
*
|
|
13
|
+
* hasConsumer:没有任何 Chat 挂载(无头夹具 / 侧栏永不渲染)时 open()
|
|
14
|
+
* 必须返回 false 而不是假装成功——attach/detach 由 useSidePanel 的
|
|
15
|
+
* mount effect 维护。
|
|
16
|
+
*/
|
|
17
|
+
const listeners = new Set();
|
|
18
|
+
let consumers = 0;
|
|
19
|
+
let requestSnapshot = Object.freeze({ kind: 'open', id: '', nonce: 0 });
|
|
20
|
+
export const panelBridgeRequests = {
|
|
21
|
+
subscribe(listener) {
|
|
22
|
+
listeners.add(listener);
|
|
23
|
+
return () => { listeners.delete(listener); };
|
|
24
|
+
},
|
|
25
|
+
/** 服务侧入口:无 Chat 消费者时返回 false(调用方据此向插件返回 false)。 */
|
|
26
|
+
request(kind, id) {
|
|
27
|
+
if (consumers <= 0)
|
|
28
|
+
return false;
|
|
29
|
+
requestSnapshot = Object.freeze({ kind, id, nonce: requestSnapshot.nonce + 1 });
|
|
30
|
+
for (const listener of [...listeners])
|
|
31
|
+
listener(requestSnapshot);
|
|
32
|
+
return true;
|
|
33
|
+
},
|
|
34
|
+
/** useSidePanel mount/unmount 维护;带消费者才允许请求入队。 */
|
|
35
|
+
attach() { consumers += 1; },
|
|
36
|
+
detach() { consumers = Math.max(0, consumers - 1); },
|
|
37
|
+
hasConsumer() { return consumers > 0; },
|
|
38
|
+
};
|
|
39
|
+
let uiState = Object.freeze({ open: false, activePanelId: undefined, focus: 'chat' });
|
|
40
|
+
const stateListeners = new Set();
|
|
41
|
+
export const panelBridgeState = {
|
|
42
|
+
subscribe(listener) {
|
|
43
|
+
stateListeners.add(listener);
|
|
44
|
+
return () => { stateListeners.delete(listener); };
|
|
45
|
+
},
|
|
46
|
+
get() {
|
|
47
|
+
return uiState;
|
|
48
|
+
},
|
|
49
|
+
/** 只由 useSidePanel 回写。 */
|
|
50
|
+
set(next) {
|
|
51
|
+
uiState = Object.freeze(next);
|
|
52
|
+
for (const listener of [...stateListeners])
|
|
53
|
+
listener();
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PluginPanelAdapter(设计文档 §18.2/§18.5):把插件注册的 Panel 组件
|
|
3
|
+
* 接进 PanelHost。PanelHost 看到的仍是普通 PanelDefinition.component
|
|
4
|
+
* (这里在注册时包好),插件组件拿到的是收窄后的
|
|
5
|
+
* TuiPanelProps { React, ui, host, width, height, focused, visible, mode }。
|
|
6
|
+
*
|
|
7
|
+
* - ui:照 TuiStatusViewUi 的收窄法——Box 去掉 ref/tabIndex/focus/键盘/
|
|
8
|
+
* contextMenu(保留 click/hover/drag/onWheel),useTerminalSize 恒等于
|
|
9
|
+
* Panel 的 width/height,useAnimationTime 是唯一合法定时源。
|
|
10
|
+
* - host:策展只读 snapshot(SidePanelRuntimeContext 的 channel/activity/
|
|
11
|
+
* attention 的结构拷贝,不含转录正文/凭证/文件内容)+ badge/scene/toast/
|
|
12
|
+
* storage/focus/onKey。
|
|
13
|
+
* - onKey:走 usePanelInput 分发器(v2.1 键盘契约),仅 focused 期间投递;
|
|
14
|
+
* preventDefault() = 阻止宿主回退键(等价 handler 返回 true)。
|
|
15
|
+
* - sendToChat:本阶段授权流程(panels.chat.attach)未落地——返回 false
|
|
16
|
+
* 并 toast 一次(i18n 文案),不静默。
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import type { PanelProps } from './types.js';
|
|
20
|
+
import type { TuiPanelProps } from '../../dsh-adapter/panels.js';
|
|
21
|
+
export declare function makePluginPanelComponent(panelId: string, component: React.ComponentType<TuiPanelProps>): React.ComponentType<PanelProps>;
|
|
22
|
+
//# sourceMappingURL=pluginPanelAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginPanelAdapter.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/pluginPanelAdapter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAGV,aAAa,EAGd,MAAM,6BAA6B,CAAA;AAYpC,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,GAC5C,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CA2HjC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PluginPanelAdapter(设计文档 §18.2/§18.5):把插件注册的 Panel 组件
|
|
3
|
+
* 接进 PanelHost。PanelHost 看到的仍是普通 PanelDefinition.component
|
|
4
|
+
* (这里在注册时包好),插件组件拿到的是收窄后的
|
|
5
|
+
* TuiPanelProps { React, ui, host, width, height, focused, visible, mode }。
|
|
6
|
+
*
|
|
7
|
+
* - ui:照 TuiStatusViewUi 的收窄法——Box 去掉 ref/tabIndex/focus/键盘/
|
|
8
|
+
* contextMenu(保留 click/hover/drag/onWheel),useTerminalSize 恒等于
|
|
9
|
+
* Panel 的 width/height,useAnimationTime 是唯一合法定时源。
|
|
10
|
+
* - host:策展只读 snapshot(SidePanelRuntimeContext 的 channel/activity/
|
|
11
|
+
* attention 的结构拷贝,不含转录正文/凭证/文件内容)+ badge/scene/toast/
|
|
12
|
+
* storage/focus/onKey。
|
|
13
|
+
* - onKey:走 usePanelInput 分发器(v2.1 键盘契约),仅 focused 期间投递;
|
|
14
|
+
* preventDefault() = 阻止宿主回退键(等价 handler 返回 true)。
|
|
15
|
+
* - sendToChat:本阶段授权流程(panels.chat.attach)未落地——返回 false
|
|
16
|
+
* 并 toast 一次(i18n 文案),不静默。
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { Box, Text, Image, ScrollBox, useTheme, useAnimationFrame } from '../../ui.js';
|
|
20
|
+
import { Divider } from '../design-system/Divider.js';
|
|
21
|
+
import { t, getLang } from '../../i18n.js';
|
|
22
|
+
import { SidePanelRuntimeContext } from './SidePanelRuntimeContext.js';
|
|
23
|
+
import { usePanelInput } from './usePanelInput.js';
|
|
24
|
+
import { panelStore } from './PanelStore.js';
|
|
25
|
+
import { pluginPanelFocus, pluginPanelOpenScene, pluginPanelStorage, pluginPanelToast, } from '../../dsh-adapter/panel-runtime-registry.js';
|
|
26
|
+
/** sendToChat 未授权提示每 Panel 每会话只 toast 一次。 */
|
|
27
|
+
const sendToChatWarned = new Set();
|
|
28
|
+
export function makePluginPanelComponent(panelId, component) {
|
|
29
|
+
function PluginPanelHost(props) {
|
|
30
|
+
const { width, height, focused, visible, mode } = props;
|
|
31
|
+
const runtimeCtx = React.useContext(SidePanelRuntimeContext);
|
|
32
|
+
// ── onKey(v2.1 分发器):仅 focused && visible 期间投递。listener
|
|
33
|
+
// 集合在分发时读取,插件在 render 期或 effect 期注册都安全。
|
|
34
|
+
const keyListeners = React.useRef(new Set());
|
|
35
|
+
usePanelInput((input, key) => {
|
|
36
|
+
let consumed = false;
|
|
37
|
+
const event = {
|
|
38
|
+
input,
|
|
39
|
+
key,
|
|
40
|
+
preventDefault: () => { consumed = true; },
|
|
41
|
+
};
|
|
42
|
+
for (const listener of [...keyListeners.current]) {
|
|
43
|
+
try {
|
|
44
|
+
listener(event);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
// 插件 listener 崩溃不得打断后续分发(错误面由 boundary 兜)。
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return consumed;
|
|
51
|
+
}, { active: focused && visible });
|
|
52
|
+
// ── host API:identity 随 runtimeCtx(channel/activity/attention)
|
|
53
|
+
// 与 focused 变化而刷新;其余函数绑定 panelId。
|
|
54
|
+
const channel = runtimeCtx?.channel;
|
|
55
|
+
const activity = runtimeCtx?.activity;
|
|
56
|
+
const attention = runtimeCtx?.attention;
|
|
57
|
+
const host = React.useMemo(() => ({
|
|
58
|
+
snapshot: () => {
|
|
59
|
+
// 结构拷贝、只策展白名单字段——不含转录正文/凭证/文件内容。
|
|
60
|
+
return Object.freeze({
|
|
61
|
+
sessionId: channel?.sessionId ?? '',
|
|
62
|
+
cwd: channel?.cwd ?? '',
|
|
63
|
+
lang: getLang(),
|
|
64
|
+
working: channel?.working === true,
|
|
65
|
+
spinnerMode: channel?.spinnerMode ?? 'idle',
|
|
66
|
+
version: channel?.version ?? 0,
|
|
67
|
+
goal: channel?.goal === undefined
|
|
68
|
+
? undefined
|
|
69
|
+
: Object.freeze({
|
|
70
|
+
objective: channel.goal.objective,
|
|
71
|
+
phase: channel.goal.phase,
|
|
72
|
+
roundsStarted: channel.goal.roundsStarted,
|
|
73
|
+
maxGoalRounds: channel.goal.maxGoalRounds,
|
|
74
|
+
}),
|
|
75
|
+
todos: Object.freeze((channel?.todos ?? []).map(item => Object.freeze({
|
|
76
|
+
content: item.content,
|
|
77
|
+
status: item.status,
|
|
78
|
+
}))),
|
|
79
|
+
backgroundJobs: Object.freeze((channel?.backgroundJobs ?? []).map(job => Object.freeze({
|
|
80
|
+
id: job.id,
|
|
81
|
+
kind: job.kind,
|
|
82
|
+
label: job.label,
|
|
83
|
+
status: job.status,
|
|
84
|
+
progress: job.progress,
|
|
85
|
+
detail: job.detail,
|
|
86
|
+
startedAt: job.startedAt,
|
|
87
|
+
}))),
|
|
88
|
+
subagents: Object.freeze((channel?.subagents ?? []).map(sub => Object.freeze({
|
|
89
|
+
agentId: sub.agentId,
|
|
90
|
+
description: sub.description,
|
|
91
|
+
status: sub.status,
|
|
92
|
+
mode: sub.mode,
|
|
93
|
+
model: sub.model,
|
|
94
|
+
startedAt: sub.startedAt,
|
|
95
|
+
completedAt: sub.completedAt,
|
|
96
|
+
}))),
|
|
97
|
+
attention: Object.freeze({
|
|
98
|
+
approvals: attention?.approvals ?? 0,
|
|
99
|
+
questions: attention?.questions ?? 0,
|
|
100
|
+
}),
|
|
101
|
+
activity: activity === undefined ? undefined : Object.freeze({ ...activity }),
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
focused,
|
|
105
|
+
notify: (level, unread = 0) => { panelStore.setBadge(panelId, { level, unread }); },
|
|
106
|
+
clearBadge: () => { panelStore.clearBadge(panelId); },
|
|
107
|
+
sendToChat: () => {
|
|
108
|
+
if (!sendToChatWarned.has(panelId)) {
|
|
109
|
+
sendToChatWarned.add(panelId);
|
|
110
|
+
pluginPanelToast(panelId, t('panel-send-to-chat-denied'));
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
},
|
|
114
|
+
openScene: sceneId => pluginPanelOpenScene(panelId, sceneId),
|
|
115
|
+
toast: text => pluginPanelToast(panelId, text),
|
|
116
|
+
get storage() { return pluginPanelStorage(panelId); },
|
|
117
|
+
onKey: listener => {
|
|
118
|
+
keyListeners.current.add(listener);
|
|
119
|
+
return () => { keyListeners.current.delete(listener); };
|
|
120
|
+
},
|
|
121
|
+
focus: () => pluginPanelFocus(panelId),
|
|
122
|
+
}), [channel, activity, attention, focused]);
|
|
123
|
+
// ── ui kit:useTerminalSize/useAnimationTime 绑定 Panel 尺寸,其余
|
|
124
|
+
// 直接复用宿主组件(类型在 TuiPanelUi 处收窄)。
|
|
125
|
+
const ui = React.useMemo(() => ({
|
|
126
|
+
Box: Box,
|
|
127
|
+
Text: Text,
|
|
128
|
+
Image: Image,
|
|
129
|
+
ScrollBox: ScrollBox,
|
|
130
|
+
Divider: Divider,
|
|
131
|
+
useTerminalSize: () => ({ columns: width, rows: height }),
|
|
132
|
+
useAnimationTime: (intervalMs) => useAnimationFrame(intervalMs)[1],
|
|
133
|
+
useTheme: useTheme,
|
|
134
|
+
}), [width, height]);
|
|
135
|
+
return React.createElement(component, {
|
|
136
|
+
React,
|
|
137
|
+
ui,
|
|
138
|
+
host,
|
|
139
|
+
width,
|
|
140
|
+
height,
|
|
141
|
+
focused,
|
|
142
|
+
visible,
|
|
143
|
+
mode,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
PluginPanelHost.displayName = 'PluginPanelHost(' + panelId + ')';
|
|
147
|
+
return PluginPanelHost;
|
|
148
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel 系统的核心契约(设计文档 §6.2 + v2.1 修订)。
|
|
3
|
+
*
|
|
4
|
+
* Panel 不知道自己在右侧、比例多少、终端总宽多少;只知道 width /
|
|
5
|
+
* height / focused / visible / mode。以后把侧栏改到底部,Panel 不用重写。
|
|
6
|
+
*/
|
|
7
|
+
import type React from 'react';
|
|
8
|
+
import type { I18nKey } from '../../i18n.js';
|
|
9
|
+
export type PanelMountPolicy =
|
|
10
|
+
/** 只有 active 时才挂载(插件默认——防止常驻面板烧资源)。 */
|
|
11
|
+
'active'
|
|
12
|
+
/** 启用即挂载,非 active 时 display:none + focused/visible=false——
|
|
13
|
+
* 状态(计时、内部路由、滚动位)保留,但不动画、不收键盘(内置
|
|
14
|
+
todo/jobs/agents/companion 用)。 */
|
|
15
|
+
| 'enabled';
|
|
16
|
+
export interface PanelCapabilities {
|
|
17
|
+
readonly scroll?: boolean;
|
|
18
|
+
readonly search?: boolean;
|
|
19
|
+
readonly selection?: boolean;
|
|
20
|
+
readonly zoom?: boolean;
|
|
21
|
+
readonly sendToChat?: boolean;
|
|
22
|
+
/** 有整屏对应物:PanelBar 右端出现 ⤢「全屏」按钮(点击交给宿主
|
|
23
|
+
* openFullscreen(panelId))。没有整屏形态的面板不声明,按钮不出现。 */
|
|
24
|
+
readonly fullscreen?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface PanelProps {
|
|
27
|
+
readonly width: number;
|
|
28
|
+
readonly height: number;
|
|
29
|
+
readonly focused: boolean;
|
|
30
|
+
/** 非 active(mountPolicy=enabled 时仍挂载)或侧栏收起时 false:
|
|
31
|
+
* 组件应停掉高频刷新(useAnimationFrame 传 null),store 继续更新。 */
|
|
32
|
+
readonly visible: boolean;
|
|
33
|
+
readonly mode: 'split' | 'zoom' | 'fullscreen';
|
|
34
|
+
}
|
|
35
|
+
export interface PanelCompactProps {
|
|
36
|
+
readonly width: number;
|
|
37
|
+
readonly badge: PanelBadge | null;
|
|
38
|
+
}
|
|
39
|
+
export interface PanelDefinition {
|
|
40
|
+
/** /^[a-z][a-z0-9_-]*(:[a-z][a-z0-9_-]*)*$/;插件用 plugin:sub 命名空间。 */
|
|
41
|
+
readonly id: string;
|
|
42
|
+
/** 内置 Panel 走 i18n key;插件给字面量 title。 */
|
|
43
|
+
readonly titleKey?: I18nKey;
|
|
44
|
+
readonly title?: string;
|
|
45
|
+
/** PanelBar 胶囊里的单格图标(显示宽度必须为 1;缺省用首字母)。 */
|
|
46
|
+
readonly icon?: string;
|
|
47
|
+
readonly order?: number;
|
|
48
|
+
/** 低于此宽度时 PanelBar 照显、Host 提示「宽度不足」。 */
|
|
49
|
+
readonly minColumns?: number;
|
|
50
|
+
readonly defaultEnabled?: boolean;
|
|
51
|
+
readonly source: 'builtin' | 'plugin';
|
|
52
|
+
readonly pluginId?: string;
|
|
53
|
+
readonly mountPolicy?: PanelMountPolicy;
|
|
54
|
+
readonly capabilities?: PanelCapabilities;
|
|
55
|
+
readonly component: React.ComponentType<PanelProps>;
|
|
56
|
+
/** 可选的 1~3 行紧凑呈现(侧栏收起/窄屏时的紧凑槽,Phase 6 挂载)。 */
|
|
57
|
+
readonly compact?: {
|
|
58
|
+
readonly maxRows: 1 | 2 | 3;
|
|
59
|
+
readonly component: React.ComponentType<PanelCompactProps>;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export type PanelOwner = 'builtin' | {
|
|
63
|
+
readonly pluginId: string;
|
|
64
|
+
readonly activation?: unknown;
|
|
65
|
+
};
|
|
66
|
+
export interface PanelBadge {
|
|
67
|
+
readonly level: 'info' | 'warning' | 'error';
|
|
68
|
+
readonly unread: number;
|
|
69
|
+
readonly latestAt: number;
|
|
70
|
+
}
|
|
71
|
+
export interface PanelEntry {
|
|
72
|
+
readonly definition: PanelDefinition;
|
|
73
|
+
readonly owner: PanelOwner;
|
|
74
|
+
/** 同 id 重注册时递增,用于重挂 error boundary。 */
|
|
75
|
+
readonly registrationId: number;
|
|
76
|
+
readonly badge: PanelBadge | null;
|
|
77
|
+
readonly lastError: {
|
|
78
|
+
readonly message: string;
|
|
79
|
+
readonly at: number;
|
|
80
|
+
} | null;
|
|
81
|
+
/** 插件 Panel 连续崩溃后本会话内禁用(PanelHost 渲染禁用卡)。 */
|
|
82
|
+
readonly disabled?: boolean;
|
|
83
|
+
}
|
|
84
|
+
/** 侧栏按键事件(v2.1:Panel 的业务键优先于宿主回退键)。 */
|
|
85
|
+
export interface SidePanelKeyFlags {
|
|
86
|
+
readonly escape?: boolean;
|
|
87
|
+
readonly leftArrow?: boolean;
|
|
88
|
+
readonly rightArrow?: boolean;
|
|
89
|
+
readonly upArrow?: boolean;
|
|
90
|
+
readonly downArrow?: boolean;
|
|
91
|
+
readonly pageUp?: boolean;
|
|
92
|
+
readonly pageDown?: boolean;
|
|
93
|
+
readonly return_?: boolean;
|
|
94
|
+
readonly ctrl?: boolean;
|
|
95
|
+
readonly meta?: boolean;
|
|
96
|
+
readonly shift?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** 返回 true = 已消费(宿主回退键不再触发)。 */
|
|
99
|
+
export type PanelKeyHandler = (input: string, key: SidePanelKeyFlags) => boolean | void;
|
|
100
|
+
/**
|
|
101
|
+
* 侧栏运行时:PanelHost / usePanelInput 与 useSidePanel 之间的接缝。
|
|
102
|
+
* 由 useSidePanel 创建(Chat 侧),经 context 抵达右栏子树。
|
|
103
|
+
*/
|
|
104
|
+
export interface SidePanelRuntime {
|
|
105
|
+
/** 注册 Panel 的键盘处理器;enabled=false 时保留注册但不投递。 */
|
|
106
|
+
registerInput: (panelId: string, handler: PanelKeyHandler, enabled: boolean) => () => void;
|
|
107
|
+
/** 键盘分发的第一棒:焦点在右栏时先问活动 Panel 吃不吃这个键。 */
|
|
108
|
+
dispatchKey: (panelId: string, input: string, key: SidePanelKeyFlags) => boolean;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelInput.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/usePanelInput.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,YAAY,CAAA;AAUpE,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,IAAI,CAwBN"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePanelInput(v2.1 键盘契约的实现):同一份业务键逻辑,既能整屏、
|
|
3
|
+
* 也能侧栏。
|
|
4
|
+
*
|
|
5
|
+
* - 侧栏形态(组件挂在 PanelHost 下,PanelContext 存在):handler 注册
|
|
6
|
+
* 进 PanelHost 的输入分发器;焦点在右栏时,宿主把按键先发给活动
|
|
7
|
+
* Panel 的 handler(返回 true = 消费,宿主回退键不再触发),Panel
|
|
8
|
+
* 没吃的键才轮到宿主回退(←/→ 切面板、Esc 回聊天……)。
|
|
9
|
+
* - 整屏形态(窄屏 / inline 回退、/jobs 早返回:没有 PanelContext):
|
|
10
|
+
* 退化为普通 useInput(handler, { isActive: active }),行为与现状一致。
|
|
11
|
+
*
|
|
12
|
+
* active 一般传 focused && visible(PanelProps 直接给),这样
|
|
13
|
+
* mountPolicy=enabled 的面板在非 active 时保留注册但收不到键。
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { useInput } from '../../ui.js';
|
|
17
|
+
import { PanelContext, SidePanelRuntimeContext } from './SidePanelRuntimeContext.js';
|
|
18
|
+
/** ink 的 Enter 是 input='' + key.return;v2.1 的 SidePanelKeyFlags 拼
|
|
19
|
+
* 作 return_。在接缝处统一归一,两条路径(分发器 / 整屏回退)的
|
|
20
|
+
* handler 都只需要认 return_。 */
|
|
21
|
+
function normalizeKey(key) {
|
|
22
|
+
if (key.return === true && key.return_ !== true)
|
|
23
|
+
return { ...key, return_: true };
|
|
24
|
+
return key;
|
|
25
|
+
}
|
|
26
|
+
export function usePanelInput(handler, opts) {
|
|
27
|
+
const panelCtx = React.useContext(PanelContext);
|
|
28
|
+
const runtimeCtx = React.useContext(SidePanelRuntimeContext);
|
|
29
|
+
const active = opts?.active ?? true;
|
|
30
|
+
const inPanel = panelCtx !== null && runtimeCtx !== null;
|
|
31
|
+
// Trampoline:handler 不必是稳定引用(内联书写也安全),注册只随
|
|
32
|
+
// active / panelId 翻转而刷新。
|
|
33
|
+
const handlerRef = React.useRef(handler);
|
|
34
|
+
handlerRef.current = handler;
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
if (!inPanel)
|
|
37
|
+
return undefined;
|
|
38
|
+
return runtimeCtx.runtime.registerInput(panelCtx.panelId, (input, key) => handlerRef.current(input, normalizeKey(key)), active);
|
|
39
|
+
}, [inPanel, runtimeCtx, panelCtx, active]);
|
|
40
|
+
// 整屏回退路径。面板形态下也挂着(isActive=false),保证 hook 顺序稳定。
|
|
41
|
+
useInput((input, key) => {
|
|
42
|
+
handlerRef.current(input, normalizeKey(key));
|
|
43
|
+
}, { isActive: !inPanel && active });
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type SidePanelSplit } from './dimensions.js';
|
|
2
|
+
import type { SidePanelKeyFlags, SidePanelRuntime } from './types.js';
|
|
3
|
+
export type { SidePanelKeyFlags } from './types.js';
|
|
4
|
+
export type SidePanelFocus = 'chat' | 'panel';
|
|
5
|
+
export interface UseSidePanelOptions {
|
|
6
|
+
/** Content width after PageMargin (what Chat's useTerminalSize reports). */
|
|
7
|
+
readonly columns: number;
|
|
8
|
+
readonly fullscreen: boolean;
|
|
9
|
+
/** Fullscreen draft editor covers the whole page: force collapsed. */
|
|
10
|
+
readonly editorOpen: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SidePanelKeyEventLike {
|
|
13
|
+
stopImmediatePropagation?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface SidePanelController {
|
|
16
|
+
/** Resolved split, or null when the chat takes the full width. */
|
|
17
|
+
readonly geometry: SidePanelSplit | null;
|
|
18
|
+
readonly split: boolean;
|
|
19
|
+
readonly chatColumns: number;
|
|
20
|
+
readonly panelColumns: number;
|
|
21
|
+
/** Whether a split COULD render right now (setting + width + mode). */
|
|
22
|
+
readonly splitAvailable: boolean;
|
|
23
|
+
readonly open: boolean;
|
|
24
|
+
readonly zoom: boolean;
|
|
25
|
+
readonly focus: SidePanelFocus;
|
|
26
|
+
readonly activePanelId: string | undefined;
|
|
27
|
+
readonly enabledPanelIds: readonly string[];
|
|
28
|
+
/** 键盘分发与 Panel 注册的接缝(PanelHost / usePanelInput 用)。 */
|
|
29
|
+
readonly runtime: SidePanelRuntime;
|
|
30
|
+
focusChat: () => void;
|
|
31
|
+
focusPanel: () => void;
|
|
32
|
+
/** Ctrl+B smart three-state: closed → open+focus; chat → panel; panel → close. */
|
|
33
|
+
toggleSmart: () => void;
|
|
34
|
+
/** /panel toggle: plain open/close (focus returns to chat on close). */
|
|
35
|
+
toggleOpen: () => void;
|
|
36
|
+
toggleZoom: () => void;
|
|
37
|
+
nudge: (deltaColumns: number) => void;
|
|
38
|
+
openPanel: (id: string, opts?: {
|
|
39
|
+
readonly focus?: boolean;
|
|
40
|
+
}) => void;
|
|
41
|
+
/** /panel command dispatcher; false = unknown argument. */
|
|
42
|
+
command: (raw: string) => boolean;
|
|
43
|
+
/** Keyboard entry point (see the priority contract in the file header). */
|
|
44
|
+
handleKey: (input: string, key: SidePanelKeyFlags, event?: SidePanelKeyEventLike) => boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare function useSidePanel(options: UseSidePanelOptions): SidePanelController;
|
|
47
|
+
//# sourceMappingURL=useSidePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/useSidePanel.ts"],"names":[],"mappings":"AAqCA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGrE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAA;AAE7C,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAA;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IACxC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3C,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,kFAAkF;IAClF,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,wEAAwE;IACxE,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACpE,2DAA2D;IAC3D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IACjC,2EAA2E;IAC3E,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAA;CAC7F;AAMD,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CA6P9E"}
|