{"version":3,"file":"run.mjs","names":[],"sources":["../../../../../src/v2/runtime/handlers/sse/run.ts"],"sourcesContent":["import { AbstractAgent, RunAgentInput } from \"@ag-ui/client\";\nimport { CopilotRuntimeLike } from \"../../core/runtime\";\nimport { createSseEventResponse } from \"../shared/sse-response\";\n\ninterface HandleSseRunParams {\n  runtime: CopilotRuntimeLike;\n  request: Request;\n  agent: AbstractAgent;\n  input: RunAgentInput;\n}\n\nexport function handleSseRun({\n  runtime,\n  request,\n  agent,\n  input,\n}: HandleSseRunParams): Response {\n  return createSseEventResponse({\n    request,\n    observableFactory: () =>\n      runtime.runner.run({\n        threadId: input.threadId,\n        agent,\n        input,\n      }),\n  });\n}\n"],"mappings":";;;;AAWA,SAAgB,aAAa,EAC3B,SACA,SACA,OACA,SAC+B;AAC/B,QAAO,uBAAuB;EAC5B;EACA,yBACE,QAAQ,OAAO,IAAI;GACjB,UAAU,MAAM;GAChB;GACA;GACD,CAAC;EACL,CAAC"}