You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/server/webui/src/stories/ChatMessage.stories.svelte
+166Lines changed: 166 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,60 @@
59
59
thinking: '',
60
60
children: []
61
61
});
62
+
63
+
// Message with <think> format thinking content
64
+
const thinkTagMessage:DatabaseMessage= {
65
+
id: '6',
66
+
convId: 'conv-1',
67
+
type: 'message',
68
+
timestamp: Date.now() -1000*60*2,
69
+
role: 'assistant',
70
+
content:
71
+
"<think>\nLet me analyze this step by step:\n\n1. The user is asking about thinking formats\n2. I need to demonstrate the <think> tag format\n3. This content should be displayed in the thinking section\n4. The main response should be separate\n\nThis is a good example of reasoning content.\n</think>\n\nHere's my response after thinking through the problem. The thinking content above should be displayed separately from this main response content.",
72
+
parent: '1',
73
+
thinking: '',
74
+
children: []
75
+
};
76
+
77
+
// Message with [THINK] format thinking content
78
+
const thinkBracketMessage:DatabaseMessage= {
79
+
id: '7',
80
+
convId: 'conv-1',
81
+
type: 'message',
82
+
timestamp: Date.now() -1000*60*1,
83
+
role: 'assistant',
84
+
content:
85
+
'[THINK]\nThis is the DeepSeek-style thinking format:\n\n- Using square brackets instead of angle brackets\n- Should work identically to the <think> format\n- Content parsing should extract this reasoning\n- Display should be the same as <think> format\n\nBoth formats should be supported seamlessly.\n[/THINK]\n\nThis is the main response content that comes after the [THINK] block. The reasoning above should be parsed and displayed in the thinking section.',
'Let me work through this problem systematically:\n\n1. First, I need to understand what the user is asking\n2. Then I should consider different approaches\n3. I need to evaluate the pros and cons\n4. Finally, I should provide a clear recommendation\n\nThis step-by-step approach will ensure accuracy.';
"Based on my analysis above, here's the solution:\n\n**Key Points:**\n- The approach should be systematic\n- We need to consider all factors\n- Implementation should be step-by-step\n\nThis ensures the best possible outcome.";
'Using the DeepSeek format now:\n\n- This demonstrates the [THINK] bracket format\n- Should parse identically to <think> tags\n- The UI should display this in the thinking section\n- Main content should be separate\n\nBoth formats provide the same functionality.';
"Here's my response after using the [THINK] format:\n\n**Observations:**\n- Both <think> and [THINK] formats work seamlessly\n- The parsing logic handles both cases\n- UI display is consistent across formats\n\nThis demonstrates the enhanced thinking content support.";
0 commit comments