zot/internal/agent
patriceckhart 112341ca3d fix(tui): slash popup + transient overlays swallow esc before busy-cancel
Two rules for how esc resolves while a turn is running got
implemented this round:

1) Let the user open the slash popup during a busy turn.

   The suggest render path used to short-circuit on i.busy, so
   typing / while the agent was working did nothing. The
   dispatcher in runSlash already handles the busy-state routing
   per command (safe ones run immediately, destructive ones
   cancel first), so dropping the guard was safe. Now / opens
   the popup whether or not a turn is in flight.

2) Esc dismisses overlays before it cancels the turn.

   The global key switch used to fire the busy-cancel
   unconditionally on esc. That meant three common patterns
   silently ripped the active turn away:

     - Open the slash popup, press esc to dismiss it ->
       turn cancelled.
     - Run /help to see the key bindings while a turn was
       running, press esc when done -> turn cancelled.
     - An extension pushed a notify/display line, user pressed
       esc to clear it -> turn cancelled.

   The esc case now checks, in order:
     - slash popup active -> break out of the switch, let the
       popup's own esc handler (later in handleKey) close it
     - helpBlock or extNotes non-empty -> clear them, invalidate,
       return (turn keeps running)
     - busy + cancelable -> cancel the turn (old behaviour)
     - idle -> fall through to the editor which clears itself

Result: esc feels like a dismiss key that escalates. It nukes
the turn only when nothing else on screen wants it.

No change to dialog handlers \u2014 those already intercept esc in
their own return-false branches before the global switch ever
runs.
2026-04-21 18:32:22 +02:00
..
extensions feat(ext): phase 4 - full-event interception, arg rewrites, /reload-ext 2026-04-19 17:02:04 +02:00
modes fix(tui): slash popup + transient overlays swallow esc before busy-cancel 2026-04-21 18:32:22 +02:00
tools feat(tui): context diffs + framed tool blocks + paced streaming 2026-04-20 15:50:39 +02:00
args.go fix(no-yolo): don't auto-refuse tool calls in non-interactive modes 2026-04-19 19:17:05 +02:00
botcmd.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_unix.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_windows.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
build.go rename: /lock -> /jail, /unlock -> /unjail 2026-04-20 08:57:40 +02:00
changelog.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
cli.go fix(session): export the full running conversation, handle quoted paths 2026-04-20 10:19:53 +02:00
config.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
extcmd.go feat: extension system (subprocess + json-rpc, any language) 2026-04-19 14:09:43 +02:00
modelsync.go initial commit 2026-04-17 20:36:38 +02:00
rpc.go fix(no-yolo): don't auto-refuse tool calls in non-interactive modes 2026-04-19 19:17:05 +02:00
systemprompt.go feat(tui): context diffs + framed tool blocks + paced streaming 2026-04-20 15:50:39 +02:00
update.go fix(update): re-check every launch when the cache says up-to-date 2026-04-20 18:31:51 +02:00