fix(app): avoid suspending on pending child path (#30314)
This commit is contained in:
parent
687c66248c
commit
ab69f41067
@ -56,6 +56,7 @@ beforeAll(async () => {
|
||||
return options().queryKey?.[1] === "path"
|
||||
},
|
||||
get data() {
|
||||
if (options().queryKey?.[1] === "path") throw new Error("pending path data read")
|
||||
if (options().queryKey?.[1] === "mcp") return options().enabled ? { demo: { status: "disabled" } } : undefined
|
||||
if (options().queryKey?.[1] === "lsp") return []
|
||||
if (options().queryKey?.[1] === "providers") return provider
|
||||
|
||||
@ -200,8 +200,9 @@ export function createChildStoreManager(input: {
|
||||
},
|
||||
config: {},
|
||||
get path() {
|
||||
if (pathQuery.data) return pathQuery.data
|
||||
return { state: "", config: "", worktree: "", directory, home: "" }
|
||||
const EMPTY = { state: "", config: "", worktree: "", directory, home: "" }
|
||||
if (pathQuery.isLoading) return EMPTY
|
||||
return pathQuery.data ?? EMPTY
|
||||
},
|
||||
status: "loading" as const,
|
||||
agent: [],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user