diff options
Diffstat (limited to 'desktop')
| -rw-r--r-- | desktop/assistant/Card.qml | 10 | ||||
| -rw-r--r-- | desktop/assistant/README.md | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/desktop/assistant/Card.qml b/desktop/assistant/Card.qml index 85066fe..a2f8e28 100644 --- a/desktop/assistant/Card.qml +++ b/desktop/assistant/Card.qml @@ -49,6 +49,16 @@ Rectangle { // Keys reach a focused item, never the window (AGENTS.md); the card is // the ancestor of every text field, so their Escape bubbles here. Keys.onEscapePressed: card.canvas.back() + // Ctrl+N and Ctrl+H do what the New and History buttons do. + Keys.onPressed: event => { + if (!(event.modifiers & Qt.ControlModifier)) return; + if (event.key === Qt.Key_N && card.canvas.connected) { + card.canvas.fresh(); card.canvas.historyOpen = false; input.forceActiveFocus(); + } else if (event.key === Qt.Key_H) { + card.canvas.historyOpen ? card.canvas.back() : card.canvas.showHistory(); + } else return; + event.accepted = true; + } // Clicks on the card must not reach the close-on-click catcher behind it. MouseArea { anchors.fill: parent } diff --git a/desktop/assistant/README.md b/desktop/assistant/README.md index 377796c..58fbb14 100644 --- a/desktop/assistant/README.md +++ b/desktop/assistant/README.md @@ -39,7 +39,8 @@ model in use reports no `audio` input (`AssistantModule.hears`, from the router's `/models`, read on every open). Keys: Enter sends, Shift+Enter is a newline, Escape cancels a recording, -then closes the picker, the history panel, then the card. Stop replaces +then closes the picker, the history panel, then the card. Ctrl+N starts a +new chat, Ctrl+H toggles the history panel. Stop replaces Send while a reply streams. Notes: |
