fix(mcp): add OAuth skip endpoint and streamline in-chat interaction cards

Add a dedicated cancel route so users can skip mid-conversation OAuth without
token verification, and restyle OAuth/approval cards to match AgentStreamDisplay
with compact inline actions.
This commit is contained in:
wizardchen
2026-06-29 23:20:00 +08:00
committed by lyingbug
parent 505195865a
commit b5a1c88f75
10 changed files with 499 additions and 508 deletions
+5 -1
View File
@@ -226,7 +226,11 @@ export async function resolveToolApproval(
// the token exists before unblocking the paused tool call.
export async function resolveMCPOAuth(
pendingId: string,
body: { service_id: string }
body: { service_id: string; decision?: 'authorize' | 'cancel' }
): Promise<void> {
await post(`/api/v1/agent/mcp-oauth-resolutions/${encodeURIComponent(pendingId)}`, body)
}
export async function cancelMCPOAuth(pendingId: string): Promise<void> {
await post(`/api/v1/agent/mcp-oauth-resolutions/${encodeURIComponent(pendingId)}/cancel`, {})
}