add :: prefix for info events in chat log
- FormatEvent now prefixes info role with ':: ' - Session rename uses :: prefix - Update test expectation
This commit is contained in:
parent
a4bb7608c7
commit
3cef168806
|
|
@ -417,7 +417,7 @@ func (s *SessionStore) renameSession(oldID, newID string) error {
|
|||
s.cfg.OnRename(oldID, newID)
|
||||
}
|
||||
|
||||
sess.AppendLog([]byte(fmt.Sprintf("(session renamed: %s -> %s)\n", oldID, newID)))
|
||||
sess.AppendLog([]byte(fmt.Sprintf(":: session renamed: %s -> %s\n", oldID, newID)))
|
||||
s.cfg.Log.Info("renamed session %s -> %s", oldID, newID)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -456,7 +456,7 @@ func FormatEvent(ev agent.Event) []byte {
|
|||
case "stalled":
|
||||
return []byte("agent stalled\n")
|
||||
case "info":
|
||||
return []byte(ev.Content)
|
||||
return []byte(":: " + ev.Content)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1221,7 +1221,7 @@ func TestFormatEvent(t *testing.T) {
|
|||
{agent.Event{Role: "tool", Content: "result\n"}, "result\n"},
|
||||
{agent.Event{Role: "retry", Content: "5"}, "retrying in 5s...\n"},
|
||||
{agent.Event{Role: "stalled"}, "agent stalled\n"},
|
||||
{agent.Event{Role: "info", Content: "note"}, "note"},
|
||||
{agent.Event{Role: "info", Content: "note"}, ":: note"},
|
||||
{agent.Event{Role: "unknown"}, ""},
|
||||
} {
|
||||
got := string(store.FormatEvent(tc.ev))
|
||||
|
|
|
|||
Reference in New Issue