Support reasoning_content

This commit is contained in:
Alex Gleason committed 2025-09-19 20:23:55 -05:00
1 parent bd5373f57b
commit e6c9c213b5
5 files changed
+169 -8

No files matched your search

+4 -1
View File
@@ -18,6 +18,7 @@ interface UseAIChatSessionOptions {
interface StreamingMessage {
role: 'assistant';
content: string;
reasoning_content?: string;
tool_calls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[];
}
@@ -68,16 +69,18 @@ export function useAIChat({
setStreamingMessage({
role: 'assistant',
content: '',
reasoning_content: '',
});
}
}
}, [projectId]);
useSessionSubscription('streamingUpdate', (updatedProjectId: string, content: string, toolCalls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[]) => {
useSessionSubscription('streamingUpdate', (updatedProjectId: string, content: string, reasoningContent?: string, toolCalls?: OpenAI.Chat.Completions.ChatCompletionMessageToolCall[]) => {
if (updatedProjectId === projectId) {
setStreamingMessage({
role: 'assistant',
content,
reasoning_content: reasoningContent,
tool_calls: toolCalls
});
}