Commit Graph
9 Commits
Author SHA1 Message Date
adrianbonpin f6c8471045 feat: label code fences so Vicinae can colour them
Nothing needed building for the dark code panel: MdCodeBlock.qml already
provides a rounded secondaryBackground panel, a header naming the
language, a Copy button with "Copied!" feedback, and horizontal scroll.
The language string is the only missing piece, and it is also what turns
on highlighting. syntax::highlight resolves it with
definitionForName(language) and then definitionForFileName("file." +
language), so `bash` and `ts` colour correctly while an unrecognised
string such as `terminal` still renders a label but produces no
highlighting at all.

Two changes:

- The default prompt now requires a language on every fence, and forbids
  leaving commands inline in a sentence or padding them with a leading $,
  so commands stay copy-pasteable.
- code.ts labels fences the model left bare. It is deliberately
  conservative, because a wrong label is worse than none: it claims bash
  only on a clear shell signal, json only when the body actually parses,
  ts only on TypeScript-specific syntax, and leaves plain JavaScript
  alone rather than guessing.

Verified by rendering a probe with four fences and reading the result:

  ```bash     -> "bash" label, "git" coloured
  ```        -> no label, no colouring
  ```ts       -> "ts" label, const/number/length coloured
  ```terminal -> "terminal" label, no colouring

`bash` is used over `terminal` for shell commands precisely because
`terminal` costs the colouring.

Also fixes an index bug in labelCodeFences found by its own test: the
unlabelled branch pushed the wrong line back, duplicating code instead of
preserving the opening fence.

typecheck, eslint, 156 tests and vici build all pass.
2026-10-04 05:36:21 +08:00
adrianbonpin c49ffeb274 feat: strip speaker labels from the transcript, add a plain-prose prompt (#9) 2026-10-03 21:28:38 +00:00
adrianbonpin ee96f1ee61 feat: display toggles, smart session resume, fix stale transcript pane (#8) 2026-10-03 21:22:04 +00:00
adrianbonpin ffe2c6b7ed feat: newest message first, Raycast-style conversation sidebar (#7) 2026-10-03 21:15:44 +00:00
adrianbonpin 9b35fcef11 feat: conversations on the left, the transcript on the right (#6) 2026-10-03 21:09:36 +00:00
adrianbonpin d448a4377b feat: mark each speaker with a role icon in the transcript (#5) 2026-10-03 21:03:26 +00:00
adrianbonpin 31eb688455 feat: message-per-row transcript, session resume, drop the composer (#4) 2026-10-03 20:59:01 +00:00
adrianbonpin 8b507e7953 feat: initial Lam Agent extension (#1) 2026-10-03 20:32:40 +00:00
adrianbonpin 1d39aabb50 Initial commit 2026-10-03 20:11:02 +00:00