fix: add Message field to session.Entry and check marshal error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,10 +45,14 @@ func (s *Skill) Handle(ctx context.Context, tool string, args json.RawMessage) (
|
||||
FilePath: a.FilePath,
|
||||
ModelUsed: a.ModelUsed,
|
||||
DurationMs: a.DurationMs,
|
||||
Message: a.Message,
|
||||
}
|
||||
if err := session.Append(s.cfg.SessionsDir, a.SessionID, entry); err != nil {
|
||||
return nil, fmt.Errorf("append session log: %w", err)
|
||||
}
|
||||
b, _ := json.Marshal(map[string]string{"status": "ok", "session_id": a.SessionID})
|
||||
b, err := json.Marshal(map[string]string{"status": "ok", "session_id": a.SessionID})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal response: %w", err)
|
||||
}
|
||||
return b, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user