fix: skip a late tool event that has no name
A terminal tool event can arrive without its starting one; adding a blank row for it is worse than waiting for the next page read. Bump version to 0.1.12 (build 13).
This commit is contained in:
1 parent
e67490e768
commit
4c6fcf4cbe
2 files changed
+8
-2
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "OpenChamber",
|
||||
"id": "com.openchamber.native",
|
||||
"version": "0.1.11",
|
||||
"build": 12,
|
||||
"version": "0.1.12",
|
||||
"build": 13,
|
||||
"orientations": ["portrait", "landscape"]
|
||||
}
|
||||
@@ -554,6 +554,12 @@ func (ch *chat) applyToolEvent(ev ocapi.Event) {
|
||||
}
|
||||
}
|
||||
if idx < 0 {
|
||||
// A terminal event can arrive without the starting one (a
|
||||
// stream joined late). Without a name the row would be
|
||||
// blank; the next page read adds the call properly.
|
||||
if d.Name == "" {
|
||||
return
|
||||
}
|
||||
m.Content = append(m.Content, ocapi.ContentPart{
|
||||
Type: "tool", ID: d.ID, Name: d.Name,
|
||||
State: &ocapi.ToolState{Status: "running"},
|
||||
|
||||
Reference in new issue
Block a user