Spaces:
Running on Zero
Running on Zero
Update index.html
Browse files- index.html +7 -2
index.html
CHANGED
|
@@ -494,9 +494,14 @@ function renderBot(el,raw){
|
|
| 494 |
const tOpen=raw.indexOf('<think>'),tClose=raw.indexOf('</think>');
|
| 495 |
const dOpen=raw.indexOf('<details>'),sClose=raw.indexOf('</summary>'),dClose=raw.indexOf('</details>');
|
| 496 |
if(tOpen>=0&&tClose>tOpen){
|
| 497 |
-
|
|
|
|
|
|
|
| 498 |
}else if(tOpen>=0){
|
| 499 |
-
|
|
|
|
|
|
|
|
|
|
| 500 |
}else if(dOpen>=0&&sClose>dOpen){
|
| 501 |
const body=dClose>sClose?raw.slice(sClose+10,dClose):raw.slice(sClose+10);
|
| 502 |
const chain=body.replace(/^> ?/gm,'').replace(/<[^>]+>/g,'').trim();
|
|
|
|
| 494 |
const tOpen=raw.indexOf('<think>'),tClose=raw.indexOf('</think>');
|
| 495 |
const dOpen=raw.indexOf('<details>'),sClose=raw.indexOf('</summary>'),dClose=raw.indexOf('</details>');
|
| 496 |
if(tOpen>=0&&tClose>tOpen){
|
| 497 |
+
// Thinking ์๋ฃ โ ์ ์ด์ ๋ธ๋ก + ๋ต๋ณ ํ์
|
| 498 |
+
const chain=raw.slice(tOpen+7,tClose).trim();ans=raw.slice(tClose+8).trim();
|
| 499 |
+
thinkHtml=buildThink(chain);
|
| 500 |
}else if(tOpen>=0){
|
| 501 |
+
// ์์ง thinking ์ค โ ์บ๋ฆญํฐ ์๋ง ํ์ (๋ด์ฉ ์จ๊น)
|
| 502 |
+
const thinkLen=raw.length-tOpen-7;
|
| 503 |
+
ans='';
|
| 504 |
+
thinkHtml=`<div class="think-blk"><div class="think-hdr" style="cursor:default;">๐ง REASONING CHAIN (${thinkLen} CHARS) <span class="typing" style="display:inline-flex;gap:4px;vertical-align:middle;margin-left:6px;"><span></span><span></span><span></span></span></div></div>`;
|
| 505 |
}else if(dOpen>=0&&sClose>dOpen){
|
| 506 |
const body=dClose>sClose?raw.slice(sClose+10,dClose):raw.slice(sClose+10);
|
| 507 |
const chain=body.replace(/^> ?/gm,'').replace(/<[^>]+>/g,'').trim();
|