From 719d17abf61bb1faed989bcb168f31f5c139750a Mon Sep 17 00:00:00 2001 From: mohiit1502 Date: Thu, 6 Aug 2026 03:03:12 +0530 Subject: [PATCH] feat: add openUrl bridge action, allow-popups sandbox, fix white iframe corners - Add allow-popups to DB card iframe sandbox attribute - Add host.openUrl capability, openUrl action type, and bridge handler - Add openUrl() wrapper to plugin-side bridge SDK - Add openUrl handler in DbInlineCard (window.open on behalf of iframe) - Fix white corners: borderRadius + overflow:hidden + colorScheme:dark on iframe element --- src/components/layout/ChatWorkspace/DbInlineCard.tsx | 9 ++++++++- src/lib/pluginBridgeSdk.ts | 1 + src/lib/pluginHostBridge.ts | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/layout/ChatWorkspace/DbInlineCard.tsx b/src/components/layout/ChatWorkspace/DbInlineCard.tsx index 54b4c58..e093e01 100644 --- a/src/components/layout/ChatWorkspace/DbInlineCard.tsx +++ b/src/components/layout/ChatWorkspace/DbInlineCard.tsx @@ -106,6 +106,12 @@ export function DbInlineCard({ if (path) navigate(path) return { ok: true } }, + openUrl: (params) => { + const url = typeof params.url === 'string' ? params.url : '' + const target = typeof params.target === 'string' ? params.target : '_blank' + if (url) window.open(url, target) + return { ok: true } + }, sendMessage: (params) => { const text = typeof params.text === 'string' ? params.text : '' if (text) onSendMessage?.(text) @@ -144,10 +150,11 @@ export function DbInlineCard({