]> git.giacomolli.uk - onechat/blobdiff - tools.go
Submit root events through the local socket
[onechat] / tools.go
index 191bb251df369a99984dbbc683ac593b13b9d364..24e745bb51192a2575472c83d5e3f69670dad2e7 100644 (file)
--- a/tools.go
+++ b/tools.go
@@ -419,10 +419,15 @@ func (b *Toolbox) zoomAgent(ctx context.Context, name string) (string, error) {
 
        subagent, err := b.subagents.Get(ctx, name)
        if err != nil {
 
        subagent, err := b.subagents.Get(ctx, name)
        if err != nil {
-               return "", err
+               return "", fmt.Errorf("open worker log: %w", err)
        }
 
        }
 
-       return subagent.Show()
+       text, err := subagent.Show()
+       if err != nil {
+               return text, fmt.Errorf("read worker log: %w", err)
+       }
+
+       return text, nil
 }
 
 // zoom returns message id whole for n = 1, or else the two lines under the line
 }
 
 // zoom returns message id whole for n = 1, or else the two lines under the line