@deepseek-harness-tui/dsh-tui 0.12.0 → 0.14.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 +124 -8
- package/assets/claude-girl/claude-girl-happy.png +0 -0
- package/assets/claude-girl/claude-girl.png +0 -0
- package/assets/codex-girl/codex-girl-happy.png +0 -0
- package/assets/codex-girl/codex-girl.png +0 -0
- 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 +112 -21
- package/cordis.patch.yml +9 -1
- package/cordis.yml +2 -0
- package/guide/dsh-tui-guide/SKILL.md +4 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +203 -0
- package/guide/dsh-tui-guide/claude-backend.md +161 -0
- package/guide/dsh-tui-guide/codex-backend.en.md +297 -0
- package/guide/dsh-tui-guide/codex-backend.md +257 -0
- package/guide/dsh-tui-guide/configuration.en.md +13 -1
- package/guide/dsh-tui-guide/configuration.md +13 -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 +221 -15
- package/guide/dsh-tui-guide/interaction.md +153 -9
- 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 +31 -4
- package/guide/dsh-tui-guide/themes.md +26 -4
- package/guide/dsh-tui-guide/user-guide.en.md +145 -27
- package/guide/dsh-tui-guide/user-guide.md +113 -22
- package/guide/dsh-tui-guide/vscode.en.md +1 -0
- package/guide/dsh-tui-guide/vscode.md +1 -0
- package/lib/settings.json +348 -1
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +21 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +43 -1
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +45 -5
- 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 +14 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-display.d.ts +17 -1
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +5 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +243 -6
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +566 -8
- 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/agent/backend.d.ts +168 -0
- package/lib/types/agent/backend.d.ts.map +1 -0
- package/lib/types/agent/backend.js +1 -0
- package/lib/types/agent/capabilities.d.ts +461 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -0
- package/lib/types/agent/capabilities.js +1 -0
- package/lib/types/agent/events.d.ts +733 -0
- package/lib/types/agent/events.d.ts.map +1 -0
- package/lib/types/agent/events.js +2 -0
- package/lib/types/agent/index.d.ts +8 -0
- package/lib/types/agent/index.d.ts.map +1 -0
- package/lib/types/agent/index.js +7 -0
- package/lib/types/agent/messages.d.ts +52 -0
- package/lib/types/agent/messages.d.ts.map +1 -0
- package/lib/types/agent/messages.js +91 -0
- package/lib/types/agent/presentation.d.ts +29 -0
- package/lib/types/agent/presentation.d.ts.map +1 -0
- package/lib/types/agent/presentation.js +4 -0
- package/lib/types/agent/refs.d.ts +30 -0
- package/lib/types/agent/refs.d.ts.map +1 -0
- package/lib/types/agent/refs.js +39 -0
- package/lib/types/agent/session.d.ts +78 -0
- package/lib/types/agent/session.d.ts.map +1 -0
- package/lib/types/agent/session.js +1 -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/backends/claude/activity.d.ts +53 -0
- package/lib/types/backends/claude/activity.d.ts.map +1 -0
- package/lib/types/backends/claude/activity.js +103 -0
- package/lib/types/backends/claude/auth.d.ts +245 -0
- package/lib/types/backends/claude/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/auth.js +503 -0
- package/lib/types/backends/claude/backend.d.ts +32 -0
- package/lib/types/backends/claude/backend.d.ts.map +1 -0
- package/lib/types/backends/claude/backend.js +296 -0
- package/lib/types/backends/claude/catalog.d.ts +17 -0
- package/lib/types/backends/claude/catalog.d.ts.map +1 -0
- package/lib/types/backends/claude/catalog.js +94 -0
- package/lib/types/backends/claude/channels.d.ts +63 -0
- package/lib/types/backends/claude/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/channels.js +275 -0
- package/lib/types/backends/claude/contract.d.ts +37 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -0
- package/lib/types/backends/claude/contract.js +46 -0
- package/lib/types/backends/claude/controls.d.ts +134 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -0
- package/lib/types/backends/claude/controls.js +425 -0
- package/lib/types/backends/claude/dialogs.d.ts +62 -0
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -0
- package/lib/types/backends/claude/dialogs.js +253 -0
- package/lib/types/backends/claude/flag-settings.d.ts +12 -0
- package/lib/types/backends/claude/flag-settings.d.ts.map +1 -0
- package/lib/types/backends/claude/flag-settings.js +49 -0
- package/lib/types/backends/claude/images.d.ts +49 -0
- package/lib/types/backends/claude/images.d.ts.map +1 -0
- package/lib/types/backends/claude/images.js +94 -0
- package/lib/types/backends/claude/index.d.ts +5 -0
- package/lib/types/backends/claude/index.d.ts.map +1 -0
- package/lib/types/backends/claude/index.js +4 -0
- package/lib/types/backends/claude/install.d.ts +15 -0
- package/lib/types/backends/claude/install.d.ts.map +1 -0
- package/lib/types/backends/claude/install.js +91 -0
- package/lib/types/backends/claude/modelEnv.d.ts +64 -0
- package/lib/types/backends/claude/modelEnv.d.ts.map +1 -0
- package/lib/types/backends/claude/modelEnv.js +199 -0
- package/lib/types/backends/claude/narrow.d.ts +10 -0
- package/lib/types/backends/claude/narrow.d.ts.map +1 -0
- package/lib/types/backends/claude/narrow.js +8 -0
- package/lib/types/backends/claude/older-history.d.ts +16 -0
- package/lib/types/backends/claude/older-history.d.ts.map +1 -0
- package/lib/types/backends/claude/older-history.js +101 -0
- package/lib/types/backends/claude/options.d.ts +181 -0
- package/lib/types/backends/claude/options.d.ts.map +1 -0
- package/lib/types/backends/claude/options.js +208 -0
- package/lib/types/backends/claude/permissions.d.ts +83 -0
- package/lib/types/backends/claude/permissions.d.ts.map +1 -0
- package/lib/types/backends/claude/permissions.js +331 -0
- package/lib/types/backends/claude/prefs.d.ts +55 -0
- package/lib/types/backends/claude/prefs.d.ts.map +1 -0
- package/lib/types/backends/claude/prefs.js +150 -0
- package/lib/types/backends/claude/process.d.ts +19 -0
- package/lib/types/backends/claude/process.d.ts.map +1 -0
- package/lib/types/backends/claude/process.js +156 -0
- package/lib/types/backends/claude/replay.d.ts +129 -0
- package/lib/types/backends/claude/replay.d.ts.map +1 -0
- package/lib/types/backends/claude/replay.js +505 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts +23 -0
- package/lib/types/backends/claude/sdk-warnings.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk-warnings.js +55 -0
- package/lib/types/backends/claude/sdk.d.ts +12 -0
- package/lib/types/backends/claude/sdk.d.ts.map +1 -0
- package/lib/types/backends/claude/sdk.js +34 -0
- package/lib/types/backends/claude/send-message.d.ts +54 -0
- package/lib/types/backends/claude/send-message.d.ts.map +1 -0
- package/lib/types/backends/claude/send-message.js +65 -0
- package/lib/types/backends/claude/session/auth.d.ts +47 -0
- package/lib/types/backends/claude/session/auth.d.ts.map +1 -0
- package/lib/types/backends/claude/session/auth.js +226 -0
- package/lib/types/backends/claude/session/channels.d.ts +82 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -0
- package/lib/types/backends/claude/session/channels.js +45 -0
- package/lib/types/backends/claude/session/input.d.ts +16 -0
- package/lib/types/backends/claude/session/input.d.ts.map +1 -0
- package/lib/types/backends/claude/session/input.js +64 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts +6 -0
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -0
- package/lib/types/backends/claude/session/lifecycle.js +852 -0
- package/lib/types/backends/claude/session/store.d.ts +17 -0
- package/lib/types/backends/claude/session/store.d.ts.map +1 -0
- package/lib/types/backends/claude/session/store.js +122 -0
- package/lib/types/backends/claude/session/subagents.d.ts +13 -0
- package/lib/types/backends/claude/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/claude/session/subagents.js +77 -0
- package/lib/types/backends/claude/session/types.d.ts +89 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -0
- package/lib/types/backends/claude/session/types.js +1 -0
- package/lib/types/backends/claude/session.d.ts +4 -0
- package/lib/types/backends/claude/session.d.ts.map +1 -0
- package/lib/types/backends/claude/session.js +2 -0
- package/lib/types/backends/claude/side-query.d.ts +34 -0
- package/lib/types/backends/claude/side-query.d.ts.map +1 -0
- package/lib/types/backends/claude/side-query.js +116 -0
- package/lib/types/backends/claude/task-output.d.ts +13 -0
- package/lib/types/backends/claude/task-output.d.ts.map +1 -0
- package/lib/types/backends/claude/task-output.js +101 -0
- package/lib/types/backends/claude/tools.d.ts +45 -0
- package/lib/types/backends/claude/tools.d.ts.map +1 -0
- package/lib/types/backends/claude/tools.js +231 -0
- package/lib/types/backends/claude/transcript-file.d.ts +41 -0
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -0
- package/lib/types/backends/claude/transcript-file.js +195 -0
- package/lib/types/backends/claude/translate/attempts.d.ts +33 -0
- package/lib/types/backends/claude/translate/attempts.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/attempts.js +243 -0
- package/lib/types/backends/claude/translate/content.d.ts +33 -0
- package/lib/types/backends/claude/translate/content.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/content.js +91 -0
- package/lib/types/backends/claude/translate/core.d.ts +76 -0
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/core.js +447 -0
- package/lib/types/backends/claude/translate/events.d.ts +9 -0
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/events.js +77 -0
- package/lib/types/backends/claude/translate/lanes.d.ts +31 -0
- package/lib/types/backends/claude/translate/lanes.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/lanes.js +177 -0
- package/lib/types/backends/claude/translate/messages.d.ts +36 -0
- package/lib/types/backends/claude/translate/messages.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/messages.js +202 -0
- package/lib/types/backends/claude/translate/system.d.ts +40 -0
- package/lib/types/backends/claude/translate/system.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/system.js +399 -0
- package/lib/types/backends/claude/translate/tasks.d.ts +19 -0
- package/lib/types/backends/claude/translate/tasks.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/tasks.js +159 -0
- package/lib/types/backends/claude/translate/types.d.ts +114 -0
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -0
- package/lib/types/backends/claude/translate/types.js +1 -0
- package/lib/types/backends/claude/translate.d.ts +9 -0
- package/lib/types/backends/claude/translate.d.ts.map +1 -0
- package/lib/types/backends/claude/translate.js +6 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts +66 -0
- package/lib/types/backends/codex/auth/external-tokens.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/external-tokens.js +325 -0
- package/lib/types/backends/codex/auth/route.d.ts +14 -0
- package/lib/types/backends/codex/auth/route.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/route.js +52 -0
- package/lib/types/backends/codex/auth/status.d.ts +16 -0
- package/lib/types/backends/codex/auth/status.d.ts.map +1 -0
- package/lib/types/backends/codex/auth/status.js +115 -0
- package/lib/types/backends/codex/backend.d.ts +58 -0
- package/lib/types/backends/codex/backend.d.ts.map +1 -0
- package/lib/types/backends/codex/backend.js +201 -0
- package/lib/types/backends/codex/catalog.d.ts +17 -0
- package/lib/types/backends/codex/catalog.d.ts.map +1 -0
- package/lib/types/backends/codex/catalog.js +128 -0
- package/lib/types/backends/codex/channels.d.ts +59 -0
- package/lib/types/backends/codex/channels.d.ts.map +1 -0
- package/lib/types/backends/codex/channels.js +274 -0
- package/lib/types/backends/codex/contract.d.ts +46 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -0
- package/lib/types/backends/codex/contract.js +80 -0
- package/lib/types/backends/codex/detect.d.ts +14 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -0
- package/lib/types/backends/codex/detect.js +90 -0
- package/lib/types/backends/codex/index.d.ts +6 -0
- package/lib/types/backends/codex/index.d.ts.map +1 -0
- package/lib/types/backends/codex/index.js +5 -0
- package/lib/types/backends/codex/modes.d.ts +16 -0
- package/lib/types/backends/codex/modes.d.ts.map +1 -0
- package/lib/types/backends/codex/modes.js +49 -0
- package/lib/types/backends/codex/narrow.d.ts +20 -0
- package/lib/types/backends/codex/narrow.d.ts.map +1 -0
- package/lib/types/backends/codex/narrow.js +18 -0
- package/lib/types/backends/codex/prefs.d.ts +42 -0
- package/lib/types/backends/codex/prefs.d.ts.map +1 -0
- package/lib/types/backends/codex/prefs.js +124 -0
- package/lib/types/backends/codex/protocol/index.d.ts +149 -0
- package/lib/types/backends/codex/protocol/index.d.ts.map +1 -0
- package/lib/types/backends/codex/protocol/index.js +130 -0
- package/lib/types/backends/codex/rpc/binary.d.ts +35 -0
- package/lib/types/backends/codex/rpc/binary.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/binary.js +174 -0
- package/lib/types/backends/codex/rpc/client.d.ts +72 -0
- package/lib/types/backends/codex/rpc/client.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/client.js +214 -0
- package/lib/types/backends/codex/rpc/hub.d.ts +105 -0
- package/lib/types/backends/codex/rpc/hub.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/hub.js +532 -0
- package/lib/types/backends/codex/rpc/transport.d.ts +39 -0
- package/lib/types/backends/codex/rpc/transport.d.ts.map +1 -0
- package/lib/types/backends/codex/rpc/transport.js +212 -0
- package/lib/types/backends/codex/session/activity.d.ts +18 -0
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -0
- package/lib/types/backends/codex/session/activity.js +108 -0
- package/lib/types/backends/codex/session/approvals.d.ts +39 -0
- package/lib/types/backends/codex/session/approvals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/approvals.js +477 -0
- package/lib/types/backends/codex/session/commands.d.ts +37 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/session/commands.js +141 -0
- package/lib/types/backends/codex/session/controls.d.ts +37 -0
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -0
- package/lib/types/backends/codex/session/controls.js +303 -0
- package/lib/types/backends/codex/session/goals.d.ts +25 -0
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -0
- package/lib/types/backends/codex/session/goals.js +97 -0
- package/lib/types/backends/codex/session/history.d.ts +52 -0
- package/lib/types/backends/codex/session/history.d.ts.map +1 -0
- package/lib/types/backends/codex/session/history.js +196 -0
- package/lib/types/backends/codex/session/images.d.ts +17 -0
- package/lib/types/backends/codex/session/images.d.ts.map +1 -0
- package/lib/types/backends/codex/session/images.js +138 -0
- package/lib/types/backends/codex/session/input.d.ts +75 -0
- package/lib/types/backends/codex/session/input.d.ts.map +1 -0
- package/lib/types/backends/codex/session/input.js +294 -0
- package/lib/types/backends/codex/session/plan-review.d.ts +19 -0
- package/lib/types/backends/codex/session/plan-review.d.ts.map +1 -0
- package/lib/types/backends/codex/session/plan-review.js +48 -0
- package/lib/types/backends/codex/session/prompts.d.ts +7 -0
- package/lib/types/backends/codex/session/prompts.d.ts.map +1 -0
- package/lib/types/backends/codex/session/prompts.js +47 -0
- package/lib/types/backends/codex/session/session.d.ts +12 -0
- package/lib/types/backends/codex/session/session.d.ts.map +1 -0
- package/lib/types/backends/codex/session/session.js +871 -0
- package/lib/types/backends/codex/session/side-query.d.ts +25 -0
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -0
- package/lib/types/backends/codex/session/side-query.js +121 -0
- package/lib/types/backends/codex/session/state.d.ts +57 -0
- package/lib/types/backends/codex/session/state.d.ts.map +1 -0
- package/lib/types/backends/codex/session/state.js +1 -0
- package/lib/types/backends/codex/session/subagents.d.ts +28 -0
- package/lib/types/backends/codex/session/subagents.d.ts.map +1 -0
- package/lib/types/backends/codex/session/subagents.js +286 -0
- package/lib/types/backends/codex/session/tasks.d.ts +25 -0
- package/lib/types/backends/codex/session/tasks.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tasks.js +207 -0
- package/lib/types/backends/codex/session/tool-output.d.ts +9 -0
- package/lib/types/backends/codex/session/tool-output.d.ts.map +1 -0
- package/lib/types/backends/codex/session/tool-output.js +29 -0
- package/lib/types/backends/codex/translate/commands.d.ts +30 -0
- package/lib/types/backends/codex/translate/commands.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/commands.js +103 -0
- package/lib/types/backends/codex/translate/events.d.ts +9 -0
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/events.js +71 -0
- package/lib/types/backends/codex/translate/items.d.ts +112 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/items.js +375 -0
- package/lib/types/backends/codex/translate/live.d.ts +39 -0
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/live.js +315 -0
- package/lib/types/backends/codex/translate/notices.d.ts +27 -0
- package/lib/types/backends/codex/translate/notices.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/notices.js +99 -0
- package/lib/types/backends/codex/translate/presentation.d.ts +49 -0
- package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/presentation.js +237 -0
- package/lib/types/backends/codex/translate/replay.d.ts +18 -0
- package/lib/types/backends/codex/translate/replay.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/replay.js +33 -0
- package/lib/types/backends/codex/translate/usage.d.ts +29 -0
- package/lib/types/backends/codex/translate/usage.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/usage.js +65 -0
- package/lib/types/backends/shared/atomic-file.d.ts +4 -0
- package/lib/types/backends/shared/atomic-file.d.ts.map +1 -0
- package/lib/types/backends/shared/atomic-file.js +52 -0
- package/lib/types/backends/shared/channel-tokens.d.ts +29 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-tokens.js +161 -0
- package/lib/types/backends/shared/display-path.d.ts +3 -0
- package/lib/types/backends/shared/display-path.d.ts.map +1 -0
- package/lib/types/backends/shared/display-path.js +12 -0
- package/lib/types/branding.d.ts +92 -0
- package/lib/types/branding.d.ts.map +1 -0
- package/lib/types/branding.js +117 -0
- package/lib/types/channel/activity.d.ts +53 -0
- package/lib/types/channel/activity.d.ts.map +1 -0
- package/lib/types/channel/activity.js +955 -0
- package/lib/types/channel/capabilities.d.ts +24 -0
- package/lib/types/channel/capabilities.d.ts.map +1 -0
- package/lib/types/channel/capabilities.js +57 -0
- package/lib/types/channel/channel-slug.d.ts +9 -0
- package/lib/types/channel/channel-slug.d.ts.map +1 -0
- package/lib/types/channel/channel-slug.js +15 -0
- package/lib/types/channel/channel-wizard.d.ts +30 -0
- package/lib/types/channel/channel-wizard.d.ts.map +1 -0
- package/lib/types/channel/channel-wizard.js +226 -0
- package/lib/types/channel/elicitation.d.ts +135 -0
- package/lib/types/channel/elicitation.d.ts.map +1 -0
- package/lib/types/channel/elicitation.js +360 -0
- package/lib/types/channel/goal-command.d.ts +49 -0
- package/lib/types/channel/goal-command.d.ts.map +1 -0
- package/lib/types/channel/goal-command.js +72 -0
- package/lib/types/channel/history-restore.d.ts +16 -0
- package/lib/types/channel/history-restore.d.ts.map +1 -0
- package/lib/types/channel/history-restore.js +214 -0
- package/lib/types/channel/interaction.d.ts +38 -0
- package/lib/types/channel/interaction.d.ts.map +1 -0
- package/lib/types/channel/interaction.js +110 -0
- package/lib/types/channel/job-format.d.ts +6 -0
- package/lib/types/channel/job-format.d.ts.map +1 -0
- package/lib/types/channel/job-format.js +12 -0
- package/lib/types/channel/live-output.d.ts +35 -0
- package/lib/types/channel/live-output.d.ts.map +1 -0
- package/lib/types/channel/live-output.js +74 -0
- package/lib/types/channel/model-capabilities.d.ts +10 -0
- package/lib/types/channel/model-capabilities.d.ts.map +1 -0
- package/lib/types/channel/model-capabilities.js +51 -0
- package/lib/types/channel/permissions.d.ts +155 -0
- package/lib/types/channel/permissions.d.ts.map +1 -0
- package/lib/types/channel/permissions.js +188 -0
- package/lib/types/channel/projection.d.ts +110 -0
- package/lib/types/channel/projection.d.ts.map +1 -0
- package/lib/types/channel/projection.js +1521 -0
- package/lib/types/channel/question-record.d.ts +76 -0
- package/lib/types/channel/question-record.d.ts.map +1 -0
- package/lib/types/channel/question-record.js +109 -0
- package/lib/types/channel/questions.d.ts +204 -0
- package/lib/types/channel/questions.d.ts.map +1 -0
- package/lib/types/channel/questions.js +286 -0
- package/lib/types/channel/sanitize.d.ts +49 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -0
- package/lib/types/channel/sanitize.js +88 -0
- package/lib/types/channel/selection-record.d.ts +18 -0
- package/lib/types/channel/selection-record.d.ts.map +1 -0
- package/lib/types/channel/selection-record.js +45 -0
- package/lib/types/channel/side-prompts.d.ts +59 -0
- package/lib/types/channel/side-prompts.d.ts.map +1 -0
- package/lib/types/channel/side-prompts.js +127 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -0
- package/lib/types/channel/transcript.js +19 -0
- package/lib/types/channel/usage.d.ts +48 -0
- package/lib/types/channel/usage.d.ts.map +1 -0
- package/lib/types/channel/usage.js +143 -0
- package/lib/types/commands.d.ts +147 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +208 -6
- 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/AgentMessageComposer.d.ts +50 -0
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -0
- package/lib/types/components/AgentMessageComposer.js +159 -0
- package/lib/types/components/BtwPanel.d.ts +13 -12
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +35 -24
- package/lib/types/components/ChannelPicker.d.ts +40 -0
- package/lib/types/components/ChannelPicker.d.ts.map +1 -0
- package/lib/types/components/ChannelPicker.js +26 -0
- package/lib/types/components/Chat/JobCard.d.ts +29 -14
- package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
- package/lib/types/components/Chat/JobCard.js +51 -64
- 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.d.ts +4 -1
- package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
- package/lib/types/components/Chat/SubagentMessage.js +10 -3
- package/lib/types/components/ClaudeGirl.d.ts +27 -0
- package/lib/types/components/ClaudeGirl.d.ts.map +1 -0
- package/lib/types/components/ClaudeGirl.js +30 -0
- package/lib/types/components/CodeBlockFrame.d.ts +19 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -0
- package/lib/types/components/CodeBlockFrame.js +138 -0
- package/lib/types/components/CommandSuggestions.d.ts +10 -1
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +20 -3
- package/lib/types/components/ContextBarView.d.ts +2 -2
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +18 -8
- package/lib/types/components/EffortChargeGlyph.d.ts +1 -1
- package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -1
- package/lib/types/components/EffortChargeGlyph.js +3 -4
- package/lib/types/components/EffortInputBorder.d.ts +1 -2
- package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
- package/lib/types/components/EffortInputBorder.js +7 -4
- package/lib/types/components/EffortSlider.d.ts +5 -1
- package/lib/types/components/EffortSlider.d.ts.map +1 -1
- package/lib/types/components/EffortSlider.js +2 -2
- package/lib/types/components/EffortTierBadge.d.ts +1 -2
- package/lib/types/components/EffortTierBadge.d.ts.map +1 -1
- package/lib/types/components/EffortTierBadge.js +8 -5
- package/lib/types/components/GoalTodoPanel.d.ts +15 -2
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +65 -18
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/JobsPanel.d.ts +41 -2
- package/lib/types/components/JobsPanel.d.ts.map +1 -1
- package/lib/types/components/JobsPanel.js +208 -16
- package/lib/types/components/KernelPicker.d.ts +28 -0
- package/lib/types/components/KernelPicker.d.ts.map +1 -0
- package/lib/types/components/KernelPicker.js +37 -0
- package/lib/types/components/LogoV2.d.ts +49 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +157 -34
- package/lib/types/components/Markdown.d.ts +2 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +37 -8
- package/lib/types/components/MathBlock.d.ts.map +1 -1
- package/lib/types/components/MathBlock.js +3 -1
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/components/MermaidDiagram.js +7 -5
- package/lib/types/components/MessageList.d.ts +28 -4
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +247 -33
- package/lib/types/components/ModePicker.d.ts +20 -0
- package/lib/types/components/ModePicker.d.ts.map +1 -0
- package/lib/types/components/ModePicker.js +17 -0
- 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 +22 -24
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +720 -210
- package/lib/types/components/SdkInstallWizard.d.ts +44 -0
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -0
- package/lib/types/components/SdkInstallWizard.js +18 -0
- package/lib/types/components/SearchBox.d.ts +22 -6
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +27 -14
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +113 -6
- package/lib/types/components/StarPrompt.d.ts.map +1 -1
- package/lib/types/components/StarPrompt.js +5 -3
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +6 -4
- package/lib/types/components/SubagentCard.d.ts +2 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +32 -10
- package/lib/types/components/SubagentDashboard.d.ts +22 -3
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +69 -10
- package/lib/types/components/SubagentDetailScene.d.ts +22 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +245 -45
- 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/SyntaxText.d.ts.map +1 -1
- package/lib/types/components/SyntaxText.js +4 -1
- 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/TurnInterruptedRow.d.ts +3 -1
- package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -1
- package/lib/types/components/TurnInterruptedRow.js +6 -3
- package/lib/types/components/TurnUsageRow.d.ts +24 -0
- package/lib/types/components/TurnUsageRow.d.ts.map +1 -0
- package/lib/types/components/TurnUsageRow.js +46 -0
- package/lib/types/components/WorkingSpinner.d.ts +2 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +21 -4
- package/lib/types/components/approvals/ApprovalPanel.d.ts +36 -13
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +173 -25
- package/lib/types/components/claudeGirlSprite.d.ts +18 -0
- package/lib/types/components/claudeGirlSprite.d.ts.map +1 -0
- package/lib/types/components/claudeGirlSprite.js +48 -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/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +46 -13
- package/lib/types/components/design-system/ThemedText.d.ts +3 -1
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedText.js +2 -2
- package/lib/types/components/diffPatch.d.ts +55 -0
- package/lib/types/components/diffPatch.d.ts.map +1 -0
- package/lib/types/components/diffPatch.js +142 -0
- package/lib/types/components/kernelCatalog.d.ts +48 -0
- package/lib/types/components/kernelCatalog.d.ts.map +1 -0
- package/lib/types/components/kernelCatalog.js +53 -0
- package/lib/types/components/launchpadActions.d.ts +80 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -0
- package/lib/types/components/launchpadActions.js +133 -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/launchpadParams.d.ts +101 -0
- package/lib/types/components/launchpadParams.d.ts.map +1 -0
- package/lib/types/components/launchpadParams.js +171 -0
- package/lib/types/components/maidPortrait.d.ts +37 -5
- package/lib/types/components/maidPortrait.d.ts.map +1 -1
- package/lib/types/components/maidPortrait.js +73 -54
- package/lib/types/components/messages/AgentMessageFlow.d.ts +20 -0
- package/lib/types/components/messages/AgentMessageFlow.d.ts.map +1 -0
- package/lib/types/components/messages/AgentMessageFlow.js +37 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +6 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +29 -5
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +11 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +289 -36
- package/lib/types/components/messages/TranscriptLeaves.d.ts +85 -0
- package/lib/types/components/messages/TranscriptLeaves.d.ts.map +1 -0
- package/lib/types/components/messages/TranscriptLeaves.js +74 -0
- package/lib/types/components/messages/agentTeam.d.ts +69 -0
- package/lib/types/components/messages/agentTeam.d.ts.map +1 -0
- package/lib/types/components/messages/agentTeam.js +53 -0
- package/lib/types/components/messages/liveOutputLines.d.ts +33 -0
- package/lib/types/components/messages/liveOutputLines.d.ts.map +1 -0
- package/lib/types/components/messages/liveOutputLines.js +100 -0
- package/lib/types/components/messages/subagentTranscript.d.ts +146 -0
- package/lib/types/components/messages/subagentTranscript.d.ts.map +1 -0
- package/lib/types/components/messages/subagentTranscript.js +304 -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/questions/AskUserQuestionPanel.d.ts +16 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +76 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +11 -6
- package/lib/types/components/questions/ProviderModelEditor.d.ts +12 -0
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -0
- package/lib/types/components/questions/ProviderModelEditor.js +266 -0
- package/lib/types/components/shimmer.d.ts +26 -0
- package/lib/types/components/shimmer.d.ts.map +1 -1
- package/lib/types/components/shimmer.js +26 -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 +129 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts +21 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelBar.js +82 -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 +57 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/PanelStore.js +113 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +24 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
- package/lib/types/components/sidePanel/SidePanelColumn.js +67 -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 +327 -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/agentViewStore.d.ts +20 -0
- package/lib/types/components/sidePanel/agentViewStore.d.ts.map +1 -0
- package/lib/types/components/sidePanel/agentViewStore.js +26 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +50 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.js +45 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +13 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +147 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +14 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +131 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +87 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts +111 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/threads.js +302 -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 +269 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +11 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +492 -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 +208 -0
- package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/mood.js +256 -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 +136 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
- package/lib/types/components/sidePanel/companion/skins.js +582 -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/splashFonts.d.ts +17 -9
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +119 -15
- package/lib/types/components/splashLayout.d.ts.map +1 -1
- package/lib/types/components/splashLayout.js +3 -1
- package/lib/types/components/subagentDetailMemory.d.ts +17 -0
- package/lib/types/components/subagentDetailMemory.d.ts.map +1 -0
- package/lib/types/components/subagentDetailMemory.js +28 -0
- package/lib/types/components/trajectory/Inspector.d.ts.map +1 -1
- package/lib/types/components/trajectory/Inspector.js +9 -0
- package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
- package/lib/types/components/trajectory/Ledger.js +7 -1
- package/lib/types/components/trajectory/scope.d.ts +64 -0
- package/lib/types/components/trajectory/scope.d.ts.map +1 -0
- package/lib/types/components/trajectory/scope.js +88 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts +42 -0
- package/lib/types/components/trajectory/useTrajectoryScope.d.ts.map +1 -0
- package/lib/types/components/trajectory/useTrajectoryScope.js +86 -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/customTheme.d.ts +4 -6
- package/lib/types/customTheme.d.ts.map +1 -1
- package/lib/types/customTheme.js +6 -8
- 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/approvals.d.ts +18 -5
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +17 -4
- package/lib/types/dsh-adapter/backend/session.d.ts +64 -0
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/session.js +291 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts +58 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend/translate.js +467 -0
- package/lib/types/dsh-adapter/backends.d.ts +49 -0
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.js +124 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +16 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +109 -0
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- 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/background-action.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +7 -5
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +25 -9
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +101 -135
- package/lib/types/dsh-adapter/channel/binding.d.ts +61 -14
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +102 -35
- 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 +3 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +41 -4
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +3 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +4 -3
- 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/core/actions.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/actions.js +152 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +145 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +289 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +217 -0
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/compose.js +938 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts +57 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/files.js +45 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +55 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/host.js +116 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +46 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.js +117 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/core/local-images.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/local-images.js +147 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts +12 -0
- package/lib/types/dsh-adapter/channel/core/reports.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/reports.js +77 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts +39 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-controls.js +219 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +174 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/session-switch.js +390 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +40 -0
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/core/sessions.js +268 -0
- package/lib/types/dsh-adapter/channel/decisions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/decisions.js +4 -4
- package/lib/types/dsh-adapter/channel/emitter.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/emitter.js +5 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts +36 -0
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/extensions.js +714 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts +1 -10
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/ide-selection.js +4 -46
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +27 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +240 -21
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +34 -7
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +79 -24
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +10 -32
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +10 -78
- package/lib/types/dsh-adapter/channel/local-fs.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/local-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/local-fs.js +46 -0
- package/lib/types/dsh-adapter/channel/mode-actions.d.ts +3 -6
- 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 +10 -3
- 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/model-actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +38 -5
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +9 -6
- 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 +25 -1
- package/lib/types/dsh-adapter/channel/projection.d.ts +16 -13
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +38 -1138
- package/lib/types/dsh-adapter/channel/question-record.d.ts +3 -75
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/question-record.js +3 -107
- 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-activity.d.ts +9 -0
- package/lib/types/dsh-adapter/channel/session-activity.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-activity.js +42 -0
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +3 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +2 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +7 -3
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -9
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- 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 +5 -0
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +5 -10
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +74 -113
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +7 -6
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -7
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/skill-catalog.js +2 -2
- package/lib/types/dsh-adapter/channel/state.d.ts +89 -2
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +9 -4
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +58 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +153 -9
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +114 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/subagent-transcript.js +279 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +7 -15
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +17 -21
- package/lib/types/dsh-adapter/channel/types.d.ts +16 -7
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.d.ts +3 -6
- package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/usage.js +5 -16
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +2 -1
- package/lib/types/dsh-adapter/channel.d.ts +17 -8
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +24 -1006
- package/lib/types/dsh-adapter/context-occupancy.d.ts +209 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
- package/lib/types/dsh-adapter/context-occupancy.js +304 -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/decision-guard.d.ts +24 -0
- package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/decision-guard.js +44 -0
- package/lib/types/dsh-adapter/extension-events.d.ts +4 -1
- package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/extension-events.js +22 -10
- package/lib/types/dsh-adapter/index.d.ts +71 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +47 -1
- package/lib/types/dsh-adapter/jobs.d.ts +5 -3
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +53 -14
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -16
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +3 -29
- 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-credential-source.d.ts +34 -0
- package/lib/types/dsh-adapter/oauth-credential-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/oauth-credential-source.js +66 -0
- 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 +55 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +708 -135
- 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/provider-model-capabilities.d.ts +10 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.d.ts.map +1 -0
- package/lib/types/dsh-adapter/provider-model-capabilities.js +80 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts +8 -2
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +118 -52
- package/lib/types/dsh-adapter/questions.d.ts +29 -124
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +33 -267
- package/lib/types/dsh-adapter/recap.d.ts +3 -15
- package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
- package/lib/types/dsh-adapter/recap.js +3 -46
- package/lib/types/dsh-adapter/sanitize.d.ts +4 -44
- package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sanitize.js +4 -84
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +3 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -1
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +4 -2
- package/lib/types/dsh-adapter/sessions/digest.d.ts +18 -3
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +60 -27
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +6 -4
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +2 -2
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/recovery.js +23 -14
- package/lib/types/dsh-adapter/sessions/store.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +1 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +2 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +3 -13
- 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.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +7 -0
- package/lib/types/dsh-adapter/themes.d.ts +1 -1
- package/lib/types/dsh-adapter/themes.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts +84 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.d.ts.map +1 -0
- package/lib/types/dsh-adapter/trajectory/agent-source.js +601 -0
- package/lib/types/dsh-adapter/trajectory/guards.d.ts +31 -1
- package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/guards.js +28 -0
- package/lib/types/dsh-adapter/trajectory/index.d.ts +3 -1
- package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/index.js +1 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts +7 -0
- package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/inspect.js +70 -2
- package/lib/types/dsh-adapter/trajectory/projection.d.ts +4 -0
- package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/trajectory/projection.js +36 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts +13 -0
- package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +7 -0
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +11 -2
- package/lib/types/handoffAck.d.ts +57 -0
- package/lib/types/handoffAck.d.ts.map +1 -0
- package/lib/types/handoffAck.js +154 -0
- package/lib/types/handoffEvents.d.ts +52 -0
- package/lib/types/handoffEvents.d.ts.map +1 -0
- package/lib/types/handoffEvents.js +128 -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 +3937 -97
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +1154 -12
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +8 -2
- package/lib/types/ink/components/AlternateScreen.d.ts +12 -1
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
- package/lib/types/ink/components/AlternateScreen.js +25 -4
- package/lib/types/ink/components/App.d.ts +19 -2
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +114 -66
- package/lib/types/ink/components/Image.d.ts +8 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- 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/components/Text.d.ts +8 -1
- package/lib/types/ink/components/Text.d.ts.map +1 -1
- package/lib/types/ink/components/Text.js +11 -1
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/dom.js +75 -3
- 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 +17 -6
- 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 +59 -10
- package/lib/types/ink/kitty-graphics.d.ts +7 -2
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +15 -7
- package/lib/types/ink/node-cache.d.ts +15 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/node-cache.js +4 -1
- 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 +5 -3
- package/lib/types/ink/parse-keypress.d.ts +49 -3
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +700 -127
- package/lib/types/ink/reconciler.d.ts.map +1 -1
- package/lib/types/ink/reconciler.js +9 -0
- 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 +237 -9
- package/lib/types/ink/render-stats.d.ts +35 -0
- package/lib/types/ink/render-stats.d.ts.map +1 -0
- package/lib/types/ink/render-stats.js +53 -0
- 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 +21 -0
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +49 -8
- package/lib/types/ink/sixel-graphics.js +2 -2
- package/lib/types/ink/styles.d.ts +46 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +7 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +1 -1
- package/lib/types/ink/terminal-querier.js +4 -4
- package/lib/types/ink/text-decoration.d.ts +49 -0
- package/lib/types/ink/text-decoration.d.ts.map +1 -0
- package/lib/types/ink/text-decoration.js +235 -0
- package/lib/types/ink/update-overflow-guard.d.ts +9 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +41 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +5 -1
- package/lib/types/kernelPrefs.d.ts +51 -0
- package/lib/types/kernelPrefs.d.ts.map +1 -0
- package/lib/types/kernelPrefs.js +126 -0
- 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/modelRecents.d.ts +10 -2
- package/lib/types/modelRecents.d.ts.map +1 -1
- package/lib/types/modelRecents.js +20 -7
- 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/AgentTranscriptScene.d.ts +42 -0
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -0
- package/lib/types/screens/AgentTranscriptScene.js +269 -0
- package/lib/types/screens/Chat.d.ts +66 -7
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +1720 -381
- package/lib/types/screens/Launchpad.d.ts +211 -0
- package/lib/types/screens/Launchpad.d.ts.map +1 -0
- package/lib/types/screens/Launchpad.js +726 -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 +3 -3
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +87 -17
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +211 -7
- package/lib/types/screens/StatusLine.d.ts +40 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +160 -30
- package/lib/types/screens/StatusMetrics.d.ts +75 -17
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +161 -30
- package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
- package/lib/types/screens/TrajectoryScene.js +74 -12
- package/lib/types/screens/chat/backendCommands.d.ts +37 -0
- package/lib/types/screens/chat/backendCommands.d.ts.map +1 -0
- package/lib/types/screens/chat/backendCommands.js +51 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts +20 -0
- package/lib/types/screens/chat/useBackendChannels.d.ts.map +1 -0
- package/lib/types/screens/chat/useBackendChannels.js +117 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +23 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useKernelPicker.js +72 -0
- package/lib/types/screens/chatOverlay.d.ts +49 -2
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +12 -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/useForeignSessions.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +5 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +14 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +104 -25
- package/lib/types/sessionHistory.d.ts +18 -1
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +46 -4
- package/lib/types/sessionPins.d.ts +7 -0
- package/lib/types/sessionPins.d.ts.map +1 -1
- package/lib/types/sessionPins.js +9 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +2 -1
- package/lib/types/settings/definitions.d.ts +167 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +129 -0
- package/lib/types/terminal-utils/hyperlink.d.ts +2 -2
- package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -1
- package/lib/types/terminal-utils/hyperlink.js +21 -4
- package/lib/types/terminal-utils/markdown.d.ts +34 -6
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +257 -66
- package/lib/types/theme.d.ts +49 -8
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +514 -18
- package/lib/types/tips.js +7 -7
- package/lib/types/trajectory/effortIgnition.d.ts +25 -7
- package/lib/types/trajectory/effortIgnition.d.ts.map +1 -1
- package/lib/types/trajectory/effortIgnition.js +106 -34
- package/lib/types/trajectory/window.d.ts +26 -0
- package/lib/types/trajectory/window.d.ts.map +1 -0
- package/lib/types/trajectory/window.js +27 -0
- package/lib/types/tuiDisplayPrefs.d.ts +79 -2
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +118 -0
- package/lib/types/update.d.ts +141 -12
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +386 -62
- 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/crashDetail.d.ts +56 -0
- package/lib/types/utils/crashDetail.d.ts.map +1 -0
- package/lib/types/utils/crashDetail.js +175 -0
- 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/imageResize.d.ts +9 -23
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +24 -20
- package/lib/types/utils/inputPaste.d.ts +63 -0
- package/lib/types/utils/inputPaste.d.ts.map +1 -0
- package/lib/types/utils/inputPaste.js +148 -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/jsonl.d.ts +24 -0
- package/lib/types/utils/jsonl.d.ts.map +1 -0
- package/lib/types/utils/jsonl.js +36 -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 +36 -9
- 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
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
// 粘贴/清洗语义已抽到 utils/inputPaste.ts(方案 B:PromptInput 与 Launchpad 共享;
|
|
4
|
+
// 行为逐字节不变,只是搬了家)。
|
|
5
|
+
import { sanitizeEditableText, sanitizePastedText } from '../utils/inputPaste.js';
|
|
4
6
|
import { constants as fsConstants } from 'node:fs';
|
|
5
7
|
import { open, unlink } from 'node:fs/promises';
|
|
6
8
|
import { basename, resolve } from 'node:path';
|
|
7
9
|
import { t } from '../i18n.js';
|
|
10
|
+
import { kernelDisplayName } from './kernelCatalog.js';
|
|
8
11
|
import { Box, Text, useInput, useTerminalSize, useTheme } from '../ui.js';
|
|
9
12
|
import { EffortChargeGlyph } from './EffortChargeGlyph.js';
|
|
10
13
|
import { EffortInputBorder } from './EffortInputBorder.js';
|
|
11
14
|
import { EffortTierBadge } from './EffortTierBadge.js';
|
|
12
|
-
import {
|
|
15
|
+
import { cursorGlyphColor, getTheme } from '../theme.js';
|
|
13
16
|
import { sessionColorHex } from '../terminal-utils/sessionColors.js';
|
|
14
17
|
import { useDeclaredCursor } from '../ink/hooks/use-declared-cursor.js';
|
|
15
18
|
import { TerminalWriteContext } from '../ink/useTerminalNotification.js';
|
|
@@ -19,12 +22,13 @@ import instances from '../ink/instances.js';
|
|
|
19
22
|
import { stringWidth } from '../ink/stringWidth.js';
|
|
20
23
|
import { truncateToWidth } from '../ink/truncateToWidth.js';
|
|
21
24
|
import { getGraphemeSegmenter } from '../utils/intl.js';
|
|
25
|
+
import { draftWordRangeAt, isDraftWordBoundary } from '../utils/draftWordBoundary.js';
|
|
22
26
|
import { formatClipboardInsert, readClipboard } from '../utils/clipboard.js';
|
|
23
27
|
import { imagePathMediaType, parsePastedImagePath, stageClipboardFilePaths } from '../utils/pastedImagePath.js';
|
|
24
28
|
import { editInExternalEditor } from '../utils/externalEditor.js';
|
|
25
29
|
import { setPromptEditorNode, EditorButton } from './PromptEditor.js';
|
|
26
|
-
import { isHiddenCommandName, parseCommandName } from '../commands.js';
|
|
27
|
-
import { appendHistory, HISTORY_LIMIT, loadHistoryOldestFirst } from '../history.js';
|
|
30
|
+
import { isHiddenCommandName, isUnavailableLocalCommand, parseCommandName, workingHoldOf } from '../commands.js';
|
|
31
|
+
import { appendHistory, HISTORY_LIMIT, historyProjectKey, loadHistoryOldestFirst } from '../history.js';
|
|
28
32
|
import { mentionAtCaret } from '../utils/mentions.js';
|
|
29
33
|
import { preserveSelection } from '../utils/fileSuggestions.js';
|
|
30
34
|
import { isMod } from '../utils/modifiers.js';
|
|
@@ -32,9 +36,11 @@ import { actionMatches } from '../utils/keymap.js';
|
|
|
32
36
|
import { CommandSuggestions } from './CommandSuggestions.js';
|
|
33
37
|
import { FileSuggestions } from './FileSuggestions.js';
|
|
34
38
|
import { HelpMenu } from './HelpMenu.js';
|
|
35
|
-
import { OverlayAbove } from './OverlayAbove.js';
|
|
39
|
+
import { OverlayAbove, useOverlayListRows } from './OverlayAbove.js';
|
|
40
|
+
import { listWindow } from './listWindow.js';
|
|
36
41
|
import { SuggestionCard, cardContentWidth } from './SuggestionCard.js';
|
|
37
42
|
import { filterLiveImageBindings, isUsableDraftSnapshot, resolveBindingGeneration, } from './promptDraftCache.js';
|
|
43
|
+
export { sanitizeEditableText, sanitizePastedText } from '../utils/inputPaste.js';
|
|
38
44
|
/**
|
|
39
45
|
* Visible text of the session-entry control at the head of the input row:
|
|
40
46
|
* U+2338 APL FUNCTIONAL SYMBOL QUAD COLON plus a separator space.
|
|
@@ -53,6 +59,67 @@ import { filterLiveImageBindings, isUsableDraftSnapshot, resolveBindingGeneratio
|
|
|
53
59
|
*/
|
|
54
60
|
const HOME_BUTTON_TEXT = '⌸ ';
|
|
55
61
|
const HOME_BUTTON_COLS = stringWidth(HOME_BUTTON_TEXT);
|
|
62
|
+
/** Undo depth for both stacks (draft `Ctrl+Z` and vim `u`). */
|
|
63
|
+
const UNDO_LIMIT = 100;
|
|
64
|
+
/** Total characters kept across all snapshots; the oldest are dropped first. */
|
|
65
|
+
const UNDO_MAX_CHARS = 1_000_000;
|
|
66
|
+
/** Layer-3 idle window: a pause longer than this starts a new step. */
|
|
67
|
+
const UNDO_IDLE_MS = 700;
|
|
68
|
+
/**
|
|
69
|
+
* Common prefix/suffix of `prev` and `next` — the single edited span. Undo
|
|
70
|
+
* grouping works on this span rather than on a stdin chunk: one chunk may
|
|
71
|
+
* carry several characters (or several keys), so the unit is one real text
|
|
72
|
+
* mutation however it arrived. The common prefix must not pass either caret:
|
|
73
|
+
* repeated characters otherwise make an edit at the head look like a tail edit.
|
|
74
|
+
*/
|
|
75
|
+
function diffSpan(prev, next, cursorBefore, cursorAfter) {
|
|
76
|
+
let start = 0;
|
|
77
|
+
const common = Math.min(prev.length, next.length, cursorBefore, cursorAfter);
|
|
78
|
+
while (start < common && prev.charCodeAt(start) === next.charCodeAt(start))
|
|
79
|
+
start++;
|
|
80
|
+
let prevEnd = prev.length;
|
|
81
|
+
let nextEnd = next.length;
|
|
82
|
+
while (prevEnd > start &&
|
|
83
|
+
nextEnd > start &&
|
|
84
|
+
prev.charCodeAt(prevEnd - 1) === next.charCodeAt(nextEnd - 1)) {
|
|
85
|
+
prevEnd--;
|
|
86
|
+
nextEnd--;
|
|
87
|
+
}
|
|
88
|
+
return { start, inserted: next.slice(start, nextEnd) };
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Open a deletion run at the first character it removed: remember the word that
|
|
92
|
+
* character belongs to, and how much has been consumed so far.
|
|
93
|
+
*/
|
|
94
|
+
function startDeleteRun(text, start, removed) {
|
|
95
|
+
const word = draftWordRangeAt(text, start);
|
|
96
|
+
return { wordStart: word.start, wordEnd: word.end, lo: start, hi: start + removed };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether a same-direction deletion extends the run recorded on `last`. The
|
|
100
|
+
* run's word interval and consumed range live in `last.text` coordinates, so
|
|
101
|
+
* the comparison survives the draft shrinking under it; extending past the word
|
|
102
|
+
* (or off the text) starts a new step. Only called once the direction, caret
|
|
103
|
+
* continuity and idle window have already agreed, so the new text is always
|
|
104
|
+
* adjacent to the consumed range.
|
|
105
|
+
*/
|
|
106
|
+
function extendDeleteRun(last, backward, removed) {
|
|
107
|
+
const run = last.deleteRun;
|
|
108
|
+
if (run === null || removed <= 0)
|
|
109
|
+
return false;
|
|
110
|
+
if (backward) {
|
|
111
|
+
const lo = run.lo - removed;
|
|
112
|
+
if (lo < 0 || lo < run.wordStart)
|
|
113
|
+
return false;
|
|
114
|
+
run.lo = lo;
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
const hi = run.hi + removed;
|
|
118
|
+
if (hi > last.text.length || hi > run.wordEnd)
|
|
119
|
+
return false;
|
|
120
|
+
run.hi = hi;
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
56
123
|
/**
|
|
57
124
|
* Paste fold with a visible preview and no black box:
|
|
58
125
|
* a paste that leaves the input this big folds into a one-line chip
|
|
@@ -65,66 +132,6 @@ const HOME_BUTTON_COLS = stringWidth(HOME_BUTTON_TEXT);
|
|
|
65
132
|
const FOLD_MIN_LINES = 6;
|
|
66
133
|
const FOLD_MIN_CHARS = 600;
|
|
67
134
|
const isBigInput = (text) => text.split('\n').length >= FOLD_MIN_LINES || text.length >= FOLD_MIN_CHARS;
|
|
68
|
-
/**
|
|
69
|
-
* Editable prompt text must have one stable source-to-screen geometry. The
|
|
70
|
-
* renderer interprets ANSI as zero-width styling and expands tabs relative to
|
|
71
|
-
* global tab stops; keeping either in `value` would let wrapping/click mapping
|
|
72
|
-
* count different cells and could split an escape sequence during selection.
|
|
73
|
-
* Strip terminal controls and expand tabs at ingress while preserving newlines.
|
|
74
|
-
*/
|
|
75
|
-
const EDITABLE_CONTROL = /[\u0000-\u0009\u000b-\u001f\u007f]/u;
|
|
76
|
-
/**
|
|
77
|
-
* Raw win32-input-mode records (`CSI Vk;Sc;Uc;Kd;Cs;Rc _`) that reached the
|
|
78
|
-
* editable buffer as text instead of being translated. `stripAnsi` consumes
|
|
79
|
-
* the record head and leaves its terminating `_` in the draft — the stray
|
|
80
|
-
* underscore users see after a multi-line paste (issue #1090). Only the full
|
|
81
|
-
* record grammar (exactly five `;` separators) matches, so a real `_` and
|
|
82
|
-
* ordinary bracket text survive untouched.
|
|
83
|
-
*/
|
|
84
|
-
const WIN32_RECORD_RESIDUE = /\u001b\[\d*(?:;\d*){5}_/gu;
|
|
85
|
-
/**
|
|
86
|
-
* The same record with its ESC byte missing: what a record split across
|
|
87
|
-
* reads leaves behind when the escape timer flushed the prefix before the
|
|
88
|
-
* tail arrived. Printable, so it is stripped only from paste payloads
|
|
89
|
-
* ({@link sanitizePastedText}) — and only when the same payload also carries
|
|
90
|
-
* a full ESC-bearing record as in-payload evidence of that split; typed text
|
|
91
|
-
* and literal clipboard/bracketed-paste bytes are left untouched.
|
|
92
|
-
*/
|
|
93
|
-
const WIN32_RECORD_RESIDUE_TAIL = /\[\d*(?:;\d*){5}_/gu;
|
|
94
|
-
/**
|
|
95
|
-
* Normalize editable text so no terminal control characters remain in state.
|
|
96
|
-
*/
|
|
97
|
-
export function sanitizeEditableText(text) {
|
|
98
|
-
// Fast path for ordinary and multi-line drafts: newline is intentionally
|
|
99
|
-
// absent from the probe, so large clean text returns without the
|
|
100
|
-
// stripAnsi/control-normalization passes.
|
|
101
|
-
if (!EDITABLE_CONTROL.test(text))
|
|
102
|
-
return text;
|
|
103
|
-
// Record residue goes first: `stripAnsi` would consume the CSI head and
|
|
104
|
-
// leave only the terminating `_` behind.
|
|
105
|
-
return stripAnsi(text.replace(WIN32_RECORD_RESIDUE, ''))
|
|
106
|
-
.replace(/\r\n?/gu, '\n')
|
|
107
|
-
.replace(/\t/gu, ' ')
|
|
108
|
-
.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu, '');
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Paste-payload ingress: strip the ESC-less tail of a split record before
|
|
112
|
-
* normalizing. The tail is printable, so it survives `sanitizeEditableText`'s
|
|
113
|
-
* control probe untouched; typed text keeps it because only a paste payload
|
|
114
|
-
* can carry a partial record.
|
|
115
|
-
*
|
|
116
|
-
* The five separators only prove the *shape*, not that a record was split:
|
|
117
|
-
* a user can legitimately paste the literal `[13;28;13;1;0;1_`. Strip the
|
|
118
|
-
* ESC-less form only when the same payload also carries a full ESC-bearing
|
|
119
|
-
* record — only then is there in-payload evidence of a split stream.
|
|
120
|
-
* Otherwise the bytes are ordinary text and must survive verbatim.
|
|
121
|
-
*/
|
|
122
|
-
export function sanitizePastedText(text) {
|
|
123
|
-
// Probe with String#match: the /g detection regex carries lastIndex state
|
|
124
|
-
// across `.test` calls, so a previous success could skip a later match.
|
|
125
|
-
const hasRecordStream = text.match(WIN32_RECORD_RESIDUE) !== null;
|
|
126
|
-
return sanitizeEditableText(hasRecordStream ? text.replace(WIN32_RECORD_RESIDUE_TAIL, '') : text);
|
|
127
|
-
}
|
|
128
135
|
const COMPOSER_IMAGE_TOKEN = /\[Image #\d+\]/gu;
|
|
129
136
|
/** Format label for one image media type, matching the image preview card's
|
|
130
137
|
* title (`JPEG`, `PNG`, `WEBP`, `GIF`). */
|
|
@@ -414,8 +421,25 @@ const DOUBLE_CLICK_MS = 500;
|
|
|
414
421
|
* working) interrupts the turn and delivers them right away; Ctrl+Enter
|
|
415
422
|
* aborts the turn and sends the current input immediately.
|
|
416
423
|
*/
|
|
417
|
-
export function PromptInput({ channel, suspended = false, draftCache, helpOpen, onToggleHelp, onRunCommand, selectionActive, fillText, onFillConsumed, onRewindRequest, onBackgroundRequest, onOpenSessions, backgroundAgentsNeedingInput, controllerRef, onCaretImage, caretPreviewOpen = false, onDismissCaretPreview, }) {
|
|
424
|
+
export function PromptInput({ channel, toastSuppressed, suspended = false, draftCache, helpOpen, onToggleHelp, onRunCommand, selectionActive, fillText, onFillConsumed, onRewindRequest, onBackgroundRequest, onOpenSessions, backgroundAgentsNeedingInput, controllerRef, onCaretImage, caretPreviewOpen = false, onDismissCaretPreview, now = Date.now, }) {
|
|
418
425
|
const [themeName] = useTheme();
|
|
426
|
+
/**
|
|
427
|
+
* Caret fill. The face is self-drawn (the native cursor is hidden), and it
|
|
428
|
+
* used to be `inverse` only — i.e. always the ink color, which a theme whose
|
|
429
|
+
* input surface is already ink-adjacent cannot make readable. `cursor` names
|
|
430
|
+
* the block fill, and the glyph on it is whichever ink contrasts with that
|
|
431
|
+
* fill (cursorGlyphColor) — `inverseText` alone cannot serve a light caret;
|
|
432
|
+
* empty keeps the inverse-video caret for palettes that predate the key.
|
|
433
|
+
*
|
|
434
|
+
* A palette a legacy runtime resolver returns can be missing the key
|
|
435
|
+
* altogether (normalizeThemePalette hands such a palette back untouched), so
|
|
436
|
+
* the undefined case normalizes here — ONE place, both consumers below read
|
|
437
|
+
* `''` and take the inverse path. Without it the caret renders with no
|
|
438
|
+
* background at all (the native cursor is hidden: the caret disappears).
|
|
439
|
+
*/
|
|
440
|
+
const cursorTheme = getTheme(themeName);
|
|
441
|
+
const cursorColor = cursorTheme.cursor ?? '';
|
|
442
|
+
const cursorGlyph = cursorGlyphColor(cursorTheme);
|
|
419
443
|
// Raw stdout writer for OSC 52 clipboard writes (selection copy) — must
|
|
420
444
|
// bypass the frame pipeline; null outside a mounted Ink App.
|
|
421
445
|
const writeRaw = React.useContext(TerminalWriteContext);
|
|
@@ -507,7 +531,20 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
507
531
|
const vimInsertRef = React.useRef(true);
|
|
508
532
|
vimEnabledRef.current = vimEnabled;
|
|
509
533
|
vimInsertRef.current = vimInsert;
|
|
510
|
-
/**
|
|
534
|
+
/**
|
|
535
|
+
* Draft-scoped undo stack (word-level `Ctrl+Z`). This is the DRAFT's own
|
|
536
|
+
* history: a submit, a recall or a session switch ends it. Entries hold image
|
|
537
|
+
* bindings exactly like the draft does, so dropping one must release the
|
|
538
|
+
* capabilities only it kept alive.
|
|
539
|
+
*/
|
|
540
|
+
const draftUndoRef = React.useRef([]);
|
|
541
|
+
/**
|
|
542
|
+
* Vim NORMAL-mode undo stack (vim `u`), deliberately separate from
|
|
543
|
+
* `draftUndoRef`: unifying the two transaction models is a user-visible vim
|
|
544
|
+
* behavior change and is out of this change's scope. `/vim` toggling clears
|
|
545
|
+
* THIS stack — a later re-enable must never `u` back past edits made while
|
|
546
|
+
* vim was off.
|
|
547
|
+
*/
|
|
511
548
|
const vimUndoRef = React.useRef([]);
|
|
512
549
|
/** Pending vim operator: `d` pressed, awaiting its second key. */
|
|
513
550
|
const vimPendingRef = React.useRef('');
|
|
@@ -555,6 +592,15 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
555
592
|
const [homeHovered, setHomeHovered] = React.useState(false);
|
|
556
593
|
/** Pointer over the input box (drives the hover peek card). */
|
|
557
594
|
const [hovered, setHovered] = React.useState(false);
|
|
595
|
+
/** Highlighted row of the docked-queue selector (null = inactive; the
|
|
596
|
+
* index runs over the docked subset of `channel.pending`, oldest first).
|
|
597
|
+
* The ref mirrors it for the deferred consumeEscape controller closure. */
|
|
598
|
+
const [dockSelected, setDockSelectedState] = React.useState(null);
|
|
599
|
+
const dockSelectedRef = React.useRef(null);
|
|
600
|
+
const setDockSelected = (index) => {
|
|
601
|
+
dockSelectedRef.current = index;
|
|
602
|
+
setDockSelectedState(index);
|
|
603
|
+
};
|
|
558
604
|
/** 120ms grace so the pointer crossing the input border row from the
|
|
559
605
|
* chip up onto the peek card never flickers the card. */
|
|
560
606
|
const hoverLeaveTimerRef = React.useRef(null);
|
|
@@ -575,8 +621,11 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
575
621
|
const history = React.useRef([]);
|
|
576
622
|
const historyIndex = React.useRef(-1);
|
|
577
623
|
const historyDraft = React.useRef({ text: '', images: [] });
|
|
578
|
-
/** The persisted history is read lazily, once per mount
|
|
579
|
-
|
|
624
|
+
/** The persisted history is read lazily, once per mount and project: the
|
|
625
|
+
* normalized project key it was seeded for, so a workspace switch re-seeds
|
|
626
|
+
* (see seedHistory) while a respelled path to the same directory does not.
|
|
627
|
+
* `null` = never seeded; `''` = seeded without a workspace. */
|
|
628
|
+
const historySeededProject = React.useRef(null);
|
|
580
629
|
/** Visible `[Image #N]` labels are presentation only; this sidecar carries
|
|
581
630
|
* the non-reusable capability for the current draft. History/rewind text
|
|
582
631
|
* restored without this map can never bind to a later image by accident. */
|
|
@@ -606,6 +655,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
606
655
|
const detachDraftImages = () => {
|
|
607
656
|
advanceDraftRevision();
|
|
608
657
|
draftImagesRef.current.clear();
|
|
658
|
+
clearDraftUndo();
|
|
609
659
|
clearVimUndo();
|
|
610
660
|
};
|
|
611
661
|
const stageIdIsRetained = (stageId) => {
|
|
@@ -613,7 +663,8 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
613
663
|
if (current === stageId)
|
|
614
664
|
return true;
|
|
615
665
|
}
|
|
616
|
-
return
|
|
666
|
+
return draftUndoRef.current.some(entry => entry.images.some(image => image.stageId === stageId))
|
|
667
|
+
|| vimUndoRef.current.some(entry => entry.images.some(image => image.stageId === stageId))
|
|
617
668
|
|| history.current.some(entry => entry.images.some(image => image.stageId === stageId))
|
|
618
669
|
|| historyDraft.current.images.some(image => image.stageId === stageId)
|
|
619
670
|
|| channel.pending.some(item => item.images?.some(image => image.stageId === stageId) === true);
|
|
@@ -624,14 +675,109 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
624
675
|
channel.discardStagedImage(stageId);
|
|
625
676
|
}
|
|
626
677
|
};
|
|
678
|
+
const clearDraftUndo = () => {
|
|
679
|
+
const previous = draftUndoRef.current;
|
|
680
|
+
draftUndoRef.current = [];
|
|
681
|
+
discardUnretainedImages(previous.flatMap(entry => entry.images.map(image => image.stageId)));
|
|
682
|
+
};
|
|
627
683
|
const clearVimUndo = () => {
|
|
628
684
|
const previous = vimUndoRef.current;
|
|
629
685
|
vimUndoRef.current = [];
|
|
630
686
|
discardUnretainedImages(previous.flatMap(entry => entry.images.map(image => image.stageId)));
|
|
631
687
|
};
|
|
632
|
-
|
|
688
|
+
/** Push one step and enforce the depth/character guards. */
|
|
689
|
+
const pushDraftUndo = (snapshot, kind, caretAfter, deleteRun = null) => {
|
|
690
|
+
draftUndoRef.current.push({ ...snapshot, atMs: now(), caretAfter, kind, deleteRun });
|
|
691
|
+
const dropped = [];
|
|
692
|
+
while (draftUndoRef.current.length > UNDO_LIMIT)
|
|
693
|
+
dropped.push(draftUndoRef.current.shift());
|
|
694
|
+
let chars = draftUndoRef.current.reduce((total, entry) => total + entry.text.length, 0);
|
|
695
|
+
while (chars > UNDO_MAX_CHARS && draftUndoRef.current.length > 1) {
|
|
696
|
+
const oldest = draftUndoRef.current.shift();
|
|
697
|
+
chars -= oldest.text.length;
|
|
698
|
+
dropped.push(oldest);
|
|
699
|
+
}
|
|
700
|
+
if (dropped.length > 0) {
|
|
701
|
+
discardUnretainedImages(dropped.flatMap(entry => entry.images.map(image => image.stageId)));
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* Record one real text mutation. `group` folds it into the current step when
|
|
706
|
+
* the direction, caret continuity, idle window and word rule all agree;
|
|
707
|
+
* `step` always starts a sealed step. A chunk carrying several characters is
|
|
708
|
+
* judged per mutation, never per stdin read.
|
|
709
|
+
*/
|
|
710
|
+
const recordDraftEdit = (prev, prevCursor, block, next, nextCursor, mode) => {
|
|
711
|
+
const span = diffSpan(prev, next, prevCursor, nextCursor);
|
|
712
|
+
// Backspace consumes the character BEFORE the caret; Delete consumes the
|
|
713
|
+
// one AT it. The two directions anchor differently, so their runs must
|
|
714
|
+
// never fold into one another.
|
|
715
|
+
const backward = span.start < prevCursor;
|
|
716
|
+
const kind = span.inserted.length > 0 ? 'insert' : backward ? 'deleteBackward' : 'deleteForward';
|
|
717
|
+
const removed = prev.length - next.length;
|
|
718
|
+
const caretAfter = nextCursor;
|
|
719
|
+
if (mode === 'group') {
|
|
720
|
+
const last = draftUndoRef.current[draftUndoRef.current.length - 1];
|
|
721
|
+
// Continuity: this edit must begin where the last one ended. An insertion
|
|
722
|
+
// begins at the caret; a Backspace consumes the character BEFORE it, so
|
|
723
|
+
// the pre-edit caret is its start — comparing `span.start` there would
|
|
724
|
+
// make every repeated Backspace a step of its own.
|
|
725
|
+
const editStart = kind === 'insert' ? span.start : prevCursor;
|
|
726
|
+
if (last !== undefined &&
|
|
727
|
+
last.caretAfter !== null &&
|
|
728
|
+
last.kind === kind &&
|
|
729
|
+
last.caretAfter === editStart &&
|
|
730
|
+
now() - last.atMs <= UNDO_IDLE_MS &&
|
|
731
|
+
// An insertion extends a word when its seam is not a boundary; a
|
|
732
|
+
// deletion continues while it stays inside the word its run began in.
|
|
733
|
+
// The boundary question is deliberately NOT asked of a deletion: at the
|
|
734
|
+
// seam, `isDraftWordBoundary(prev, span.start)` reads the removed
|
|
735
|
+
// character's LEFT neighbour, which stops the run one keystroke early
|
|
736
|
+
// at a word's left edge and at the text head (and mis-splits a
|
|
737
|
+
// re-segmented CJK suffix).
|
|
738
|
+
(kind === 'insert'
|
|
739
|
+
? !isDraftWordBoundary(next, span.start)
|
|
740
|
+
: extendDeleteRun(last, backward, removed))) {
|
|
741
|
+
last.atMs = now();
|
|
742
|
+
last.caretAfter = caretAfter;
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
pushDraftUndo({ text: prev, cursor: prevCursor, images: imageRefsFor(prev), block }, kind, mode === 'group' ? caretAfter : null,
|
|
747
|
+
// A sealed step never groups, so only a groupable deletion needs (and
|
|
748
|
+
// pays for) the word interval.
|
|
749
|
+
mode === 'group' && kind !== 'insert' ? startDeleteRun(prev, span.start, removed) : null);
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Clear the draft while keeping ONE undo step, so `Ctrl+Z` can bring the
|
|
753
|
+
* whole draft back (text, caret, images and fold block). The snapshot is
|
|
754
|
+
* taken before the images are released: afterwards the capabilities would
|
|
755
|
+
* already be gone and the restored `[Image #N]` tokens would be inert.
|
|
756
|
+
*/
|
|
757
|
+
const clearDraftUndoably = () => {
|
|
758
|
+
syncImageGeneration();
|
|
759
|
+
// Nothing to come back to on an already-empty draft: pushing a snapshot
|
|
760
|
+
// there would waste the next Ctrl+Z (and hide an older real step).
|
|
761
|
+
if (valueRef.current !== '') {
|
|
762
|
+
pushDraftUndo({
|
|
763
|
+
text: valueRef.current,
|
|
764
|
+
cursor: cursorRef.current,
|
|
765
|
+
images: imageRefsFor(valueRef.current),
|
|
766
|
+
block: foldBlockRef.current,
|
|
767
|
+
}, 'clear', null);
|
|
768
|
+
}
|
|
769
|
+
discardDraftImages({ keepUndo: true });
|
|
770
|
+
setInput('', 0, 'silent');
|
|
771
|
+
setSelectedCommand(0);
|
|
772
|
+
setFileSelected(0);
|
|
773
|
+
};
|
|
774
|
+
const discardDraftImages = (options) => {
|
|
633
775
|
advanceDraftRevision();
|
|
634
776
|
const stageIds = [...draftImagesRef.current.values()];
|
|
777
|
+
// The draft stack may be kept so Ctrl+Z can undo the clear; the vim stack
|
|
778
|
+
// is never restored by `u` across a whole-draft replacement.
|
|
779
|
+
if (options?.keepUndo !== true)
|
|
780
|
+
clearDraftUndo();
|
|
635
781
|
clearVimUndo();
|
|
636
782
|
draftImagesRef.current.clear();
|
|
637
783
|
discardUnretainedImages(stageIds);
|
|
@@ -651,6 +797,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
651
797
|
if (draftImagesGenerationRef.current !== generation) {
|
|
652
798
|
// The channel has already cleared every old-generation capability.
|
|
653
799
|
// Only detach the UI sidecar; calling discard would be redundant.
|
|
800
|
+
draftUndoRef.current = [];
|
|
654
801
|
vimUndoRef.current = [];
|
|
655
802
|
detachDraftImages();
|
|
656
803
|
draftImagesGenerationRef.current = generation;
|
|
@@ -721,6 +868,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
721
868
|
const next = sanitizeEditableText(previous + text);
|
|
722
869
|
if (next !== previous)
|
|
723
870
|
inputEditSequenceRef.current += 1;
|
|
871
|
+
// An external injection is a NEW draft baseline. It bypasses setInput,
|
|
872
|
+
// so the stack would still describe the pre-injection text: one Ctrl+Z
|
|
873
|
+
// would then erase the injected text together with the typing it
|
|
874
|
+
// joined (the injection is not an edit of the draft the user made).
|
|
875
|
+
if (next !== previous)
|
|
876
|
+
clearDraftUndo();
|
|
724
877
|
valueRef.current = next;
|
|
725
878
|
cursorRef.current = next.length;
|
|
726
879
|
setValue(next);
|
|
@@ -739,14 +892,16 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
739
892
|
// The selection stays: copy never clears it (Esc/typing/delete do).
|
|
740
893
|
return true;
|
|
741
894
|
},
|
|
895
|
+
consumeEscape: consumeEditingEscape,
|
|
742
896
|
toggleVim: () => {
|
|
743
897
|
const next = !vimEnabledRef.current;
|
|
744
898
|
vimEnabledRef.current = next;
|
|
745
899
|
setVimEnabled(next);
|
|
746
900
|
// Every toggle lands in INSERT: a fresh vim user keeps typing
|
|
747
901
|
// normally until they press Esc for the first time. Turning the
|
|
748
|
-
// mode off also clears the undo stack — a later re-enable must
|
|
749
|
-
// never `u` its way back past edits made while vim was off.
|
|
902
|
+
// mode off also clears the VIM undo stack — a later re-enable must
|
|
903
|
+
// never `u` its way back past edits made while vim was off. The
|
|
904
|
+
// draft stack (Ctrl+Z) is a different history and is left alone.
|
|
750
905
|
vimInsertRef.current = true;
|
|
751
906
|
setVimInsert(true);
|
|
752
907
|
vimPendingRef.current = '';
|
|
@@ -769,7 +924,9 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
769
924
|
syncImageGeneration();
|
|
770
925
|
discardDraftImages();
|
|
771
926
|
updateFoldBlock(null);
|
|
772
|
-
|
|
927
|
+
// A recall is not undoable (D4): the stack was just cleared above, so
|
|
928
|
+
// the fill must not push a snapshot of the draft it replaced.
|
|
929
|
+
setInput(fillText, fillText.length, 'silent');
|
|
773
930
|
onFillConsumed?.();
|
|
774
931
|
}
|
|
775
932
|
}, [fillText, onFillConsumed]);
|
|
@@ -797,9 +954,10 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
797
954
|
*
|
|
798
955
|
* `advanceDraftRevision` invalidates any image read/stage still in
|
|
799
956
|
* flight, so a late continuation cannot bind a capability into a composer
|
|
800
|
-
* that no longer exists. `clearVimUndo`
|
|
801
|
-
* only
|
|
802
|
-
* nothing will ever restore them once this composer is
|
|
957
|
+
* that no longer exists. `clearDraftUndo`/`clearVimUndo` release the
|
|
958
|
+
* capabilities that only an undo stack was holding: they are not part of
|
|
959
|
+
* the draft, and nothing will ever restore them once this composer is
|
|
960
|
+
* gone.
|
|
803
961
|
*
|
|
804
962
|
* The stageIds the DRAFT holds are deliberately NOT revoked — they are
|
|
805
963
|
* part of the snapshot the slot now keeps, and the restore filters out
|
|
@@ -807,6 +965,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
807
965
|
* an image draft used to come back as inert text.
|
|
808
966
|
*/
|
|
809
967
|
advanceDraftRevision();
|
|
968
|
+
clearDraftUndo();
|
|
810
969
|
clearVimUndo();
|
|
811
970
|
const images = [...draftImagesRef.current.entries()]
|
|
812
971
|
.map(([token, stageId]) => [token, stageId]);
|
|
@@ -864,7 +1023,24 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
864
1023
|
// loses nothing functional. (PR #446; restored after the picker
|
|
865
1024
|
// snapshot's cherry-pick resurrected the old formula.)
|
|
866
1025
|
const helpViewportHeight = Math.max(3, Math.min(terminalRows - 7, 15));
|
|
867
|
-
|
|
1026
|
+
// Issue #1072: while a turn runs, the overlay groups the commands that
|
|
1027
|
+
// AFFECT the running conversation (gated / conversation-acting / steering)
|
|
1028
|
+
// below the ones that do not. The partition is a stable reorder and keeps ONE
|
|
1029
|
+
// index space: `suggestions` stays the only list selection, Enter dispatch and
|
|
1030
|
+
// clicks read, and the default selection stays the first normal-region row.
|
|
1031
|
+
// The region is marked by colour only — it costs no display row.
|
|
1032
|
+
const completions = value.startsWith('/') ? channel.commandCompletions(value) : [];
|
|
1033
|
+
const holdOf = (commandLine) => workingHoldOf(commandLine, channel.commandList.find(command => command.name === commandLine.replace(/^\//, '').split(/[\t ]/u)[0])?.skill === true) !== undefined;
|
|
1034
|
+
const normalCompletions = channel.working
|
|
1035
|
+
? completions.filter(completion => !holdOf(completion.commandLine))
|
|
1036
|
+
: completions;
|
|
1037
|
+
/** 灰区起始索引;灰区为空时不分区。 */
|
|
1038
|
+
const suggestionsHoldFrom = channel.working && normalCompletions.length < completions.length
|
|
1039
|
+
? normalCompletions.length
|
|
1040
|
+
: undefined;
|
|
1041
|
+
const suggestions = suggestionsHoldFrom === undefined
|
|
1042
|
+
? completions
|
|
1043
|
+
: [...normalCompletions, ...completions.filter(completion => holdOf(completion.commandLine))];
|
|
868
1044
|
const overlayOpen = suggestions.length > 0 &&
|
|
869
1045
|
!expanded &&
|
|
870
1046
|
!helpOpen &&
|
|
@@ -980,7 +1156,13 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
980
1156
|
}
|
|
981
1157
|
}
|
|
982
1158
|
};
|
|
983
|
-
|
|
1159
|
+
/**
|
|
1160
|
+
* Apply `next` at `cursorOffset` and record the edit on the undo stack.
|
|
1161
|
+
* `snapshotBlock` overrides the block the step snapshots: a caller that must
|
|
1162
|
+
* clear the fold block BEFORE writing (the external-editor refill) still
|
|
1163
|
+
* wants the block that was live at edit time.
|
|
1164
|
+
*/
|
|
1165
|
+
const setInput = (next, cursorOffset = next.length, undo = 'group', snapshotBlock) => {
|
|
984
1166
|
// Apply the same ingress normalization to fills/history/editor results as
|
|
985
1167
|
// to paste. Map the requested caret through the sanitized prefix so an
|
|
986
1168
|
// ANSI sequence removed before it cannot leave the caret past the text.
|
|
@@ -1022,6 +1204,22 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1022
1204
|
// one continues in its direction of travel (←/word-left/↑ → the token's
|
|
1023
1205
|
// start, →/word-right/↓ → its end); with no travel, the nearer edge.
|
|
1024
1206
|
offset = snapOffImageToken(boundImageSpans(next), offset, offset < prevCursor ? 'start' : offset > prevCursor ? 'end' : 'nearest');
|
|
1207
|
+
// Undo bookkeeping runs before the mirrors move: it snapshots the state
|
|
1208
|
+
// this edit replaces, and `diffSpan` needs both texts. `reset` ends the
|
|
1209
|
+
// draft's history, `silent` (undo itself, a recall) leaves it untouched.
|
|
1210
|
+
if (next !== prev) {
|
|
1211
|
+
// Every real text change (typing, paste, history, external editor,
|
|
1212
|
+
// undo) hands the arrows back to the draft: a held-queue selection
|
|
1213
|
+
// must not survive an edited draft and steer ↑/↓ over the text.
|
|
1214
|
+
// Caret-only moves (next === prev) never land here.
|
|
1215
|
+
if (dockSelectedRef.current !== null)
|
|
1216
|
+
setDockSelected(null);
|
|
1217
|
+
if (undo === 'reset')
|
|
1218
|
+
clearDraftUndo();
|
|
1219
|
+
else if (undo !== 'silent') {
|
|
1220
|
+
recordDraftEdit(prev, prevCursor, snapshotBlock === undefined ? block : snapshotBlock, next, offset, undo);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1025
1223
|
// The synchronous mirrors are what batch-dispatched events (one stdin
|
|
1026
1224
|
// read → several keys, no render in between) read on their next turn.
|
|
1027
1225
|
if (next !== prev)
|
|
@@ -1044,12 +1242,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1044
1242
|
setValue(next);
|
|
1045
1243
|
setCursor(offset);
|
|
1046
1244
|
};
|
|
1047
|
-
const deleteInputRange = (start, end) => {
|
|
1245
|
+
const deleteInputRange = (start, end, undo = 'group') => {
|
|
1048
1246
|
if (start >= end)
|
|
1049
1247
|
return;
|
|
1050
1248
|
const text = valueRef.current;
|
|
1051
1249
|
const range = expandImageTokenRange(boundImageSpans(text), start, end);
|
|
1052
|
-
setInput(text.slice(0, range.start) + text.slice(range.end), range.start);
|
|
1250
|
+
setInput(text.slice(0, range.start) + text.slice(range.end), range.start, undo);
|
|
1053
1251
|
};
|
|
1054
1252
|
/**
|
|
1055
1253
|
* Write the selection [start, end) (snapped to grapheme boundaries,
|
|
@@ -1112,7 +1310,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1112
1310
|
const suffix = mention.pathEnd === undefined ? '' : value.slice(mention.pathEnd, mention.end);
|
|
1113
1311
|
const insert = candidate.kind === 'directory' ? `${body}${suffix}` : `${body}${suffix} `;
|
|
1114
1312
|
const next = value.slice(0, mention.start) + insert + value.slice(mention.end);
|
|
1115
|
-
setInput(next, mention.start + insert.length);
|
|
1313
|
+
setInput(next, mention.start + insert.length, 'step');
|
|
1116
1314
|
setFileSelected(0);
|
|
1117
1315
|
};
|
|
1118
1316
|
const imageRefsFor = (text) => {
|
|
@@ -1145,14 +1343,35 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1145
1343
|
* persisted entries first, this run's submits behind them — instead of two
|
|
1146
1344
|
* lists to merge at recall time. Restored text carries no image capability
|
|
1147
1345
|
* (the file stores text only), which is also what keeps a recalled entry
|
|
1148
|
-
* from binding to a later staged image by accident.
|
|
1346
|
+
* from binding to a later staged image by accident. The walk is scoped to
|
|
1347
|
+
* the channel's workspace, keyed the same way the store keys it
|
|
1348
|
+
* (historyProjectKey), so a workspace switch re-seeds it with that
|
|
1349
|
+
* project's history instead of carrying the previous one over — and a
|
|
1350
|
+
* respelled path to the same directory is not a switch.
|
|
1351
|
+
* @returns Whether the re-seed cut short a walk in progress: the composer
|
|
1352
|
+
* then shows a recalled entry of the previous project while the draft that
|
|
1353
|
+
* walk started from is still held in `historyDraft`.
|
|
1149
1354
|
*/
|
|
1150
1355
|
const seedHistory = () => {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1356
|
+
// The store's own key, not the raw cwd: `/repo` and `/repo/` are one
|
|
1357
|
+
// project, so respelling the path must not look like a workspace switch.
|
|
1358
|
+
const project = historyProjectKey(channel.cwd) ?? '';
|
|
1359
|
+
if (historySeededProject.current === project)
|
|
1360
|
+
return false;
|
|
1361
|
+
const interrupted = historyIndex.current >= 0;
|
|
1362
|
+
historySeededProject.current = project;
|
|
1363
|
+
history.current = loadHistoryOldestFirst(channel.cwd).map(entry => ({ text: entry.text, images: [] }));
|
|
1155
1364
|
historyIndex.current = -1;
|
|
1365
|
+
return interrupted;
|
|
1366
|
+
};
|
|
1367
|
+
/** End the walk and put back the draft it started from. */
|
|
1368
|
+
const restoreHistoryDraft = () => {
|
|
1369
|
+
historyIndex.current = -1;
|
|
1370
|
+
updateFoldBlock(null);
|
|
1371
|
+
restoreDraftImages(historyDraft.current);
|
|
1372
|
+
// A recall is not undoable (D4): `restoreDraftImages` just ended the
|
|
1373
|
+
// history, so the restore must not push a step of its own.
|
|
1374
|
+
setInput(historyDraft.current.text, historyDraft.current.text.length, 'silent');
|
|
1156
1375
|
};
|
|
1157
1376
|
const rememberHistory = (text, images) => {
|
|
1158
1377
|
// Both entries into the walk (a submit and ↑) must see the persisted
|
|
@@ -1165,14 +1384,15 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1165
1384
|
if (history.current.length > HISTORY_LIMIT)
|
|
1166
1385
|
history.current.shift();
|
|
1167
1386
|
historyIndex.current = -1;
|
|
1168
|
-
void appendHistory(text);
|
|
1387
|
+
void appendHistory(text, channel.cwd);
|
|
1169
1388
|
};
|
|
1170
1389
|
const clearDeliveredDraft = () => {
|
|
1171
1390
|
syncImageGeneration();
|
|
1172
1391
|
// Delivery captured the opaque refs and history retains them; only the
|
|
1173
|
-
// editable-draft binding is ending here.
|
|
1392
|
+
// editable-draft binding is ending here. `reset` ends the draft's undo
|
|
1393
|
+
// history: a submitted message must not come back with Ctrl+Z.
|
|
1174
1394
|
detachDraftImages();
|
|
1175
|
-
setInput('', 0);
|
|
1395
|
+
setInput('', 0, 'reset');
|
|
1176
1396
|
setSelectedCommand(0);
|
|
1177
1397
|
setFileSelected(0);
|
|
1178
1398
|
};
|
|
@@ -1189,8 +1409,40 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1189
1409
|
syncImageGeneration();
|
|
1190
1410
|
advanceDraftRevision();
|
|
1191
1411
|
replaceDraftImages(entry.images);
|
|
1412
|
+
// A recall is not undoable (D4): both stacks end with the draft it replaced.
|
|
1413
|
+
clearDraftUndo();
|
|
1192
1414
|
clearVimUndo();
|
|
1193
1415
|
};
|
|
1416
|
+
/**
|
|
1417
|
+
* `Ctrl+Z`: pop back to the state before the current undo step — text,
|
|
1418
|
+
* caret, images and fold block together. An empty stack is a no-op (never
|
|
1419
|
+
* the rewind picker, never a clear). The restore is `silent`, so repeated
|
|
1420
|
+
* Ctrl+Z walks further back instead of pushing what it just left. Vim `u`
|
|
1421
|
+
* uses its own stack (see {@link vimUndoRef}).
|
|
1422
|
+
*/
|
|
1423
|
+
const undoDraft = () => {
|
|
1424
|
+
// A session replacement invalidates the whole stack. Check that BEFORE
|
|
1425
|
+
// popping: restoring first and discarding afterwards would put the old
|
|
1426
|
+
// session's text (and its image tokens) back into the new composer.
|
|
1427
|
+
syncImageGeneration();
|
|
1428
|
+
const entry = draftUndoRef.current.pop();
|
|
1429
|
+
if (entry === undefined)
|
|
1430
|
+
return;
|
|
1431
|
+
advanceDraftRevision();
|
|
1432
|
+
replaceDraftImages(entry.images);
|
|
1433
|
+
// Drop the live block first: setInput's atomicity rules describe the block
|
|
1434
|
+
// that was live at edit time, and re-shifting it here would corrupt the
|
|
1435
|
+
// snapshot's. The snapshot's own block goes back afterwards, and only if
|
|
1436
|
+
// its range still fits the text it was captured from.
|
|
1437
|
+
updateFoldBlock(null);
|
|
1438
|
+
setInput(entry.text, entry.cursor, 'silent');
|
|
1439
|
+
const block = entry.block !== null && entry.block.start < entry.block.end && entry.block.end <= entry.text.length
|
|
1440
|
+
? entry.block
|
|
1441
|
+
: null;
|
|
1442
|
+
updateFoldBlock(block);
|
|
1443
|
+
setSelectedCommand(0);
|
|
1444
|
+
setFileSelected(0);
|
|
1445
|
+
};
|
|
1194
1446
|
const submitText = (text, notice) => {
|
|
1195
1447
|
const trimmed = text.trim();
|
|
1196
1448
|
if (!trimmed)
|
|
@@ -1247,6 +1499,9 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1247
1499
|
* cannot withdraw inbox messages (released package without the inbox API).
|
|
1248
1500
|
*/
|
|
1249
1501
|
const pullBackLast = () => {
|
|
1502
|
+
// Alt+↑ keeps its direct last-item meaning even while the dock selector
|
|
1503
|
+
// is open — one press, one retracted row (the selector closes with it).
|
|
1504
|
+
setDockSelected(null);
|
|
1250
1505
|
const item = channel.pending[channel.pending.length - 1];
|
|
1251
1506
|
if (!item)
|
|
1252
1507
|
return;
|
|
@@ -1258,7 +1513,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1258
1513
|
text: item.text,
|
|
1259
1514
|
images: item.images ?? [],
|
|
1260
1515
|
});
|
|
1261
|
-
setInput(item.text);
|
|
1516
|
+
setInput(item.text, item.text.length, 'silent');
|
|
1262
1517
|
updateFoldBlock(null);
|
|
1263
1518
|
setSelectedCommand(0);
|
|
1264
1519
|
setFileSelected(0);
|
|
@@ -1288,6 +1543,87 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1288
1543
|
channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
|
|
1289
1544
|
}
|
|
1290
1545
|
};
|
|
1546
|
+
/**
|
|
1547
|
+
* The docked queue (Esc parked it while interrupting, Claude Code parity):
|
|
1548
|
+
* previews the composer keeps until the user sends them all (⏎ on an empty
|
|
1549
|
+
* draft / the clickable hint) or retracts items (the ↑ selector / Alt+↑).
|
|
1550
|
+
*/
|
|
1551
|
+
const dockedPending = channel.pending.filter(item => item.docked === true);
|
|
1552
|
+
const dockCount = dockedPending.length;
|
|
1553
|
+
/** Send the whole dock now (⏎ on an empty draft, or the hint row click):
|
|
1554
|
+
* FIFO, exactly once, through the channel's own delivery chain. */
|
|
1555
|
+
const sendDocked = () => {
|
|
1556
|
+
const sent = channel.deliverDocked();
|
|
1557
|
+
if (sent > 0)
|
|
1558
|
+
channel.notify(t('input-dock-sent', { n: sent }), { timeoutMs: 2500 });
|
|
1559
|
+
setDockSelected(null);
|
|
1560
|
+
};
|
|
1561
|
+
/** Retract one docked row into the draft for editing (selector ⏎, row
|
|
1562
|
+
* click, Alt+↑ on the last): purely local — the backend dropped its copy
|
|
1563
|
+
* with the aborted turn, so every backend can do it.
|
|
1564
|
+
*
|
|
1565
|
+
* A draft with real content is never destroyed by the retraction: it
|
|
1566
|
+
* SWAPS — the whole draft (text + staged images) parks at
|
|
1567
|
+
* the dock's tail while the clicked row comes into the input. Nothing
|
|
1568
|
+
* sends; the swap is one undo step, so Ctrl+Z brings the parked draft
|
|
1569
|
+
* back (text, caret, images and fold block; the parked row retains the
|
|
1570
|
+
* image capabilities, see stageIdIsRetained). Only an empty (or
|
|
1571
|
+
* whitespace-only) draft takes the plain retraction path. */
|
|
1572
|
+
const editDocked = (index) => {
|
|
1573
|
+
const item = dockedPending[index];
|
|
1574
|
+
setDockSelected(null);
|
|
1575
|
+
if (item === undefined)
|
|
1576
|
+
return;
|
|
1577
|
+
if (valueRef.current.trim() !== '') {
|
|
1578
|
+
// Park the draft FIRST: its capabilities must already be retained by
|
|
1579
|
+
// the pending row when setInput's undo bookkeeping and sidecar pruning
|
|
1580
|
+
// run below, or a later swap-back would find them discarded.
|
|
1581
|
+
const swapped = channel.swapDockedForDraft(item.id, {
|
|
1582
|
+
text: valueRef.current,
|
|
1583
|
+
images: imageRefsFor(valueRef.current),
|
|
1584
|
+
});
|
|
1585
|
+
if (!swapped) {
|
|
1586
|
+
channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
// One sealed undo step captures the draft the swap replaces (same
|
|
1590
|
+
// shape as the external-editor refill): snapshot the fold block
|
|
1591
|
+
// BEFORE clearing it, so Ctrl+Z restores the chip too. setInput runs
|
|
1592
|
+
// while the sidecar still maps the parked draft's tokens — the undo
|
|
1593
|
+
// snapshot then carries them, and its pruning sees the pending row
|
|
1594
|
+
// already retains every capability (nothing is discarded).
|
|
1595
|
+
const beforeBlock = foldBlockRef.current;
|
|
1596
|
+
updateFoldBlock(null);
|
|
1597
|
+
setInput(item.text, item.text.length, 'step', beforeBlock);
|
|
1598
|
+
replaceDraftImages(item.images ?? []);
|
|
1599
|
+
setSelectedCommand(0);
|
|
1600
|
+
setFileSelected(0);
|
|
1601
|
+
channel.notify(t('input-dock-swapped'), { timeoutMs: 2000 });
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
if (!channel.removePending(item.id)) {
|
|
1605
|
+
channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
|
|
1606
|
+
return;
|
|
1607
|
+
}
|
|
1608
|
+
restoreDraftImages({
|
|
1609
|
+
text: item.text,
|
|
1610
|
+
images: item.images ?? [],
|
|
1611
|
+
});
|
|
1612
|
+
setInput(item.text, item.text.length, 'silent');
|
|
1613
|
+
updateFoldBlock(null);
|
|
1614
|
+
setSelectedCommand(0);
|
|
1615
|
+
setFileSelected(0);
|
|
1616
|
+
channel.notify(t('input-retracted'), { timeoutMs: 2000 });
|
|
1617
|
+
};
|
|
1618
|
+
// A dock that empties or shrinks under an open selector (rows claimed,
|
|
1619
|
+
// a receipt un-docking them, a session reset) leaves the highlight
|
|
1620
|
+
// pointing past the list — fold it instead of steering arrows at an
|
|
1621
|
+
// invisible row.
|
|
1622
|
+
React.useEffect(() => {
|
|
1623
|
+
if (dockSelected !== null && (dockSelected >= dockCount || dockCount === 0)) {
|
|
1624
|
+
setDockSelected(null);
|
|
1625
|
+
}
|
|
1626
|
+
}, [dockSelected, dockCount]);
|
|
1291
1627
|
/**
|
|
1292
1628
|
* Ctrl+Enter: abort the running turn and send the input immediately — the
|
|
1293
1629
|
* model stops what it is doing and starts on this message right away.
|
|
@@ -1300,10 +1636,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1300
1636
|
}
|
|
1301
1637
|
// Abort the running turn and deliver: previously queued pending
|
|
1302
1638
|
// messages first (FIFO), then the current input — all processed
|
|
1303
|
-
// immediately once the abort settles.
|
|
1639
|
+
// immediately once the abort settles. Docked rows are NOT listed here:
|
|
1640
|
+
// the channel's interruptAndDeliver takes the dock itself first (same
|
|
1641
|
+
// FIFO order), so including them would send each docked text twice.
|
|
1304
1642
|
const images = imageRefsFor(trimmed);
|
|
1305
1643
|
const queued = [
|
|
1306
|
-
...channel.pending.map(item => ({ text: item.text, images: item.images ?? [] })),
|
|
1644
|
+
...channel.pending.filter(item => item.docked !== true).map(item => ({ text: item.text, images: item.images ?? [] })),
|
|
1307
1645
|
{ text: value, images },
|
|
1308
1646
|
];
|
|
1309
1647
|
const count = channel.interruptAndDeliver(queued);
|
|
@@ -1328,6 +1666,18 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1328
1666
|
if (parsed === undefined)
|
|
1329
1667
|
return false;
|
|
1330
1668
|
const command = channel.commandList.find(entry => entry.name === parsed.name);
|
|
1669
|
+
// A built-in the bound backend does not serve is hidden from the menu and
|
|
1670
|
+
// Tab, and a typed one must neither run nor reach the model as text. A
|
|
1671
|
+
// partial embedder channel carries no snapshot: everything is served.
|
|
1672
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- partial embedder channels omit the snapshot
|
|
1673
|
+
const capabilities = channel.backendCapabilities;
|
|
1674
|
+
if (command === undefined && isUnavailableLocalCommand(parsed.name, capabilities)) {
|
|
1675
|
+
channel.notify(t('cmd-unavailable-backend', { cmd: parsed.name, backend: capabilities === undefined ? '' : kernelDisplayName(capabilities.backendId) }), {
|
|
1676
|
+
color: 'warning',
|
|
1677
|
+
timeoutMs: 4000,
|
|
1678
|
+
});
|
|
1679
|
+
return true;
|
|
1680
|
+
}
|
|
1331
1681
|
const known = command !== undefined || isHiddenCommandName(parsed.name);
|
|
1332
1682
|
if (!known)
|
|
1333
1683
|
return false;
|
|
@@ -1402,8 +1752,9 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1402
1752
|
* The Enter main path, shared by the inline prompt, the expanded
|
|
1403
1753
|
* editor's Ctrl+Enter, and its Send button:
|
|
1404
1754
|
* - command menu open → run the SELECTED command (never send `/mo`);
|
|
1405
|
-
* - model working →
|
|
1406
|
-
*
|
|
1755
|
+
* - model working → a KNOWN command is still a command; anything else
|
|
1756
|
+
* STEERS into the running turn (next step boundary, agent continues —
|
|
1757
|
+
* the "immediate" send; Codex/pi semantics);
|
|
1407
1758
|
* - otherwise → submit directly (or run a unique command).
|
|
1408
1759
|
* Reads valueRef so a key batch (typing + Enter in one stdin read)
|
|
1409
1760
|
* operates on the text the preceding keys produced.
|
|
@@ -1417,6 +1768,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1417
1768
|
return;
|
|
1418
1769
|
lastEnterAtRef.current = now;
|
|
1419
1770
|
const value = valueRef.current;
|
|
1771
|
+
// The docked-queue selector owns Enter while a row is highlighted and
|
|
1772
|
+
// the draft is untouched: retract that row into the input for editing.
|
|
1773
|
+
if (dockSelectedRef.current !== null && value.trim() === '' && dockCount > 0) {
|
|
1774
|
+
editDocked(dockSelectedRef.current);
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1420
1777
|
if (overlayOpen) {
|
|
1421
1778
|
const command = suggestions[selectedCommand];
|
|
1422
1779
|
if (command) {
|
|
@@ -1433,19 +1790,23 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1433
1790
|
return;
|
|
1434
1791
|
}
|
|
1435
1792
|
}
|
|
1793
|
+
// A docked queue (Esc parked it) owns a bare Enter on an EMPTY draft
|
|
1794
|
+
// (Claude Code parity: "…or Enter to send them now"). A draft in
|
|
1795
|
+
// progress keeps the ordinary submit path and the dock stays parked —
|
|
1796
|
+
// sending parked messages silently along with the next typed submit is
|
|
1797
|
+
// exactly the surprise the dock exists to prevent.
|
|
1798
|
+
if (value.trim() === '' && !channel.working && dockCount > 0) {
|
|
1799
|
+
sendDocked();
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1436
1802
|
if (channel.working && value.trim() !== '') {
|
|
1437
|
-
//
|
|
1438
|
-
//
|
|
1439
|
-
//
|
|
1440
|
-
//
|
|
1441
|
-
//
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
&& channel.commandList.some(c => c.name === parsed.name))
|
|
1445
|
-
|| isHiddenCommandName(parsed.name))) {
|
|
1446
|
-
if (tryRunCommand(value))
|
|
1447
|
-
return;
|
|
1448
|
-
}
|
|
1803
|
+
// While a turn is running a KNOWN command is dispatched as a command:
|
|
1804
|
+
// with or without arguments, with the completion overlay open or closed,
|
|
1805
|
+
// from the inline prompt or the fullscreen editor (issue #1072). Each
|
|
1806
|
+
// command's own gate decides whether it can run mid-turn and says why;
|
|
1807
|
+
// steering is reserved for input that is NOT a command.
|
|
1808
|
+
if (tryRunCommand(value))
|
|
1809
|
+
return;
|
|
1449
1810
|
steerSend(value);
|
|
1450
1811
|
return;
|
|
1451
1812
|
}
|
|
@@ -1480,6 +1841,25 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1480
1841
|
lastClickColRef.current = -1;
|
|
1481
1842
|
lastClickRowRef.current = -1;
|
|
1482
1843
|
};
|
|
1844
|
+
/** Local Esc layers, shared by the prompt listener and Chat's delegation.
|
|
1845
|
+
* Refs preserve this order even when expansion and Esc share a stdin batch. */
|
|
1846
|
+
const consumeEditingEscape = () => {
|
|
1847
|
+
// The docked-queue selector folds first: Esc leaves the selector and the
|
|
1848
|
+
// dock itself stays put (⏎/↑ keep working afterwards).
|
|
1849
|
+
if (dockSelectedRef.current !== null) {
|
|
1850
|
+
setDockSelected(null);
|
|
1851
|
+
return true;
|
|
1852
|
+
}
|
|
1853
|
+
if (selectionRef.current && !helpOpen && !overlayOpen && !fileOverlayOpen) {
|
|
1854
|
+
clearSelection();
|
|
1855
|
+
return true;
|
|
1856
|
+
}
|
|
1857
|
+
if (expandedRef.current) {
|
|
1858
|
+
collapseEditor();
|
|
1859
|
+
return true;
|
|
1860
|
+
}
|
|
1861
|
+
return false;
|
|
1862
|
+
};
|
|
1483
1863
|
/** The editor's explicit send (Ctrl+Enter / Send button): the Enter main
|
|
1484
1864
|
* path, then collapse — an empty draft just collapses. */
|
|
1485
1865
|
const submitFromEditor = () => {
|
|
@@ -1498,7 +1878,8 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1498
1878
|
const next = sel
|
|
1499
1879
|
? current.slice(0, sel.start) + text + current.slice(sel.end)
|
|
1500
1880
|
: current.slice(0, position) + text + current.slice(position);
|
|
1501
|
-
|
|
1881
|
+
// A paste is ONE undo step however many characters it carries.
|
|
1882
|
+
setInput(next, position + text.length, 'step');
|
|
1502
1883
|
setSelectedCommand(0);
|
|
1503
1884
|
setFileSelected(0);
|
|
1504
1885
|
return { next, at: position };
|
|
@@ -1650,27 +2031,18 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1650
2031
|
// ONLY drops the highlight (text untouched), and Backspace/Delete
|
|
1651
2032
|
// delete the selected span. Arrows/typing handle the selection at their
|
|
1652
2033
|
// own arms below.
|
|
1653
|
-
if (key.escape &&
|
|
2034
|
+
if (key.escape && consumeEditingEscape()) {
|
|
1654
2035
|
event.stopImmediatePropagation();
|
|
1655
|
-
clearSelection();
|
|
1656
2036
|
return;
|
|
1657
2037
|
}
|
|
1658
2038
|
if ((key.backspace || key.delete) && selection) {
|
|
1659
|
-
|
|
2039
|
+
// Removing a selection is atomic: it must undo in one step, not fold
|
|
2040
|
+
// into whatever the caret-continuity rule would otherwise see.
|
|
2041
|
+
deleteInputRange(selection.start, selection.end, 'step');
|
|
1660
2042
|
setSelectedCommand(0);
|
|
1661
2043
|
setFileSelected(0);
|
|
1662
2044
|
return;
|
|
1663
2045
|
}
|
|
1664
|
-
// ── 全屏草稿编辑(expandEditor,默认 Ctrl+Shift+E / 输入行 ✎)─────
|
|
1665
|
-
// 展开态拥有屏幕;Esc 收起(有选区时上面的 selection 分支已先行只清
|
|
1666
|
-
// 选区)。滚轮不经此——编辑区的 onWheel 位置路由直接驱动滚动窗口。
|
|
1667
|
-
if (key.escape && expandedRef.current) {
|
|
1668
|
-
// Collapse runs AHEAD of the fold-block/vim Esc meanings: the
|
|
1669
|
-
// fullscreen cover is the outermost modal layer.
|
|
1670
|
-
event?.stopImmediatePropagation();
|
|
1671
|
-
collapseEditor();
|
|
1672
|
-
return;
|
|
1673
|
-
}
|
|
1674
2046
|
// Fold block: Esc expands it — it must NEVER clear text
|
|
1675
2047
|
// that LOOKS like one line; Backspace at the block's tail / Delete at
|
|
1676
2048
|
// its head deletes the WHOLE block in one key; ←/→ jump over the
|
|
@@ -1690,7 +2062,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1690
2062
|
if ((key.backspace && cursor === block.end) || (key.delete && cursor === block.start)) {
|
|
1691
2063
|
const next = value.slice(0, block.start) + value.slice(block.end);
|
|
1692
2064
|
updateFoldBlock(null);
|
|
1693
|
-
setInput(next, block.start);
|
|
2065
|
+
setInput(next, block.start, 'step', block);
|
|
1694
2066
|
setSelectedCommand(0);
|
|
1695
2067
|
setFileSelected(0);
|
|
1696
2068
|
return;
|
|
@@ -1711,7 +2083,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1711
2083
|
* active selection is REPLACED by the insert (standard editor
|
|
1712
2084
|
* semantics). Returns the insertion offset so callers can derive the
|
|
1713
2085
|
* inserted span (paste fold). */
|
|
1714
|
-
const insertAtCaret = (text) => {
|
|
2086
|
+
const insertAtCaret = (text, undo = 'group') => {
|
|
1715
2087
|
if (helpOpen)
|
|
1716
2088
|
onToggleHelp();
|
|
1717
2089
|
const sel = selectionRef.current;
|
|
@@ -1719,7 +2091,9 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1719
2091
|
const next = sel
|
|
1720
2092
|
? value.slice(0, sel.start) + text + value.slice(sel.end)
|
|
1721
2093
|
: value.slice(0, cursor) + text + value.slice(cursor);
|
|
1722
|
-
|
|
2094
|
+
// Replacing a selection is atomic (like deleting one): the replaced span
|
|
2095
|
+
// must not fold into the surrounding typed run.
|
|
2096
|
+
setInput(next, at + text.length, sel ? 'step' : undo);
|
|
1723
2097
|
setSelectedCommand(0);
|
|
1724
2098
|
setFileSelected(0);
|
|
1725
2099
|
return at;
|
|
@@ -1758,7 +2132,8 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1758
2132
|
});
|
|
1759
2133
|
return;
|
|
1760
2134
|
}
|
|
1761
|
-
|
|
2135
|
+
// One paste is ONE undo step however many characters it carries.
|
|
2136
|
+
const at = insertAtCaret(text, 'step');
|
|
1762
2137
|
// A big paste becomes a fold block right away (hover peeks
|
|
1763
2138
|
// at it); an existing block is replaced by the new paste's span.
|
|
1764
2139
|
// The EXPANDED editor never folds — pasting there is plain text
|
|
@@ -1950,8 +2325,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
1950
2325
|
if (!draftImageLeaseIsCurrent(editorLease))
|
|
1951
2326
|
return;
|
|
1952
2327
|
if (outcome.kind === 'edited') {
|
|
2328
|
+
// Snapshot the block BEFORE clearing it: the refill is one undo
|
|
2329
|
+
// step (D4), and Ctrl+Z must bring back the fold chip the draft
|
|
2330
|
+
// had, not the already-cleared null.
|
|
2331
|
+
const beforeBlock = foldBlockRef.current;
|
|
1953
2332
|
updateFoldBlock(null);
|
|
1954
|
-
setInput(outcome.text);
|
|
2333
|
+
setInput(outcome.text, outcome.text.length, 'step', beforeBlock);
|
|
1955
2334
|
setSelectedCommand(0);
|
|
1956
2335
|
setFileSelected(0);
|
|
1957
2336
|
}
|
|
@@ -2063,6 +2442,12 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2063
2442
|
// indentation arm so the expanded editor participates in the cycle too —
|
|
2064
2443
|
// the parser reports backtab as key.tab + key.shift.
|
|
2065
2444
|
if (key.tab && key.shift) {
|
|
2445
|
+
// A backend without native modes has nothing to cycle (capability
|
|
2446
|
+
// snapshots absent on test stubs = DSH).
|
|
2447
|
+
if (channel.backendCapabilities?.modes === false) {
|
|
2448
|
+
channel.notify(t('capability-unavailable-backend', { name: 'mode' }), { color: 'warning', timeoutMs: 4000 });
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2066
2451
|
// The key is consumed either way. `cycleMode` is best-effort inside the
|
|
2067
2452
|
// channel, but a dropped rejection here would be an unhandledRejection
|
|
2068
2453
|
// (the process guard rethrows everything that is not React #185), and
|
|
@@ -2094,7 +2479,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2094
2479
|
const command = suggestions[selectedCommand];
|
|
2095
2480
|
if (command) {
|
|
2096
2481
|
updateFoldBlock(null);
|
|
2097
|
-
setInput(command.replacement);
|
|
2482
|
+
setInput(command.replacement, command.replacement.length, 'step');
|
|
2098
2483
|
}
|
|
2099
2484
|
return;
|
|
2100
2485
|
}
|
|
@@ -2145,6 +2530,17 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2145
2530
|
return;
|
|
2146
2531
|
}
|
|
2147
2532
|
if (key.upArrow) {
|
|
2533
|
+
// The docked-queue selector owns ↑ while a row is highlighted
|
|
2534
|
+
// (Claude Code parity: "Press up to select a queued message to
|
|
2535
|
+
// edit"); the walk wraps around the dock. The REF drives it: one
|
|
2536
|
+
// stdin read can carry several ↑ (key repeat / a coalescing
|
|
2537
|
+
// terminal), and the state value would pin every handler in the
|
|
2538
|
+
// batch to the same row — N presses collapsing to one step.
|
|
2539
|
+
if (dockSelectedRef.current !== null) {
|
|
2540
|
+
const current = dockSelectedRef.current;
|
|
2541
|
+
setDockSelected(current <= 0 ? dockCount - 1 : current - 1);
|
|
2542
|
+
return;
|
|
2543
|
+
}
|
|
2148
2544
|
// A history walk owns the arrows until it returns to the draft: a
|
|
2149
2545
|
// recalled entry can itself open the @ menu or the slash menu (e.g.
|
|
2150
2546
|
// `/model`), and letting the overlay navigate here strands the stashed
|
|
@@ -2182,10 +2578,26 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2182
2578
|
setSelectedCommand(index => index <= 0 ? suggestions.length - 1 : index - 1);
|
|
2183
2579
|
return;
|
|
2184
2580
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2581
|
+
// An EMPTY draft while idle with a docked queue takes ↑ into the dock
|
|
2582
|
+
// selector, ahead of the history walk (Claude Code parity). Any draft
|
|
2583
|
+
// keeps ↑ as cursor movement; the menus above keep their priority.
|
|
2584
|
+
if (value === '' && !channel.working && !expandedRef.current
|
|
2585
|
+
&& !overlayOpen && !fileOverlayOpen && dockCount > 0) {
|
|
2586
|
+
setDockSelected(dockCount - 1);
|
|
2187
2587
|
return;
|
|
2188
|
-
|
|
2588
|
+
}
|
|
2589
|
+
// A workspace switch mid-walk keeps the draft that walk started from:
|
|
2590
|
+
// the composer shows the previous project's entry, not a new draft.
|
|
2591
|
+
const interrupted = seedHistory();
|
|
2592
|
+
if (history.current.length === 0) {
|
|
2593
|
+
if (interrupted)
|
|
2594
|
+
restoreHistoryDraft();
|
|
2595
|
+
return;
|
|
2596
|
+
}
|
|
2597
|
+
if (interrupted) {
|
|
2598
|
+
historyIndex.current = history.current.length - 1;
|
|
2599
|
+
}
|
|
2600
|
+
else if (historyIndex.current < 0) {
|
|
2189
2601
|
historyDraft.current = {
|
|
2190
2602
|
text: value,
|
|
2191
2603
|
images: imageRefsFor(value),
|
|
@@ -2201,10 +2613,17 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2201
2613
|
retractRecalledCopy(entry.text);
|
|
2202
2614
|
updateFoldBlock(null);
|
|
2203
2615
|
restoreDraftImages(entry);
|
|
2204
|
-
setInput(entry.text);
|
|
2616
|
+
setInput(entry.text, entry.text.length, 'silent');
|
|
2205
2617
|
return;
|
|
2206
2618
|
}
|
|
2207
2619
|
if (key.downArrow) {
|
|
2620
|
+
// The docked-queue selector owns ↓ too (wraps down around the dock;
|
|
2621
|
+
// the REF, so a batch of ↓ advances one row per press — see ↑).
|
|
2622
|
+
if (dockSelectedRef.current !== null) {
|
|
2623
|
+
const current = dockSelectedRef.current;
|
|
2624
|
+
setDockSelected(current >= dockCount - 1 ? 0 : current + 1);
|
|
2625
|
+
return;
|
|
2626
|
+
}
|
|
2208
2627
|
// Same history-walk ownership as ↑ above.
|
|
2209
2628
|
if (fileOverlayOpen && historyIndex.current < 0) {
|
|
2210
2629
|
setFileSelected(index => index >= fileMatches.length - 1 ? 0 : index + 1);
|
|
@@ -2253,20 +2672,23 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2253
2672
|
setSelectedCommand(index => index >= suggestions.length - 1 ? 0 : index + 1);
|
|
2254
2673
|
return;
|
|
2255
2674
|
}
|
|
2675
|
+
// A walk cut short by a workspace switch has no position in the new
|
|
2676
|
+
// project's list; ↓ just ends it and returns the draft.
|
|
2677
|
+
if (seedHistory()) {
|
|
2678
|
+
restoreHistoryDraft();
|
|
2679
|
+
return;
|
|
2680
|
+
}
|
|
2256
2681
|
if (historyIndex.current < 0)
|
|
2257
2682
|
return;
|
|
2258
2683
|
if (historyIndex.current >= history.current.length - 1) {
|
|
2259
|
-
|
|
2260
|
-
updateFoldBlock(null);
|
|
2261
|
-
restoreDraftImages(historyDraft.current);
|
|
2262
|
-
setInput(historyDraft.current.text);
|
|
2684
|
+
restoreHistoryDraft();
|
|
2263
2685
|
}
|
|
2264
2686
|
else {
|
|
2265
2687
|
historyIndex.current += 1;
|
|
2266
2688
|
const entry = history.current[historyIndex.current];
|
|
2267
2689
|
if (entry !== undefined) {
|
|
2268
2690
|
restoreDraftImages(entry);
|
|
2269
|
-
setInput(entry.text);
|
|
2691
|
+
setInput(entry.text, entry.text.length, 'silent');
|
|
2270
2692
|
}
|
|
2271
2693
|
}
|
|
2272
2694
|
return;
|
|
@@ -2286,8 +2708,8 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2286
2708
|
return;
|
|
2287
2709
|
}
|
|
2288
2710
|
if (key.leftArrow) {
|
|
2289
|
-
// ← on an EMPTY prompt
|
|
2290
|
-
//
|
|
2711
|
+
// ← on an EMPTY prompt opens the session manager; the caller decides
|
|
2712
|
+
// whether the backend can background the session first.
|
|
2291
2713
|
// (The command/file overlays both imply non-empty text, so no extra
|
|
2292
2714
|
// gate beyond the help menu is needed.)
|
|
2293
2715
|
if (value.length === 0 && !helpOpen) {
|
|
@@ -2355,10 +2777,19 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2355
2777
|
deleteInputRange(cursor, end);
|
|
2356
2778
|
return;
|
|
2357
2779
|
}
|
|
2780
|
+
if (actionMatches('undo', input, key)) {
|
|
2781
|
+
// Word-level draft undo (remappable via /settings). Only the prompt
|
|
2782
|
+
// draft has an undo space: with the keyboard owned by a panel or a
|
|
2783
|
+
// dialog this handler is inactive (useInput isActive), and an empty
|
|
2784
|
+
// stack is a no-op rather than the rewind picker.
|
|
2785
|
+
undoDraft();
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2358
2788
|
if (isMod(key) && input === 'w') {
|
|
2359
|
-
// Delete the word before the cursor:
|
|
2360
|
-
// trailing whitespace, then the
|
|
2361
|
-
//
|
|
2789
|
+
// Delete the word before the cursor: readline's whitespace-delimited
|
|
2790
|
+
// rule (skip trailing whitespace, then the word). The ICU/CJK
|
|
2791
|
+
// alternative is a separate editor-UX change, not part of draft undo.
|
|
2792
|
+
// The deletion start never crosses into the block.
|
|
2362
2793
|
const before = value.slice(0, cursor);
|
|
2363
2794
|
let end = before.length;
|
|
2364
2795
|
while (end > 0 && /\s/.test(before[end - 1]))
|
|
@@ -2375,25 +2806,30 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2375
2806
|
// NORMAL submode: bare characters and Esc are vim keys; help/command/
|
|
2376
2807
|
// file overlays, modified combos, Tab, Enter, arrows and other
|
|
2377
2808
|
// structured keys keep their existing handlers.
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
setFileSelected(0);
|
|
2383
|
-
};
|
|
2809
|
+
/**
|
|
2810
|
+
* Push one vim NORMAL-mode step. Vim edits never touch the draft stack:
|
|
2811
|
+
* `u` and `Ctrl+Z` are two independent histories (see {@link vimUndoRef}).
|
|
2812
|
+
*/
|
|
2384
2813
|
const vimPushUndo = () => {
|
|
2385
2814
|
const images = imageRefsFor(valueRef.current);
|
|
2386
|
-
const evicted = vimUndoRef.current.length >=
|
|
2815
|
+
const evicted = vimUndoRef.current.length >= UNDO_LIMIT ? vimUndoRef.current.shift() : undefined;
|
|
2387
2816
|
vimUndoRef.current.push({ text: valueRef.current, cursor: cursorRef.current, images });
|
|
2388
|
-
if (evicted !== undefined)
|
|
2817
|
+
if (evicted !== undefined) {
|
|
2389
2818
|
discardUnretainedImages(evicted.images.map(image => image.stageId));
|
|
2819
|
+
}
|
|
2820
|
+
};
|
|
2821
|
+
const vimNormalEdit = (next, cursorOffset) => {
|
|
2822
|
+
updateFoldBlock(null);
|
|
2823
|
+
setInput(next, cursorOffset, 'silent');
|
|
2824
|
+
setSelectedCommand(0);
|
|
2825
|
+
setFileSelected(0);
|
|
2390
2826
|
};
|
|
2391
2827
|
const vimDeleteRange = (start, end) => {
|
|
2392
2828
|
if (start >= end)
|
|
2393
2829
|
return;
|
|
2394
2830
|
vimPushUndo();
|
|
2395
2831
|
updateFoldBlock(null);
|
|
2396
|
-
deleteInputRange(start, end);
|
|
2832
|
+
deleteInputRange(start, end, 'silent');
|
|
2397
2833
|
setSelectedCommand(0);
|
|
2398
2834
|
setFileSelected(0);
|
|
2399
2835
|
};
|
|
@@ -2510,7 +2946,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2510
2946
|
case 'd':
|
|
2511
2947
|
vimPendingRef.current = 'd';
|
|
2512
2948
|
return;
|
|
2513
|
-
case 'u': { // undo the last vim edit
|
|
2949
|
+
case 'u': { // undo the last vim edit (its own stack, not Ctrl+Z's)
|
|
2514
2950
|
syncImageGeneration();
|
|
2515
2951
|
const prev = vimUndoRef.current.pop();
|
|
2516
2952
|
if (prev === undefined)
|
|
@@ -2518,7 +2954,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2518
2954
|
advanceDraftRevision();
|
|
2519
2955
|
replaceDraftImages(prev.images);
|
|
2520
2956
|
updateFoldBlock(null);
|
|
2521
|
-
setInput(prev.text, prev.cursor);
|
|
2957
|
+
setInput(prev.text, prev.cursor, 'silent');
|
|
2522
2958
|
setSelectedCommand(0);
|
|
2523
2959
|
setFileSelected(0);
|
|
2524
2960
|
return;
|
|
@@ -2591,12 +3027,17 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2591
3027
|
return;
|
|
2592
3028
|
// `/` opens the slash-command menu even in NORMAL: insert it and
|
|
2593
3029
|
// switch to INSERT so the rest of the command types normally
|
|
2594
|
-
// (the menu then owns the keys while it is open).
|
|
3030
|
+
// (the menu then owns the keys while it is open). The insertion is
|
|
3031
|
+
// a NORMAL command, so it lands on the vim undo stack (`u` reverts
|
|
3032
|
+
// it); anything typed afterwards is a draft edit whose first
|
|
3033
|
+
// snapshot already contains the `/`, so `Ctrl+Z` never peels the
|
|
3034
|
+
// `/` off on its own.
|
|
2595
3035
|
if (input === '/') {
|
|
2596
3036
|
const text = valueRef.current;
|
|
2597
3037
|
const pos = cursorRef.current;
|
|
2598
3038
|
const next = text.slice(0, pos) + '/' + text.slice(pos);
|
|
2599
|
-
|
|
3039
|
+
vimPushUndo(); // NORMAL command: one vim-undo step, not a draft edit
|
|
3040
|
+
setInput(next, pos + 1, 'silent');
|
|
2600
3041
|
setSelectedCommand(0);
|
|
2601
3042
|
setFileSelected(0);
|
|
2602
3043
|
vimInsertRef.current = true;
|
|
@@ -2634,11 +3075,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2634
3075
|
// A single Esc closes the open command menu first;
|
|
2635
3076
|
// the double-tap-clear semantics only apply to ordinary input.
|
|
2636
3077
|
if (overlayOpen) {
|
|
2637
|
-
|
|
2638
|
-
discardDraftImages();
|
|
2639
|
-
setInput('', 0);
|
|
2640
|
-
setSelectedCommand(0);
|
|
2641
|
-
setFileSelected(0);
|
|
3078
|
+
clearDraftUndoably();
|
|
2642
3079
|
return;
|
|
2643
3080
|
}
|
|
2644
3081
|
// File overlay: Esc dismisses the menu for THIS token only — clearing
|
|
@@ -2647,17 +3084,32 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2647
3084
|
fileEscRef.current = mention?.start ?? -1;
|
|
2648
3085
|
return;
|
|
2649
3086
|
}
|
|
2650
|
-
//
|
|
2651
|
-
//
|
|
2652
|
-
|
|
3087
|
+
// The docked-queue selector folds before anything else: Esc leaves the
|
|
3088
|
+
// selector (Chat's delegation reaches this through consumeEscape too).
|
|
3089
|
+
if (dockSelectedRef.current !== null) {
|
|
3090
|
+
setDockSelected(null);
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3093
|
+
// With pending messages while working, Esc = interrupt and DOCK the
|
|
3094
|
+
// queue (Claude Code parity): the previews park channel-side and the
|
|
3095
|
+
// dock hint offers ↑ to edit one / ⏎ to send them all — nothing
|
|
3096
|
+
// auto-sends. A queue already fully docked docks nothing new; the
|
|
3097
|
+
// turn still needs its plain abort.
|
|
2653
3098
|
if (channel.working && channel.pending.length > 0) {
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
3099
|
+
if (channel.interruptAndDock() === 0)
|
|
3100
|
+
channel.cancel();
|
|
3101
|
+
return;
|
|
3102
|
+
}
|
|
3103
|
+
// "Send to Chat" chips peel before the draft: the first Esc drops the
|
|
3104
|
+
// contexts panels staged and leaves the typed text untouched, so a second
|
|
3105
|
+
// Esc then clears the input as usual. The press is CONSUMED — this rung
|
|
3106
|
+
// has exactly one meaning, and a running turn must not be interrupted by
|
|
3107
|
+
// the same key that only dropped a chip.
|
|
3108
|
+
const stagedContexts = channel.attachedContexts ?? [];
|
|
3109
|
+
if (stagedContexts.length > 0) {
|
|
3110
|
+
event?.stopImmediatePropagation();
|
|
3111
|
+
for (const staged of [...stagedContexts])
|
|
3112
|
+
channel.detachContext(staged.id);
|
|
2661
3113
|
return;
|
|
2662
3114
|
}
|
|
2663
3115
|
// A single Esc clears the current input (if any); the double-tap
|
|
@@ -2672,28 +3124,19 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2672
3124
|
setFileSelected(0);
|
|
2673
3125
|
return;
|
|
2674
3126
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
setSelectedCommand(0);
|
|
2679
|
-
setFileSelected(0);
|
|
3127
|
+
// Esc clearing the draft is undoable (D4): Ctrl+Z brings the whole
|
|
3128
|
+
// draft back, images and fold block included.
|
|
3129
|
+
clearDraftUndoably();
|
|
2680
3130
|
return;
|
|
2681
3131
|
}
|
|
2682
|
-
// Double-tap Esc
|
|
2683
|
-
//
|
|
2684
|
-
//
|
|
3132
|
+
// Double-tap Esc opens the rewind picker. Reaching here means the draft
|
|
3133
|
+
// is empty: every non-empty branch above returns after clearing, so the
|
|
3134
|
+
// second tap can only be the rewind gesture.
|
|
2685
3135
|
if (escPendingRef.current) {
|
|
2686
3136
|
escPendingRef.current = false;
|
|
2687
3137
|
if (escTimerRef.current)
|
|
2688
3138
|
clearTimeout(escTimerRef.current);
|
|
2689
|
-
|
|
2690
|
-
onRewindRequest?.();
|
|
2691
|
-
}
|
|
2692
|
-
else {
|
|
2693
|
-
syncImageGeneration();
|
|
2694
|
-
discardDraftImages();
|
|
2695
|
-
setInput('', 0);
|
|
2696
|
-
}
|
|
3139
|
+
onRewindRequest?.();
|
|
2697
3140
|
return;
|
|
2698
3141
|
}
|
|
2699
3142
|
escPendingRef.current = true;
|
|
@@ -2708,16 +3151,22 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2708
3151
|
return;
|
|
2709
3152
|
}
|
|
2710
3153
|
if (input && !key.ctrl && !key.meta && !key.super && !key.tab && !key.escape) {
|
|
2711
|
-
// Typing anything else dismisses the help menu
|
|
3154
|
+
// Typing anything else dismisses the help menu…
|
|
2712
3155
|
if (helpOpen)
|
|
2713
3156
|
onToggleHelp();
|
|
3157
|
+
// …and leaves the docked-queue selector: the draft is no longer empty,
|
|
3158
|
+
// so ↑ goes back to cursor movement.
|
|
3159
|
+
if (dockSelectedRef.current !== null)
|
|
3160
|
+
setDockSelected(null);
|
|
2714
3161
|
// An active selection is REPLACED by the typed text, caret after it.
|
|
2715
3162
|
const sel = selectionRef.current;
|
|
2716
3163
|
const at = sel ? sel.start : cursor;
|
|
2717
3164
|
const next = sel
|
|
2718
3165
|
? value.slice(0, sel.start) + input + value.slice(sel.end)
|
|
2719
3166
|
: value.slice(0, cursor) + input + value.slice(cursor);
|
|
2720
|
-
|
|
3167
|
+
// Replacing a selection is atomic, exactly like `insertAtCaret`: the
|
|
3168
|
+
// replaced span must not fold into the surrounding typed run.
|
|
3169
|
+
setInput(next, at + input.length, sel ? 'step' : 'group');
|
|
2721
3170
|
setSelectedCommand(0);
|
|
2722
3171
|
setFileSelected(0);
|
|
2723
3172
|
}
|
|
@@ -2877,23 +3326,30 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2877
3326
|
]
|
|
2878
3327
|
: visualLineRanges(value, inputWidth);
|
|
2879
3328
|
/**
|
|
2880
|
-
*
|
|
3329
|
+
* Highlight runs for one rendered row, shared by the inline prompt and the
|
|
2881
3330
|
* expanded editor: the selection's intersection (if any) and the caret
|
|
2882
|
-
* cluster on the caret's row.
|
|
2883
|
-
* intervals merge so a caret inside the selection
|
|
2884
|
-
* highlight. The caret row inverts the WHOLE cluster at
|
|
2885
|
-
* (solid block) — [col, next boundary) covers a surrogate
|
|
2886
|
-
* emoji as one glyph; at the text end it shows a blank inverse
|
|
2887
|
-
* the empty-input caret (appended after everything, so a selection
|
|
3331
|
+
* cluster on the caret's row. Without a palette `cursor` both are inverse
|
|
3332
|
+
* runs and overlapping intervals merge, so a caret inside the selection
|
|
3333
|
+
* stays one continuous highlight. The caret row inverts the WHOLE cluster at
|
|
3334
|
+
* the caret column (solid block) — [col, next boundary) covers a surrogate
|
|
3335
|
+
* pair or ZWJ emoji as one glyph; at the text end it shows a blank inverse
|
|
3336
|
+
* cell like the empty-input caret (appended after everything, so a selection
|
|
2888
3337
|
* ending there cannot swallow it).
|
|
3338
|
+
*
|
|
3339
|
+
* A palette that sets `cursor` splits the caret off the selection: the
|
|
3340
|
+
* caret is then its own kind (painted with `caretCell`) instead of merging
|
|
3341
|
+
* into the selection's inverse run.
|
|
2889
3342
|
*/
|
|
2890
3343
|
const rowHighlightPieces = (text, absoluteLine) => {
|
|
2891
3344
|
const [rowStart] = lineRanges[absoluteLine] ?? [0, 0];
|
|
2892
3345
|
// Per-character style: 0 plain, 1 chip (a staged token), 2 inverse
|
|
2893
|
-
// (selection or caret
|
|
3346
|
+
// (selection, or caret when the palette has no `cursor`), 3 caret.
|
|
3347
|
+
// Later fills win: chip < selection < caret.
|
|
2894
3348
|
const PLAIN = 0;
|
|
2895
3349
|
const CHIP = 1;
|
|
2896
3350
|
const INVERSE = 2;
|
|
3351
|
+
const CARET = 3;
|
|
3352
|
+
const caretKind = cursorColor === '' ? INVERSE : CARET;
|
|
2897
3353
|
const kinds = new Uint8Array(text.length);
|
|
2898
3354
|
const fill = (lo, hi, kind) => {
|
|
2899
3355
|
for (let i = Math.max(lo, 0); i < Math.min(hi, text.length); i++)
|
|
@@ -2915,7 +3371,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2915
3371
|
? Math.min(tokenAtCaret.end - rowStart, text.length)
|
|
2916
3372
|
: nextGraphemeBoundary(graphemeBoundaries(text), col);
|
|
2917
3373
|
if (clusterEnd > col)
|
|
2918
|
-
fill(col, clusterEnd,
|
|
3374
|
+
fill(col, clusterEnd, caretKind);
|
|
2919
3375
|
else
|
|
2920
3376
|
endBlankCaret = col === text.length;
|
|
2921
3377
|
}
|
|
@@ -2926,13 +3382,27 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2926
3382
|
let end = pos + 1;
|
|
2927
3383
|
while (end < text.length && kinds[end] === kind)
|
|
2928
3384
|
end++;
|
|
2929
|
-
pieces.push({
|
|
3385
|
+
pieces.push({
|
|
3386
|
+
text: text.slice(pos, end),
|
|
3387
|
+
inverse: kind === INVERSE,
|
|
3388
|
+
chip: kind === CHIP,
|
|
3389
|
+
caret: kind === CARET,
|
|
3390
|
+
});
|
|
2930
3391
|
pos = end;
|
|
2931
3392
|
}
|
|
2932
|
-
if (endBlankCaret)
|
|
2933
|
-
pieces.push({ text: ' ', inverse:
|
|
3393
|
+
if (endBlankCaret) {
|
|
3394
|
+
pieces.push({ text: ' ', inverse: caretKind === INVERSE, chip: false, caret: caretKind === CARET });
|
|
3395
|
+
}
|
|
2934
3396
|
return pieces;
|
|
2935
3397
|
};
|
|
3398
|
+
/**
|
|
3399
|
+
* One caret cell: the palette's `cursor` fill with the glyph in whichever
|
|
3400
|
+
* palette ink contrasts with it, or the inverse-video block it replaces when
|
|
3401
|
+
* the palette predates the key.
|
|
3402
|
+
*/
|
|
3403
|
+
const caretCell = (key, text) => cursorColor === ''
|
|
3404
|
+
? _jsx(Text, { inverse: true, children: text }, key)
|
|
3405
|
+
: _jsx(Text, { backgroundColor: cursorColor, color: cursorGlyph, children: text }, key);
|
|
2936
3406
|
const rendered = visibleLines.map((line, index) => {
|
|
2937
3407
|
const absoluteLine = windowStart + index;
|
|
2938
3408
|
if (block && absoluteLine === chipRow) {
|
|
@@ -2947,7 +3417,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2947
3417
|
const text = withPrefix ? truncateToWidth(line, inputWidth - prefixCols) : line;
|
|
2948
3418
|
const prefix = withPrefix ? _jsx(Text, { dimColor: true, children: prefixLabel }) : null;
|
|
2949
3419
|
const pieces = rowHighlightPieces(text, absoluteLine);
|
|
2950
|
-
return (_jsxs(Text, { wrap: "truncate-end", children: [prefix, pieces.length === 0 ? ' ' : pieces.map((piece, pieceIndex) => piece.inverse ? (_jsx(Text, { inverse: true, children: piece.text }, pieceIndex)) : piece.chip ? (_jsx(Text, { color: "suggestion", children: piece.text }, pieceIndex)) : (piece.text))] }, absoluteLine));
|
|
3420
|
+
return (_jsxs(Text, { wrap: "truncate-end", children: [prefix, pieces.length === 0 ? ' ' : pieces.map((piece, pieceIndex) => piece.caret ? (caretCell(pieceIndex, piece.text)) : piece.inverse ? (_jsx(Text, { inverse: true, children: piece.text }, pieceIndex)) : piece.chip ? (_jsx(Text, { color: "suggestion", children: piece.text }, pieceIndex)) : (piece.text))] }, absoluteLine));
|
|
2951
3421
|
});
|
|
2952
3422
|
// ── 展开态编辑行 ────────────────────────────────────────────────────
|
|
2953
3423
|
// Logical line number per visual row (a wrapped continuation keeps its
|
|
@@ -2972,7 +3442,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
2972
3442
|
? ' '.repeat(editorNoWidth)
|
|
2973
3443
|
: String(logicalNo + 1).padStart(editorNoWidth, ' ');
|
|
2974
3444
|
const pieces = rowHighlightPieces(line, absoluteLine);
|
|
2975
|
-
return (_jsxs(Text, { wrap: "truncate-end", backgroundColor: isCaretRow ? 'toolCardBackgroundDim' : undefined, children: [_jsx(Text, { dimColor: !isCaretRow, bold: isCaretRow, color: isCaretRow ? promptAccent : undefined, children: `${gutterLabel} │ ` }), pieces.map((piece, pieceIndex) => piece.inverse ? (_jsx(Text, { inverse: true, children: piece.text }, pieceIndex)) : piece.chip ? (_jsx(Text, { color: "suggestion", children: piece.text }, pieceIndex)) : (piece.text))] }, absoluteLine));
|
|
3445
|
+
return (_jsxs(Text, { wrap: "truncate-end", backgroundColor: isCaretRow ? 'toolCardBackgroundDim' : undefined, children: [_jsx(Text, { dimColor: !isCaretRow, bold: isCaretRow, color: isCaretRow ? promptAccent : undefined, children: `${gutterLabel} │ ` }), pieces.map((piece, pieceIndex) => piece.caret ? (caretCell(pieceIndex, piece.text)) : piece.inverse ? (_jsx(Text, { inverse: true, children: piece.text }, pieceIndex)) : piece.chip ? (_jsx(Text, { color: "suggestion", children: piece.text }, pieceIndex)) : (piece.text))] }, absoluteLine));
|
|
2976
3446
|
})
|
|
2977
3447
|
: null;
|
|
2978
3448
|
// Peek card content: the BLOCK's text wrapped to the card's inner width,
|
|
@@ -3010,6 +3480,11 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
3010
3480
|
prevContentRowsRef.current = contentRows;
|
|
3011
3481
|
}, [contentRows]);
|
|
3012
3482
|
const lastNotification = channel.notifications[channel.notifications.length - 1];
|
|
3483
|
+
// The pet panel can "say" a notice with its speech bubble instead: while
|
|
3484
|
+
// that panel is the ACTIVE one the host suppresses the duplicate toast
|
|
3485
|
+
// here (errors always toast — they may need action). Same render, same
|
|
3486
|
+
// commit, so the swap cannot flash one frame of toast first.
|
|
3487
|
+
const toastVisible = lastNotification !== undefined && (toastSuppressed?.(lastNotification) ?? false) !== true;
|
|
3013
3488
|
// Park the native terminal cursor at the input caret (via the renderer's
|
|
3014
3489
|
// cursor-declaration mechanism). Terminal emulators render IME preedit
|
|
3015
3490
|
// text and screen-reader focus at the physical cursor, so parking it at
|
|
@@ -3240,12 +3715,35 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
3240
3715
|
// 的 style.position,常驻浮层 + 移除普通子节点不会触发 blit 解毒,被
|
|
3241
3716
|
// 覆盖的转录行会留空(见 Chat.tsx dialogOverlayOpen 注释)。展开态由
|
|
3242
3717
|
// 全屏编辑器接管,内联浮层全部撤下。
|
|
3718
|
+
// The dock rows are windowed, never rendered in full: OverlayAbove clips
|
|
3719
|
+
// overflow from the top without scrolling, so a long dock would push the
|
|
3720
|
+
// highlighted row off-screen while Enter still retracts by index. The
|
|
3721
|
+
// window keeps the focused row
|
|
3722
|
+
// visible (listWindow centers on it); Enter and the row click both
|
|
3723
|
+
// operate on the absolute dock index, so they always name the row the
|
|
3724
|
+
// user SEES highlighted. The budget subtracts every other row the
|
|
3725
|
+
// pending block paints (steer/followup previews, labels, hints, padding)
|
|
3726
|
+
// so the window always fits the overlay's effective height.
|
|
3727
|
+
const steerPreviewCount = channel.pending.filter(item => item.placement === 'steer' && item.docked !== true).length;
|
|
3728
|
+
const followupPreviewCount = channel.pending.filter(item => item.placement === 'followup' && item.docked !== true).length;
|
|
3729
|
+
const dockWindowRows = useOverlayListRows((steerPreviewCount > 0 ? 1 + steerPreviewCount : 0)
|
|
3730
|
+
+ (followupPreviewCount > 0 ? 1 + followupPreviewCount : 0)
|
|
3731
|
+
+ 1 /* dock label */ + 1 /* dock hint row */ + 1 /* Alt+↑ hint */ + 1 /* block paddingBottom */);
|
|
3732
|
+
const dockFocus = dockSelected ?? Math.max(dockCount - 1, 0);
|
|
3733
|
+
const { start: dockStart, end: dockEnd } = listWindow(dockedPending.map(() => 1), dockFocus, dockWindowRows);
|
|
3243
3734
|
const floatersOpen = !suspended &&
|
|
3244
3735
|
!expanded &&
|
|
3245
3736
|
(helpOpen || channel.pending.length > 0 || fileOverlayOpen || overlayOpen || peekOpen);
|
|
3246
3737
|
// 顶边框右侧的会话名标签 chip:色随强调色;超宽截断,宽度
|
|
3247
3738
|
// 随终端列数伸缩但不超过 28 显示单元。默认关闭——`/settings` 的
|
|
3248
3739
|
// 「会话名标签」开关(dsh-tui.promptSessionLabel)开启后显示。
|
|
3740
|
+
// "Send to Chat" chips (side-panel §6.7): the contexts panels staged for the
|
|
3741
|
+
// next submission, rendered as one strip directly above the prompt border.
|
|
3742
|
+
// Read defensively — hosts and older fixtures mount this composer with a
|
|
3743
|
+
// partial channel stub (Chat guards `agentViewRows` for the same reason),
|
|
3744
|
+
// and a missing projection means "nothing attached". A render-time TypeError
|
|
3745
|
+
// here would be swallowed by ink and silently freeze the screen.
|
|
3746
|
+
const attachedContexts = channel.attachedContexts ?? [];
|
|
3249
3747
|
const sessionTitle = channel.sessionTitle ?? '';
|
|
3250
3748
|
const topRightLabel = channel.promptSessionLabel === true && sessionTitle !== ''
|
|
3251
3749
|
? {
|
|
@@ -3338,13 +3836,25 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
3338
3836
|
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [floatersOpen && (_jsxs(OverlayAbove, { maxHeight: Math.max(terminalRows - 6, 1), children: [helpOpen && (_jsx(Box, { marginBottom: 1, children: _jsx(HelpMenu, { commands: channel.commandList, viewportHeight: helpViewportHeight, viewportWidth: columns, scrollRef: helpScrollRef, onCommandPick: (name) => {
|
|
3339
3837
|
// 点击命令行 = 填入 /name 并关闭帮助(Tab 补全的鼠标等价)
|
|
3340
3838
|
updateFoldBlock(null);
|
|
3341
|
-
|
|
3839
|
+
// `/${name} ` — the whole fill is one undo step.
|
|
3840
|
+
setInput(`/${name} `, name.length + 2, 'step');
|
|
3342
3841
|
onToggleHelp();
|
|
3343
|
-
} }) })), !helpOpen && channel.pending.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingBottom: 1, children: [channel.pending.some(item => item.placement === 'steer') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u26A1 ", t('input-pending-steer-label')] }), channel.pending
|
|
3344
|
-
.filter(item => item.placement === 'steer')
|
|
3345
|
-
.map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), channel.pending.some(item => item.placement === 'followup') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u23F3 ", t('input-pending-queue-label')] }), channel.pending
|
|
3346
|
-
.filter(item => item.placement === 'followup')
|
|
3347
|
-
.map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), _jsxs(Text, { dimColor: true, children: ["
|
|
3842
|
+
} }) })), !helpOpen && channel.pending.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingBottom: 1, children: [channel.pending.some(item => item.placement === 'steer' && item.docked !== true) && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u26A1 ", t('input-pending-steer-label')] }), channel.pending
|
|
3843
|
+
.filter(item => item.placement === 'steer' && item.docked !== true)
|
|
3844
|
+
.map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), channel.pending.some(item => item.placement === 'followup' && item.docked !== true) && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u23F3 ", t('input-pending-queue-label')] }), channel.pending
|
|
3845
|
+
.filter(item => item.placement === 'followup' && item.docked !== true)
|
|
3846
|
+
.map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), dockCount > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u23F8 ", t('input-pending-dock-label')] }), dockedPending.slice(dockStart, dockEnd).map((item, index) => {
|
|
3847
|
+
// The window maps to absolute dock indices: the click and
|
|
3848
|
+
// the highlight name the same row the user sees.
|
|
3849
|
+
const absoluteIndex = dockStart + index;
|
|
3850
|
+
return (_jsx(Box, {
|
|
3851
|
+
// 点击停靠行 = 撤回该条进输入框编辑(与选择器 ⏎ 同路径)
|
|
3852
|
+
onClick: () => { editDocked(absoluteIndex); }, children: _jsxs(Text, { wrap: "truncate", dimColor: dockSelected === null || dockSelected !== absoluteIndex, color: dockSelected === absoluteIndex ? promptAccent : undefined, children: [' ', dockSelected === absoluteIndex ? '❯' : '↳', " ", item.text] }) }, item.id));
|
|
3853
|
+
}), _jsx(Box
|
|
3854
|
+
// 点击提示行 = 全部发送(与空输入 ⏎ 同路径)
|
|
3855
|
+
, {
|
|
3856
|
+
// 点击提示行 = 全部发送(与空输入 ⏎ 同路径)
|
|
3857
|
+
onClick: () => { sendDocked(); }, children: _jsxs(Text, { dimColor: true, children: [' ', t('input-pending-dock-hint')] }) })] })), _jsxs(Text, { dimColor: true, children: ["Alt+\u2191 ", t('input-pending-actions-hint')] })] })), fileOverlayOpen && (_jsx(FileSuggestions, { files: fileMatches, selectedIndex: fileSelected, columns: columns, query: mention?.query ?? '', accent: promptAccent,
|
|
3348
3858
|
// 点击行 = 接受该项(与 Enter 同路径)
|
|
3349
3859
|
onPick: (index) => {
|
|
3350
3860
|
const file = fileMatches[index];
|
|
@@ -3354,7 +3864,7 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
3354
3864
|
// 滚轮 = 移动选中行(与 ↑/↓ 同路径,窗口跟随)
|
|
3355
3865
|
onWheelStep: (step) => {
|
|
3356
3866
|
setFileSelected(i => Math.max(0, Math.min(fileMatches.length - 1, i + step)));
|
|
3357
|
-
} })), overlayOpen && (_jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns, query: value, accent: promptAccent,
|
|
3867
|
+
} })), overlayOpen && (_jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns, query: value, accent: promptAccent, holdFrom: suggestionsHoldFrom,
|
|
3358
3868
|
// 点击行 = 运行该命令(与 Enter 同路径)
|
|
3359
3869
|
onPick: (index) => {
|
|
3360
3870
|
const command = suggestions[index];
|
|
@@ -3369,14 +3879,14 @@ export function PromptInput({ channel, suspended = false, draftCache, helpOpen,
|
|
|
3369
3879
|
: undefined, rows: peekVisualLines.map((row, index) => (_jsx(Text, { wrap: "truncate-end", children: row }, index))), onRowPick: () => {
|
|
3370
3880
|
updateFoldBlock(null);
|
|
3371
3881
|
setHovered(false);
|
|
3372
|
-
} }) }))] })), lastNotification && (_jsx(Box, { position: "absolute", marginTop: -1, height: 1, width: "100%", paddingLeft: 2, paddingRight: 1, flexDirection: "column", justifyContent: "flex-end", overflow: "hidden", children: _jsx(Box, { justifyContent: "flex-end", children: _jsx(Text, { color: lastNotification.color, dimColor: !lastNotification.color, wrap: "truncate", children: lastNotification.text }) }) })), _jsx(EffortInputBorder, { effort: channel.reasoningEffort, levels: channel.effortLevels, columns: columns,
|
|
3882
|
+
} }) }))] })), attachedContexts.length > 0 && (_jsx(Box, { flexDirection: "row", width: "100%", height: 1, overflow: "hidden", paddingLeft: 2, columnGap: 2, children: attachedContexts.map(item => (_jsx(Box, { overflow: "hidden", children: _jsx(Text, { color: promptAccent, wrap: "truncate-end", children: t('prompt-attached-context-chip', { title: item.title }) }) }, item.id))) })), lastNotification && toastVisible && (_jsx(Box, { position: "absolute", marginTop: -1, height: 1, width: "100%", paddingLeft: 2, paddingRight: 1, flexDirection: "column", justifyContent: "flex-end", overflow: "hidden", children: _jsx(Box, { justifyContent: "flex-end", children: _jsx(Text, { color: lastNotification.color, dimColor: !lastNotification.color, wrap: "truncate", children: lastNotification.text }) }) })), _jsx(EffortInputBorder, { effort: channel.reasoningEffort, levels: channel.effortLevels, columns: columns, idleColor: promptAccent, topRightLabel: topRightLabel, children: _jsxs(Box, { flexDirection: "row", alignItems: "flex-start", width: "100%", children: [onOpenSessions !== undefined && (_jsx(Box, { flexShrink: 0, onClick: (event) => {
|
|
3373
3883
|
event.stopImmediatePropagation();
|
|
3374
3884
|
onOpenSessions?.();
|
|
3375
3885
|
}, onMouseEnter: () => {
|
|
3376
3886
|
setHomeHovered(true);
|
|
3377
3887
|
}, onMouseLeave: () => {
|
|
3378
3888
|
setHomeHovered(false);
|
|
3379
|
-
}, children: _jsx(Text, { dimColor: !homeHovered, bold: homeHovered, color: homeHovered ? promptAccent : undefined, children: HOME_BUTTON_TEXT }) })), _jsx(EffortChargeGlyph, { effort: channel.reasoningEffort, levels: channel.effortLevels, working: channel.working }), vimEnabled && (_jsxs(Text, { bold: true, color: vimInsert ? 'success' : 'warning', children: [vimInsert ? 'INSERT' : 'NORMAL', " "] })), _jsx(Box, { ref: expanded ? undefined : valueBoxRef, flexGrow: 1, flexShrink: 1, onClick: handleValueClick, onDragStart: handleDragStart, onDragMove: handleDragMove, onDragEnd: handleDragEnd, children: value.length === 0 ? (_jsxs(_Fragment, { children: [
|
|
3889
|
+
}, children: _jsx(Text, { dimColor: !homeHovered, bold: homeHovered, color: homeHovered ? promptAccent : undefined, children: HOME_BUTTON_TEXT }) })), _jsx(EffortChargeGlyph, { effort: channel.reasoningEffort, levels: channel.effortLevels, working: channel.working }), vimEnabled && (_jsxs(Text, { bold: true, color: vimInsert ? 'success' : 'warning', children: [vimInsert ? 'INSERT' : 'NORMAL', " "] })), _jsx(Box, { ref: expanded ? undefined : valueBoxRef, flexGrow: 1, flexShrink: 1, onClick: handleValueClick, onDragStart: handleDragStart, onDragMove: handleDragMove, onDragEnd: handleDragEnd, children: value.length === 0 ? (_jsxs(_Fragment, { children: [caretCell('empty', ' '), _jsx(EffortTierBadge, { effort: channel.reasoningEffort, levels: channel.effortLevels, columns: columns, leadingColumns: 3 + homeButtonCols })] })) : (_jsx(Box, { flexDirection: "column", children: rendered })) }), expandEnabled && (_jsx(Box, { flexShrink: 0, onClick: (event) => {
|
|
3380
3890
|
event.stopImmediatePropagation();
|
|
3381
3891
|
toggleExpand();
|
|
3382
3892
|
}, onMouseEnter: () => {
|