From 5672d2f511d3d0636d300093c6f096e0e79e6ae2 Mon Sep 17 00:00:00 2001 From: Troy Hernandez Date: Thu, 14 May 2026 13:42:49 -0500 Subject: [PATCH] Document interrupt-key split in /help and NEWS The interrupt key splits cleanly by environment but neither path's /help mentioned it: RStudio console + corteza::chat() uses Esc (RStudio swallows Ctrl+C for clipboard copy), while the terminal ~/bin/corteza CLI uses Ctrl+C (terminals send a raw ^[ byte for Esc, which is not a signal). NEWS originally implied Esc works in both environments and Ctrl+C falls back to the CLI; reality is that each environment has exactly one usable interrupt key and they don't overlap. Add a Keys: section to both /help outputs and tighten the NEWS bullet. --- NEWS.md | 7 ++++--- R/chat-slash.R | 6 ++++++ inst/bin/corteza | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index a4912b7..3bd0490 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,9 +13,10 @@ * The aborted exchange is recorded in history with an `[Interrupted by user before completing.]` marker so the next turn's model sees that the prior turn ended early. -* In `corteza::chat()` running under RStudio, Esc fires the interrupt - as expected. In the terminal CLI, only Ctrl+C is an interrupt — - terminals send raw `^[` for Esc, which is not a signal. +* Interrupt keys differ by environment: in the RStudio console + `corteza::chat()` is interrupted by **Esc** (RStudio's console + intercepts Ctrl+C for copy). In the terminal `~/bin/corteza` CLI it's + **Ctrl+C** — terminals send raw `^[` for Esc, which is not a signal. ## Other diff --git a/R/chat-slash.R b/R/chat-slash.R index 8a92a56..8c67bad 100644 --- a/R/chat-slash.R +++ b/R/chat-slash.R @@ -84,6 +84,12 @@ chat_help_text <- function() { " /skill remove Remove a skill", " /skill test Run skill tests", "", + "Keys:", + " Esc Interrupt the current turn and return to the prompt.", + " (RStudio's console intercepts Ctrl+C for copy. In the", + " terminal ~/bin/corteza CLI the split is reversed:", + " Ctrl+C interrupts, Esc does nothing.)", + "", sep = "\n" ) } diff --git a/inst/bin/corteza b/inst/bin/corteza index 8d9fc22..cc90023 100755 --- a/inst/bin/corteza +++ b/inst/bin/corteza @@ -112,6 +112,12 @@ Commands (in chat): /model Switch model /provider

Switch provider +Keys: + Ctrl+C Interrupt the current turn and return to the prompt. + (Esc does nothing here — terminals send a raw ^[ byte, + not a signal. In RStudio's corteza::chat() the split is + reversed: Esc interrupts, Ctrl+C is copy.) + Project context is loaded from saber::briefing() and saber::agent_context(). Additional files can be loaded via the `context_files` config key.