@deepseek-harness-tui/dsh-tui 0.11.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -8
- package/assets/deepy/README.md +60 -0
- package/assets/deepy/frames.json +1 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whaleGirl/README.md +7 -0
- package/assets/whaleGirl/frames.json +1 -0
- package/assets/whaleGirl/img/building/00.png +0 -0
- package/assets/whaleGirl/img/building/01.png +0 -0
- package/assets/whaleGirl/img/building/02.png +0 -0
- package/assets/whaleGirl/img/building/03.png +0 -0
- package/assets/whaleGirl/img/building/04.png +0 -0
- package/assets/whaleGirl/img/building/05.png +0 -0
- package/assets/whaleGirl/img/building/06.png +0 -0
- package/assets/whaleGirl/img/building/07.png +0 -0
- package/assets/whaleGirl/img/building/08.png +0 -0
- package/assets/whaleGirl/img/building/09.png +0 -0
- package/assets/whaleGirl/img/building/10.png +0 -0
- package/assets/whaleGirl/img/building/11.png +0 -0
- package/assets/whaleGirl/img/building/12.png +0 -0
- package/assets/whaleGirl/img/building/13.png +0 -0
- package/assets/whaleGirl/img/building/14.png +0 -0
- package/assets/whaleGirl/img/building/15.png +0 -0
- package/assets/whaleGirl/img/building/16.png +0 -0
- package/assets/whaleGirl/img/building/17.png +0 -0
- package/assets/whaleGirl/img/building/18.png +0 -0
- package/assets/whaleGirl/img/building/19.png +0 -0
- package/assets/whaleGirl/img/building/20.png +0 -0
- package/assets/whaleGirl/img/building/21.png +0 -0
- package/assets/whaleGirl/img/building/22.png +0 -0
- package/assets/whaleGirl/img/building/23.png +0 -0
- package/assets/whaleGirl/img/carrying/00.png +0 -0
- package/assets/whaleGirl/img/carrying/01.png +0 -0
- package/assets/whaleGirl/img/carrying/02.png +0 -0
- package/assets/whaleGirl/img/carrying/03.png +0 -0
- package/assets/whaleGirl/img/carrying/04.png +0 -0
- package/assets/whaleGirl/img/carrying/05.png +0 -0
- package/assets/whaleGirl/img/carrying/06.png +0 -0
- package/assets/whaleGirl/img/carrying/07.png +0 -0
- package/assets/whaleGirl/img/compacting/00.png +0 -0
- package/assets/whaleGirl/img/compacting/01.png +0 -0
- package/assets/whaleGirl/img/compacting/02.png +0 -0
- package/assets/whaleGirl/img/compacting/03.png +0 -0
- package/assets/whaleGirl/img/compacting/04.png +0 -0
- package/assets/whaleGirl/img/compacting/05.png +0 -0
- package/assets/whaleGirl/img/compacting/06.png +0 -0
- package/assets/whaleGirl/img/compacting/07.png +0 -0
- package/assets/whaleGirl/img/compacting/08.png +0 -0
- package/assets/whaleGirl/img/compacting/09.png +0 -0
- package/assets/whaleGirl/img/conducting/00.png +0 -0
- package/assets/whaleGirl/img/conducting/01.png +0 -0
- package/assets/whaleGirl/img/conducting/02.png +0 -0
- package/assets/whaleGirl/img/conducting/03.png +0 -0
- package/assets/whaleGirl/img/conducting/04.png +0 -0
- package/assets/whaleGirl/img/conducting/05.png +0 -0
- package/assets/whaleGirl/img/conducting/06.png +0 -0
- package/assets/whaleGirl/img/conducting/07.png +0 -0
- package/assets/whaleGirl/img/conducting/08.png +0 -0
- package/assets/whaleGirl/img/conducting/09.png +0 -0
- package/assets/whaleGirl/img/conducting/10.png +0 -0
- package/assets/whaleGirl/img/conducting/11.png +0 -0
- package/assets/whaleGirl/img/drag/00.png +0 -0
- package/assets/whaleGirl/img/drag/01.png +0 -0
- package/assets/whaleGirl/img/drag/02.png +0 -0
- package/assets/whaleGirl/img/drag/03.png +0 -0
- package/assets/whaleGirl/img/drag/04.png +0 -0
- package/assets/whaleGirl/img/drag/05.png +0 -0
- package/assets/whaleGirl/img/drag/06.png +0 -0
- package/assets/whaleGirl/img/drag/07.png +0 -0
- package/assets/whaleGirl/img/drag/08.png +0 -0
- package/assets/whaleGirl/img/drag/09.png +0 -0
- package/assets/whaleGirl/img/error/00.png +0 -0
- package/assets/whaleGirl/img/error/01.png +0 -0
- package/assets/whaleGirl/img/error/02.png +0 -0
- package/assets/whaleGirl/img/error/03.png +0 -0
- package/assets/whaleGirl/img/error/04.png +0 -0
- package/assets/whaleGirl/img/error/05.png +0 -0
- package/assets/whaleGirl/img/error/06.png +0 -0
- package/assets/whaleGirl/img/error/07.png +0 -0
- package/assets/whaleGirl/img/error/08.png +0 -0
- package/assets/whaleGirl/img/error/09.png +0 -0
- package/assets/whaleGirl/img/happy/00.png +0 -0
- package/assets/whaleGirl/img/happy/01.png +0 -0
- package/assets/whaleGirl/img/happy/02.png +0 -0
- package/assets/whaleGirl/img/happy/03.png +0 -0
- package/assets/whaleGirl/img/happy/04.png +0 -0
- package/assets/whaleGirl/img/happy/05.png +0 -0
- package/assets/whaleGirl/img/happy/06.png +0 -0
- package/assets/whaleGirl/img/happy/07.png +0 -0
- package/assets/whaleGirl/img/happy/08.png +0 -0
- package/assets/whaleGirl/img/happy/09.png +0 -0
- package/assets/whaleGirl/img/happy/10.png +0 -0
- package/assets/whaleGirl/img/idle/00.png +0 -0
- package/assets/whaleGirl/img/idle/01.png +0 -0
- package/assets/whaleGirl/img/idle/02.png +0 -0
- package/assets/whaleGirl/img/idle/03.png +0 -0
- package/assets/whaleGirl/img/idle/04.png +0 -0
- package/assets/whaleGirl/img/idle/05.png +0 -0
- package/assets/whaleGirl/img/idle/06.png +0 -0
- package/assets/whaleGirl/img/idle/07.png +0 -0
- package/assets/whaleGirl/img/idle/08.png +0 -0
- package/assets/whaleGirl/img/idle/09.png +0 -0
- package/assets/whaleGirl/img/idle/10.png +0 -0
- package/assets/whaleGirl/img/idle/11.png +0 -0
- package/assets/whaleGirl/img/idle/12.png +0 -0
- package/assets/whaleGirl/img/idle/13.png +0 -0
- package/assets/whaleGirl/img/idle/14.png +0 -0
- package/assets/whaleGirl/img/idle/15.png +0 -0
- package/assets/whaleGirl/img/idle/16.png +0 -0
- package/assets/whaleGirl/img/idle/17.png +0 -0
- package/assets/whaleGirl/img/idle/18.png +0 -0
- package/assets/whaleGirl/img/idle/19.png +0 -0
- package/assets/whaleGirl/img/idle/20.png +0 -0
- package/assets/whaleGirl/img/idle-look/00.png +0 -0
- package/assets/whaleGirl/img/idle-look/01.png +0 -0
- package/assets/whaleGirl/img/idle-look/02.png +0 -0
- package/assets/whaleGirl/img/idle-look/03.png +0 -0
- package/assets/whaleGirl/img/idle-look/04.png +0 -0
- package/assets/whaleGirl/img/idle-look/05.png +0 -0
- package/assets/whaleGirl/img/idle-look/06.png +0 -0
- package/assets/whaleGirl/img/idle-look/07.png +0 -0
- package/assets/whaleGirl/img/idle-look/08.png +0 -0
- package/assets/whaleGirl/img/idle-look/09.png +0 -0
- package/assets/whaleGirl/img/idle-look/10.png +0 -0
- package/assets/whaleGirl/img/idle-look/11.png +0 -0
- package/assets/whaleGirl/img/idle-look/12.png +0 -0
- package/assets/whaleGirl/img/idle-spout/00.png +0 -0
- package/assets/whaleGirl/img/idle-spout/01.png +0 -0
- package/assets/whaleGirl/img/idle-spout/02.png +0 -0
- package/assets/whaleGirl/img/idle-spout/03.png +0 -0
- package/assets/whaleGirl/img/idle-spout/04.png +0 -0
- package/assets/whaleGirl/img/idle-spout/05.png +0 -0
- package/assets/whaleGirl/img/idle-spout/06.png +0 -0
- package/assets/whaleGirl/img/idle-spout/07.png +0 -0
- package/assets/whaleGirl/img/idle-spout/08.png +0 -0
- package/assets/whaleGirl/img/idle-spout/09.png +0 -0
- package/assets/whaleGirl/img/idle-spout/10.png +0 -0
- package/assets/whaleGirl/img/music/00.png +0 -0
- package/assets/whaleGirl/img/music/01.png +0 -0
- package/assets/whaleGirl/img/music/02.png +0 -0
- package/assets/whaleGirl/img/music/03.png +0 -0
- package/assets/whaleGirl/img/music/04.png +0 -0
- package/assets/whaleGirl/img/music/05.png +0 -0
- package/assets/whaleGirl/img/music/06.png +0 -0
- package/assets/whaleGirl/img/music/07.png +0 -0
- package/assets/whaleGirl/img/notification/00.png +0 -0
- package/assets/whaleGirl/img/notification/01.png +0 -0
- package/assets/whaleGirl/img/notification/02.png +0 -0
- package/assets/whaleGirl/img/notification/03.png +0 -0
- package/assets/whaleGirl/img/notification/04.png +0 -0
- package/assets/whaleGirl/img/notification/05.png +0 -0
- package/assets/whaleGirl/img/notification/06.png +0 -0
- package/assets/whaleGirl/img/notification/07.png +0 -0
- package/assets/whaleGirl/img/poke-left/00.png +0 -0
- package/assets/whaleGirl/img/poke-left/01.png +0 -0
- package/assets/whaleGirl/img/poke-left/02.png +0 -0
- package/assets/whaleGirl/img/poke-left/03.png +0 -0
- package/assets/whaleGirl/img/poke-left/04.png +0 -0
- package/assets/whaleGirl/img/poke-left/05.png +0 -0
- package/assets/whaleGirl/img/poke-left/06.png +0 -0
- package/assets/whaleGirl/img/poke-left/07.png +0 -0
- package/assets/whaleGirl/img/poke-left/08.png +0 -0
- package/assets/whaleGirl/img/poke-left/09.png +0 -0
- package/assets/whaleGirl/img/poke-left/10.png +0 -0
- package/assets/whaleGirl/img/poke-right/00.png +0 -0
- package/assets/whaleGirl/img/poke-right/01.png +0 -0
- package/assets/whaleGirl/img/poke-right/02.png +0 -0
- package/assets/whaleGirl/img/poke-right/03.png +0 -0
- package/assets/whaleGirl/img/poke-right/04.png +0 -0
- package/assets/whaleGirl/img/poke-right/05.png +0 -0
- package/assets/whaleGirl/img/poke-right/06.png +0 -0
- package/assets/whaleGirl/img/poke-right/07.png +0 -0
- package/assets/whaleGirl/img/poke-right/08.png +0 -0
- package/assets/whaleGirl/img/poke-right/09.png +0 -0
- package/assets/whaleGirl/img/poke-right/10.png +0 -0
- package/assets/whaleGirl/img/sleeping/00.png +0 -0
- package/assets/whaleGirl/img/sleeping/01.png +0 -0
- package/assets/whaleGirl/img/sleeping/02.png +0 -0
- package/assets/whaleGirl/img/sleeping/03.png +0 -0
- package/assets/whaleGirl/img/sleeping/04.png +0 -0
- package/assets/whaleGirl/img/sleeping/05.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/00.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/01.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/02.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/03.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/04.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/05.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/06.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/07.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/08.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/09.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/10.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/11.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/12.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/13.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/14.png +0 -0
- package/assets/whaleGirl/img/smile-hearts/15.png +0 -0
- package/assets/whaleGirl/img/swim/00.png +0 -0
- package/assets/whaleGirl/img/swim/01.png +0 -0
- package/assets/whaleGirl/img/swim/02.png +0 -0
- package/assets/whaleGirl/img/swim/03.png +0 -0
- package/assets/whaleGirl/img/swim/04.png +0 -0
- package/assets/whaleGirl/img/swim/05.png +0 -0
- package/assets/whaleGirl/img/swim/06.png +0 -0
- package/assets/whaleGirl/img/swim/07.png +0 -0
- package/assets/whaleGirl/img/thinking/00.png +0 -0
- package/assets/whaleGirl/img/thinking/01.png +0 -0
- package/assets/whaleGirl/img/thinking/02.png +0 -0
- package/assets/whaleGirl/img/thinking/03.png +0 -0
- package/assets/whaleGirl/img/thinking/04.png +0 -0
- package/assets/whaleGirl/img/thinking/05.png +0 -0
- package/assets/whaleGirl/img/thinking/06.png +0 -0
- package/assets/whaleGirl/img/thinking/07.png +0 -0
- package/assets/whaleGirl/img/thinking/08.png +0 -0
- package/assets/whaleGirl/img/thinking/09.png +0 -0
- package/assets/whaleGirl/img/thinking/10.png +0 -0
- package/assets/whaleGirl/img/thinking/11.png +0 -0
- package/assets/whaleGirl/img/thinking/12.png +0 -0
- package/assets/whaleGirl/img/thinking/13.png +0 -0
- package/assets/whaleGirl/img/thinking/14.png +0 -0
- package/assets/whaleGirl/img/thinking/15.png +0 -0
- package/assets/whaleGirl/img/thinking/16.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/00.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/01.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/02.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/03.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/04.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/05.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/06.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/07.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/08.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/09.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/10.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/11.png +0 -0
- package/assets/whaleGirl/img/thumbs-up/12.png +0 -0
- package/assets/whaleGirl/img/tickle/00.png +0 -0
- package/assets/whaleGirl/img/tickle/01.png +0 -0
- package/assets/whaleGirl/img/tickle/02.png +0 -0
- package/assets/whaleGirl/img/tickle/03.png +0 -0
- package/assets/whaleGirl/img/tickle/04.png +0 -0
- package/assets/whaleGirl/img/tickle/05.png +0 -0
- package/assets/whaleGirl/img/tickle/06.png +0 -0
- package/assets/whaleGirl/img/tickle/07.png +0 -0
- package/assets/whaleGirl/img/tickle/08.png +0 -0
- package/assets/whaleGirl/img/tickle/09.png +0 -0
- package/assets/whaleGirl/img/tickle/10.png +0 -0
- package/assets/whaleGirl/img/tickle/11.png +0 -0
- package/assets/whaleGirl/img/tickle/12.png +0 -0
- package/assets/whaleGirl/img/tickle/13.png +0 -0
- package/assets/whaleGirl/img/timings.json +1 -0
- package/assets/whaleGirl/img/typing/00.png +0 -0
- package/assets/whaleGirl/img/typing/01.png +0 -0
- package/assets/whaleGirl/img/typing/02.png +0 -0
- package/assets/whaleGirl/img/typing/03.png +0 -0
- package/assets/whaleGirl/img/typing/04.png +0 -0
- package/assets/whaleGirl/img/typing/05.png +0 -0
- package/assets/whaleGirl/img/typing/06.png +0 -0
- package/assets/whaleGirl/img/typing/07.png +0 -0
- package/assets/whaleGirl/img/typing/08.png +0 -0
- package/assets/whaleGirl/img/typing/09.png +0 -0
- package/assets/whaleGirl/img/typing/10.png +0 -0
- package/assets/whaleGirl/img/typing/11.png +0 -0
- package/assets/whaleGirl/img/typing/12.png +0 -0
- package/assets/whaleGirl/img/typing/13.png +0 -0
- package/assets/whaleGirl/img/waking/00.png +0 -0
- package/assets/whaleGirl/img/waking/01.png +0 -0
- package/assets/whaleGirl/img/waking/02.png +0 -0
- package/assets/whaleGirl/img/waking/03.png +0 -0
- package/assets/whaleGirl/img/waking/04.png +0 -0
- package/assets/whaleGirl/img/waking/05.png +0 -0
- package/assets/whaleGirl/img/waking/06.png +0 -0
- package/assets/whaleGirl/img/waking/07.png +0 -0
- package/assets/whaleGirl/img/waking/08.png +0 -0
- package/assets/whaleGirl/img/waking/09.png +0 -0
- package/assets/whaleGirl/img/waking/10.png +0 -0
- package/bin/dsh-tui.js +38 -6
- package/cordis.patch.yml +31 -6
- package/guide/dsh-tui-guide/SKILL.md +37 -0
- package/guide/dsh-tui-guide/configuration.en.md +415 -0
- package/guide/dsh-tui-guide/configuration.md +354 -0
- package/guide/dsh-tui-guide/getting-started.en.md +401 -0
- package/guide/dsh-tui-guide/getting-started.md +399 -0
- package/guide/dsh-tui-guide/interaction.en.md +738 -0
- package/guide/dsh-tui-guide/interaction.md +793 -0
- package/guide/dsh-tui-guide/migrate.en.md +166 -0
- package/guide/dsh-tui-guide/migrate.md +132 -0
- package/guide/dsh-tui-guide/plugins.en.md +78 -0
- package/guide/dsh-tui-guide/plugins.md +64 -0
- package/guide/dsh-tui-guide/themes.en.md +197 -0
- package/guide/dsh-tui-guide/themes.md +188 -0
- package/guide/dsh-tui-guide/user-guide.en.md +711 -0
- package/guide/dsh-tui-guide/user-guide.md +666 -0
- package/guide/dsh-tui-guide/vscode.en.md +301 -0
- package/guide/dsh-tui-guide/vscode.md +272 -0
- package/lib/settings.json +219 -5
- package/lib/types/adapter/channel/ui-policy.d.ts +7 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +18 -1
- package/lib/types/adapter/index.d.ts +1 -1
- package/lib/types/adapter/index.js +1 -1
- package/lib/types/adapter/kernel/host-facade.d.ts +4 -1
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
- package/lib/types/adapter/kernel/host-facade.js +8 -1
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +13 -0
- package/lib/types/adapter/kernel/slices/index.d.ts +1 -0
- package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -1
- package/lib/types/adapter/kernel/slices/index.js +3 -0
- package/lib/types/adapter/kernel/slices/panels.d.ts +3 -0
- package/lib/types/adapter/kernel/slices/panels.d.ts.map +1 -0
- package/lib/types/adapter/kernel/slices/panels.js +14 -0
- package/lib/types/adapter/ports/channel-capabilities.d.ts +48 -0
- package/lib/types/adapter/ports/channel-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/ports/channel-capabilities.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +10 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +2 -1
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +91 -4
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +137 -9
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +1 -1
- package/lib/types/adapter/ports/channel.js +1 -1
- package/lib/types/adapter/ports/descriptor.d.ts +1 -1
- package/lib/types/adapter/ports/descriptor.js +1 -1
- package/lib/types/adapter/ports/index.d.ts +1 -1
- package/lib/types/adapter/ports/index.js +1 -1
- package/lib/types/adapter/ports/panels.d.ts +28 -0
- package/lib/types/adapter/ports/panels.d.ts.map +1 -0
- package/lib/types/adapter/ports/panels.js +8 -0
- package/lib/types/adapter/ports/workspace.d.ts +1 -1
- package/lib/types/adapter/ports/workspace.js +1 -1
- package/lib/types/adapter/spec/index.d.ts +2 -2
- package/lib/types/adapter/spec/index.js +2 -2
- package/lib/types/adapter/spec/profile.d.ts +6 -6
- package/lib/types/adapter/spec/profile.d.ts.map +1 -1
- package/lib/types/adapter/spec/profile.js +6 -6
- package/lib/types/adapter/spec/protocol-constants.d.ts +3 -3
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +5 -5
- package/lib/types/adapter/spec/tui-contributions.d.ts +4 -4
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +5 -5
- package/lib/types/adapter/standard/descriptor.js +1 -1
- package/lib/types/adapter/standard/index.d.ts +3 -3
- package/lib/types/adapter/standard/index.js +3 -3
- package/lib/types/adapter/standard/registry.d.ts +3 -2
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +6 -5
- package/lib/types/adapter/standard/tui-extension.d.ts +1 -1
- package/lib/types/adapter/standard/tui-extension.js +1 -1
- package/lib/types/adapter/upstream/index.d.ts +1 -0
- package/lib/types/adapter/upstream/index.d.ts.map +1 -1
- package/lib/types/adapter/upstream/index.js +1 -0
- package/lib/types/adapter/upstream/panels-driver.d.ts +18 -0
- package/lib/types/adapter/upstream/panels-driver.d.ts.map +1 -0
- package/lib/types/adapter/upstream/panels-driver.js +159 -0
- package/lib/types/api.d.ts +2 -0
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/api.js +3 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +12 -4
- package/lib/types/components/ActivityLine.d.ts +6 -9
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityLine.js +7 -8
- package/lib/types/components/Chat/JobCard.d.ts +27 -1
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +128 -33
- package/lib/types/components/Chat/JobGroupHeader.d.ts +27 -0
- package/lib/types/components/Chat/JobGroupHeader.d.ts.map +1 -0
- package/lib/types/components/Chat/JobGroupHeader.js +62 -0
- package/lib/types/components/Chat/SubagentMessage.js +6 -6
- package/lib/types/components/GoalTodoPanel.d.ts +13 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +55 -14
- package/lib/types/components/JobsPanel.d.ts +42 -2
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +220 -40
- package/lib/types/components/LogoV2.d.ts +43 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +42 -15
- package/lib/types/components/MessageList.d.ts +8 -2
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +215 -21
- package/lib/types/components/OverlayAbove.d.ts +11 -1
- package/lib/types/components/OverlayAbove.d.ts.map +1 -1
- package/lib/types/components/OverlayAbove.js +2 -12
- package/lib/types/components/PageMargin.d.ts.map +1 -1
- package/lib/types/components/PageMargin.js +3 -1
- package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
- package/lib/types/components/PluginSceneBoundary.js +1 -1
- package/lib/types/components/PresetPicker.d.ts +4 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -1
- package/lib/types/components/PresetPicker.js +5 -1
- package/lib/types/components/PromptInput.d.ts +20 -22
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +425 -157
- package/lib/types/components/SearchBox.d.ts +22 -5
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +17 -13
- package/lib/types/components/StarPrompt.d.ts +6 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +45 -0
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +24 -9
- package/lib/types/components/SubagentDashboard.d.ts +18 -3
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +53 -5
- package/lib/types/components/SubagentDetailScene.d.ts +7 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +160 -13
- package/lib/types/components/SurfaceEdges.d.ts +21 -0
- package/lib/types/components/SurfaceEdges.d.ts.map +1 -0
- package/lib/types/components/SurfaceEdges.js +7 -0
- package/lib/types/components/ThemePicker.d.ts +9 -0
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +74 -10
- package/lib/types/components/ThemePreviewPane.d.ts +26 -0
- package/lib/types/components/ThemePreviewPane.d.ts.map +1 -0
- package/lib/types/components/ThemePreviewPane.js +99 -0
- package/lib/types/components/WhaleGirl.d.ts +6 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -1
- package/lib/types/components/WhaleGirl.js +18 -0
- package/lib/types/components/design-system/Divider.d.ts.map +1 -1
- package/lib/types/components/design-system/Divider.js +14 -9
- package/lib/types/components/launchpadActions.d.ts +73 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -0
- package/lib/types/components/launchpadActions.js +111 -0
- package/lib/types/components/launchpadLayout.d.ts +62 -0
- package/lib/types/components/launchpadLayout.d.ts.map +1 -0
- package/lib/types/components/launchpadLayout.js +176 -0
- package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
- package/lib/types/components/onboardingModel.d.ts +83 -0
- package/lib/types/components/onboardingModel.d.ts.map +1 -0
- package/lib/types/components/onboardingModel.js +128 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts +17 -0
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/InfoPanel.js +124 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts +45 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelBar.js +104 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts +21 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelErrorBoundary.js +30 -0
- package/lib/types/components/sidePanel/PanelHost.d.ts +36 -0
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelHost.js +81 -0
- package/lib/types/components/sidePanel/PanelPicker.d.ts +24 -0
- package/lib/types/components/sidePanel/PanelPicker.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelPicker.js +45 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts +55 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelStore.js +109 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +31 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelColumn.js +70 -0
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +54 -0
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelLayout.js +81 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +43 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +26 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts +7 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/TrajectoryPanel.js +263 -0
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts +4 -0
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/WorkspacePanel.js +171 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts +3 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -0
- package/lib/types/components/sidePanel/builtinPanels.js +229 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +53 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +528 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +32 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/SplashMascot.js +103 -0
- package/lib/types/components/sidePanel/companion/deepy.d.ts +75 -0
- package/lib/types/components/sidePanel/companion/deepy.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/deepy.js +222 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts +176 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/mood.js +212 -0
- package/lib/types/components/sidePanel/companion/pose.d.ts +43 -0
- package/lib/types/components/sidePanel/companion/pose.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/pose.js +34 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts +102 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/skins.js +408 -0
- package/lib/types/components/sidePanel/dimensions.d.ts +60 -0
- package/lib/types/components/sidePanel/dimensions.d.ts.map +1 -0
- package/lib/types/components/sidePanel/dimensions.js +75 -0
- package/lib/types/components/sidePanel/jobsFocusStore.d.ts +21 -0
- package/lib/types/components/sidePanel/jobsFocusStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/jobsFocusStore.js +30 -0
- package/lib/types/components/sidePanel/panelBridge.d.ts +44 -0
- package/lib/types/components/sidePanel/panelBridge.d.ts.map +1 -0
- package/lib/types/components/sidePanel/panelBridge.js +55 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts +22 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.js +148 -0
- package/lib/types/components/sidePanel/types.d.ts +110 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -0
- package/lib/types/components/sidePanel/types.js +1 -0
- package/lib/types/components/sidePanel/usePanelInput.d.ts +5 -0
- package/lib/types/components/sidePanel/usePanelInput.d.ts.map +1 -0
- package/lib/types/components/sidePanel/usePanelInput.js +44 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts +47 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/useSidePanel.js +284 -0
- package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
- package/lib/types/components/trajectory/MiniWake.js +9 -3
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +3 -2
- package/lib/types/deepseekPricing.d.ts +10 -9
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +18 -11
- package/lib/types/dsh-adapter/channel/attached-context.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/attached-context.js +109 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +43 -0
- package/lib/types/dsh-adapter/channel/capabilities.d.ts +82 -0
- package/lib/types/dsh-adapter/channel/capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/capabilities.js +165 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +8 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +4 -12
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -4
- package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +13 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +18 -1
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -3
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-actions.js +55 -9
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -10
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +26 -8
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +42 -37
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +13 -4
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +1 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +21 -3
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +3 -2
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +5 -0
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +18 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +97 -2
- package/lib/types/dsh-adapter/channel.d.ts +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +72 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts +204 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
- package/lib/types/dsh-adapter/context-occupancy.js +299 -0
- package/lib/types/dsh-adapter/contract.d.ts +19 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +33 -3
- package/lib/types/dsh-adapter/index.d.ts +32 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +20 -1
- package/lib/types/dsh-adapter/jobs.d.ts +82 -16
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +104 -9
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
- package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
- package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
- package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
- package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
- package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
- package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
- package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
- package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
- package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
- package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
- package/lib/types/dsh-adapter/panel-runtime-registry.d.ts +39 -0
- package/lib/types/dsh-adapter/panel-runtime-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/panel-runtime-registry.js +84 -0
- package/lib/types/dsh-adapter/panels.d.ts +251 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -0
- package/lib/types/dsh-adapter/panels.js +407 -0
- package/lib/types/dsh-adapter/plugin-host.js +1 -1
- package/lib/types/dsh-adapter/plugin.d.ts +25 -2
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +241 -44
- package/lib/types/dsh-adapter/presets.d.ts +26 -4
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +29 -5
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +6 -2
- package/lib/types/dsh-adapter/startup-args.d.ts +8 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -0
- package/lib/types/dsh-adapter/startup-args.js +34 -0
- package/lib/types/dsh-adapter/subagents.d.ts +1 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +10 -1
- package/lib/types/history.d.ts +24 -7
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +77 -18
- package/lib/types/i18n.d.ts +908 -33
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +355 -17
- package/lib/types/ink/components/App.d.ts +14 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +71 -61
- package/lib/types/ink/components/TerminalSizeContext.d.ts +7 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.d.ts +11 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-input.js +8 -2
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-viewport.js +3 -1
- package/lib/types/ink/ink.d.ts +18 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +51 -8
- package/lib/types/ink/output.d.ts +10 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +3 -3
- package/lib/types/ink/parse-keypress.d.ts +71 -3
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +815 -133
- package/lib/types/ink/render-node-to-output.d.ts +1 -1
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +37 -5
- package/lib/types/ink/screen.d.ts +26 -1
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +96 -1
- package/lib/types/ink/selection.d.ts +23 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +102 -26
- package/lib/types/ink/sixel-codec.d.ts +11 -0
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +42 -8
- package/lib/types/ink/terminal-querier.d.ts +25 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +42 -0
- package/lib/types/ink/update-overflow-guard.d.ts +24 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +25 -3
- package/lib/types/math/renderer.d.ts +2 -0
- package/lib/types/math/renderer.d.ts.map +1 -1
- package/lib/types/math/renderer.js +4 -0
- package/lib/types/minimalUiMode.d.ts +19 -0
- package/lib/types/minimalUiMode.d.ts.map +1 -0
- package/lib/types/minimalUiMode.js +23 -0
- package/lib/types/oauth.d.ts +5 -10
- package/lib/types/oauth.d.ts.map +1 -1
- package/lib/types/oauth.js +5 -10
- package/lib/types/onboardingPrefs.d.ts +52 -0
- package/lib/types/onboardingPrefs.d.ts.map +1 -0
- package/lib/types/onboardingPrefs.js +107 -0
- package/lib/types/panels.d.ts +4 -0
- package/lib/types/panels.d.ts.map +1 -0
- package/lib/types/panels.js +4 -0
- package/lib/types/screens/Chat.d.ts +25 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1149 -302
- package/lib/types/screens/Launchpad.d.ts +194 -0
- package/lib/types/screens/Launchpad.d.ts.map +1 -0
- package/lib/types/screens/Launchpad.js +607 -0
- package/lib/types/screens/Onboarding.d.ts +37 -0
- package/lib/types/screens/Onboarding.d.ts.map +1 -0
- package/lib/types/screens/Onboarding.js +492 -0
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +18 -12
- package/lib/types/screens/StatusLine.d.ts +4 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +43 -25
- package/lib/types/screens/StatusMetrics.d.ts +22 -0
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +20 -0
- package/lib/types/screens/chatOverlay.d.ts +18 -1
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +3 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +1 -2
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +4 -2
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +7 -3
- package/lib/types/settings/definitions.d.ts +93 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +87 -4
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +13 -7
- package/lib/types/tuiDisplayPrefs.d.ts +42 -2
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +74 -0
- package/lib/types/update.d.ts +53 -9
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +103 -46
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +8 -1
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +25 -6
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +5 -1
- package/lib/types/utils/draftWordBoundary.d.ts +23 -0
- package/lib/types/utils/draftWordBoundary.d.ts.map +1 -0
- package/lib/types/utils/draftWordBoundary.js +161 -0
- package/lib/types/utils/fileTarget.d.ts.map +1 -1
- package/lib/types/utils/fileTarget.js +7 -9
- package/lib/types/utils/inputPaste.d.ts +62 -0
- package/lib/types/utils/inputPaste.d.ts.map +1 -0
- package/lib/types/utils/inputPaste.js +111 -0
- package/lib/types/utils/intl.d.ts +8 -0
- package/lib/types/utils/intl.d.ts.map +1 -1
- package/lib/types/utils/intl.js +11 -0
- package/lib/types/utils/keymap.d.ts +13 -3
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +27 -5
- package/lib/types/utils/pastedImagePath.d.ts +8 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +29 -5
- package/package.json +128 -106
- package/presets/liangshen/agent.cordis.yml +4 -1
- package/presets/liangshen/preset.yml +1 -1
- package/{dsh-ecosystem-spec → tui-profile}/registry/README.md +1 -1
- package/{dsh-ecosystem-spec → tui-profile}/registry/registry-0.15.json +1 -1
- package/lib/types/minimalMode.d.ts +0 -13
- package/lib/types/minimalMode.d.ts.map +0 -1
- package/lib/types/minimalMode.js +0 -17
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
- package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
- package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
- package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.d.ts +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.js +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/decision-events-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/scene-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/settings-section-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/tui-channel-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/workspace-provider-v1alpha1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/host-descriptor.tui.example.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/registry/permissions-0.1.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/conformance-claim.schema.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/effect-ledger-record.schema.json +0 -0
- /package/{dsh-ecosystem-spec → tui-profile}/schemas/host-descriptor.schema.json +0 -0
package/lib/types/update.js
CHANGED
|
@@ -966,16 +966,38 @@ export function ensureProfileAllowBuilds(profile) {
|
|
|
966
966
|
* (24h by default) — on release day that gate refuses the very version
|
|
967
967
|
* `/update` is installing (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION), which
|
|
968
968
|
* reads to the user as a broken update until the window passes. Pre-seed the
|
|
969
|
-
* profile's pnpm-workspace.yaml with
|
|
970
|
-
* package at the exact
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
*
|
|
969
|
+
* profile's pnpm-workspace.yaml with release-age exclusions scoped to this
|
|
970
|
+
* package at the exact versions pnpm verifies before it can swap the package:
|
|
971
|
+
* the target version itself, plus `alsoExempt` — the pre-update `updatedFrom`,
|
|
972
|
+
* read from the running package's own manifest (normally the version the
|
|
973
|
+
* profile lockfile pins). Two releases inside the 24h window leave the OLD
|
|
974
|
+
* lockfile entry inside it too, and pnpm fails the whole policy check on that
|
|
975
|
+
* entry before replacing the package (issue #1205), so exempting only the
|
|
976
|
+
* target is not enough. Same best-effort,
|
|
977
|
+
* idempotent pattern as {@link ensureProfileAllowBuilds}: entries for this
|
|
978
|
+
* package track exactly the versions the current update needs (older own
|
|
979
|
+
* entries are dropped instead of accumulating), foreign entries are
|
|
980
|
+
* preserved, a missing `minimumReleaseAgeExclude` block is appended, a
|
|
981
|
+
* missing file is created, and an absent profile directory resolves to
|
|
982
|
+
* undefined — the caller still runs pnpm, whose own diagnostic stays the
|
|
983
|
+
* visible fallback. Own entries are re-rendered target-first on every
|
|
984
|
+
* rewrite: pnpm 11.7.x honours only the FIRST entry per package (later
|
|
985
|
+
* entries for the same package are ignored against the real registry), and
|
|
986
|
+
* 11.21.x applies every entry in any order, so the target — the version the
|
|
987
|
+
* swap itself has to resolve, and published by construction while a
|
|
988
|
+
* dev-built `updatedFrom` need not be — takes the slot older pnpm still
|
|
989
|
+
* reads. Both exemptions come from the manifest, not from `pnpm-lock.yaml`:
|
|
990
|
+
* a profile whose manifest and lockfile diverged keeps the lockfile's entry
|
|
991
|
+
* unexempted. The 11.7.x `--frozen-lockfile` policy check reads that first
|
|
992
|
+
* entry only, so a two-entry list does not clear it there; the `pnpm add`
|
|
993
|
+
* path `/update` runs resolves the target and does pass.
|
|
994
|
+
*
|
|
995
|
+
* @param profile - The dsh profile whose workspace file is seeded.
|
|
996
|
+
* @param version - The update target (exact version).
|
|
997
|
+
* @param alsoExempt - Optional second version to keep exempt, normally the
|
|
998
|
+
* pre-update `updatedFrom`; ignored when empty or equal to `version`.
|
|
977
999
|
*/
|
|
978
|
-
export function ensureProfileReleaseAgeExclude(profile, version) {
|
|
1000
|
+
export function ensureProfileReleaseAgeExclude(profile, version, alsoExempt) {
|
|
979
1001
|
const yamlPath = profileWorkspaceYamlPath(profile);
|
|
980
1002
|
try {
|
|
981
1003
|
if (!existsSafe(dirname(yamlPath)))
|
|
@@ -988,6 +1010,10 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
|
|
|
988
1010
|
// Missing file — start from an empty document; writeFileSync creates it.
|
|
989
1011
|
}
|
|
990
1012
|
const entry = `${PACKAGE_NAME}@${version}`;
|
|
1013
|
+
const alsoEntry = alsoExempt !== undefined && alsoExempt !== '' && alsoExempt !== version
|
|
1014
|
+
? `${PACKAGE_NAME}@${alsoExempt}`
|
|
1015
|
+
: undefined;
|
|
1016
|
+
const keep = alsoEntry === undefined ? [entry] : [entry, alsoEntry];
|
|
991
1017
|
const lines = text.split(/\r?\n/u);
|
|
992
1018
|
let blockStart = -1;
|
|
993
1019
|
for (let i = 0; i < lines.length; i += 1) {
|
|
@@ -999,9 +1025,12 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
|
|
|
999
1025
|
}
|
|
1000
1026
|
/** Item text of a list line, unquoted (`- 'x@1'` / `- x@1` → `x@1`). */
|
|
1001
1027
|
const itemOf = (line) => line.trim().replace(/^-\s*/u, '').replace(/^'(.*)'$/u, '$1');
|
|
1002
|
-
|
|
1028
|
+
/** Foreign exclusion lines, preserved verbatim and in file order. */
|
|
1029
|
+
const foreignLines = [];
|
|
1030
|
+
/** Keep-set entries already present in the block. */
|
|
1031
|
+
const present = [];
|
|
1032
|
+
let droppedStale = false;
|
|
1003
1033
|
let blockEnd = -1;
|
|
1004
|
-
let alreadyCurrent = false;
|
|
1005
1034
|
if (blockStart !== -1) {
|
|
1006
1035
|
blockEnd = blockStart + 1;
|
|
1007
1036
|
for (let i = blockStart + 1; i < lines.length; i += 1) {
|
|
@@ -1010,21 +1039,27 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
|
|
|
1010
1039
|
break; // dedent = block ends
|
|
1011
1040
|
blockEnd = i + 1;
|
|
1012
1041
|
const item = itemOf(line);
|
|
1013
|
-
if (item
|
|
1014
|
-
|
|
1015
|
-
foreign.push(line);
|
|
1042
|
+
if (!item.startsWith(`${PACKAGE_NAME}@`)) {
|
|
1043
|
+
foreignLines.push(line);
|
|
1016
1044
|
}
|
|
1017
|
-
else if (
|
|
1018
|
-
|
|
1045
|
+
else if (keep.includes(item)) {
|
|
1046
|
+
present.push(item);
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
// Own entries for older targets: dropped (no accumulation).
|
|
1050
|
+
droppedStale = true;
|
|
1019
1051
|
}
|
|
1020
|
-
// Stale entries for THIS package (older targets) are dropped above.
|
|
1021
1052
|
}
|
|
1022
1053
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
return { entries, changed: false };
|
|
1054
|
+
const missing = keep.filter(item => !present.includes(item));
|
|
1055
|
+
if (!droppedStale && missing.length === 0) {
|
|
1056
|
+
return { entries: [...foreignLines.map(itemOf), ...present], changed: false };
|
|
1026
1057
|
}
|
|
1027
|
-
|
|
1058
|
+
// Own entries are re-rendered in keep order (target first) instead of
|
|
1059
|
+
// copied as found: pnpm 11.7.x honours only the first entry per package
|
|
1060
|
+
// (11.21.x applies them all, order-independent), and the target is the
|
|
1061
|
+
// version the swap must resolve, so it takes that first slot.
|
|
1062
|
+
const insert = foreignLines.concat(keep.map(item => ` - '${item}'`));
|
|
1028
1063
|
if (blockStart !== -1) {
|
|
1029
1064
|
lines.splice(blockStart + 1, blockEnd - blockStart - 1, ...insert);
|
|
1030
1065
|
}
|
|
@@ -1034,7 +1069,7 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
|
|
|
1034
1069
|
lines.push('minimumReleaseAgeExclude:', ...insert);
|
|
1035
1070
|
}
|
|
1036
1071
|
writeFileSync(yamlPath, `${lines.join('\n')}\n`);
|
|
1037
|
-
return { entries:
|
|
1072
|
+
return { entries: insert.map(itemOf), changed: true };
|
|
1038
1073
|
}
|
|
1039
1074
|
catch {
|
|
1040
1075
|
return undefined;
|
|
@@ -1427,8 +1462,8 @@ export async function updateTui(profile, targetVersion) {
|
|
|
1427
1462
|
const dsh = process.platform === 'win32' ? 'dsh.cmd' : 'dsh';
|
|
1428
1463
|
const updateArgs = tuiUpdatePluginArgs(profile, targetVersion);
|
|
1429
1464
|
// pnpm ≥11 hard-fails installs whose dependency tree carries un-allowlisted
|
|
1430
|
-
// build scripts (ERR_PNPM_IGNORED_BUILDS). The
|
|
1431
|
-
// postinstall-only deps (@google/genai/protobufjs
|
|
1465
|
+
// build scripts (ERR_PNPM_IGNORED_BUILDS). The host's pi-ai adapter pulls in
|
|
1466
|
+
// postinstall-only deps (@google/genai/protobufjs), so pre-seed
|
|
1432
1467
|
// the profile workspace with explicit `false` entries before pnpm runs.
|
|
1433
1468
|
const allowBuilds = ensureProfileAllowBuilds(profile);
|
|
1434
1469
|
if (allowBuilds !== undefined && allowBuilds.added.length > 0) {
|
|
@@ -1446,13 +1481,17 @@ export async function updateTui(profile, targetVersion) {
|
|
|
1446
1481
|
// pnpm ≥11's minimumReleaseAge (24h by default) refuses installs of
|
|
1447
1482
|
// packages published within the window — on release day that gate rejects
|
|
1448
1483
|
// the exact version /update pins, surfacing as a failed update that heals
|
|
1449
|
-
// itself a day later.
|
|
1450
|
-
//
|
|
1484
|
+
// itself a day later. Two releases inside the window (issue #1205) trip the
|
|
1485
|
+
// same gate on the OLD lockfile entry pnpm verifies before the swap, so
|
|
1486
|
+
// both the target and the still-installed updatedFrom are exempted.
|
|
1451
1487
|
if (targetVersion !== undefined) {
|
|
1452
|
-
const releaseAge = ensureProfileReleaseAgeExclude(profile, targetVersion);
|
|
1488
|
+
const releaseAge = ensureProfileReleaseAgeExclude(profile, targetVersion, updatedFrom === '' ? undefined : updatedFrom);
|
|
1453
1489
|
if (releaseAge !== undefined && releaseAge.changed) {
|
|
1454
|
-
|
|
1455
|
-
|
|
1490
|
+
const exempted = updatedFrom !== '' && updatedFrom !== targetVersion
|
|
1491
|
+
? `${PACKAGE_NAME}@${targetVersion} + ${PACKAGE_NAME}@${updatedFrom}`
|
|
1492
|
+
: `${PACKAGE_NAME}@${targetVersion}`;
|
|
1493
|
+
process.stderr.write(`dsh-tui: pre-seeded profile release-age exclusion (${exempted}) — ` +
|
|
1494
|
+
'freshly published versions install without the 24h supply-chain delay\n');
|
|
1456
1495
|
}
|
|
1457
1496
|
}
|
|
1458
1497
|
let updateStderr = '';
|
|
@@ -1622,6 +1661,33 @@ export async function cliUpdate(profile) {
|
|
|
1622
1661
|
}
|
|
1623
1662
|
return outcome.code;
|
|
1624
1663
|
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Release the shared console for the replacement without resetting it.
|
|
1666
|
+
*
|
|
1667
|
+
* A pty's termios is per-DEVICE: destroying this stream would write this
|
|
1668
|
+
* process's saved cooked/ECHO mode back over the replacement's raw mode
|
|
1669
|
+
* (libuv restores orig_termios on tty close; verified on Node 24 — mouse
|
|
1670
|
+
* reports then echo as `^[[<…M` and keys wait for a newline). Detaching —
|
|
1671
|
+
* no readers, paused, unref'd — keeps the mode untouched.
|
|
1672
|
+
*
|
|
1673
|
+
* Two deliberate trade-offs vs the old destroy():
|
|
1674
|
+
* - destroy() doubled as a permanent gate ("a destroyed stream can never be
|
|
1675
|
+
* resumed"). Readers removed + paused already keep this process out of the
|
|
1676
|
+
* console's key path (#284/#307), and after the handoff only the
|
|
1677
|
+
* child-exit listener remains here — nothing re-attaches a reader.
|
|
1678
|
+
* - On exit Node still writes the saved cooked mode back once (atexit
|
|
1679
|
+
* uv_tty_reset_mode). Fine in the normal order — this process outlives the
|
|
1680
|
+
* replacement, and the shell wants cooked back anyway; it only bites if
|
|
1681
|
+
* this process dies while the replacement is still running.
|
|
1682
|
+
*
|
|
1683
|
+
* @param stdin - Console stream to detach; injectable for the regression.
|
|
1684
|
+
*/
|
|
1685
|
+
export function detachHandoffStdin(stdin = process.stdin) {
|
|
1686
|
+
stdin.removeAllListeners('readable');
|
|
1687
|
+
stdin.removeAllListeners('data');
|
|
1688
|
+
stdin.pause();
|
|
1689
|
+
stdin.unref();
|
|
1690
|
+
}
|
|
1625
1691
|
export async function restartTui(sessionId, options = {}) {
|
|
1626
1692
|
const kind = options.kind ?? 'restart';
|
|
1627
1693
|
const tag = kind === 'update' ? 'update-restart' : 'restart';
|
|
@@ -1661,10 +1727,12 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1661
1727
|
// 1. SAMPLE this process's stdin state every second — if anything
|
|
1662
1728
|
// re-attaches a reader after the funnel's detachStdinForHandoff, the
|
|
1663
1729
|
// sample (taken before the re-assert below) shows it in the log.
|
|
1664
|
-
// 2. RE-ASSERT the detach
|
|
1665
|
-
//
|
|
1666
|
-
//
|
|
1667
|
-
//
|
|
1730
|
+
// 2. RE-ASSERT the detach — never DESTROY the stream: destroying it
|
|
1731
|
+
// resets the shared pty and stomps the replacement's raw mode (see
|
|
1732
|
+
// detachHandoffStdin for the mechanism and trade-offs). This process
|
|
1733
|
+
// must never read the shared console again — every keypress belongs to
|
|
1734
|
+
// the replacement, and a resumed pump here is exactly the "restarted
|
|
1735
|
+
// TUI sees dropped or swallowed input" failure (#284/#307).
|
|
1668
1736
|
let watchdogTicks = 0;
|
|
1669
1737
|
const watchdog = setInterval(() => {
|
|
1670
1738
|
watchdogTicks += 1;
|
|
@@ -1678,25 +1746,14 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1678
1746
|
buffered: stdin.readableLength,
|
|
1679
1747
|
});
|
|
1680
1748
|
try {
|
|
1681
|
-
stdin
|
|
1682
|
-
stdin.removeAllListeners('data');
|
|
1683
|
-
stdin.pause();
|
|
1749
|
+
detachHandoffStdin(stdin);
|
|
1684
1750
|
}
|
|
1685
1751
|
catch {
|
|
1686
1752
|
// Diagnosis/mitigation only.
|
|
1687
1753
|
}
|
|
1688
1754
|
if (watchdogTicks === 15) {
|
|
1689
1755
|
clearInterval(watchdog);
|
|
1690
|
-
|
|
1691
|
-
// Terminal safeguard: a destroyed stream can never be resumed by
|
|
1692
|
-
// any late re-attachment. The child holds its own inherited
|
|
1693
|
-
// handle, so closing ours does not affect it.
|
|
1694
|
-
process.stdin.destroy();
|
|
1695
|
-
logRestartEvent('parent: stdin destroyed after watchdog');
|
|
1696
|
-
}
|
|
1697
|
-
catch {
|
|
1698
|
-
// Best effort.
|
|
1699
|
-
}
|
|
1756
|
+
logRestartEvent('parent: stdin detached after watchdog (kept raw, not destroyed)');
|
|
1700
1757
|
}
|
|
1701
1758
|
}, 1000);
|
|
1702
1759
|
watchdog.unref();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8DH;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8DH;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4FlE"}
|
package/lib/types/utils/bmp.js
CHANGED
|
@@ -74,6 +74,10 @@ export async function bmpToPng(bmp) {
|
|
|
74
74
|
return null;
|
|
75
75
|
if (bpp !== 24 && bpp !== 32)
|
|
76
76
|
return null;
|
|
77
|
+
// High-colour DIBs may still carry a colour table. Without a file header
|
|
78
|
+
// its length is ambiguous; a BMP file instead locates pixels via bfOffBits.
|
|
79
|
+
if (!hasFileHeader && bmp.readUInt32LE(dib + 32) !== 0)
|
|
80
|
+
return null; // biClrUsed
|
|
77
81
|
if (compression !== BI_RGB && compression !== BI_BITFIELDS && compression !== BI_ALPHABITFIELDS)
|
|
78
82
|
return null;
|
|
79
83
|
if (bpp === 24 && compression !== BI_RGB)
|
|
@@ -100,7 +104,10 @@ export async function bmpToPng(bmp) {
|
|
|
100
104
|
if (bpp === 32 && (redMask === 0 || greenMask === 0 || blueMask === 0))
|
|
101
105
|
return null;
|
|
102
106
|
const declaredOffset = hasFileHeader ? bmp.readUInt32LE(10) : 0;
|
|
103
|
-
const
|
|
107
|
+
const minimumOffset = dib + headerSize + maskBytes;
|
|
108
|
+
if (hasFileHeader && declaredOffset < minimumOffset)
|
|
109
|
+
return null;
|
|
110
|
+
const pixelOffset = hasFileHeader ? declaredOffset : minimumOffset;
|
|
104
111
|
const stride = Math.floor((bpp * width + 31) / 32) * 4;
|
|
105
112
|
if (pixelOffset + stride * height > bmp.length)
|
|
106
113
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAeH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA;AAE5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAWD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYtE;AAiDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAS9C;
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAeH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA;AAE5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAWD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYtE;AAiDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAS9C;AAsfD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAStD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAcvE"}
|
|
@@ -239,8 +239,18 @@ function spawnForBuffer(file, args, timeout = CLIPBOARD_TIMEOUT) {
|
|
|
239
239
|
const child = spawn(file, [...args], { timeout });
|
|
240
240
|
const chunks = [];
|
|
241
241
|
child.stdout.on('data', (chunk) => chunks.push(chunk));
|
|
242
|
-
child.
|
|
243
|
-
|
|
242
|
+
child.stderr.resume(); // A full stderr pipe must not block the child.
|
|
243
|
+
// Node's spawn timeout sends SIGTERM only; an uncooperative helper can
|
|
244
|
+
// otherwise keep the paste Promise pending forever.
|
|
245
|
+
const hardKill = setTimeout(() => child.kill('SIGKILL'), timeout + 1000);
|
|
246
|
+
child.on('error', () => {
|
|
247
|
+
clearTimeout(hardKill);
|
|
248
|
+
resolve({ code: 1, stdout: Buffer.concat(chunks) });
|
|
249
|
+
});
|
|
250
|
+
child.on('close', code => {
|
|
251
|
+
clearTimeout(hardKill);
|
|
252
|
+
resolve({ code, stdout: Buffer.concat(chunks) });
|
|
253
|
+
});
|
|
244
254
|
child.stdin.end();
|
|
245
255
|
});
|
|
246
256
|
}
|
|
@@ -490,12 +500,15 @@ function buildWslPsScript() {
|
|
|
490
500
|
return [
|
|
491
501
|
"$ErrorActionPreference='SilentlyContinue'",
|
|
492
502
|
'[Console]::OutputEncoding=[System.Text.Encoding]::UTF8',
|
|
503
|
+
// Only CLIPBRD_E_CANT_OPEN is retryable. A missing format or empty
|
|
504
|
+
// clipboard is not a reason to cold-start PowerShell three times.
|
|
505
|
+
'function Test-ClipboardBusy($e){while($e){if($e.HResult -eq -2147221040){return $true};$e=$e.InnerException};return $false}',
|
|
493
506
|
'$files=$null',
|
|
494
|
-
'try { $files = Get-Clipboard -Format FileDropList -ErrorAction Stop } catch {}',
|
|
507
|
+
'try { $files = Get-Clipboard -Format FileDropList -ErrorAction Stop } catch { if(Test-ClipboardBusy $_.Exception){exit 75} }',
|
|
495
508
|
'if($files){foreach($f in $files){Write-Output ("FILE:"+$f.FullName)}}',
|
|
496
509
|
'$saved=$false',
|
|
497
|
-
'if(-not $files){try { Add-Type -AssemblyName System.Drawing; $img=Get-Clipboard -Format Image -ErrorAction Stop; if($img){$ms=New-Object System.IO.MemoryStream; $img.Save($ms,[System.Drawing.Imaging.ImageFormat]::Png); $img.Dispose(); Write-Output ("IMAGE64:"+[Convert]::ToBase64String($ms.ToArray())); $saved=$true} } catch {} }',
|
|
498
|
-
'if(-not $files -and -not $saved){$t=Get-Clipboard -Raw; if($null -ne $t){Write-Output ("TEXT64:"+[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($t)))}}',
|
|
510
|
+
'if(-not $files){try { Add-Type -AssemblyName System.Drawing; $img=Get-Clipboard -Format Image -ErrorAction Stop; if($img){$ms=New-Object System.IO.MemoryStream; $img.Save($ms,[System.Drawing.Imaging.ImageFormat]::Png); $img.Dispose(); Write-Output ("IMAGE64:"+[Convert]::ToBase64String($ms.ToArray())); $saved=$true} } catch { if(Test-ClipboardBusy $_.Exception){exit 75} } }',
|
|
511
|
+
'if(-not $files -and -not $saved){try { $t=Get-Clipboard -Raw -ErrorAction Stop; if($null -ne $t){Write-Output ("TEXT64:"+[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($t)))} } catch { if(Test-ClipboardBusy $_.Exception){exit 75} } }',
|
|
499
512
|
].join('; ');
|
|
500
513
|
}
|
|
501
514
|
/**
|
|
@@ -505,7 +518,13 @@ function buildWslPsScript() {
|
|
|
505
518
|
* clipboard holds nothing usable.
|
|
506
519
|
*/
|
|
507
520
|
async function readClipboardWsl() {
|
|
508
|
-
|
|
521
|
+
let result;
|
|
522
|
+
for (let attempt = 0;; attempt += 1) {
|
|
523
|
+
result = await spawnForBuffer('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', buildWslPsScript()], WSL_POWERSHELL_TIMEOUT);
|
|
524
|
+
if (result.code !== 75 || attempt >= 2)
|
|
525
|
+
break;
|
|
526
|
+
await new Promise(resolve => setTimeout(resolve, 150));
|
|
527
|
+
}
|
|
509
528
|
if (result.code !== 0)
|
|
510
529
|
return null;
|
|
511
530
|
const files = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"AAgBA,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"AAgBA,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB,GAAG,OAAO,CAUxF"}
|
|
@@ -15,7 +15,11 @@ import { homedir } from 'node:os';
|
|
|
15
15
|
import { join } from 'node:path';
|
|
16
16
|
/** The DSH home that owns the credential store, following the launcher's rule. */
|
|
17
17
|
export function dshHomeDir() {
|
|
18
|
-
|
|
18
|
+
// `||`, not `??`: the launcher resolves the same root as
|
|
19
|
+
// `process.env.DSH_HOME || join(homedir(), '.dsh')` (bin/dsh-tui.js), so an
|
|
20
|
+
// empty `DSH_HOME=` — a common way to spell "unset" in scripts — must fall
|
|
21
|
+
// back here too instead of turning every path into a relative one.
|
|
22
|
+
return process.env.DSH_HOME || join(homedir(), '.dsh');
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
25
|
* Whether the DSH credential store declares a reference by this name.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the seam at `offset` (`text[offset-1] | text[offset]`) is a word
|
|
3
|
+
* boundary. `offset` is a code-unit index, as produced by the composer's
|
|
4
|
+
* grapheme-normalized caret.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isDraftWordBoundary(text: string, offset: number): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The word interval `[start, end)` containing the character at `index`: the
|
|
9
|
+
* ICU segment when that character is word-like, otherwise just the character
|
|
10
|
+
* itself (whitespace and punctuation are boundaries, never part of a
|
|
11
|
+
* multi-character word). A deletion run uses this as the range it may keep
|
|
12
|
+
* consuming.
|
|
13
|
+
*
|
|
14
|
+
* The window widens until the segment no longer touches its edge: ICU
|
|
15
|
+
* segmentation is length-dependent, so a truncated copy of a repeated-Han run
|
|
16
|
+
* can split differently from the full draft (and the ±32 window would then
|
|
17
|
+
* read the wrong word at the seam).
|
|
18
|
+
*/
|
|
19
|
+
export declare function draftWordRangeAt(text: string, index: number): {
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=draftWordBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draftWordBoundary.d.ts","sourceRoot":"","sources":["../../../src/utils/draftWordBoundary.ts"],"names":[],"mappings":"AA4GA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAWzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAoB5F"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { getWordSegmenter } from './intl.js';
|
|
2
|
+
/**
|
|
3
|
+
* Word boundaries for the prompt draft. `Intl.Segmenter` (`granularity:
|
|
4
|
+
* 'word'`, UAX #29 + the ICU dictionary) is the source of truth; a cheap
|
|
5
|
+
* hard-rule layer in front of it answers the common cases (edges, whitespace,
|
|
6
|
+
* CJK punctuation, script changes) without paying for a segmentation.
|
|
7
|
+
*
|
|
8
|
+
* Two callers:
|
|
9
|
+
*
|
|
10
|
+
* - `Ctrl+Z`/typing grouping asks whether a seam (`text[offset-1] |
|
|
11
|
+
* text[offset]`) is a word boundary — {@link isDraftWordBoundary}.
|
|
12
|
+
* - a deletion run asks for the word interval its first removed character
|
|
13
|
+
* belongs to, so the run may keep consuming that word and nothing else —
|
|
14
|
+
* {@link draftWordRangeAt}.
|
|
15
|
+
*
|
|
16
|
+
* Idle coalescing is deliberately NOT here: the undo stack applies its own
|
|
17
|
+
* 700ms rule so a test clock can be injected at that call site.
|
|
18
|
+
*/
|
|
19
|
+
/** Window radius (characters) for the ICU layer, and its scan budget. */
|
|
20
|
+
const DRAFT_WORD_WINDOW = 32;
|
|
21
|
+
const WHITESPACE = /\s/u;
|
|
22
|
+
const HAN = /\p{Script=Han}/u;
|
|
23
|
+
const KANA = /[\p{Script=Hiragana}\p{Script=Katakana}]/u;
|
|
24
|
+
const HANGUL = /\p{Script=Hangul}/u;
|
|
25
|
+
const LATIN = /\p{Script=Latin}/u;
|
|
26
|
+
const DIGIT = /\p{N}/u;
|
|
27
|
+
/**
|
|
28
|
+
* CJK/fullwidth punctuation always severs a word: ,。!?、;:""''()《》【】
|
|
29
|
+
* plus the rest of the CJK Symbols, Halfwidth/Fullwidth Forms and the
|
|
30
|
+
* curly-quote/ellipsis/em-dash block.
|
|
31
|
+
*/
|
|
32
|
+
const CJK_PUNCT = /[\u2014\u2018\u2019\u201c\u201d\u2026\u3000-\u303f\uff01-\uff0f\uff1a-\uff20\uff3b-\uff40\uff5b-\uff65]/u;
|
|
33
|
+
/** Grapheme-cluster continuations: combining marks, ZWJ, variation selectors. */
|
|
34
|
+
const JOINER = /[\p{M}\u200d\ufe00-\ufe0f]/u;
|
|
35
|
+
const CLASS_OTHER = 0;
|
|
36
|
+
const CLASS_LATIN = 1;
|
|
37
|
+
const CLASS_DIGIT = 2;
|
|
38
|
+
const CLASS_HAN = 3;
|
|
39
|
+
const CLASS_KANA = 4;
|
|
40
|
+
const CLASS_HANGUL = 5;
|
|
41
|
+
/** Code point ending at `index`, surrogate-pair aware. */
|
|
42
|
+
function codePointBefore(text, index) {
|
|
43
|
+
const low = text.charCodeAt(index - 1);
|
|
44
|
+
if (low >= 0xdc00 && low <= 0xdfff && index >= 2) {
|
|
45
|
+
const high = text.charCodeAt(index - 2);
|
|
46
|
+
if (high >= 0xd800 && high <= 0xdbff) {
|
|
47
|
+
return (high - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return low;
|
|
51
|
+
}
|
|
52
|
+
function scriptClass(codePoint) {
|
|
53
|
+
const char = String.fromCodePoint(codePoint);
|
|
54
|
+
if (HAN.test(char))
|
|
55
|
+
return CLASS_HAN;
|
|
56
|
+
if (KANA.test(char))
|
|
57
|
+
return CLASS_KANA;
|
|
58
|
+
if (HANGUL.test(char))
|
|
59
|
+
return CLASS_HANGUL;
|
|
60
|
+
if (DIGIT.test(char))
|
|
61
|
+
return CLASS_DIGIT;
|
|
62
|
+
if (LATIN.test(char))
|
|
63
|
+
return CLASS_LATIN;
|
|
64
|
+
return CLASS_OTHER;
|
|
65
|
+
}
|
|
66
|
+
/** Continuation of a grapheme cluster: combining mark, ZWJ, variation selector. */
|
|
67
|
+
function isClusterJoiner(codePoint) {
|
|
68
|
+
return JOINER.test(String.fromCodePoint(codePoint));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Script class of the character before `offset`, skipping any trailing
|
|
72
|
+
* cluster joiners so `e` + U+0301 classifies as Latin, not "other".
|
|
73
|
+
*/
|
|
74
|
+
function leftClassAt(text, offset) {
|
|
75
|
+
let index = offset;
|
|
76
|
+
while (index > 0) {
|
|
77
|
+
const codePoint = codePointBefore(text, index);
|
|
78
|
+
if (!isClusterJoiner(codePoint))
|
|
79
|
+
return scriptClass(codePoint);
|
|
80
|
+
index = stepBackward(text, index);
|
|
81
|
+
}
|
|
82
|
+
return CLASS_OTHER;
|
|
83
|
+
}
|
|
84
|
+
/** Layer 1 only: cheap, context-free break rules (edges count as breaks). */
|
|
85
|
+
function hardBoundaryAt(text, offset) {
|
|
86
|
+
if (offset <= 0 || offset >= text.length)
|
|
87
|
+
return true;
|
|
88
|
+
const right = text.codePointAt(offset);
|
|
89
|
+
// A joining mark on the right means the seam sits INSIDE a grapheme
|
|
90
|
+
// cluster — never a word boundary, whatever the base character's class.
|
|
91
|
+
if (isClusterJoiner(right))
|
|
92
|
+
return false;
|
|
93
|
+
const left = codePointBefore(text, offset);
|
|
94
|
+
const leftChar = String.fromCodePoint(left);
|
|
95
|
+
const rightChar = String.fromCodePoint(right);
|
|
96
|
+
if (WHITESPACE.test(leftChar) || WHITESPACE.test(rightChar))
|
|
97
|
+
return true;
|
|
98
|
+
if (CJK_PUNCT.test(leftChar) || CJK_PUNCT.test(rightChar))
|
|
99
|
+
return true;
|
|
100
|
+
return leftClassAt(text, offset) !== scriptClass(right);
|
|
101
|
+
}
|
|
102
|
+
/** Previous code-point index before `index` (never splits a surrogate pair). */
|
|
103
|
+
function stepBackward(text, index) {
|
|
104
|
+
const codePoint = codePointBefore(text, index);
|
|
105
|
+
return codePoint > 0xffff ? index - 2 : index - 1;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether the seam at `offset` (`text[offset-1] | text[offset]`) is a word
|
|
109
|
+
* boundary. `offset` is a code-unit index, as produced by the composer's
|
|
110
|
+
* grapheme-normalized caret.
|
|
111
|
+
*/
|
|
112
|
+
export function isDraftWordBoundary(text, offset) {
|
|
113
|
+
if (hardBoundaryAt(text, offset))
|
|
114
|
+
return true;
|
|
115
|
+
// Layer 1 rejected this offset, so 0 < offset < text.length, which means the
|
|
116
|
+
// window's own edges can never masquerade as a seam boundary and the queried
|
|
117
|
+
// offset is always strictly inside.
|
|
118
|
+
const start = Math.max(0, offset - DRAFT_WORD_WINDOW);
|
|
119
|
+
const end = Math.min(text.length, offset + DRAFT_WORD_WINDOW);
|
|
120
|
+
for (const part of getWordSegmenter().segment(text.slice(start, end))) {
|
|
121
|
+
if (start + part.index === offset)
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The word interval `[start, end)` containing the character at `index`: the
|
|
128
|
+
* ICU segment when that character is word-like, otherwise just the character
|
|
129
|
+
* itself (whitespace and punctuation are boundaries, never part of a
|
|
130
|
+
* multi-character word). A deletion run uses this as the range it may keep
|
|
131
|
+
* consuming.
|
|
132
|
+
*
|
|
133
|
+
* The window widens until the segment no longer touches its edge: ICU
|
|
134
|
+
* segmentation is length-dependent, so a truncated copy of a repeated-Han run
|
|
135
|
+
* can split differently from the full draft (and the ±32 window would then
|
|
136
|
+
* read the wrong word at the seam).
|
|
137
|
+
*/
|
|
138
|
+
export function draftWordRangeAt(text, index) {
|
|
139
|
+
const single = { start: index, end: index + 1 };
|
|
140
|
+
if (index < 0 || index >= text.length)
|
|
141
|
+
return single;
|
|
142
|
+
const segmenter = getWordSegmenter();
|
|
143
|
+
let radius = DRAFT_WORD_WINDOW;
|
|
144
|
+
for (;;) {
|
|
145
|
+
const windowStart = Math.max(0, index - radius);
|
|
146
|
+
const windowEnd = Math.min(text.length, index + radius);
|
|
147
|
+
for (const part of segmenter.segment(text.slice(windowStart, windowEnd))) {
|
|
148
|
+
const start = windowStart + part.index;
|
|
149
|
+
const end = start + part.segment.length;
|
|
150
|
+
if (start > index || index >= end)
|
|
151
|
+
continue;
|
|
152
|
+
const clipped = (start === windowStart && windowStart > 0) || (end === windowEnd && windowEnd < text.length);
|
|
153
|
+
if (!clipped)
|
|
154
|
+
return part.isWordLike === true ? { start, end } : single;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
if (windowStart === 0 && windowEnd === text.length)
|
|
158
|
+
return single;
|
|
159
|
+
radius = Math.min(radius * 2, text.length);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileTarget.d.ts","sourceRoot":"","sources":["../../../src/utils/fileTarget.ts"],"names":[],"mappings":"AAuBA,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAWvE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM7D;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAoBvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMtD;AAWD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAC9C,MAAM,
|
|
1
|
+
{"version":3,"file":"fileTarget.d.ts","sourceRoot":"","sources":["../../../src/utils/fileTarget.ts"],"names":[],"mappings":"AAuBA,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAWvE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM7D;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAoBvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMtD;AAWD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAC9C,MAAM,CAYR"}
|
|
@@ -161,15 +161,13 @@ const PATH_SPAN_RE = /(?:\.{1,2}[\\/]|[\\/]|~[\\/]|[A-Za-z]:[\\/])[^\s<>"'`|?#]*
|
|
|
161
161
|
*/
|
|
162
162
|
export function linkifyFilePaths(text, wrap) {
|
|
163
163
|
return text.replace(PATH_SPAN_RE, (match, offset, full) => {
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return match;
|
|
172
|
-
}
|
|
164
|
+
// A candidate must start at a text boundary, not inside another token:
|
|
165
|
+
// `/idle/needs-input` in `working/idle/needs-input` otherwise looks like
|
|
166
|
+
// an absolute path (#1181). Colons and slashes are not boundaries, so
|
|
167
|
+
// URL interiors stay excluded too. Quotes/opening delimiters and `=`
|
|
168
|
+
// still allow standalone anchored paths in prose and assignments.
|
|
169
|
+
if (offset > 0 && !/[\s<>"'`|([{=]/u.test(full[offset - 1]))
|
|
170
|
+
return match;
|
|
173
171
|
const display = match.replace(/[.,;:!?]+$/u, '');
|
|
174
172
|
if (display === '' || !looksLikeFilePath(display))
|
|
175
173
|
return match;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 输入粘贴的**共享语义**(PromptInput 与 Launchpad 复用;2026-10 方案 B)。
|
|
3
|
+
*
|
|
4
|
+
* 只抽两条输入真正同源的东西:
|
|
5
|
+
* 1. **粘贴管线**——载荷清洗(win32 输入记录残渣、终端控制字节、\r 规整、
|
|
6
|
+
* bracketed paste 标记字节)与单行折叠;
|
|
7
|
+
* 2. **组合键匹配**——`paste` 动作经 keymap 的生效组合键(可重映射),
|
|
8
|
+
* 谁都不许再硬编码 `ctrl+v` 字符串。
|
|
9
|
+
*
|
|
10
|
+
* 明确**不**统一的语义(边界见 Launchpad/PromptInput 各自注释):
|
|
11
|
+
* - 多行/附件/图片暂存/历史/chip 折叠是聊天页编辑器的能力,落地页是单行
|
|
12
|
+
* 首屏输入——多行内容在落地页折叠成一行({@link collapseToSingleLine}),
|
|
13
|
+
* PromptInput 保留换行;
|
|
14
|
+
* - 异步落点守则**同一条**(读回时必须用当下最新的文本/光标,闭包旧值一律
|
|
15
|
+
* 不许用),实现各自落地:PromptInput 用 revision lease(与会话代次、图片
|
|
16
|
+
* 租约耦合,搬动会改变聊天页行为),Launchpad 用每次渲染刷新的 current-ref
|
|
17
|
+
* (受控组件,props 即最新值)。
|
|
18
|
+
*/
|
|
19
|
+
import { type ComboKeyFlags } from './keymap.js';
|
|
20
|
+
/**
|
|
21
|
+
* Normalize editable text so no terminal control characters remain in state.
|
|
22
|
+
*/
|
|
23
|
+
export declare function sanitizeEditableText(text: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Paste-payload ingress: strip the ESC-less tail of a split record before
|
|
26
|
+
* normalizing. The tail is printable, so it survives `sanitizeEditableText`'s
|
|
27
|
+
* control probe untouched; typed text keeps it because only a paste payload
|
|
28
|
+
* can carry a partial record.
|
|
29
|
+
*
|
|
30
|
+
* The five separators only prove the *shape*, not that a record was split:
|
|
31
|
+
* a user can legitimately paste the literal `[13;28;13;1;0;1_`. Strip the
|
|
32
|
+
* ESC-less form only when the same payload also carries a full ESC-bearing
|
|
33
|
+
* record — only then is there in-payload evidence of a split stream.
|
|
34
|
+
* Otherwise the bytes are ordinary text and must survive verbatim.
|
|
35
|
+
*/
|
|
36
|
+
export declare function sanitizePastedText(text: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Strip literal bracketed-paste marker bytes (`\x1b[200~` / `\x1b[201~`).
|
|
39
|
+
* ink's parser normally consumes them before `useInput` sees the payload;
|
|
40
|
+
* this is the belt-and-braces pass for any path that receives raw bytes
|
|
41
|
+
* (a flush boundary splitting marker from payload leaves them printable-side).
|
|
42
|
+
*/
|
|
43
|
+
export declare function stripBracketedPasteMarkers(text: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Single-line paste fold (Launchpad 语义):清洗后把换行折叠成一个空格——
|
|
46
|
+
* 单行编辑器里 Enter 是提交,多行内容不许拼出换行。
|
|
47
|
+
*/
|
|
48
|
+
export declare function collapseToSingleLine(text: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* 按键是否命中 `paste` 动作的**生效**组合键(默认 Ctrl+V/Cmd+V + Alt+V 别名,
|
|
51
|
+
* 可经 /settings 重映射)。唯一的组合键判定入口——调用方不许自己比键字符串。
|
|
52
|
+
*/
|
|
53
|
+
export declare function matchesPasteShortcut(input: string, key: ComboKeyFlags): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 单行插入的纯计算:把已清洗文本落在给定光标处,返回新的文本与光标。
|
|
56
|
+
* 调用方负责拿**当下最新**的 query/caret(异步落点守则),这里不做 IO。
|
|
57
|
+
*/
|
|
58
|
+
export declare function insertSingleLineAt(query: string, caret: number, text: string): {
|
|
59
|
+
text: string;
|
|
60
|
+
caret: number;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=inputPaste.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputPaste.d.ts","sourceRoot":"","sources":["../../../src/utils/inputPaste.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AA+B/D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAE/E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAGjC"}
|