summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-02-06 08:49:17 +0800
committerGitHub <noreply@github.com>2025-02-06 08:49:17 +0800
commit4812e446ee30467bd3ecce983a826f7649de7110 (patch)
treea44bf9ad94db9008199a619af8398b1a62b0ac25 /assets
parent470eeb2efc8b5c9f20ec275d3b2ced1d92e1642d (diff)
downloadaichat-4812e446ee30467bd3ecce983a826f7649de7110.tar.gz
refactor: several improvements (#1149)
Diffstat (limited to 'assets')
-rw-r--r--assets/arena.html3
-rw-r--r--assets/playground.html3
2 files changed, 2 insertions, 4 deletions
diff --git a/assets/arena.html b/assets/arena.html
index 2296de2..cf25dc7 100644
--- a/assets/arena.html
+++ b/assets/arena.html
@@ -1047,9 +1047,8 @@
}
},
renderer(token) {
- const isOpen = !token.raw.endsWith('</think>');
const text = '<p>' + token.text.trim().replace(/\n+/g, '</p><p>') + '</p>';
- return `<details ${isOpen ? "open" : ""} class="think">
+ return `<details open class="think">
<summary>Deeply thought</summary>
<blockquote>${text}</blockquote>
</details>`;
diff --git a/assets/playground.html b/assets/playground.html
index 06e2e62..34379e4 100644
--- a/assets/playground.html
+++ b/assets/playground.html
@@ -1528,9 +1528,8 @@
}
},
renderer(token) {
- const isOpen = !token.raw.endsWith('</think>');
const text = '<p>' + token.text.trim().replace(/\n+/g, '</p><p>') + '</p>';
- return `<details ${isOpen ? "open" : ""} class="think">
+ return `<details open class="think">
<summary>Deeply thought</summary>
<blockquote>${text}</blockquote>
</details>`;