@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,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ThemeCatalogEntry } from '../themeCatalog.js';
|
|
3
|
+
/**
|
|
4
|
+
* `/theme` 右列的预览面板:用**被预览主题**的调色板(而不是当前生效主题)
|
|
5
|
+
* 实渲染一段语法高亮代码块、一张代码操作工具卡和三行 diff。
|
|
6
|
+
*
|
|
7
|
+
* 为什么要有它:列表行只有 accent/text/success 三个色块,挑主题时看不到
|
|
8
|
+
* 语法色(syntax*)、diff 色(diffAdded/diffRemoved)和工具卡底色
|
|
9
|
+
* (toolCard 族/toolDot 族)——而那才是每天盯着的部分。预览跟随焦点行,移动
|
|
10
|
+
* 光标即可比较,不必先 Enter 应用再后悔。
|
|
11
|
+
*
|
|
12
|
+
* 颜色全部走**显式色值**:调色板里的 hex/`ansi:` 值经 ThemedText/ThemedBox
|
|
13
|
+
* 的 resolveColor 原样透传(那里只解析主题键名),于是预览列抹的是候选主题
|
|
14
|
+
* 的色,而外层列表仍是当前主题——不需要给 design-system 加调色板覆盖层。
|
|
15
|
+
* 同理这里一律不写 `dimColor`:ThemedText 的 dimColor 会盖掉传入的 color,
|
|
16
|
+
* 把候选色换成**当前主题**的 inactive。
|
|
17
|
+
*/
|
|
18
|
+
export declare function ThemePreviewPane({ entry, rows, width, }: {
|
|
19
|
+
/** 焦点行主题(目录条目自带已解析的完整调色板)。 */
|
|
20
|
+
entry: ThemeCatalogEntry;
|
|
21
|
+
/** 预览列可用行数(已按浮层高度预算钳过);装不下的块从底部裁掉。 */
|
|
22
|
+
rows: number;
|
|
23
|
+
/** 预览列宽度(终端列数):抬头主题名与跟随提示按它截断,不换行。 */
|
|
24
|
+
width: number;
|
|
25
|
+
}): React.ReactNode;
|
|
26
|
+
//# sourceMappingURL=ThemePreviewPane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemePreviewPane.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePreviewPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAiB3D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE;IACD,8BAA8B;IAC9B,KAAK,EAAE,iBAAiB,CAAA;IACxB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,SAAS,CA0ElB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { t } from '../i18n.js';
|
|
4
|
+
import { Box, Text } from '../ui.js';
|
|
5
|
+
import { buildSyntaxTheme } from '../terminal-utils/syntaxTheme.js';
|
|
6
|
+
import { getCliHighlightPromise } from '../terminal-utils/cliHighlight.js';
|
|
7
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
8
|
+
import { truncateMiddle } from '../utils/truncateMiddle.js';
|
|
9
|
+
/**
|
|
10
|
+
* 调色板键 → 渲染原语接受的显式色值:Theme 的值是宽松 string(hex 或
|
|
11
|
+
* `ansi:<name>`),而 Text/Box 的 color 联合类型要 Color。与 ThemePicker 的
|
|
12
|
+
* swatches 同一个断言(`theme[key] as Color`)——resolveColor 对 `#`/`rgb(`/
|
|
13
|
+
* `ansi256(`/`ansi:` 前缀原样透传,所以候选主题的色不会被当前主题改写。
|
|
14
|
+
*/
|
|
15
|
+
function ink(color) {
|
|
16
|
+
return color;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* `/theme` 右列的预览面板:用**被预览主题**的调色板(而不是当前生效主题)
|
|
20
|
+
* 实渲染一段语法高亮代码块、一张代码操作工具卡和三行 diff。
|
|
21
|
+
*
|
|
22
|
+
* 为什么要有它:列表行只有 accent/text/success 三个色块,挑主题时看不到
|
|
23
|
+
* 语法色(syntax*)、diff 色(diffAdded/diffRemoved)和工具卡底色
|
|
24
|
+
* (toolCard 族/toolDot 族)——而那才是每天盯着的部分。预览跟随焦点行,移动
|
|
25
|
+
* 光标即可比较,不必先 Enter 应用再后悔。
|
|
26
|
+
*
|
|
27
|
+
* 颜色全部走**显式色值**:调色板里的 hex/`ansi:` 值经 ThemedText/ThemedBox
|
|
28
|
+
* 的 resolveColor 原样透传(那里只解析主题键名),于是预览列抹的是候选主题
|
|
29
|
+
* 的色,而外层列表仍是当前主题——不需要给 design-system 加调色板覆盖层。
|
|
30
|
+
* 同理这里一律不写 `dimColor`:ThemedText 的 dimColor 会盖掉传入的 color,
|
|
31
|
+
* 把候选色换成**当前主题**的 inactive。
|
|
32
|
+
*/
|
|
33
|
+
export function ThemePreviewPane({ entry, rows, width, }) {
|
|
34
|
+
const palette = entry.theme;
|
|
35
|
+
const [highlight, setHighlight] = React.useState(null);
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
let alive = true;
|
|
38
|
+
// cli-highlight 是懒加载的(与 markdown.ts 的 fenced code 同一条路径):
|
|
39
|
+
// 首帧先上纯文本,加载完成后原位补色——不为预览阻塞浮层打开,也不改
|
|
40
|
+
// 代码块在转录里的首帧行为。
|
|
41
|
+
void getCliHighlightPromise().then((loaded) => {
|
|
42
|
+
if (alive)
|
|
43
|
+
setHighlight(loaded);
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
alive = false;
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
const codeLines = React.useMemo(() => {
|
|
50
|
+
const plain = SAMPLE_CODE.split('\n');
|
|
51
|
+
if (highlight === null)
|
|
52
|
+
return plain;
|
|
53
|
+
try {
|
|
54
|
+
return highlight
|
|
55
|
+
.highlight(SAMPLE_CODE, { language: 'typescript', theme: buildSyntaxTheme(palette) })
|
|
56
|
+
.replace(/\n+$/u, '')
|
|
57
|
+
.split('\n');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// 高亮抛错(语言表缺失等)只降级为纯文本,绝不把浮层带崩。
|
|
61
|
+
return plain;
|
|
62
|
+
}
|
|
63
|
+
}, [highlight, palette]);
|
|
64
|
+
const label = t('theme-preview-title');
|
|
65
|
+
const name = truncateMiddle(entry.displayName, Math.max(width - stringWidth(label) - 4, 4));
|
|
66
|
+
const body = [
|
|
67
|
+
_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(palette.accent), bold: true, children: label }), _jsx(Text, { color: ink(palette.subtle), children: ' · ' }), _jsx(Text, { color: ink(palette.text), children: name })] }, "head"),
|
|
68
|
+
_jsx(Text, { color: ink(palette.subtle), children: truncateMiddle(t('theme-preview-follow'), Math.max(width, 1)) }, "follow"),
|
|
69
|
+
_jsx(Text, { color: ink(palette.subtle), children: '```ts' }, "fence"),
|
|
70
|
+
...codeLines.map((line, index) => (_jsx(Text, { children: `${CODE_INDENT}${line}` }, `code-${index}`))),
|
|
71
|
+
_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(palette.toolDotWrite), children: '● ' }), _jsx(Text, { color: ink(palette.toolNameMutate), children: 'Write' }), _jsx(Text, { color: ink(palette.subtle), children: ' src/theme.ts' })] }, "card"),
|
|
72
|
+
...SAMPLE_DIFF.map((row, index) => (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(row.tone === 'add' ? palette.diffAddedWord : palette.diffRemovedWord), children: index === 0 ? GUTTER_FIRST : GUTTER_REST }), _jsx(Text, { color: ink(row.tone === 'add' ? palette.diffAddedWord : palette.diffRemovedWord), children: row.text })] }, `diff-${index}`))),
|
|
73
|
+
];
|
|
74
|
+
// 行预算是硬约束:浮层向上生长且探出帧顶的行会被裁掉,超出预算的块宁可
|
|
75
|
+
// 不画,也不能把上方的主题列表顶出可视区。
|
|
76
|
+
const shown = body.slice(0, Math.max(rows, 0));
|
|
77
|
+
if (shown.length === 0)
|
|
78
|
+
return null;
|
|
79
|
+
return _jsx(Box, { flexDirection: "column", children: shown });
|
|
80
|
+
}
|
|
81
|
+
/** 预览代码块示例:每行 ≤ 30 列(最窄的预览列 34 列,留 2 列缩进),同时覆盖
|
|
82
|
+
* 注释/关键字/字符串/类型四类 token,语法色的差异一眼可见。 */
|
|
83
|
+
const SAMPLE_CODE = [
|
|
84
|
+
'// dsh-tui palette',
|
|
85
|
+
"const theme = pick('dark')",
|
|
86
|
+
'type Swatch = { hex: string }',
|
|
87
|
+
].join('\n');
|
|
88
|
+
/** 代码操作工具卡的示例 diff:一行删除 + 两行新增,覆盖 diffRemoved/diffAdded
|
|
89
|
+
* 的词级变体(真机转录里工具卡正文用的就是这两个键)。 */
|
|
90
|
+
const SAMPLE_DIFF = [
|
|
91
|
+
{ tone: 'del', text: "- accent: '#3b4252'" },
|
|
92
|
+
{ tone: 'add', text: "+ accent: '#7aa2f7'" },
|
|
93
|
+
{ tone: 'add', text: "+ text: '#e5e9f0'" },
|
|
94
|
+
];
|
|
95
|
+
/** 代码块正文缩进:与 markdown.ts 的 fenced code 同一约定(2 空格)。 */
|
|
96
|
+
const CODE_INDENT = ' ';
|
|
97
|
+
/** 工具卡正文左侧沟槽:首行 ⎿、其余行同宽空格(真机转录的 GUTTER_FIRST/REST)。 */
|
|
98
|
+
const GUTTER_FIRST = ' ⎿ ';
|
|
99
|
+
const GUTTER_REST = ' ';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAA;AAQhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,KAAK,YAAY,GAAG;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AASD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,IAAU,EACV,OAAW,EACX,KAAK,EACL,KAAa,GACd,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAA;AAQhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,KAAK,YAAY,GAAG;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AASD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,IAAU,EACV,OAAW,EACX,KAAK,EACL,KAAa,GACd,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS,CAyFhC"}
|
|
@@ -5,7 +5,7 @@ import Text from './ThemedText.js';
|
|
|
5
5
|
import measureElement from '../../ink/measure-element.js';
|
|
6
6
|
import { stringWidth } from '../../ink/stringWidth.js';
|
|
7
7
|
import { useTerminalSize } from '../../ink/hooks/use-terminal-size.js';
|
|
8
|
-
import {
|
|
8
|
+
import { useSurfaceEdges } from '../SurfaceEdges.js';
|
|
9
9
|
// Upper bound on distinct measurements applied per terminal-width
|
|
10
10
|
// generation. Converging layouts apply one or two; a non-converging
|
|
11
11
|
// context (content-sized Box, or a sibling negotiating space the same
|
|
@@ -35,13 +35,18 @@ const MAX_APPLIED_MEASUREMENTS = 8;
|
|
|
35
35
|
*/
|
|
36
36
|
export function Divider({ width, color, char = '─', padding = 0, title, bleed = false, }) {
|
|
37
37
|
const { columns } = useTerminalSize();
|
|
38
|
-
const
|
|
39
|
-
// Full-bleed: the rule spans the
|
|
40
|
-
//
|
|
41
|
-
// area; the parent does not clip). `columns` here is the
|
|
42
|
-
// (PageMargin narrows TerminalSizeContext
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const edges = useSurfaceEdges();
|
|
39
|
+
// Full-bleed: the rule spans the SURFACE width, shifted left by the
|
|
40
|
+
// allowed bleed via a negative margin (the box reaches into the margin
|
|
41
|
+
// area; the parent does not clip). `columns` here is the SURFACE
|
|
42
|
+
// content width (PageMargin narrows TerminalSizeContext, the side panel
|
|
43
|
+
// narrows it again per column), and SurfaceEdges says how far past each
|
|
44
|
+
// side chrome may run: under PageMargin alone that's {x, x} (the whole
|
|
45
|
+
// terminal); in the split chat column it's {x, 0} — the rule stops at
|
|
46
|
+
// the divider instead of painting into the panel.
|
|
47
|
+
const bleedLeft = bleed ? edges.left : 0;
|
|
48
|
+
const bleedRight = bleed ? edges.right : 0;
|
|
49
|
+
const bleedWidth = columns + bleedLeft + bleedRight;
|
|
45
50
|
const [measuredWidth, setMeasuredWidth] = useState(null);
|
|
46
51
|
const boxRef = useRef(null);
|
|
47
52
|
// Measurement feedback guard: the rule width rendered from
|
|
@@ -108,7 +113,7 @@ export function Divider({ width, color, char = '─', padding = 0, title, bleed
|
|
|
108
113
|
text = char.repeat(lineWidth);
|
|
109
114
|
}
|
|
110
115
|
return (_jsx(Box, { ref: boxRef, ...(bleed
|
|
111
|
-
? { width: bleedWidth, marginLeft: -
|
|
116
|
+
? { width: bleedWidth, marginLeft: -bleedLeft }
|
|
112
117
|
: width !== undefined
|
|
113
118
|
? { width }
|
|
114
119
|
: {}), children: _jsx(Text, { dimColor: !color, color: color, wrap: "truncate-end", children: text }) }));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 落地页的一个动作入口(第四版:状态驱动的"下一步建议")。
|
|
3
|
+
*
|
|
4
|
+
* 动作仍然全部走**既有命令名**(第七版表:continue / home / settings /
|
|
5
|
+
* jobs / update / star / help)——这一屏不新增行为,它只是把"当前状态下
|
|
6
|
+
* 最可能的下一步"摆到台面上。知道了名字,键盘用户直接敲;鼠标用户点一下,
|
|
7
|
+
* 两条路落到同一个 `runCommand`。
|
|
8
|
+
*/
|
|
9
|
+
export interface LaunchpadAction {
|
|
10
|
+
/** 稳定的行标识(焦点、`key` 都用它)。 */
|
|
11
|
+
readonly id: string;
|
|
12
|
+
/** i18n key:那一行的短标签。 */
|
|
13
|
+
readonly labelKey: string;
|
|
14
|
+
/** i18n 插值参数(目前只有 Continue 带会话标题)。 */
|
|
15
|
+
readonly values?: Readonly<Record<string, string>>;
|
|
16
|
+
/** 点击/回车时交给 `Chat.runCommand` 的命令名(不含斜杠)。 */
|
|
17
|
+
readonly command: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* resolveLaunchpadActions 的输入——一次启动的状态快照。
|
|
21
|
+
*
|
|
22
|
+
* 第七版:每个字段都来自**既有**数据源(不造假):
|
|
23
|
+
* - `lastSessionTitle`:会话名册(`channel.agentViewRows`,含持久化会话)
|
|
24
|
+
* 里最近一条**可继续**会话的标题;没有就没有 Continue(不放假动作);
|
|
25
|
+
* - `jobsRunning`:`channel.backgroundJobs` 里有 running/stopping 的任务;
|
|
26
|
+
* - `updateAvailable`:`checkForTuiUpdate()`(src/update.ts,与 /update
|
|
27
|
+
* 同一条判定)在启动页挂起时异步探得的新版本;
|
|
28
|
+
* - `starDue`:`usageStats`(~/.dsh-tui/usage.json)有**未报过的**已达档
|
|
29
|
+
* 里程碑(首档 24h)且本进程尚未 star 成功——口径与开屏求 star 弹窗
|
|
30
|
+
* 完全一致(pendingStarMilestone + starred)。
|
|
31
|
+
*/
|
|
32
|
+
export interface LaunchpadActionState {
|
|
33
|
+
/** 最近一条可继续会话的标题;没有(或为空)视为"无历史",整格不画。 */
|
|
34
|
+
readonly lastSessionTitle?: string | undefined;
|
|
35
|
+
/** 有后台任务在跑(条件位①)。 */
|
|
36
|
+
readonly jobsRunning: boolean;
|
|
37
|
+
/** 检测到可用更新(条件位②)。 */
|
|
38
|
+
readonly updateAvailable: boolean;
|
|
39
|
+
/** 用量到档且从未 star(条件位③)。 */
|
|
40
|
+
readonly starDue: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** Continue 标题的截断上限(显示宽度,含截断省略号)。 */
|
|
43
|
+
export declare const LAUNCHPAD_CONTINUE_TITLE_MAX = 16;
|
|
44
|
+
/**
|
|
45
|
+
* 截断会话标题:按显示宽度(CJK 双宽)从头部取,超宽补 `…`。
|
|
46
|
+
* 纯函数、无副作用,表驱动回归直接钉它的边界。
|
|
47
|
+
*/
|
|
48
|
+
export declare function truncateContinueTitle(title: string, max?: number): string;
|
|
49
|
+
/**
|
|
50
|
+
* 落地页第七版的核心纯函数:按状态快照决定入口行放什么。
|
|
51
|
+
*
|
|
52
|
+
* 版面(用户拍板的四格;第一格条件性缺席):
|
|
53
|
+
*
|
|
54
|
+
* 1. `继续「<标题>」` —— 有可继续会话才画(无历史不放假动作);
|
|
55
|
+
* 快捷键 Alt+R(keymap 的 `continue` 动作,见 utils/keymap.ts)。
|
|
56
|
+
* 2. `会话与工作区` —— 历史会话 + 工作区合并入口;命令用既有 `home`。
|
|
57
|
+
* 3. `设置` —— /settings。
|
|
58
|
+
* 4. 条件位,**按优先级取第一个成立者**(同时成立时高优先级胜出,
|
|
59
|
+
* 回归按这张优先级表驱动):
|
|
60
|
+
* ① jobsRunning → `后台任务`(/jobs)
|
|
61
|
+
* ② updateAvailable → `有新版本`(/update,走既有更新路径)
|
|
62
|
+
* ③ starDue → `投喂一颗 Star`(/star)
|
|
63
|
+
* ④ 都不成立 → `帮助`(/help)兜底。
|
|
64
|
+
*
|
|
65
|
+
* 第六版的 doctor 入口已删(第七版):它的输出属于转录区,天然把人带进
|
|
66
|
+
* 对话页,不适合留在"Esc 必须回启动页"的这一屏;首启/配置问题专属按钮
|
|
67
|
+
* 也随之退役——首启由引导向导(盖在落地页之上)承担,provider 配置经
|
|
68
|
+
* 向导或 /settings 可达。输出恒 ≤4 条。
|
|
69
|
+
*
|
|
70
|
+
* 纯函数:不改入参、不读环境、同样输入恒同样输出——表驱动回归钉死每个状态。
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveLaunchpadActions(state: LaunchpadActionState): readonly LaunchpadAction[];
|
|
73
|
+
//# sourceMappingURL=launchpadActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launchpadActions.d.ts","sourceRoot":"","sources":["../../../src/components/launchpadActions.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9C,qBAAqB;IACrB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,qBAAqB;IACrB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,0BAA0B;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,qCAAqC;AACrC,eAAO,MAAM,4BAA4B,KAAK,CAAA;AAE9C;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAA+B,GAAG,MAAM,CAY/F;AAkDD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,eAAe,EAAE,CAkB/F"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { stringWidth } from '../ink/stringWidth.js';
|
|
2
|
+
/** Continue 标题的截断上限(显示宽度,含截断省略号)。 */
|
|
3
|
+
export const LAUNCHPAD_CONTINUE_TITLE_MAX = 16;
|
|
4
|
+
/**
|
|
5
|
+
* 截断会话标题:按显示宽度(CJK 双宽)从头部取,超宽补 `…`。
|
|
6
|
+
* 纯函数、无副作用,表驱动回归直接钉它的边界。
|
|
7
|
+
*/
|
|
8
|
+
export function truncateContinueTitle(title, max = LAUNCHPAD_CONTINUE_TITLE_MAX) {
|
|
9
|
+
const clean = title.replace(/[\r\n]+/gu, ' ').trim();
|
|
10
|
+
if (stringWidth(clean) <= max)
|
|
11
|
+
return clean;
|
|
12
|
+
let width = 0;
|
|
13
|
+
let out = '';
|
|
14
|
+
for (const ch of Array.from(clean)) {
|
|
15
|
+
const w = stringWidth(ch);
|
|
16
|
+
if (width + w > max - 1)
|
|
17
|
+
break;
|
|
18
|
+
out += ch;
|
|
19
|
+
width += w;
|
|
20
|
+
}
|
|
21
|
+
return out + '…';
|
|
22
|
+
}
|
|
23
|
+
/** Continue(不带标题时的短标签)。 */
|
|
24
|
+
const CONTINUE = {
|
|
25
|
+
id: 'continue',
|
|
26
|
+
labelKey: 'launchpad-action-continue',
|
|
27
|
+
command: 'continue',
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 会话与工作区(第七版合并入口):历史会话与工作区本来就是同一个界面
|
|
31
|
+
* (`/home` 的会话名册 = 工作区首页,见 Chat 的 resume/home/agentview 合一
|
|
32
|
+
* 注释),两个按钮进同一个页面——用户实测后要求合并只留一个。命令用
|
|
33
|
+
* 既有的 `home` 那条。
|
|
34
|
+
*/
|
|
35
|
+
const SESSIONS_WORKSPACE = {
|
|
36
|
+
id: 'sessions-workspace',
|
|
37
|
+
labelKey: 'launchpad-action-sessions-workspace',
|
|
38
|
+
command: 'home',
|
|
39
|
+
};
|
|
40
|
+
/** Settings(用户拍板的第三格)。 */
|
|
41
|
+
const SETTINGS = {
|
|
42
|
+
id: 'settings',
|
|
43
|
+
labelKey: 'launchpad-action-settings',
|
|
44
|
+
command: 'settings',
|
|
45
|
+
};
|
|
46
|
+
/** 条件位①:有后台任务在跑。 */
|
|
47
|
+
const JOBS = {
|
|
48
|
+
id: 'jobs',
|
|
49
|
+
labelKey: 'launchpad-action-jobs',
|
|
50
|
+
command: 'jobs',
|
|
51
|
+
};
|
|
52
|
+
/** 条件位②:检测到可用更新。 */
|
|
53
|
+
const UPDATE = {
|
|
54
|
+
id: 'update',
|
|
55
|
+
labelKey: 'launchpad-action-update',
|
|
56
|
+
command: 'update',
|
|
57
|
+
};
|
|
58
|
+
/** 条件位③:用量到档且从未 star。 */
|
|
59
|
+
const STAR = {
|
|
60
|
+
id: 'star',
|
|
61
|
+
labelKey: 'launchpad-action-star',
|
|
62
|
+
command: 'star',
|
|
63
|
+
};
|
|
64
|
+
/** Help(? 快捷键与命令)——条件位的兜底。 */
|
|
65
|
+
const HELP = {
|
|
66
|
+
id: 'help',
|
|
67
|
+
labelKey: 'launchpad-action-help',
|
|
68
|
+
command: 'help',
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* 落地页第七版的核心纯函数:按状态快照决定入口行放什么。
|
|
72
|
+
*
|
|
73
|
+
* 版面(用户拍板的四格;第一格条件性缺席):
|
|
74
|
+
*
|
|
75
|
+
* 1. `继续「<标题>」` —— 有可继续会话才画(无历史不放假动作);
|
|
76
|
+
* 快捷键 Alt+R(keymap 的 `continue` 动作,见 utils/keymap.ts)。
|
|
77
|
+
* 2. `会话与工作区` —— 历史会话 + 工作区合并入口;命令用既有 `home`。
|
|
78
|
+
* 3. `设置` —— /settings。
|
|
79
|
+
* 4. 条件位,**按优先级取第一个成立者**(同时成立时高优先级胜出,
|
|
80
|
+
* 回归按这张优先级表驱动):
|
|
81
|
+
* ① jobsRunning → `后台任务`(/jobs)
|
|
82
|
+
* ② updateAvailable → `有新版本`(/update,走既有更新路径)
|
|
83
|
+
* ③ starDue → `投喂一颗 Star`(/star)
|
|
84
|
+
* ④ 都不成立 → `帮助`(/help)兜底。
|
|
85
|
+
*
|
|
86
|
+
* 第六版的 doctor 入口已删(第七版):它的输出属于转录区,天然把人带进
|
|
87
|
+
* 对话页,不适合留在"Esc 必须回启动页"的这一屏;首启/配置问题专属按钮
|
|
88
|
+
* 也随之退役——首启由引导向导(盖在落地页之上)承担,provider 配置经
|
|
89
|
+
* 向导或 /settings 可达。输出恒 ≤4 条。
|
|
90
|
+
*
|
|
91
|
+
* 纯函数:不改入参、不读环境、同样输入恒同样输出——表驱动回归钉死每个状态。
|
|
92
|
+
*/
|
|
93
|
+
export function resolveLaunchpadActions(state) {
|
|
94
|
+
const conditional = state.jobsRunning
|
|
95
|
+
? JOBS
|
|
96
|
+
: state.updateAvailable
|
|
97
|
+
? UPDATE
|
|
98
|
+
: state.starDue
|
|
99
|
+
? STAR
|
|
100
|
+
: HELP;
|
|
101
|
+
const title = truncateContinueTitle(state.lastSessionTitle ?? '');
|
|
102
|
+
if (title !== '') {
|
|
103
|
+
return [
|
|
104
|
+
{ ...CONTINUE, labelKey: 'launchpad-action-continue-titled', values: { title } },
|
|
105
|
+
SESSIONS_WORKSPACE,
|
|
106
|
+
SETTINGS,
|
|
107
|
+
conditional,
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
return [SESSIONS_WORKSPACE, SETTINGS, conditional];
|
|
111
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { SplashFont } from './splashFonts.js';
|
|
2
|
+
/** 输入框卡片占的行数:边框 2 + 输入 1(第三版:参数行移出框外)。 */
|
|
3
|
+
export declare const CARD_ROWS = 3;
|
|
4
|
+
/** 框下参数行的行数(模型/思考深度/模式/权限全空时整行不画)。 */
|
|
5
|
+
export declare const PARAM_ROWS = 1;
|
|
6
|
+
/** 该尺寸下渲染哪一档。 */
|
|
7
|
+
export type LaunchpadStage = 'full' | 'no-tip' | 'no-hints' | 'no-art' | 'input-only';
|
|
8
|
+
/** 一屏落地页在该尺寸下要渲染哪些部件。 */
|
|
9
|
+
export interface LaunchpadLayout {
|
|
10
|
+
/** 整块撤的顺序档位。 */
|
|
11
|
+
readonly stage: LaunchpadStage;
|
|
12
|
+
/** 渲染像素鲸鱼 / 女仆娘立绘(宽轴决定;窄了不画,免得被裁)。 */
|
|
13
|
+
readonly showWhale: boolean;
|
|
14
|
+
/** 渲染 DEEPSEEK / HARNESS 块体大字。 */
|
|
15
|
+
readonly showBigTitle: boolean;
|
|
16
|
+
/** 大字放不下、立绘也放不下:退化成一行纯文字标题。 */
|
|
17
|
+
readonly showPlainTitle: boolean;
|
|
18
|
+
/** 头部整块是否渲染。 */
|
|
19
|
+
readonly showHero: boolean;
|
|
20
|
+
/** 键帽按钮行(框下成组行的第二行,右对齐)。 */
|
|
21
|
+
readonly showHints: boolean;
|
|
22
|
+
/** 居中 Tips 行(成组行的第三行)。 */
|
|
23
|
+
readonly showTip: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 参数行与入口行之间的呼吸留白行数(0 或 1):默认 1;矮屏阶梯里排在
|
|
26
|
+
* Tips 之后、键帽行之前被撤掉。参数行缺席时恒 0(没有可隔开的两行)。
|
|
27
|
+
*/
|
|
28
|
+
readonly hintsGapRows: number;
|
|
29
|
+
/**
|
|
30
|
+
* 词标与输入框之间的呼吸留白行数(1 或 2,第六版默认 2——刻意的呼吸感,
|
|
31
|
+
* 不是遗漏):矮屏阶梯里先于 Tips 行被撤回紧档 1。
|
|
32
|
+
*/
|
|
33
|
+
readonly heroGapRows: number;
|
|
34
|
+
/**
|
|
35
|
+
* 入口行与 Tips 行之间的呼吸留白行数(1 或 2,第六版默认 2):矮屏阶梯
|
|
36
|
+
* 里先于 Tips 行被撤回紧档 1(Tips 行本身更晚才整行撤掉)。
|
|
37
|
+
*/
|
|
38
|
+
readonly tipGapRows: number;
|
|
39
|
+
/** 双角铭牌行(永远画:它是这一屏的底边锚点)。 */
|
|
40
|
+
readonly showCorners: boolean;
|
|
41
|
+
/** 输入框卡片占的行数(边框 2 + 输入 1,恒 3)。 */
|
|
42
|
+
readonly cardRows: number;
|
|
43
|
+
/** 头部本体占的行数(不含 LogoV2 根盒的 marginTop)。 */
|
|
44
|
+
readonly heroRows: number;
|
|
45
|
+
/** 内容总行数——测试用来钉死这一档真的放得下。 */
|
|
46
|
+
readonly totalRows: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @param columns - 内容区列数。
|
|
50
|
+
* @param rows - 内容区行数。
|
|
51
|
+
* @param options - whale / whaleGirl 对应设置项;font 是当天那款字体(字身宽度
|
|
52
|
+
* 不同,宽轴阈值也跟着不同);params 是框下有没有参数行(模型/思考深度/模式/
|
|
53
|
+
* 权限全拿不到时为 false,成组行矮一行)。
|
|
54
|
+
* @returns 该尺寸下要渲染的部件。
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveLaunchpadLayout(columns: number, rows: number, options: {
|
|
57
|
+
whale: boolean;
|
|
58
|
+
whaleGirl?: boolean;
|
|
59
|
+
font: SplashFont;
|
|
60
|
+
params?: boolean;
|
|
61
|
+
}): LaunchpadLayout;
|
|
62
|
+
//# sourceMappingURL=launchpadLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launchpadLayout.d.ts","sourceRoot":"","sources":["../../../src/components/launchpadLayout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AA0ClD,0CAA0C;AAC1C,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,sCAAsC;AACtC,eAAO,MAAM,UAAU,IAAI,CAAA;AAwC3B,iBAAiB;AACjB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAA;AAErF,yBAAyB;AACzB,MAAM,WAAW,eAAe;IAC9B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,kCAAkC;IAClC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,+BAA+B;IAC/B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC,gBAAgB;IAChB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,0BAA0B;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,6BAA6B;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GACnF,eAAe,CAwFjB"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { bigTextWidth } from './bigfont.js';
|
|
2
|
+
import { WHALE_BOX_WIDTH } from './splashLayout.js';
|
|
3
|
+
/**
|
|
4
|
+
* 落地页的降级阶梯——两个轴一起解:
|
|
5
|
+
*
|
|
6
|
+
* **宽轴**:上下排布之后立绘与词标各自独立判断(谁都别挤谁)——词标放不下就
|
|
7
|
+
* 退化成一行纯文字标题,立绘放不下(窄于盒宽)就不画。
|
|
8
|
+
* **高轴**是本模块的:落地页是整屏、放不下就没了,所以按行数再排一次顺序
|
|
9
|
+
* **整块撤**,顺序从最可省到最不可省:
|
|
10
|
+
*
|
|
11
|
+
* ① full —— 头部 + 输入框 + 紧贴框下的成组三行(参数/键帽/Tips)+ 双角铭牌
|
|
12
|
+
* ② full-撤呼吸 —— 第六版两处呼吸留白(词标↔输入框、入口行↔Tips,各 2 行)
|
|
13
|
+
* 先撤回紧档 1 行,参数行留白随后也撤——**留白是刻意的
|
|
14
|
+
* 呼吸感,不是遗漏**;所有留白永远排在 Tips/入口行之前撤
|
|
15
|
+
* ③ no-tip —— 撤 Tips 行(最可省的一句闲话)
|
|
16
|
+
* ④ no-hints —— 撤键帽按钮行(鼠标的礼貌;命令名本身还在 `/` 里)
|
|
17
|
+
* ⑤ no-art —— 撤立绘(13 行,最占地方的那块),只留词标
|
|
18
|
+
* ⑥ input-only —— 只留词标 + 输入框 + 双角铭牌(最矮的终端也要能敲进去第一句)
|
|
19
|
+
*
|
|
20
|
+
* 双角铭牌(工作路径:分支 / 版本号)钉在最底一行,是这一屏唯一不随阶梯消失的
|
|
21
|
+
* 装饰——它把整块界面扎在终端底边上。
|
|
22
|
+
*
|
|
23
|
+
* 版面契约(2026-10 第三版):
|
|
24
|
+
* - 头部走 LogoV2 的 chrome=minimal + arrangement=column:立绘在上、
|
|
25
|
+
* DEEPSEEK/HARNESS 大字在下,两块各自水平居中;版号/模型/工作目录/提示一律不进
|
|
26
|
+
* 头部(它们各自有更低频的位置:参数进框下成组行,目录与版本进底角)。
|
|
27
|
+
* - 输入框(圆角边框)里**只有输入那一行**;参数行移到框外、紧贴框下方,
|
|
28
|
+
* 左对齐输入框。整组(头部 + 输入框 + 参数/键帽/Tips 三行)垂直居中,
|
|
29
|
+
* 不钉屏幕底、中间不留大空档。
|
|
30
|
+
* - 键帽按钮行整行右对齐(与输入框右缘对齐);Tips 行居中、`● Tips:` 前缀。
|
|
31
|
+
*
|
|
32
|
+
* 所有列数按**内容区**算(PageMargin 已经把 TerminalSizeContext 收窄);行数
|
|
33
|
+
* 同理。落地页不自己减页边距。
|
|
34
|
+
*/
|
|
35
|
+
/** 鲸鱼/女仆娘立绘(含盒)的行数。 */
|
|
36
|
+
const WHALE_ART_ROWS = 13;
|
|
37
|
+
/** 块体大字的行数:上排 5 + 空 1 + 下排 5。 */
|
|
38
|
+
const BIG_TITLE_ROWS = 11;
|
|
39
|
+
/** 只留文字的档位:一行纯标题。 */
|
|
40
|
+
const PLAIN_TITLE_ROWS = 1;
|
|
41
|
+
/** 输入框卡片占的行数:边框 2 + 输入 1(第三版:参数行移出框外)。 */
|
|
42
|
+
export const CARD_ROWS = 3;
|
|
43
|
+
/** 框下参数行的行数(模型/思考深度/模式/权限全空时整行不画)。 */
|
|
44
|
+
export const PARAM_ROWS = 1;
|
|
45
|
+
/**
|
|
46
|
+
* 头部与卡片之间的呼吸留白(第六版,2026-10 用户原话「DeepSeekHarness 和
|
|
47
|
+
* 输入框中间空一行」):默认 2 行。**这是刻意的版面呼吸感,不是遗漏**——
|
|
48
|
+
* 别在重构时把它当成 bug 修掉。矮屏阶梯里它排在参数行留白之后、Tips 行
|
|
49
|
+
* 之前被撤(撤到紧档 1 行),绝不让呼吸把输入框挤掉。
|
|
50
|
+
*/
|
|
51
|
+
const HERO_TO_CARD_GAP = 2;
|
|
52
|
+
/** 矮屏撤呼吸后的紧档(第五版的老间距:词标与输入框隔 1 行)。 */
|
|
53
|
+
const HERO_TO_CARD_GAP_TIGHT = 1;
|
|
54
|
+
/** LogoV2 根盒自带的 marginTop——真实占一行,阶梯预算必须算进去,否则恰好卡
|
|
55
|
+
* 阈值时卡片会被挤掉最后一行(夹具实证)。 */
|
|
56
|
+
const HERO_TOP_MARGIN = 1;
|
|
57
|
+
/**
|
|
58
|
+
* 参数行与入口行之间的呼吸留白(第五版,2026-10 用户实测「跟输入框太紧了,
|
|
59
|
+
* 留一两行空」):默认 1 行。**这行留白是刻意的版面呼吸感,不是遗漏**——
|
|
60
|
+
* 别在重构时把它当成 bug 修掉。只在参数行画出来时才存在(参数全空时入口行
|
|
61
|
+
* 直接紧贴框底,原契约不变)。矮屏阶梯里它的取舍顺序排在 Tips 之后、
|
|
62
|
+
* 键帽行之前:先撤留白、再撤键帽行,绝不让这行呼吸把输入框挤掉。
|
|
63
|
+
*/
|
|
64
|
+
const PARAM_HINTS_GAP_ROWS = 1;
|
|
65
|
+
/** 键帽按钮行:参数行之下、隔一行呼吸留白(矮屏可撤,见 PARAM_HINTS_GAP_ROWS)。 */
|
|
66
|
+
const HINTS_ROWS = 1;
|
|
67
|
+
/**
|
|
68
|
+
* Tips 行:自身 1 行 + 上方呼吸留白(第六版,用户原话「继续等按钮和 tips
|
|
69
|
+
* 中间空一行」→ 入口行与 Tips 之间默认 2 行空行)。**这行留白同样是刻意的
|
|
70
|
+
* 呼吸感,不是遗漏**;矮屏阶梯里先撤它(回到 1 行)再撤 Tips 行本身。
|
|
71
|
+
*/
|
|
72
|
+
const TIP_BLOCK_ROWS = 3;
|
|
73
|
+
/** 矮屏撤呼吸后的紧档(自身 1 + 留白 1)。 */
|
|
74
|
+
const TIP_BLOCK_ROWS_TIGHT = 2;
|
|
75
|
+
/**
|
|
76
|
+
* 双角铭牌:自身 2 行 + 上方 1 行留白。自身 2 行是第七版**版本号竖排**带来
|
|
77
|
+
* 的——右下角两行(`dsh-tui v…` 在上、`dsh-core v…` 在下),左下目录铭牌仍
|
|
78
|
+
* 1 行、与第一行顶对齐。内核版本读不到时右侧只画 1 行(预算按 2 行上限算,
|
|
79
|
+
* 矮屏阶梯的取舍顺序不变:先撤装饰、绝不让输入框被挤掉)。
|
|
80
|
+
*/
|
|
81
|
+
const CORNERS_BLOCK_ROWS = 3;
|
|
82
|
+
/**
|
|
83
|
+
* @param columns - 内容区列数。
|
|
84
|
+
* @param rows - 内容区行数。
|
|
85
|
+
* @param options - whale / whaleGirl 对应设置项;font 是当天那款字体(字身宽度
|
|
86
|
+
* 不同,宽轴阈值也跟着不同);params 是框下有没有参数行(模型/思考深度/模式/
|
|
87
|
+
* 权限全拿不到时为 false,成组行矮一行)。
|
|
88
|
+
* @returns 该尺寸下要渲染的部件。
|
|
89
|
+
*/
|
|
90
|
+
export function resolveLaunchpadLayout(columns, rows, options) {
|
|
91
|
+
const { font } = options;
|
|
92
|
+
// 与 resolveSplashLayout 同一套阈值:末尾那一格字距也算进去,否则恰好卡阈值
|
|
93
|
+
// 时 Ink 会把最后一个字形换成省略号。
|
|
94
|
+
const titleWidth = bigTextWidth(font, font.tagline.top, font.tagline.topKerning) + font.tagline.topKerning;
|
|
95
|
+
const showBigTitle = columns >= titleWidth;
|
|
96
|
+
const artBox = WHALE_BOX_WIDTH;
|
|
97
|
+
const wantsArt = options.whale || options.whaleGirl === true;
|
|
98
|
+
// 上下排布:立绘只看自己放不放得下,不再和词标抢同一行的宽度。
|
|
99
|
+
const showWhale = wantsArt && columns >= artBox;
|
|
100
|
+
const showPlainTitle = !showBigTitle && !showWhale;
|
|
101
|
+
const showHero = showWhale || showBigTitle || showPlainTitle;
|
|
102
|
+
// 上下排布时头部 = 立绘 + 间隔 1 + 大字;退化档位取各自实际行数。
|
|
103
|
+
const artRows = showWhale ? WHALE_ART_ROWS : 0;
|
|
104
|
+
const titleRows = showBigTitle ? BIG_TITLE_ROWS : PLAIN_TITLE_ROWS;
|
|
105
|
+
const heroRows = showHero ? (artRows > 0 ? artRows + 1 + titleRows : titleRows) : 0;
|
|
106
|
+
// 头部整块(含根盒 marginTop)实际占的行数:阶梯与 totalRows 都按它算。
|
|
107
|
+
const heroBlockRows = showHero ? heroRows + HERO_TOP_MARGIN : 0;
|
|
108
|
+
// 第六版行数预算:输入框(恒 3)+ 框下成组行(参数 1 + 呼吸留白 0/1 +
|
|
109
|
+
// 键帽 1 + Tips 3)+ 双角铭牌 2。撤的顺序「从最可省到最不可省」:
|
|
110
|
+
// 新增的两处呼吸(词标↔输入框、入口行↔Tips)→ 参数行呼吸留白 → Tips 行
|
|
111
|
+
// 本身 → 键帽行 → 立绘(**所有留白永远排在 Tips/入口行之前撤**,
|
|
112
|
+
// 绝不让呼吸把输入框挤掉)。
|
|
113
|
+
const paramRows = options.params === true ? PARAM_ROWS : 0;
|
|
114
|
+
const gapRows = paramRows > 0 ? PARAM_HINTS_GAP_ROWS : 0;
|
|
115
|
+
const cardRows = CARD_ROWS;
|
|
116
|
+
const withArt = artRows > 0 ? artRows + 1 : 0;
|
|
117
|
+
const core = heroBlockRows + cardRows + paramRows + CORNERS_BLOCK_ROWS;
|
|
118
|
+
// 每一档的总行数。顺序即从最全的往下掉:先试最全的,放不下就往下掉。
|
|
119
|
+
// full 带 4 个变体(呼吸×参数留白的紧/松组合)、no-tip 带 3 个:
|
|
120
|
+
// 呼吸在(默认 2/2)→ 撤呼吸(紧档 1/1)→ 撤参数留白,全部都矮于撤 Tips。
|
|
121
|
+
const stages = [
|
|
122
|
+
{ stage: 'full', breath: true, gap: true, rows: core + HERO_TO_CARD_GAP + gapRows + HINTS_ROWS + TIP_BLOCK_ROWS },
|
|
123
|
+
{ stage: 'full', breath: false, gap: true, rows: core + HERO_TO_CARD_GAP_TIGHT + gapRows + HINTS_ROWS + TIP_BLOCK_ROWS_TIGHT },
|
|
124
|
+
{ stage: 'full', breath: true, gap: false, rows: core + HERO_TO_CARD_GAP + HINTS_ROWS + TIP_BLOCK_ROWS },
|
|
125
|
+
{ stage: 'full', breath: false, gap: false, rows: core + HERO_TO_CARD_GAP_TIGHT + HINTS_ROWS + TIP_BLOCK_ROWS_TIGHT },
|
|
126
|
+
{ stage: 'no-tip', breath: false, gap: true, rows: core + HERO_TO_CARD_GAP_TIGHT + gapRows + HINTS_ROWS },
|
|
127
|
+
{ stage: 'no-tip', breath: true, gap: false, rows: core + HERO_TO_CARD_GAP + HINTS_ROWS },
|
|
128
|
+
{ stage: 'no-tip', breath: false, gap: false, rows: core + HERO_TO_CARD_GAP_TIGHT + HINTS_ROWS },
|
|
129
|
+
{ stage: 'no-hints', breath: false, gap: false, rows: core + HERO_TO_CARD_GAP_TIGHT },
|
|
130
|
+
{ stage: 'no-art', breath: false, gap: false, rows: core + HERO_TO_CARD_GAP_TIGHT - withArt },
|
|
131
|
+
{ stage: 'input-only', breath: false, gap: false, rows: core + HERO_TO_CARD_GAP_TIGHT - withArt },
|
|
132
|
+
];
|
|
133
|
+
// 默认落到最省的那一档:终端矮到连它都放不下时,宁可溢出也不把输入框藏起来
|
|
134
|
+
// ——这一屏存在的理由就是能敲进去第一句。
|
|
135
|
+
let stage = 'input-only';
|
|
136
|
+
let keepGap = false;
|
|
137
|
+
let keepBreath = false;
|
|
138
|
+
for (const candidate of stages) {
|
|
139
|
+
if (candidate.rows <= rows) {
|
|
140
|
+
stage = candidate.stage;
|
|
141
|
+
keepGap = candidate.gap;
|
|
142
|
+
keepBreath = candidate.breath;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const dropArt = (stage === 'no-art' || stage === 'input-only') && withArt > 0;
|
|
147
|
+
const heroRowsFinal = dropArt ? titleRows : heroRows;
|
|
148
|
+
const heroBlockFinal = showHero ? heroRowsFinal + HERO_TOP_MARGIN : 0;
|
|
149
|
+
const showHints = stage === 'full' || stage === 'no-tip';
|
|
150
|
+
const showTip = stage === 'full';
|
|
151
|
+
// 留白只画在「参数行 ↔ 入口行」之间:两行都在且这一档保住了留白才算数。
|
|
152
|
+
const hintsGapRows = showHints && keepGap ? gapRows : 0;
|
|
153
|
+
// 两处呼吸(词标↔输入框、入口行↔Tips):默认 2 行,矮屏先撤回紧档 1 行。
|
|
154
|
+
const heroGapRows = keepBreath ? HERO_TO_CARD_GAP : HERO_TO_CARD_GAP_TIGHT;
|
|
155
|
+
const tipGapRows = keepBreath ? TIP_BLOCK_ROWS - 1 : TIP_BLOCK_ROWS_TIGHT - 1;
|
|
156
|
+
const total = (showTip ? 1 + tipGapRows : 0) + hintsGapRows + (showHints ? HINTS_ROWS : 0) + heroBlockFinal
|
|
157
|
+
+ heroGapRows + cardRows + paramRows + CORNERS_BLOCK_ROWS;
|
|
158
|
+
return {
|
|
159
|
+
stage,
|
|
160
|
+
// dropArt 只撤立绘——`heroRowsFinal`/`totalRows` 都按「撤立绘、留大字」算,
|
|
161
|
+
// 这里跟着把大字也杀掉会让字段自相矛盾(测试代理实测抓到)。
|
|
162
|
+
showWhale: showWhale && !dropArt,
|
|
163
|
+
showBigTitle,
|
|
164
|
+
showPlainTitle: showBigTitle ? false : showPlainTitle || dropArt,
|
|
165
|
+
showHero,
|
|
166
|
+
showHints,
|
|
167
|
+
showTip,
|
|
168
|
+
hintsGapRows,
|
|
169
|
+
heroGapRows,
|
|
170
|
+
tipGapRows,
|
|
171
|
+
showCorners: true,
|
|
172
|
+
cardRows,
|
|
173
|
+
heroRows: heroRowsFinal,
|
|
174
|
+
totalRows: total,
|
|
175
|
+
};
|
|
176
|
+
}
|