Sync thread workspaces from Codex cwd

This commit is contained in:
Codex
2026-05-21 09:56:47 +00:00
parent 1d433038ab
commit a73f88fe5e
5 changed files with 120 additions and 29 deletions

View File

@@ -176,6 +176,20 @@ func TestRenameThread(t *testing.T) {
if thread.Title != "synced codex title" {
t.Fatalf("title = %q", thread.Title)
}
ws2, err := st.AddWorkspace(ctx, t.TempDir(), "repo2", false)
if err != nil {
t.Fatal(err)
}
if err := st.SyncThreadWorkspace(ctx, 42, thread.ID, ws2.ID); err != nil {
t.Fatal(err)
}
thread, err = st.GetThreadByID(ctx, 42, thread.ID)
if err != nil {
t.Fatal(err)
}
if thread.WorkspaceID != ws2.ID {
t.Fatalf("workspace id = %d, want %d", thread.WorkspaceID, ws2.ID)
}
}
func TestValidateWorkspacePath(t *testing.T) {