refactor(tui): replace v2 sync with data context (#31826)

This commit is contained in:
Dax
2026-06-10 23:34:35 -04:00
committed by GitHub
parent 69623c2b79
commit 47a45601fd
16 changed files with 1113 additions and 2380 deletions
+7
View File
@@ -59,6 +59,13 @@ export function createFetch(override?: FetchHandler) {
if (url.pathname === "/config/providers") return json({ providers: {}, default: {} })
if (url.pathname === "/experimental/console") return json({ consoleManagedProviders: [], switchableOrgCount: 0 })
if (url.pathname === "/path") return json({ home: "", state: "", config: "", worktree, directory })
if (url.pathname === "/api/location")
return json({ directory, project: { id: "proj_test", directory: worktree } })
if (["/api/agent", "/api/model", "/api/provider", "/api/command", "/api/skill"].includes(url.pathname))
return json({
location: { directory, project: { id: "proj_test", directory: worktree } },
data: [],
})
if (url.pathname === "/project/current") return json({ id: "proj_test" })
if (url.pathname === "/api/reference")
return json({ location: { directory, project: { id: "proj_test", directory } }, data: [] })