Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,20 @@ and error thresholds.
** Common keys ⌨️


| Key | Context | Description |
|------------------+---------+------------------------------------------------|
| Key | Context | Description |
|------------------+---------+-----------------------------------------------|
| =C-c C-c= | input | 📮 Send prompt, or queue follow-up if busy |
| =C-c C-s= | input | 🐎 Send steering message while Pi is busy |
| =C-c C-k= | input | 🪓 Abort current response or compaction |
| =C-c C-p= | input | 🎛️ Open transient menu |
| =C-c C-p= | input | 🎛️ Open transient menu |
| =C-c C-n= | input | 🌱 New session |
| =C-c C-r= | input | 📼 Resume a previous session |
| =M-p= / =M-n= | input | 🕰️ Prompt history (=C-↑= / =C-↓= also work) |
| =C-r= | input | 🕵️ Incremental prompt-history search |
| =C-c C-e= | input | 🖨️ Export session to HTML |
| =C-c C-m= | input | 🧠 Select model |
| =C-c C-t= | input | 🌀 Cycle thinking level |
| =C-c C-y= | input | 📋 Copy last message |
| =M-p= / =M-n= | input | 🕰️ Prompt history (=C-↑= / =C-↓= also work) |
| =C-r= | input | 🕵️ Incremental prompt-history search |
| =TAB= | input | 🪄 Complete paths, and =/= commands |
| =M+<prior/next>= | input | 🛗 Scroll linked chat window |
| =TAB= | chat | 🪗 Toggle thinking block, tool block, or turn |
Expand All @@ -245,8 +250,8 @@ and error thresholds.
| =C-c C-k= | chat | 🪓 Abort current operation |
| =C-c C-n= | chat | 🌱 New session |
| =C-c C-r= | chat | 📼 Resume a previous session |
| =C-c C-e= | chat | 🖨️ Export session to HTML |
| =C-c C-c= | chat | 🗜️ Compact conversation context |
| =C-c C-e= | chat | 🖨️ Export session to HTML |
| =C-c C-c= | chat | 🗜️ Compact conversation context |
| =C-c C-m= | chat | 🧠 Select model |
| =C-c C-t= | chat | 🌀 Cycle thinking level |
| =C-c C-y= | chat | 📋 Copy last message |
Expand Down
5 changes: 5 additions & 0 deletions pi-coding-agent-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,12 @@ removing the instructional header that would otherwise appear."
(define-key map (kbd "TAB") #'pi-coding-agent-complete)
(define-key map (kbd "C-c C-k") #'pi-coding-agent-abort)
(define-key map (kbd "C-c C-p") #'pi-coding-agent-menu)
(define-key map (kbd "C-c C-n") #'pi-coding-agent-new-session)
(define-key map (kbd "C-c C-r") #'pi-coding-agent-resume-session)
(define-key map (kbd "C-c C-e") #'pi-coding-agent-export-html)
(define-key map (kbd "C-c C-m") #'pi-coding-agent-select-model)
(define-key map (kbd "C-c C-t") #'pi-coding-agent-cycle-thinking)
(define-key map (kbd "C-c C-y") #'pi-coding-agent-copy-last-message)
(define-key map (kbd "M-p") #'pi-coding-agent-previous-input)
(define-key map (kbd "M-n") #'pi-coding-agent-next-input)
(define-key map (kbd "<C-up>") #'pi-coding-agent-previous-input)
Expand Down
23 changes: 23 additions & 0 deletions test/pi-coding-agent-input-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4200,11 +4200,34 @@ no spurious faces are applied to plain colon-ending lines."
(should (eq (key-binding (kbd "C-c C-c")) 'pi-coding-agent-send))
(should (eq (key-binding (kbd "C-c C-k")) 'pi-coding-agent-abort))
(should (eq (key-binding (kbd "C-c C-p")) 'pi-coding-agent-menu))
(should (eq (key-binding (kbd "C-c C-n")) 'pi-coding-agent-new-session))
(should (eq (key-binding (kbd "C-c C-r")) 'pi-coding-agent-resume-session))
(should (eq (key-binding (kbd "C-c C-e")) 'pi-coding-agent-export-html))
(should (eq (key-binding (kbd "C-c C-m")) 'pi-coding-agent-select-model))
(should (eq (key-binding (kbd "C-c C-t")) 'pi-coding-agent-cycle-thinking))
(should (eq (key-binding (kbd "C-c C-y")) 'pi-coding-agent-copy-last-message))
(should (eq (key-binding (kbd "M-p")) 'pi-coding-agent-previous-input))
(should (eq (key-binding (kbd "M-n")) 'pi-coding-agent-next-input))
(should (eq (key-binding (kbd "TAB")) 'pi-coding-agent-complete))
(should (eq (key-binding (kbd "C-c C-s")) 'pi-coding-agent-queue-steering))))

(ert-deftest pi-coding-agent-test-input-chat-c-c-key-parity ()
"Input mode mirrors chat mode's C-c session-management chords.
Every C-c chord in `pi-coding-agent-chat-mode-map' is bound to the
same command in `pi-coding-agent-input-mode-map', except C-c C-c,
which means `pi-coding-agent-send' in the input buffer."
(let ((chat-c-c (lookup-key pi-coding-agent-chat-mode-map (kbd "C-c")))
(input-c-c (lookup-key pi-coding-agent-input-mode-map (kbd "C-c"))))
(should (keymapp chat-c-c))
(map-keymap
(lambda (event def)
(when (symbolp def)
(if (eq event ?\C-c)
(should (eq (lookup-key input-c-c (vector event))
'pi-coding-agent-send))
(should (eq (lookup-key input-c-c (vector event)) def)))))
chat-c-c)))

;;; Input-Buffer Chat Navigation

(ert-deftest pi-coding-agent-test-input-next-message-moves-chat ()
Expand Down
Loading