fix(runtime): RunSync returns context.Canceled on aborted run

This commit is contained in:
sausheong committed 2026-06-13 15:33:02 +08:00
1 parent 3eb9596ee6
commit 04f02c56d6
2 files changed
+33

No files matched your search

+2
View File
@@ -849,6 +849,8 @@ func (r *Runtime) RunSync(ctx context.Context, userMsg string, images []llm.Imag
switch event.Type {
case EventTextDelta:
response.WriteString(event.Text)
case EventAborted:
return response.String(), context.Canceled
case EventError:
return response.String(), event.Error
}