Commit Graph
2 Commits
Author SHA1 Message Date
adrianbonpin d5382cfdac fix: fence lone commands and give the prompt some warmth
Two problems, one report: asking for a command returned a bare `pwd` with
no code block, and every answer read like a spec sheet.

The fence rule. Promotion now turns a paragraph that is nothing but one
inline code span into a fence, so `pwd` on its own line becomes a real
block with a Copy button. The rule is deliberately narrow, a whole line
that is exactly one span, so "run `pwd` to check" is left intact. This
also repairs answers already sitting in a saved conversation, because the
stored text is re-rendered on every open.

That work exposed a real bug in the labeller: a closing ``` and an opening
bare ``` are identical lines, so every closing fence was read as a new
opening one and swallowed the rest of the answer. Any block after a
labelled block silently lost its language. The opening-fence pattern now
carries the optional language, closing fences are matched separately, and
a fence the model labelled itself is left exactly as written.

The prompt. "No preamble" plus "when the answer is a single command, the
fence is the whole answer" is why the reply was a bare snippet with no
words at all. Replaced with a plain instruction to sound like a person and
to always say in one sentence what the code does. The anti-slop rules stay,
narrowed to the stock service-desk phrasing that actually reads as filler.

171 tests, tsc, eslint and vici build all clean.
2026-10-04 06:00:26 +08:00
adrianbonpin ac2da73669 feat: label code fences so Vicinae can colour them (#10) 2026-10-03 21:37:11 +00:00