diff --git a/internal/session/session.go b/internal/session/session.go index 79337e3..f1d368f 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -25,6 +25,7 @@ type Entry struct { FilePath string `json:"file_path,omitempty"` ModelUsed string `json:"model_used,omitempty"` DurationMs int64 `json:"duration_ms,omitempty"` + Message string `json:"message,omitempty"` } // Attempt represents one subprocess invocation within a skill call. diff --git a/internal/skills/sessionlog/handlers.go b/internal/skills/sessionlog/handlers.go index b2fa005..11fa392 100644 --- a/internal/skills/sessionlog/handlers.go +++ b/internal/skills/sessionlog/handlers.go @@ -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 }