Fix: Make generateAgentResponse an async generator function
The generateAgentResponse function uses 'yield' to stream responses, so it must be declared as an async generator function (async function*) instead of a regular async function. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1a7e0d218e
commit
c5f7806718
@ -98,7 +98,7 @@ async function* parseStreamResponse(reader) {
|
||||
/**
|
||||
* Generate agent response with streaming thoughts
|
||||
*/
|
||||
export async function generateAgentResponse(agentName, prompt, currentDocument = '', onThought = null) {
|
||||
export async function* generateAgentResponse(agentName, prompt, currentDocument = '', onThought = null) {
|
||||
const systemPrompt = getAgentPrompt(agentName)
|
||||
|
||||
const messages = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user