fix(mcp): harden prompt catalog refresh
This commit is contained in:
parent
f77f037225
commit
3bfc69cf7e
5 changed files with 56 additions and 7 deletions
|
|
@ -140,7 +140,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
|
|||
})
|
||||
break
|
||||
case "command.changed": {
|
||||
void refreshCommands({ directory: metadata.directory, workspaceID: metadata.workspace })
|
||||
void refreshCommands({ directory: metadata.directory, workspaceID: metadata.workspace }).catch(() => {})
|
||||
break
|
||||
}
|
||||
case "session.next.model.switched":
|
||||
|
|
|
|||
|
|
@ -165,7 +165,10 @@ export const {
|
|||
void bootstrap()
|
||||
break
|
||||
case "command.changed":
|
||||
void sdk.client.command.list({ workspace }).then((x) => setStore("command", reconcile(x.data ?? [])))
|
||||
void sdk.client.command
|
||||
.list({ workspace })
|
||||
.then((x) => setStore("command", reconcile(x.data ?? [])))
|
||||
.catch(() => {})
|
||||
break
|
||||
case "permission.replied": {
|
||||
const requests = store.permission[event.properties.sessionID]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue