fix(runtime): RunSync returns context.Canceled on aborted run
This commit is contained in:
1 parent
3eb9596ee6
commit
04f02c56d6
2 files changed
+33
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user