v0.0.5: context compaction, minimal config, retry/search/code symbols/diff/status/test commands
This commit is contained in:
@@ -30,6 +30,7 @@ func TestSaveAndLoad(t *testing.T) {
|
||||
{Role: llm.RoleUser, Content: "hello"},
|
||||
{Role: llm.RoleAssistant, Content: "hi there"},
|
||||
},
|
||||
LastUsage: &llm.Usage{PromptTokens: 10, CompletionTokens: 5, TotalTokens: 15},
|
||||
}
|
||||
if err := store.Save(sess); err != nil {
|
||||
t.Fatalf("save: %v", err)
|
||||
@@ -51,6 +52,9 @@ func TestSaveAndLoad(t *testing.T) {
|
||||
if loaded.Messages[1].Content != "hello" {
|
||||
t.Errorf("Messages[1].Content = %q, want %q", loaded.Messages[1].Content, "hello")
|
||||
}
|
||||
if loaded.LastUsage == nil || loaded.LastUsage.TotalTokens != 15 {
|
||||
t.Errorf("LastUsage = %#v", loaded.LastUsage)
|
||||
}
|
||||
if loaded.UpdatedAt.IsZero() {
|
||||
t.Error("UpdatedAt should be set")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user