Offer the assistant the same formatting the mesh composer has, and drop the mark lower

Colour is chosen by name and mapped to a fixed value here, so the model never writes a style property — the same closed-set rule the mesh store uses.
This commit is contained in:
Gmer4Lfe
2026-08-17 18:01:45 -04:00
parent 2e646f82b4
commit 4eb0a9c608
3 changed files with 48 additions and 2 deletions
+26
View File
@@ -915,6 +915,32 @@ if ($profile === 'chat' && vv_ai_chat_needs_varaverk($question)) {
if ($context !== '') $system .= "PASSAGES\n" . $context;
// What the transcript can render, offered rather than required.
//
// Appended to every profile at the single point they all pass through, so a new profile cannot
// be added without it. The set is the one the mesh composer already offers, and the renderer
// maps colour NAMES to fixed values — the model never writes a colour, only chooses one, so
// nothing it emits can become a style property.
//
// Deliberately permissive in tone. The interesting question is whether it reaches for these at
// all and where; an instruction to use them would answer that question by force and tell us
// nothing. Prose stays prose.
$system .= "\n\nFORMATTING AVAILABLE TO YOU\n"
. "The transcript renders a small set of marks. Use them where they genuinely help a "
. "reader — a warning that must not be skimmed, a value worth picking out of a "
. "sentence — and not otherwise. Plain prose is the default and needs no marking.\n"
. " **bold** emphasis\n"
. " *italic* aside or term\n"
. " __underline__ rarely; reserve for something that must not be missed\n"
. " {big}…{/big} one size up\n"
. " {small}…{/small} one size down, for asides\n"
. " {green}…{/green} also blue, amber, red, violet, grey\n"
. "Colour carries meaning here: green for confirmed-good, amber for caution, red for "
. "something broken or destructive. Do not colour text decoratively — a coloured word "
. "that means nothing costs the colours their meaning everywhere else. Code fences and "
. "`inline code` work as before and remain the right choice for anything typed at a "
. "shell.\n";
$messages = [['role' => 'system', 'content' => $system]];
$hist = json_decode($historyJson ?: '[]', true);
if (is_array($hist)) {