Skip to content

Commit 6c59255

Browse files
committed
feat(tui): background running compose with command-b
1 parent e84c29f commit 6c59255

9 files changed

Lines changed: 539 additions & 78 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kit"
3-
version = "0.1.82"
3+
version = "0.1.83"
44
edition = "2024"
55
rust-version = "1.94.0"
66
publish = false
@@ -77,6 +77,12 @@ windows-sys = { version = "=0.61.2", features = [
7777
"Win32_UI_WindowsAndMessaging",
7878
] }
7979

80+
[patch.crates-io]
81+
agentkit-capabilities = { git = "https://github.com/danielkov/agentkit.git", rev = "d2391a0" }
82+
agentkit-core = { git = "https://github.com/danielkov/agentkit.git", rev = "d2391a0" }
83+
agentkit-task-manager = { git = "https://github.com/danielkov/agentkit.git", rev = "d2391a0" }
84+
agentkit-tools-core = { git = "https://github.com/danielkov/agentkit.git", rev = "d2391a0" }
85+
8086
[dev-dependencies]
8187
jsonwebtoken = { version = "=11.0.0", default-features = false, features = ["aws_lc_rs", "use_pem"] }
8288
tempfile = "=3.27.0"

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,11 @@ top-level `background` argument. `background: true` starts it in the background;
349349
it if it is still running. `false` or omission keeps normal foreground behavior.
350350
The delay must be an integer from 1 through 86,400 seconds.
351351

352-
Detached calls remain visible and selectable in the TUI runtime graph. Interrupting
353-
the originating turn does not stop them. The model receives each detached call's ID
352+
Press `Command+B` in the TUI to move the newest running foreground top-level
353+
compose call into the background. This shortcut requires a terminal that reports
354+
the Command key through the Kitty keyboard protocol; there is no control-key equivalent. Detached calls
355+
remain visible and selectable in the TUI runtime graph. Interrupting the originating
356+
turn does not stop them. The model receives each detached call's ID
354357
and can cancel it with `close({ call_id: "call_..." })`; the selected running
355358
background call can also be killed with `Ctrl+K` in the TUI. Completion and
356359
cancellation are delivered through the normal background-result lifecycle. Detached
@@ -514,6 +517,7 @@ child process with `KIT_RUNTIME_EVENTS=1`; other ACP hosts never see them.
514517
| `/model name` | switch immediately to the closest catalog match |
515518
| `⇧⏎`, `⌥⏎`, `^j` | newline |
516519
| `esc` | interrupt the running turn |
520+
| `⌘b` | move the newest running foreground compose call to the background |
517521
| `^c` | interrupt, or quit when idle |
518522
| `⌥←/→`, `^a`/`^e`, `home`/`end` | word and line movement |
519523
| `⌥⌫`, `^w` | delete the previous word |

docs/user/tui-and-sessions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ A session ID must be 1–128 ASCII letters, digits, `-`, or `_`. `kit prompt` us
2525
| `Enter` | Send a non-empty prompt when idle |
2626
| `Shift+Enter`, `Option+Enter`, `Ctrl+J` | Insert a newline |
2727
| `Esc` | Interrupt a running turn; dismiss a notice when idle |
28+
| `Command+B` | Move the newest running foreground top-level compose call to the background |
2829
| `Ctrl+C` | Interrupt a running turn; clear a non-empty idle prompt; quit when idle with an empty prompt |
2930
| `Ctrl+D` | Quit when the prompt is empty |
3031
| `Option+Left/Right`, `Ctrl+A`/`Ctrl+E`, `Home`/`End` | Move by word or to the start/end of a line |
@@ -63,7 +64,7 @@ Press `Esc` or `Ctrl+C` once to request cancellation. The TUI shows `interruptin
6364

6465
If a turn does not stop, press `Ctrl+C` again while Kit is cancelling to leave the TUI and terminate its agent child. On normal exit during a turn, Kit first requests cancellation and briefly allows the turn to unwind so tool outcomes can be persisted, then closes the session and releases its lock.
6566

66-
Interrupting a turn does not stop detached background calls. Select a running background tool card and press `Ctrl+K` to kill only that call; the selected title is accented and shows `^k kill`. When a background result starts an autonomous agent continuation, the TUI displays it as an active turn, and `Esc` or `Ctrl+C` interrupts it normally.
67+
Press `Command+B` to detach the newest running foreground top-level compose call without waiting for it to finish. This shortcut requires a terminal that reports the Command key through the Kitty keyboard protocol; it has no control-key equivalent. Interrupting a turn does not stop detached background calls. Select a running background tool card and press `Ctrl+K` to kill only that call; the selected title is accented and shows `^k kill`. When a background result starts an autonomous agent continuation, the TUI displays it as an active turn, and `Esc` or `Ctrl+C` interrupts it normally.
6768

6869
At an idle, non-empty editor, `Ctrl+C` clears the prompt instead of unexpectedly discarding it and quitting in one step; press it again with the empty editor to quit.
6970

0 commit comments

Comments
 (0)