Skip to content

Commit 76f386e

Browse files
committed
fix: use 2 spaces at the end for md to render \n correctly
1 parent c3cc540 commit 76f386e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

backend/cmd/chat/chat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func chatStream(w http.ResponseWriter, r *http.Request) {
186186

187187
// Accumulate reasoning for all tool calls
188188
if responseMessage.Reasoning != "" {
189-
responseMessage.Reasoning += " \n`using tool:" + toolCall.Name + "`\n " + completion.Reasoning
189+
responseMessage.Reasoning += " \n`using tool:" + toolCall.Name + "` \n" + completion.Reasoning
190190
}
191191
}
192192

@@ -357,7 +357,7 @@ func retryStream(w http.ResponseWriter, r *http.Request) {
357357

358358
// Accumulate reasoning for all tool calls
359359
if responseMessage.Reasoning != "" {
360-
responseMessage.Reasoning += " \n`using tool:" + toolCall.Name + "`\n " + completion.Reasoning
360+
responseMessage.Reasoning += " \n`using tool:" + toolCall.Name + "` \n" + completion.Reasoning
361361
}
362362
}
363363

frontend/src/components/ai-elements/response.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const components: Options["components"] = {
199199
),
200200
a: ({ node, children, className, ...props }) => (
201201
<a
202-
className={cn("font-medium text-primary underline", className)}
202+
className={cn("underline", className)}
203203
rel="noreferrer"
204204
target="_blank"
205205
{...props}

frontend/src/hooks/useConversations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function createStreamingHandlers(
108108
// If there's accumulated reasoning and this is the first tool call event (no output yet),
109109
// append tool usage information to show when the model decided to use the tool
110110
if (streamingState.reasoning && !toolCall.tool_output) {
111-
streamingState.reasoning += ` \n\`using tool:${toolCall.name}\`\n `;
111+
streamingState.reasoning += ` \n\`using tool:${toolCall.name}\`\n `;
112112
const conv = manager.getConversation(conversationId);
113113
if (conv) {
114114
const assistMsg = conv.messages.find(m => m.id === assistantPlaceholderId);

0 commit comments

Comments
 (0)