Compare commits

...

1 Commits

Author SHA1 Message Date
Aiden Cline e0a4fecd5b fix(tui): refresh MCP data for default location 2026-07-14 07:25:16 +00:00
+2 -2
View File
@@ -1044,7 +1044,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
return store.location[locationKey(location ?? defaultLocation())]?.mcp?.server return store.location[locationKey(location ?? defaultLocation())]?.mcp?.server
}, },
async refresh(ref?: LocationRef) { async refresh(ref?: LocationRef) {
const result = await client.api.mcp.list({ location: locationQuery(ref) }) const result = await client.api.mcp.list({ location: locationQuery(ref ?? defaultLocation()) })
const key = locationKey(result.location) const key = locationKey(result.location)
setStore("location", key, { setStore("location", key, {
...store.location[key], ...store.location[key],
@@ -1057,7 +1057,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
return store.location[locationKey(location ?? defaultLocation())]?.mcp?.resource return store.location[locationKey(location ?? defaultLocation())]?.mcp?.resource
}, },
async refresh(ref?: LocationRef) { async refresh(ref?: LocationRef) {
const result = await client.api.mcp.resource.catalog({ location: locationQuery(ref) }) const result = await client.api.mcp.resource.catalog({ location: locationQuery(ref ?? defaultLocation()) })
const key = locationKey(result.location) const key = locationKey(result.location)
setStore("location", key, { setStore("location", key, {
...store.location[key], ...store.location[key],