mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
connector-popup: surface trusted-tools UI in MCP edit view; consolidate disconnect
- Slot MCPTrustedTools in mcp-service-config (gated on connector.id > 0) so any connected MCP-backed connector exposes a revoke surface for approve_always grants. - Add new mcp-trusted-tools.tsx (audit + revoke list) and connectorsApiService.untrustMCPTool() that backs it. - Drop the redundant row-level Disconnect from ConnectorAccountsListView: Manage now leads to the edit view whose own Disconnect is the single source of truth. Remove the now-dead onDisconnect prop, confirm-flow state, and handleDisconnectFromList hook callback + return entry.
This commit is contained in:
parent
a22e0e915f
commit
5327f3348c
6 changed files with 101 additions and 78 deletions
|
|
@ -411,6 +411,13 @@ class ConnectorsApiService {
|
|||
`/api/v1/obsidian/stats?vault_id=${encodeURIComponent(vaultId)}`
|
||||
);
|
||||
};
|
||||
|
||||
/** Revoke a previously-trusted MCP tool so the next call asks again. */
|
||||
untrustMCPTool = async (connectorId: number, toolName: string): Promise<void> => {
|
||||
await baseApiService.post(`/api/v1/connectors/mcp/${connectorId}/untrust-tool`, undefined, {
|
||||
body: { tool_name: toolName },
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export interface ObsidianStats {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue