Sync thread names from Codex

This commit is contained in:
Codex
2026-05-21 09:47:05 +00:00
parent 660458af32
commit 1d433038ab
5 changed files with 162 additions and 21 deletions

View File

@@ -156,6 +156,26 @@ func TestRenameThread(t *testing.T) {
if thread.Title != "codex title" {
t.Fatalf("title = %q", thread.Title)
}
if err := st.SyncThreadTitle(ctx, 42, thread.ID, "synced title"); err != nil {
t.Fatal(err)
}
thread, err = st.GetThreadByID(ctx, 42, thread.ID)
if err != nil {
t.Fatal(err)
}
if thread.Title != "synced title" {
t.Fatalf("title = %q", thread.Title)
}
if err := st.SyncThreadTitleByCodexID(ctx, "codex-thread", "synced codex title"); err != nil {
t.Fatal(err)
}
thread, err = st.GetThreadByID(ctx, 42, thread.ID)
if err != nil {
t.Fatal(err)
}
if thread.Title != "synced codex title" {
t.Fatalf("title = %q", thread.Title)
}
}
func TestValidateWorkspacePath(t *testing.T) {