From 8001ab18eecad55d79a7b8624eae6a07f4db3a9c Mon Sep 17 00:00:00 2001 From: fujie Date: Sat, 28 Feb 2026 13:11:03 +0800 Subject: [PATCH] feat(pipes): update richui mode to send raw HTML content instead of an iframe tag --- plugins/pipes/github-copilot-sdk/github_copilot_sdk.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py b/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py index d88fbec..c75a890 100644 --- a/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py +++ b/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py @@ -1239,9 +1239,13 @@ class Pipe: # Note: Emission is now delayed until session.idle to avoid UI flicker and ensure reliability. if is_html and embed_type == "richui" and rich_ui_supported: try: - # For Rich UI Integrated view, we pass a bare iframe. - # We let the OpenWebUI system control styling, height, and sandboxing. - embed_content = f'' + # For Rich UI Mode, OpenWebUI expects the raw HTML of the component itself + # The system will wrap this in its own managed iframe. + embed_content = await asyncio.to_thread( + lambda: target_path.read_text( + encoding="utf-8", errors="replace" + ) + ) if pending_embeds is not None: pending_embeds.append(