diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-16 14:16:24 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-16 14:16:24 +0200 |
| commit | f99a9329caccdd14d9c530777a5e5b622d34f602 (patch) | |
| tree | fb8351c3485b534cfa2337801f1eea2d973b8f6a /desktop/assistant/test_md.js | |
| parent | 729e89b4dce7e6f89a8a20cb919ad1b05d825d09 (diff) | |
| download | quickshell-f99a9329caccdd14d9c530777a5e5b622d34f602.tar.gz quickshell-f99a9329caccdd14d9c530777a5e5b622d34f602.zip | |
fix(assistant): keep focus in the card, scope errors, guard links
From review of the canvas. Escape stopped working in three ways, each
leaving the keyboard grabbed with nothing to receive it: the history
field hiding took focus with it, a disabled input could not hold focus
while the daemon was down, and a click in a streaming reply focused text
the next flush destroyed. The card now gives focus back to the input
whenever it falls out, and the input is read-only rather than disabled.
Only an error the daemon marks as ending the reply (turn) closes the live
row; a command error, possibly another client's, used to freeze the reply
mid-stream. The running tool comes from state events, hello included.
Scrolling up during a stream no longer snaps back, since following stops
when a movement starts. History snippets go through Notify.sanitize like
any model output, links open only for http, https and mailto, and a line
opening with inline triple-backtick code is no longer taken as a fence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/assistant/test_md.js')
| -rw-r--r-- | desktop/assistant/test_md.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/assistant/test_md.js b/desktop/assistant/test_md.js index 030cdc9..58bf974 100644 --- a/desktop/assistant/test_md.js +++ b/desktop/assistant/test_md.js @@ -43,6 +43,10 @@ assert.deepStrictEqual(split("1. Install:\n ```sh\n make\n make install\ [prose("1. Install:"), code("sh", "make\n make install"), prose("2. Go")]); // A shorter or different closing run does not close the fence. assert.deepStrictEqual(split("````\n```\n~~~\n````"), [code("", "```\n~~~")]); +// Inline triple-backtick code at a line start is not a fence. +assert.deepStrictEqual(split("```x``` is inline\nmore"), [prose("```x``` is inline\nmore")]); +// Words after the language are ignored. +assert.deepStrictEqual(split("```python title=a\nx\n```"), [code("python", "x")]); // Tilde fences. assert.deepStrictEqual(split("~~~js\nx\n~~~"), [code("js", "x")]); // A closing fence with text after it is content, not a close. |
