1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

improve reasoning summaries

This commit is contained in:
Laura
2025-11-11 14:46:34 +01:00
parent 61b53ad1c1
commit 97ab3b0ed4
2 changed files with 5 additions and 11 deletions

View File

@@ -470,14 +470,6 @@ body:not(.loading) #loading {
margin-top: 16px;
}
.reasoning-text strong {
display: block;
}
.reasoning-text strong:not(:first-child) {
margin-top: 14px;
}
.message.has-reasoning:not(.has-text):not(.errored) div.text,
.message.has-tool:not(.has-text):not(.errored) div.text,
.message.has-files:not(.has-text):not(.errored) div.text,

View File

@@ -775,10 +775,12 @@
let reasoning = this.#reasoning || "";
if (this.#reasoningType === "reasoning.summary") {
reasoning = reasoning.replace(/(?<!^)\*\*(?!$)/gm, "\n\n**");
reasoning = reasoning.replace(/\s*\*\*([^\n*]+)\*\*\s*/gm, (_match, title) => {
return `\n\n### ${title}\n`;
});
}
this.#patch("reasoning", this.#_reasoning, this.#reasoning, () => {
this.#patch("reasoning", this.#_reasoning, reasoning, () => {
this.#updateReasoningHeight();
noScroll || scroll();
@@ -786,7 +788,7 @@
updateScrollButton();
});
this.#_message.classList.toggle("has-reasoning", !!this.#reasoning);
this.#_message.classList.toggle("has-reasoning", !!reasoning);
}
if (!only || only === "text") {