@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
|
@@ -465,18 +465,43 @@ export declare function blitRegion(dst: Screen, src: Screen, regionX: number, re
|
|
|
465
465
|
* @param regionHeight - the region height in rows.
|
|
466
466
|
*/
|
|
467
467
|
export declare function clearRegion(screen: Screen, regionX: number, regionY: number, regionWidth: number, regionHeight: number): void;
|
|
468
|
+
/**
|
|
469
|
+
* Count the DISTINCT columns outside [x1, x2) that hold any non-empty cell
|
|
470
|
+
* in rows [top, bottom] — the "flank" a full-width row shift would displace.
|
|
471
|
+
* The DECSTBM scroll fast path uses this to decide whether the hardware
|
|
472
|
+
* scroll is worth the diff repair it forces on those columns (blank page
|
|
473
|
+
* margins and the 1-2 column gutter rail are cheap; a whole sibling column
|
|
474
|
+
* is not). Short-circuits per column on the first painted cell.
|
|
475
|
+
* @param screen - the screen to inspect.
|
|
476
|
+
* @param top - the first row (inclusive).
|
|
477
|
+
* @param bottom - the last row (inclusive).
|
|
478
|
+
* @param x1 - the start (inclusive) of the excluded column range.
|
|
479
|
+
* @param x2 - the end (exclusive) of the excluded column range.
|
|
480
|
+
*/
|
|
481
|
+
export declare function countPaintedFlankColumns(screen: Screen, top: number, bottom: number, x1: number, x2: number): number;
|
|
468
482
|
/**
|
|
469
483
|
* Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n.
|
|
470
484
|
* n > 0 shifts UP (simulating CSI n S); n < 0 shifts DOWN (CSI n T).
|
|
471
485
|
* Vacated rows are cleared. Does NOT update damage. Both cells and the
|
|
472
486
|
* noSelect bitmap are shifted so text-selection markers stay aligned when
|
|
473
487
|
* this is applied to next.screen during scroll fast path.
|
|
488
|
+
*
|
|
489
|
+
* With columnX/columnWidth the shift applies only to that column slice of
|
|
490
|
+
* each row (the DECSTBM fast path for a scroll container narrower than the
|
|
491
|
+
* screen: the terminal's hardware scroll moves WHOLE rows, so the previous
|
|
492
|
+
* frame is simulated full-width by the caller, while this model-side shift
|
|
493
|
+
* keeps the columns outside the box at their correct places — the frame
|
|
494
|
+
* diff then repairs them on the terminal). A column-scoped shift leaves the
|
|
495
|
+
* per-row softWrap flags alone: they describe the whole row and the flanks'
|
|
496
|
+
* wrap state is still live.
|
|
474
497
|
* @param screen - the screen to shift.
|
|
475
498
|
* @param top - the first row of the shifted range (inclusive).
|
|
476
499
|
* @param bottom - the last row of the shifted range (inclusive).
|
|
477
500
|
* @param n - the shift in rows; positive shifts up, negative shifts down.
|
|
501
|
+
* @param columnX - optional start column (inclusive) of a column-scoped shift.
|
|
502
|
+
* @param columnWidth - optional width of the column-scoped slice.
|
|
478
503
|
*/
|
|
479
|
-
export declare function shiftRows(screen: Screen, top: number, bottom: number, n: number): void;
|
|
504
|
+
export declare function shiftRows(screen: Screen, top: number, bottom: number, n: number, columnX?: number, columnWidth?: number): void;
|
|
480
505
|
/**
|
|
481
506
|
* The OSC 8 hyperlink escape prefix (`ESC ] 8 ;`) used for cheap pre-checks
|
|
482
507
|
* before running the full OSC 8 regex.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/ink/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,IAAI,EAEV,MAAM,sBAAsB,CAAA;AAM7B;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,SAAS,CAGf;IACF,OAAO,CAAC,KAAK,CAA8B;IAE3C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAqB5B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG3B;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,SAAS,CAA4B;IAE7C;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAW7C;;;;OAIG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAGpC;AA4BD,yCAAyC;AACzC,MAAM,MAAM,GAAG,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC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AAI,MAAM,CAI7C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,IAAI,CAUN;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAI/F;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAWnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CASN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CAyBN"}
|
package/lib/types/ink/screen.js
CHANGED
|
@@ -1231,21 +1231,116 @@ export function clearRegion(screen, regionX, regionY, regionWidth, regionHeight)
|
|
|
1231
1231
|
screen.damage = regionRect;
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Count the DISTINCT columns outside [x1, x2) that hold any non-empty cell
|
|
1236
|
+
* in rows [top, bottom] — the "flank" a full-width row shift would displace.
|
|
1237
|
+
* The DECSTBM scroll fast path uses this to decide whether the hardware
|
|
1238
|
+
* scroll is worth the diff repair it forces on those columns (blank page
|
|
1239
|
+
* margins and the 1-2 column gutter rail are cheap; a whole sibling column
|
|
1240
|
+
* is not). Short-circuits per column on the first painted cell.
|
|
1241
|
+
* @param screen - the screen to inspect.
|
|
1242
|
+
* @param top - the first row (inclusive).
|
|
1243
|
+
* @param bottom - the last row (inclusive).
|
|
1244
|
+
* @param x1 - the start (inclusive) of the excluded column range.
|
|
1245
|
+
* @param x2 - the end (exclusive) of the excluded column range.
|
|
1246
|
+
*/
|
|
1247
|
+
export function countPaintedFlankColumns(screen, top, bottom, x1, x2) {
|
|
1248
|
+
const y1 = Math.max(0, top);
|
|
1249
|
+
const y2 = Math.min(screen.height - 1, bottom);
|
|
1250
|
+
if (y2 < y1)
|
|
1251
|
+
return 0;
|
|
1252
|
+
const left = Math.max(0, x1);
|
|
1253
|
+
const right = Math.min(screen.width, x2);
|
|
1254
|
+
let count = 0;
|
|
1255
|
+
for (let x = 0; x < left; x += 1) {
|
|
1256
|
+
for (let y = y1; y <= y2; y += 1) {
|
|
1257
|
+
if (!isEmptyCellAt(screen, x, y)) {
|
|
1258
|
+
count += 1;
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
for (let x = right; x < screen.width; x += 1) {
|
|
1264
|
+
for (let y = y1; y <= y2; y += 1) {
|
|
1265
|
+
if (!isEmptyCellAt(screen, x, y)) {
|
|
1266
|
+
count += 1;
|
|
1267
|
+
break;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
return count;
|
|
1272
|
+
}
|
|
1234
1273
|
/**
|
|
1235
1274
|
* Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n.
|
|
1236
1275
|
* n > 0 shifts UP (simulating CSI n S); n < 0 shifts DOWN (CSI n T).
|
|
1237
1276
|
* Vacated rows are cleared. Does NOT update damage. Both cells and the
|
|
1238
1277
|
* noSelect bitmap are shifted so text-selection markers stay aligned when
|
|
1239
1278
|
* this is applied to next.screen during scroll fast path.
|
|
1279
|
+
*
|
|
1280
|
+
* With columnX/columnWidth the shift applies only to that column slice of
|
|
1281
|
+
* each row (the DECSTBM fast path for a scroll container narrower than the
|
|
1282
|
+
* screen: the terminal's hardware scroll moves WHOLE rows, so the previous
|
|
1283
|
+
* frame is simulated full-width by the caller, while this model-side shift
|
|
1284
|
+
* keeps the columns outside the box at their correct places — the frame
|
|
1285
|
+
* diff then repairs them on the terminal). A column-scoped shift leaves the
|
|
1286
|
+
* per-row softWrap flags alone: they describe the whole row and the flanks'
|
|
1287
|
+
* wrap state is still live.
|
|
1240
1288
|
* @param screen - the screen to shift.
|
|
1241
1289
|
* @param top - the first row of the shifted range (inclusive).
|
|
1242
1290
|
* @param bottom - the last row of the shifted range (inclusive).
|
|
1243
1291
|
* @param n - the shift in rows; positive shifts up, negative shifts down.
|
|
1292
|
+
* @param columnX - optional start column (inclusive) of a column-scoped shift.
|
|
1293
|
+
* @param columnWidth - optional width of the column-scoped slice.
|
|
1244
1294
|
*/
|
|
1245
|
-
export function shiftRows(screen, top, bottom, n) {
|
|
1295
|
+
export function shiftRows(screen, top, bottom, n, columnX, columnWidth) {
|
|
1246
1296
|
if (n === 0 || top < 0 || bottom >= screen.height || top > bottom)
|
|
1247
1297
|
return;
|
|
1248
1298
|
const w = screen.width;
|
|
1299
|
+
if (columnX !== undefined || columnWidth !== undefined) {
|
|
1300
|
+
const x1 = Math.max(0, Math.floor(columnX ?? 0));
|
|
1301
|
+
const x2 = Math.min(w, x1 + Math.floor(columnWidth ?? w));
|
|
1302
|
+
if (x2 <= x1)
|
|
1303
|
+
return;
|
|
1304
|
+
const cells64 = screen.cells64;
|
|
1305
|
+
const noSel = screen.noSelect;
|
|
1306
|
+
const copy = screen.copyRegion;
|
|
1307
|
+
const span = x2 - x1;
|
|
1308
|
+
const absN = Math.abs(n);
|
|
1309
|
+
const clearSlice = (r) => {
|
|
1310
|
+
const base = r * w + x1;
|
|
1311
|
+
cells64.fill(EMPTY_CELL_VALUE, base, base + span);
|
|
1312
|
+
noSel.fill(0, base, base + span);
|
|
1313
|
+
copy?.fill(0, base, base + span);
|
|
1314
|
+
};
|
|
1315
|
+
if (absN > bottom - top) {
|
|
1316
|
+
for (let r = top; r <= bottom; r += 1)
|
|
1317
|
+
clearSlice(r);
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (n > 0) {
|
|
1321
|
+
for (let r = top; r <= bottom - n; r += 1) {
|
|
1322
|
+
const dst = r * w + x1;
|
|
1323
|
+
const src = (r + n) * w + x1;
|
|
1324
|
+
cells64.copyWithin(dst, src, src + span);
|
|
1325
|
+
noSel.copyWithin(dst, src, src + span);
|
|
1326
|
+
copy?.copyWithin(dst, src, src + span);
|
|
1327
|
+
}
|
|
1328
|
+
for (let r = bottom - n + 1; r <= bottom; r += 1)
|
|
1329
|
+
clearSlice(r);
|
|
1330
|
+
}
|
|
1331
|
+
else {
|
|
1332
|
+
for (let r = bottom; r >= top - n; r -= 1) {
|
|
1333
|
+
const dst = r * w + x1;
|
|
1334
|
+
const src = (r + n) * w + x1;
|
|
1335
|
+
cells64.copyWithin(dst, src, src + span);
|
|
1336
|
+
noSel.copyWithin(dst, src, src + span);
|
|
1337
|
+
copy?.copyWithin(dst, src, src + span);
|
|
1338
|
+
}
|
|
1339
|
+
for (let r = top; r < top - n; r += 1)
|
|
1340
|
+
clearSlice(r);
|
|
1341
|
+
}
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1249
1344
|
const cells64 = screen.cells64;
|
|
1250
1345
|
const noSel = screen.noSelect;
|
|
1251
1346
|
const copy = screen.copyRegion;
|
|
@@ -129,6 +129,24 @@ export type SelectionState = {
|
|
|
129
129
|
* Commit-time copy (copySelectionNoClear) refuses and clears instead
|
|
130
130
|
* of shipping the replaced text. Cleared on start/clear. */
|
|
131
131
|
stale: boolean;
|
|
132
|
+
/** Direction-aware noSelect fence. True when THIS gesture anchored on a
|
|
133
|
+
* noSelect cell (e.g. a drag that starts inside the side-panel column):
|
|
134
|
+
* for that gesture only, noSelect cells participate in the highlight,
|
|
135
|
+
* word bounds, and copy text — panel text becomes selectable/copyable.
|
|
136
|
+
* Gestures anchored anywhere else keep the exclusion verbatim, so a
|
|
137
|
+
* chat-origin drag still never captures panel glyphs (design doc §4.6).
|
|
138
|
+
* Set once per gesture by startSelection from the anchor cell's bit;
|
|
139
|
+
* reset by clearSelection. */
|
|
140
|
+
includeNoSelectCells: boolean;
|
|
141
|
+
/** The column run of noSelect cells containing the anchor (same gesture
|
|
142
|
+
* class as includeNoSelectCells): the selection rectangle is clamped to
|
|
143
|
+
* it, so a panel-origin drag that moves vertically selects only the
|
|
144
|
+
* panel's columns on every covered row — the chat column on intermediate
|
|
145
|
+
* rows is never captured. Undefined for gestures without the fence. */
|
|
146
|
+
fence?: {
|
|
147
|
+
colStart: number;
|
|
148
|
+
colEnd: number;
|
|
149
|
+
};
|
|
132
150
|
};
|
|
133
151
|
/**
|
|
134
152
|
* Create a new selection state with no active selection.
|
|
@@ -142,8 +160,12 @@ export declare function createSelectionState(): SelectionState;
|
|
|
142
160
|
* @param s - the selection state to mutate.
|
|
143
161
|
* @param col - anchor column in screen-buffer coordinates.
|
|
144
162
|
* @param row - anchor row in screen-buffer coordinates.
|
|
163
|
+
* @param screen - the current frame's screen, when the caller has it: the
|
|
164
|
+
* anchor cell's noSelect bit seeds includeNoSelectCells (the direction
|
|
165
|
+
* fence — see SelectionState). Omitted by tests that drive the state
|
|
166
|
+
* directly against a hand-built screen; the flag then stays false.
|
|
145
167
|
*/
|
|
146
|
-
export declare function startSelection(s: SelectionState, col: number, row: number): void;
|
|
168
|
+
export declare function startSelection(s: SelectionState, col: number, row: number, screen?: Screen): void;
|
|
147
169
|
/**
|
|
148
170
|
* Track the drag position: update focus to (col, row). No-op while not
|
|
149
171
|
* dragging, and the first motion at the anchor cell is ignored so a bare
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/ink/selection.ts"],"names":[],"mappings":"AAAA;;;;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O,GAAG,OAAO,EACvB,eAAe,SAAI,GAClB,IAAI,CAoDN;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,SAAS,EACpB,MAAM,GAAE,SAAS,sBAAsB,EAAO,GAC7C,IAAI,CAkCN"}
|
|
@@ -28,6 +28,7 @@ export function createSelectionState() {
|
|
|
28
28
|
coveredText: null,
|
|
29
29
|
coveredGeometry: null,
|
|
30
30
|
stale: false,
|
|
31
|
+
includeNoSelectCells: false,
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
@@ -37,9 +38,41 @@ export function createSelectionState() {
|
|
|
37
38
|
* @param s - the selection state to mutate.
|
|
38
39
|
* @param col - anchor column in screen-buffer coordinates.
|
|
39
40
|
* @param row - anchor row in screen-buffer coordinates.
|
|
41
|
+
* @param screen - the current frame's screen, when the caller has it: the
|
|
42
|
+
* anchor cell's noSelect bit seeds includeNoSelectCells (the direction
|
|
43
|
+
* fence — see SelectionState). Omitted by tests that drive the state
|
|
44
|
+
* directly against a hand-built screen; the flag then stays false.
|
|
40
45
|
*/
|
|
41
|
-
export function startSelection(s, col, row) {
|
|
46
|
+
export function startSelection(s, col, row, screen) {
|
|
42
47
|
s.anchor = { col, row };
|
|
48
|
+
// Direction fence: anchoring ON a noSelect cell means this gesture is
|
|
49
|
+
// selecting inside an excluded region (the side-panel column) — its cells
|
|
50
|
+
// must participate for the drag to highlight/copy anything at all.
|
|
51
|
+
// Anchoring elsewhere keeps the exclusion (§4.6: a chat-origin drag never
|
|
52
|
+
// captures panel glyphs).
|
|
53
|
+
s.includeNoSelectCells =
|
|
54
|
+
screen !== undefined &&
|
|
55
|
+
row >= 0 &&
|
|
56
|
+
row < screen.height &&
|
|
57
|
+
col >= 0 &&
|
|
58
|
+
col < screen.width &&
|
|
59
|
+
screen.noSelect[row * screen.width + col] === 1;
|
|
60
|
+
// Column fence: the contiguous noSelect run around the anchor. Clamps the
|
|
61
|
+
// selection rectangle (see selectionBounds) so a vertical panel drag never
|
|
62
|
+
// captures the chat column on intermediate rows.
|
|
63
|
+
if (s.includeNoSelectCells && screen !== undefined) {
|
|
64
|
+
const rowOff = row * screen.width;
|
|
65
|
+
let colStart = col;
|
|
66
|
+
while (colStart > 0 && screen.noSelect[rowOff + colStart - 1] === 1)
|
|
67
|
+
colStart -= 1;
|
|
68
|
+
let colEnd = col;
|
|
69
|
+
while (colEnd + 1 < screen.width && screen.noSelect[rowOff + colEnd + 1] === 1)
|
|
70
|
+
colEnd += 1;
|
|
71
|
+
s.fence = { colStart, colEnd };
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
s.fence = undefined;
|
|
75
|
+
}
|
|
43
76
|
// Focus is not set until the first drag motion. A click-release with no
|
|
44
77
|
// drag leaves focus null → hasSelection/selectionBounds return false/null
|
|
45
78
|
// via the `!s.focus` check, so a bare click never highlights a cell.
|
|
@@ -126,6 +159,8 @@ export function clearSelection(s) {
|
|
|
126
159
|
s.coveredText = null;
|
|
127
160
|
s.coveredGeometry = null;
|
|
128
161
|
s.stale = false;
|
|
162
|
+
s.includeNoSelectCells = false;
|
|
163
|
+
s.fence = undefined;
|
|
129
164
|
}
|
|
130
165
|
// Unicode-aware word character matcher: letters (any script), digits,
|
|
131
166
|
// and the punctuation set iTerm2 treats as word-part by default.
|
|
@@ -153,7 +188,7 @@ function charClass(c) {
|
|
|
153
188
|
* null if the click is out of bounds or lands on a noSelect cell. Used by
|
|
154
189
|
* selectWordAt (initial double-click) and extendWordSelection (drag).
|
|
155
190
|
*/
|
|
156
|
-
function wordBoundsAt(screen, col, row) {
|
|
191
|
+
function wordBoundsAt(screen, col, row, includeNoSelect = false) {
|
|
157
192
|
if (row < 0 || row >= screen.height)
|
|
158
193
|
return null;
|
|
159
194
|
const width = screen.width;
|
|
@@ -167,7 +202,7 @@ function wordBoundsAt(screen, col, row) {
|
|
|
167
202
|
if (cell && cell.width === 2 /* CellWidth.SpacerTail */)
|
|
168
203
|
c -= 1;
|
|
169
204
|
}
|
|
170
|
-
if (c < 0 || c >= width || noSelect[rowOff + c] === 1)
|
|
205
|
+
if (c < 0 || c >= width || (!includeNoSelect && noSelect[rowOff + c] === 1))
|
|
171
206
|
return null;
|
|
172
207
|
const startCell = cellAt(screen, c, row);
|
|
173
208
|
if (!startCell)
|
|
@@ -179,14 +214,14 @@ function wordBoundsAt(screen, col, row) {
|
|
|
179
214
|
let lo = c;
|
|
180
215
|
while (lo > 0) {
|
|
181
216
|
const prev = lo - 1;
|
|
182
|
-
if (noSelect[rowOff + prev] === 1)
|
|
217
|
+
if (!includeNoSelect && noSelect[rowOff + prev] === 1)
|
|
183
218
|
break;
|
|
184
219
|
const pc = cellAt(screen, prev, row);
|
|
185
220
|
if (!pc)
|
|
186
221
|
break;
|
|
187
222
|
if (pc.width === 2 /* CellWidth.SpacerTail */) {
|
|
188
223
|
// Step over the spacer to the wide-char head
|
|
189
|
-
if (prev === 0 || noSelect[rowOff + prev - 1] === 1)
|
|
224
|
+
if (prev === 0 || (!includeNoSelect && noSelect[rowOff + prev - 1] === 1))
|
|
190
225
|
break;
|
|
191
226
|
const head = cellAt(screen, prev - 1, row);
|
|
192
227
|
if (!head || charClass(head.char) !== cls)
|
|
@@ -202,7 +237,7 @@ function wordBoundsAt(screen, col, row) {
|
|
|
202
237
|
let hi = c;
|
|
203
238
|
while (hi < width - 1) {
|
|
204
239
|
const next = hi + 1;
|
|
205
|
-
if (noSelect[rowOff + next] === 1)
|
|
240
|
+
if (!includeNoSelect && noSelect[rowOff + next] === 1)
|
|
206
241
|
break;
|
|
207
242
|
const nc = cellAt(screen, next, row);
|
|
208
243
|
if (!nc)
|
|
@@ -239,7 +274,7 @@ function comparePoints(a, b) {
|
|
|
239
274
|
* @param row - click row.
|
|
240
275
|
*/
|
|
241
276
|
export function selectWordAt(s, screen, col, row) {
|
|
242
|
-
const b = wordBoundsAt(screen, col, row);
|
|
277
|
+
const b = wordBoundsAt(screen, col, row, s.includeNoSelectCells);
|
|
243
278
|
if (!b)
|
|
244
279
|
return;
|
|
245
280
|
const lo = { col: b.lo, row };
|
|
@@ -401,7 +436,7 @@ export function extendSelection(s, screen, col, row) {
|
|
|
401
436
|
let mLo;
|
|
402
437
|
let mHi;
|
|
403
438
|
if (span.kind === 'word') {
|
|
404
|
-
const b = wordBoundsAt(screen, col, row);
|
|
439
|
+
const b = wordBoundsAt(screen, col, row, s.includeNoSelectCells);
|
|
405
440
|
mLo = { col: b ? b.lo : col, row };
|
|
406
441
|
mHi = { col: b ? b.hi : col, row };
|
|
407
442
|
}
|
|
@@ -902,9 +937,20 @@ export function hasSelection(s) {
|
|
|
902
937
|
export function selectionBounds(s) {
|
|
903
938
|
if (!s.anchor || !s.focus)
|
|
904
939
|
return null;
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
940
|
+
const start = comparePoints(s.anchor, s.focus) <= 0 ? s.anchor : s.focus;
|
|
941
|
+
const end = comparePoints(s.anchor, s.focus) <= 0 ? s.focus : s.anchor;
|
|
942
|
+
// Fence clamp (panel-origin gestures): restrict the rectangle to the
|
|
943
|
+
// anchor's noSelect column run on EVERY row — a vertical drag inside the
|
|
944
|
+
// side panel selects only panel columns, never the chat column that
|
|
945
|
+
// shares the intermediate rows.
|
|
946
|
+
if (s.fence !== undefined) {
|
|
947
|
+
const colStart = Math.max(start.col, s.fence.colStart);
|
|
948
|
+
const colEnd = Math.min(end.col, s.fence.colEnd);
|
|
949
|
+
if (colStart > colEnd)
|
|
950
|
+
return null;
|
|
951
|
+
return { start: { col: colStart, row: start.row }, end: { col: colEnd, row: end.row } };
|
|
952
|
+
}
|
|
953
|
+
return { start, end };
|
|
908
954
|
}
|
|
909
955
|
/**
|
|
910
956
|
* Check if a cell at (col, row) is within the current selection range.
|
|
@@ -932,7 +978,7 @@ export function isCellSelected(s, col, row) {
|
|
|
932
978
|
* clamp to that content-end column and skip the trailing trim so the
|
|
933
979
|
* word-separator space survives the join. See Screen.softWrap for why the
|
|
934
980
|
* clamp is necessary. */
|
|
935
|
-
function extractRowText(screen, row, colStart, colEnd) {
|
|
981
|
+
function extractRowText(screen, row, colStart, colEnd, includeNoSelect = false) {
|
|
936
982
|
const noSelect = screen.noSelect;
|
|
937
983
|
const copyRegion = screen.copyRegion;
|
|
938
984
|
const rowOff = row * screen.width;
|
|
@@ -942,9 +988,11 @@ function extractRowText(screen, row, colStart, colEnd) {
|
|
|
942
988
|
const regions = [];
|
|
943
989
|
let lastRegion = 0;
|
|
944
990
|
for (let col = colStart; col <= lastCol; col++) {
|
|
945
|
-
// Skip cells marked noSelect (gutters, line numbers, diff sigils)
|
|
946
|
-
//
|
|
947
|
-
|
|
991
|
+
// Skip cells marked noSelect (gutters, line numbers, diff sigils) unless
|
|
992
|
+
// this gesture anchored inside a noSelect region (the direction fence:
|
|
993
|
+
// a panel-origin drag selects panel text). Check before cellAt to avoid
|
|
994
|
+
// the decode cost for excluded cells.
|
|
995
|
+
if (!includeNoSelect && noSelect[rowOff + col] === 1)
|
|
948
996
|
continue;
|
|
949
997
|
// A copy region (a formula image) contributes one entry per run of its
|
|
950
998
|
// cells: the text it stands for, at the offset those cells occupy here.
|
|
@@ -1126,15 +1174,25 @@ export function refreshSelectionFingerprint(s, screen, coordinated) {
|
|
|
1126
1174
|
// covered row OUTSIDE the selected column range (stable head selected,
|
|
1127
1175
|
// live tail still writing) must not latch stale — the copy would not
|
|
1128
1176
|
// read those columns anyway.
|
|
1129
|
-
|
|
1130
|
-
|
|
1177
|
+
let colStart = row === b.start.row ? b.start.col : 0;
|
|
1178
|
+
let colEnd = row === b.end.row ? b.end.col : width - 1;
|
|
1179
|
+
// Mirrors getSelectedText's fence intersection (same flag, same rows):
|
|
1180
|
+
// the hash must cover exactly the cells the copy would read.
|
|
1181
|
+
if (s.fence !== undefined) {
|
|
1182
|
+
colStart = Math.max(colStart, s.fence.colStart);
|
|
1183
|
+
colEnd = Math.min(colEnd, s.fence.colEnd);
|
|
1184
|
+
if (colStart > colEnd)
|
|
1185
|
+
continue;
|
|
1186
|
+
}
|
|
1131
1187
|
for (let col = colStart; col <= colEnd; col++) {
|
|
1132
1188
|
const ci = (rowOff + col) * 2;
|
|
1133
1189
|
// word1's low 2 bits are the cell width; SpacerTail/SpacerHead carry
|
|
1134
1190
|
// no text of their own.
|
|
1135
1191
|
if ((cells[ci + 1] & 3) >= 2 /* CellWidth.SpacerTail */)
|
|
1136
1192
|
continue;
|
|
1137
|
-
|
|
1193
|
+
// Mirrors extractRowText's noSelect skip (same fence flag): the hash
|
|
1194
|
+
// must cover exactly the cells the copy would read.
|
|
1195
|
+
if (noSelect[rowOff + col] === 1 && !s.includeNoSelectCells)
|
|
1138
1196
|
continue;
|
|
1139
1197
|
// A copy region (a formula image) is content too: its cells are blank,
|
|
1140
1198
|
// so without this term a formula swapped under a stationary highlight
|
|
@@ -1246,9 +1304,17 @@ export function getSelectedText(s, screen) {
|
|
|
1246
1304
|
rows.push(s.scrolledOffAbove[i]);
|
|
1247
1305
|
}
|
|
1248
1306
|
for (let row = start.row; row <= end.row; row++) {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1307
|
+
let rowStart = row === start.row ? start.col : 0;
|
|
1308
|
+
let rowEnd = row === end.row ? end.col : screen.width - 1;
|
|
1309
|
+
// Fence (panel-origin gestures) applies to EVERY row, not just the
|
|
1310
|
+
// endpoints: intermediate rows must not span into the chat column.
|
|
1311
|
+
if (s.fence !== undefined) {
|
|
1312
|
+
rowStart = Math.max(rowStart, s.fence.colStart);
|
|
1313
|
+
rowEnd = Math.min(rowEnd, s.fence.colEnd);
|
|
1314
|
+
if (rowStart > rowEnd)
|
|
1315
|
+
continue;
|
|
1316
|
+
}
|
|
1317
|
+
rows.push(extractRowText(screen, row, rowStart, rowEnd, s.includeNoSelectCells));
|
|
1252
1318
|
}
|
|
1253
1319
|
for (let i = 0; i < s.scrolledOffBelow.length; i++) {
|
|
1254
1320
|
rows.push(s.scrolledOffBelow[i]);
|
|
@@ -1295,7 +1361,7 @@ export function captureScrolledRows(s, screen, firstRow, lastRow, side, screenRo
|
|
|
1295
1361
|
const colStart = row === start.row ? start.col : 0;
|
|
1296
1362
|
const colEnd = row === end.row ? end.col : width - 1;
|
|
1297
1363
|
const screenRow = row - screenRowOffset;
|
|
1298
|
-
captured.push(extractRowText(screen, screenRow, colStart, colEnd));
|
|
1364
|
+
captured.push(extractRowText(screen, screenRow, colStart, colEnd, s.includeNoSelectCells));
|
|
1299
1365
|
}
|
|
1300
1366
|
if (side === 'above') {
|
|
1301
1367
|
// Newest rows go at the bottom of the above-accumulator (closest to
|
|
@@ -1360,15 +1426,25 @@ export function applySelectionOverlay(screen, selection, stylePool, images = [])
|
|
|
1360
1426
|
const noSelect = screen.noSelect;
|
|
1361
1427
|
const covered = imageCoveredCells(images, width, screen.height);
|
|
1362
1428
|
for (let row = start.row; row <= end.row && row < screen.height; row++) {
|
|
1363
|
-
|
|
1364
|
-
|
|
1429
|
+
let colStart = row === start.row ? start.col : 0;
|
|
1430
|
+
let colEnd = row === end.row ? Math.min(end.col, width - 1) : width - 1;
|
|
1431
|
+
// Fence (panel-origin gestures) clips every row to the anchor's noSelect
|
|
1432
|
+
// column run — intermediate rows never highlight the chat column.
|
|
1433
|
+
if (selection.fence !== undefined) {
|
|
1434
|
+
colStart = Math.max(colStart, selection.fence.colStart);
|
|
1435
|
+
colEnd = Math.min(colEnd, selection.fence.colEnd);
|
|
1436
|
+
if (colStart > colEnd)
|
|
1437
|
+
continue;
|
|
1438
|
+
}
|
|
1365
1439
|
const rowOff = row * width;
|
|
1366
1440
|
for (let col = colStart; col <= colEnd; col++) {
|
|
1367
1441
|
const idx = rowOff + col;
|
|
1368
1442
|
// Skip noSelect cells — gutters stay visually unchanged so it's
|
|
1369
1443
|
// clear they're not part of the copy. Surrounding selectable cells
|
|
1370
|
-
// still highlight so the selection extent remains visible.
|
|
1371
|
-
|
|
1444
|
+
// still highlight so the selection extent remains visible. A gesture
|
|
1445
|
+
// that ANCHORED on a noSelect cell (the direction fence) inverts this:
|
|
1446
|
+
// those cells are the selection's subject, so they must highlight.
|
|
1447
|
+
if (noSelect[idx] === 1 && !selection.includeNoSelectCells)
|
|
1372
1448
|
continue;
|
|
1373
1449
|
// Skip cells a terminal image is painted over: Kitty draws images
|
|
1374
1450
|
// below cells with a non-default background, so a highlighted cell
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { TerminalImageSource } from './terminal-image.js';
|
|
2
|
+
/**
|
|
3
|
+
* Paint decision for one transparent-raster pixel: 0.25·255 = 63.75 keeps the
|
|
4
|
+
* historical "below 25% never paints" bias, 160 (= 62.5%·255 + 1) makes
|
|
5
|
+
* everything above the band solid (≥75% always paints by contract), and the
|
|
6
|
+
* band between resolves by position so constant mid coverage alternates in a
|
|
7
|
+
* checkerboard. Exported for the mask regression (gradient/const fills).
|
|
8
|
+
*/
|
|
9
|
+
export declare function sixelCoveragePaints(alpha: number, x: number, y: number): boolean;
|
|
10
|
+
/** The pre-dither decision (single 25% threshold), kept for the mask
|
|
11
|
+
* regression's before/after comparison. */
|
|
12
|
+
export declare function sixelCoveragePaintsThreshold(alpha: number): boolean;
|
|
2
13
|
export interface SixelCrop {
|
|
3
14
|
readonly left: number;
|
|
4
15
|
readonly top: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixel-codec.d.ts","sourceRoot":"","sources":["../../../src/ink/sixel-codec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"sixel-codec.d.ts","sourceRoot":"","sources":["../../../src/ink/sixel-codec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAmB9D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAA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CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,8EAA8E;AAC9E,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAEnF;AAkGD,qFAAqF;AACrF,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,KAAK,CAAI;IAEX,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAoBtF"}
|
|
@@ -3,12 +3,39 @@ import { loadSharp } from '../dsh-adapter/sharp.js';
|
|
|
3
3
|
import { isTerminalImageSource, TERMINAL_IMAGE_MAX_EDGE, TERMINAL_IMAGE_MAX_BYTES, TERMINAL_IMAGE_PREVIEW_MAX_EDGE, TERMINAL_IMAGE_PREVIEW_MAX_BYTES, SIXEL_MAX_ENCODED_BYTES, SIXEL_CACHE_BYTES, SIXEL_CACHE_ENTRIES } from './terminal-image.js';
|
|
4
4
|
/**
|
|
5
5
|
* Coverage a transparent raster needs before a pixel is painted. Sixel alpha
|
|
6
|
-
* is binary
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* is binary, so this encoder promotes coverage to a hard mask — with an
|
|
7
|
+
* ordered dither for the intermediate band: coverage below 25% never paints,
|
|
8
|
+
* 62.5%+ always paints, and the band between checkers over a 2×2 Bayer matrix
|
|
9
|
+
* so the eye averages it into apparent translucency (soft anti-aliased edges
|
|
10
|
+
* instead of a hard 25% cutoff). Pure 1-bit sources (alpha only 0/255) get
|
|
11
|
+
* exactly the old single-threshold mask: 255 always painted, 0 never did.
|
|
10
12
|
*/
|
|
11
13
|
const TRANSPARENT_COVERAGE_THRESHOLD = 64;
|
|
14
|
+
/** 2×2 Bayer matrix (values 0..3) for ordered dithering of the coverage band. */
|
|
15
|
+
const BAYER_2X2 = [[0, 2], [3, 1]];
|
|
16
|
+
/** Dither band: thresholds 25% / 37.5% / 50% / 62.5% at the four matrix cells. */
|
|
17
|
+
const DITHER_BASE = 0.25;
|
|
18
|
+
const DITHER_STEP = 0.125;
|
|
19
|
+
/**
|
|
20
|
+
* Paint decision for one transparent-raster pixel: 0.25·255 = 63.75 keeps the
|
|
21
|
+
* historical "below 25% never paints" bias, 160 (= 62.5%·255 + 1) makes
|
|
22
|
+
* everything above the band solid (≥75% always paints by contract), and the
|
|
23
|
+
* band between resolves by position so constant mid coverage alternates in a
|
|
24
|
+
* checkerboard. Exported for the mask regression (gradient/const fills).
|
|
25
|
+
*/
|
|
26
|
+
export function sixelCoveragePaints(alpha, x, y) {
|
|
27
|
+
if (alpha >= 160)
|
|
28
|
+
return true;
|
|
29
|
+
if (alpha < TRANSPARENT_COVERAGE_THRESHOLD)
|
|
30
|
+
return false;
|
|
31
|
+
const bayer = BAYER_2X2[y & 1][x & 1];
|
|
32
|
+
return alpha > (DITHER_BASE + bayer * DITHER_STEP) * 255;
|
|
33
|
+
}
|
|
34
|
+
/** The pre-dither decision (single 25% threshold), kept for the mask
|
|
35
|
+
* regression's before/after comparison. */
|
|
36
|
+
export function sixelCoveragePaintsThreshold(alpha) {
|
|
37
|
+
return alpha >= TRANSPARENT_COVERAGE_THRESHOLD;
|
|
38
|
+
}
|
|
12
39
|
/** CPU-heavy work: called in the image worker, never in the frame painter. */
|
|
13
40
|
export async function encodeSixel(request) {
|
|
14
41
|
return encodeRegion(await prepareSixel(request), request.crop);
|
|
@@ -63,10 +90,17 @@ async function prepareSixel(request) {
|
|
|
63
90
|
if (data.byteLength !== width * height * 4)
|
|
64
91
|
throw new Error('Invalid quantized raster size');
|
|
65
92
|
if (transparent) {
|
|
66
|
-
// Binary ink
|
|
67
|
-
// transparent,
|
|
68
|
-
|
|
69
|
-
|
|
93
|
+
// Binary ink with an ordered-dithered coverage band (see
|
|
94
|
+
// sixelCoveragePaints): <25% transparent, ≥62.5% solid, in between by
|
|
95
|
+
// 2×2 Bayer position. Only sources that actually carry intermediate
|
|
96
|
+
// alpha change their mask; pure 0/255 rasters are byte-identical to the
|
|
97
|
+
// old single-threshold promotion.
|
|
98
|
+
let index = 3;
|
|
99
|
+
for (let y = 0; y < height; y += 1) {
|
|
100
|
+
for (let x = 0; x < width; x += 1) {
|
|
101
|
+
data[index] = sixelCoveragePaints(data[index], x, y) ? 255 : 0;
|
|
102
|
+
index += 4;
|
|
103
|
+
}
|
|
70
104
|
}
|
|
71
105
|
}
|
|
72
106
|
const palette = new Set();
|
|
@@ -47,6 +47,8 @@ export declare const mathRenderStats: {
|
|
|
47
47
|
rasterHits: number;
|
|
48
48
|
rasterMisses: number;
|
|
49
49
|
};
|
|
50
|
+
/** Formula renders still running (tests wait for 0 before reading the screen). */
|
|
51
|
+
export declare function mathRendersInFlight(): number;
|
|
50
52
|
/**
|
|
51
53
|
* The settled result for this request if one is cached, without rendering.
|
|
52
54
|
* Lets a remounted view (scrolled back into the viewport) paint its image on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/math/renderer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAGjC,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,OAAO,CAAA;AASrC,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,gBAAgB,GAChB,WAAW,GACX,oBAAoB,GACpB,WAAW,GACX,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAA;AAEzB,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,uDAAuD;IACvD,QAAQ,CAAC,KAAK,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