feat(chat,seahorse): persist and display model_name across history (#2897)

* feat(chat,seahorse): persist and display model_name across history

* test(seahorse): fix lint regressions in repair coverage

* fix(pico): preserve model_name in live updates

* fix(pico): preserve model_name through live stream wrappers
This commit is contained in:
LC
2026-05-20 13:42:21 +08:00
committed by GitHub
parent 548dc15acd
commit b7db059544
41 changed files with 1266 additions and 139 deletions
+19
View File
@@ -66,6 +66,25 @@ func TestJSONLBackend_AddFullMessage(t *testing.T) {
}
}
func TestJSONLBackend_AddFullMessage_PreservesModelName(t *testing.T) {
b := newBackend(t)
msg := providers.Message{
Role: "assistant",
Content: "done",
ModelName: "gpt-5.4-mini",
}
b.AddFullMessage("s1", msg)
history := b.GetHistory("s1")
if len(history) != 1 {
t.Fatalf("got %d, want 1", len(history))
}
if history[0].ModelName != "gpt-5.4-mini" {
t.Fatalf("ModelName = %q, want %q", history[0].ModelName, "gpt-5.4-mini")
}
}
func TestJSONLBackend_Summary(t *testing.T) {
b := newBackend(t)