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:
@@ -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,
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user