feat(github-copilot-sdk): bump version to v0.11.0 for performance & stability

- Fixed shared client pool bug to eliminate TTFT latency.
- Added pure BYOK-only mode support.
- Improved cross-user environment isolation for concurrency.
- Resolved RichUI infinite vertical sizing loop.
- Integrated client.ping() into stall detection.
- Automatically hide TODO List widget after completion.
- Synced all documentation and release notes.
This commit is contained in:
fujie
2026-03-20 03:26:43 +08:00
parent bf3ba97b9a
commit 6f8c871658
17 changed files with 2862 additions and 123 deletions

View File

@@ -44,3 +44,6 @@ Edge cases or caveats to watch out for.
| [openwebui-tool-injection.md](./openwebui-tool-injection.md) | How OpenWebUI injects parameters into Tool functions, and what the Pipe must provide |
| [openwebui-mock-request.md](./openwebui-mock-request.md) | How to build a valid Mock Request for calling OpenWebUI-internal APIs from a Pipe |
| [copilot-plan-mode-prompt-parity.md](./copilot-plan-mode-prompt-parity.md) | Why Plan Mode prompt logic must be shared between fresh-session and resume-session injection |
| [richui-default-actions-optout.md](./richui-default-actions-optout.md) | How static RichUI widgets opt out of fallback prompt/link action injection |
| [richui-declarative-priority.md](./richui-declarative-priority.md) | How RichUI resolves priority between declarative actions and inline click handlers |
| [richui-interaction-api.md](./richui-interaction-api.md) | Recommended 4-action RichUI interaction contract for chat continuation, prefill, submit, and links |

View File

@@ -0,0 +1,72 @@
# GitHub Copilot SDK 卡顿/悬停问题深度源码分析报告
## 📌 问题现象
用户反馈在 agent 处理过程中(工具调用、思考、内容输出),`github_copilot_sdk.py` 管道偶尔会卡住(界面转圈不停)。
## 🔍 事件流架构SDK 源码分析)
通过阅读 `copilot-sdk` 源码 (`jsonrpc.py`, `client.py`, `session.py`),事件流路径如下:
```
Copilot CLI (subprocess)
└─ stdout (JSON-RPC over stdio)
└─ JsonRpcClient._read_loop() [daemon thread]
└─ _handle_message()
└─ notification_handler("session.event", params) [线程安全调度到 event loop]
└─ CopilotSession._dispatch_event(event)
└─ plugin handler(event) → queue.put_nowait(chunk)
└─ main loop: await queue.get() → yield chunk
```
## 🚨 已确认的三个卡顿根因
### 根因 1: Stall 检测豁免盲区
原始代码的防卡死检测仅在 `content_sent=False``thinking_started=False``running_tool_calls` 为空时才触发。一旦 agent 开始处理(输出内容/调用工具),所有豁免条件为真,防卡死机制永久失效。
### 根因 2: 工具调用状态泄漏
`running_tool_calls.add(tool_call_id)``tool.execution_start` 时添加,但如果 SDK 连接断开导致 `tool.execution_complete` 事件丢失,集合永远不为空,直接阻塞 Stall 检测。
### 根因 3: `session.abort()` 自身可能卡住SDK 源码确认)
**SDK 源码关键证据** (`jsonrpc.py:107-148`):
```python
async def request(self, method, params=None, timeout=None):
...
if timeout is not None:
return await asyncio.wait_for(future, timeout=timeout)
return await future # ← 无 timeout永久等待
```
`session.abort()` 底层调用 `self._client.request("session.abort", ...)` **没有传 timeout**
当 CLI 进程挂死但 `_read_loop` 尚未检测到断流(例如 TCP 半开连接),`abort()` RPC 自身会无限等待响应,造成**修复代码自身也卡住**。
## ✅ 修复记录 (2026-03-18)
### 修复 1: `assistant.turn_end` / `session.error` 兜底清理
`running_tool_calls.clear()` — 即时清除孤儿工具状态。
### 修复 2: 绝对不活跃保护 (Absolute Inactivity Guard)
当距最后一个事件超过 `min(TIMEOUT, 90) × 2 = 180s` 且无任何新事件时,**无条件**推送错误并结束流。不受 `content_sent` / `thinking_started` / `running_tool_calls` 任何豁免条件限制。
### 修复 3: `session.abort()` 超时保护
所有 `session.abort()` 调用使用 `asyncio.wait_for(..., timeout=5.0)` 包裹。即使 abort RPC 自身卡住也不会阻塞主循环。
## 📊 修复后超时时间线
| 场景 | 保护机制 | 触发时间 |
|------|----------|----------|
| Turn 开始后完全无事件 | Primary Stall Detection | 90 秒 |
| Agent 处理中突然断流 | Absolute Inactivity Guard | 180 秒 |
| abort() 调用本身卡住 | asyncio.wait_for timeout | 5 秒 |
| Turn 结束/Session 错误 | 兜底 running_tool_calls.clear() | 即时 |
---
*Created by Antigravity using Source-Code-Analyzer skill on 2026-03-18.*

View File

@@ -0,0 +1,27 @@
# RichUI Declarative Priority
> Discovered: 2026-03-16
## Context
This applies to the RichUI bridge embedded by `plugins/pipes/github-copilot-sdk/github_copilot_sdk.py` when HTML pages mix declarative `data-openwebui-prompt` / `data-prompt` actions with inline `onclick` handlers.
## Finding
Mixing declarative prompt/link attributes with inline click handlers can cause duplicate prompt submission paths, especially when both the page and the bridge react to the same click.
## Solution / Pattern
The bridge now treats inline `onclick` as the default owner of click behavior. Declarative prompt/link dispatch is skipped when an element already has inline click logic.
If a page intentionally wants declarative bridge handling even with inline handlers present, mark the element explicitly:
```html
<button
onclick="trackClick()"
data-openwebui-prompt="Explain this chart"
data-openwebui-force-declarative="1"
>
```
## Gotchas
Without the explicit override, keyboard/click dispatch for declarative actions will yield to inline `onclick`.
The bridge also keeps a short same-prompt dedupe window in `sendPrompt()` as a safety net, but the preferred fix is still to avoid mixed ownership unless you opt in deliberately.

View File

@@ -0,0 +1,23 @@
# RichUI Default Action Opt-Out
> Discovered: 2026-03-16
## Context
This applies to RichUI embeds generated by `plugins/pipes/github-copilot-sdk/github_copilot_sdk.py`, especially when a specific embed should render state without fallback prompt or link actions.
## Finding
The RichUI bridge can add fallback action buttons based on declarative prompt/link metadata. Static embeds can explicitly opt out when their HTML includes `data-openwebui-no-default-actions="1"` or `data-openwebui-static-widget="1"`.
## Solution / Pattern
Mark the embed root with both attributes and keep the embed wrapped through `_prepare_richui_embed_html(...)` when you explicitly want to suppress fallback actions.
Example:
```html
<div class="w" data-openwebui-no-default-actions="1" data-openwebui-static-widget="1">
```
## Gotchas
If the opt-out markers are missing, RichUI fallback actions can reappear even after interactive row handlers have been removed from the widget itself.
This opt-out only suppresses fallback prompt/link injection. It does not affect the SQL-driven TODO refresh path, which still re-emits the widget through `type: embeds` after `todos` or `todo_deps` updates.

View File

@@ -0,0 +1,89 @@
# RichUI Interaction API
> Discovered: 2026-03-16
## Context
This applies to RichUI HTML embeds generated by `plugins/pipes/github-copilot-sdk/github_copilot_sdk.py` when the page needs to talk back to the OpenWebUI chat UI.
## Finding
The most reliable design is a small recommended interaction surface with only four primary actions:
1. continue chat now
2. prefill chat input without sending
3. submit the current chat input
4. open an external link
Keeping the recommended API this small reduces LLM choice overload and makes multilingual HTML generation more consistent.
Advanced capabilities still exist, but they are intentionally treated as opt-in patterns rather than the default contract:
- copy text to clipboard
- structured selection state
- template-based prompt/copy actions driven by current selections
## Solution / Pattern
Prefer declarative attributes first:
```html
<!-- 1. Continue chat immediately -->
<button data-openwebui-prompt="Explain this workflow step by step">Explain</button>
<!-- 2. Prefill the chat input only -->
<button
data-openwebui-prompt="Draft a rollout checklist for this design"
data-openwebui-action="fill"
>
Draft in input
</button>
<!-- 3. Submit the current chat input -->
<button data-openwebui-action="submit">Send current draft</button>
<!-- 4. Open a real URL -->
<a data-openwebui-link="https://docs.example.com">Docs</a>
```
When JavaScript is genuinely needed, prefer the object methods:
```javascript
window.OpenWebUIBridge.prompt(text);
window.OpenWebUIBridge.fill(text);
window.OpenWebUIBridge.submit();
window.OpenWebUIBridge.openLink(url);
window.OpenWebUIBridge.reportHeight();
```
Use advanced patterns only when the page genuinely needs them:
```html
<!-- Copy -->
<button data-openwebui-copy="npm run build && npm test">Copy command</button>
<!-- Pick a structured selection -->
<button data-openwebui-select="role" data-openwebui-value="reviewer">
Reviewer
</button>
<!-- Use the current selection in a follow-up action -->
<button data-openwebui-prompt-template="Explain the responsibilities of {{role}}">
Explain selected role
</button>
```
### Quick decision guide
- Need an immediate answer now → `data-openwebui-prompt`
- Need the user to review/edit first → `data-openwebui-action="fill"`
- Need to send what is already in chat input → `data-openwebui-action="submit"`
- Need to open an external resource → `data-openwebui-link`
- Need copy UX → `data-openwebui-copy`
- Need pick-then-act UX → `data-openwebui-select` + template placeholder
For most pages, keep to one dominant interaction style and only 2-4 visible actions.
## Gotchas
Inline `onclick` owns click behavior by default. If an element mixes inline click code with declarative prompt/link attributes, declarative handling is skipped unless `data-openwebui-force-declarative="1"` is present.
Legacy aliases such as `sendPrompt(...)` still work for compatibility, but new generated pages should prefer the smaller object-method API or the declarative contract above.
The bridge still keeps a short same-prompt dedupe window as a safety net, but the preferred design is to avoid mixed ownership in the first place.

173
.continues-handoff.md Normal file
View File

@@ -0,0 +1,173 @@
# Session Handoff Context
## Session Overview
| Field | Value |
|-------|-------|
| **Source** | GitHub Copilot CLI |
| **Session ID** | `231b2651-f3bf-4a24-8680-5ad9d2cdcd22` |
| **Working Directory** | `/Users/fujie/app/python/oui/openwebui-extensions` |
| **Session File** | `~/.copilot/session-state/231b2651-f3bf-4a24-8680-5ad9d2cdcd22` |
| **Repository** | Fu-Jie/openwebui-extensions @ `main` |
| **Last Active** | 2026-03-16 14:08 |
| **Files Modified** | 0 |
| **Messages** | 1 |
## Summary
> Implement RichUI Embed Bridge
## Tool Activity
### Shell (17 calls)
> `$ cd /Users/fujie/app/python/oui/openwebui-extensions && git status --short && echo "---" && git log --oneline -3`
> `$ q`
> `$ cd /Users/fujie/app/python/oui/openwebui-extensions && git --no-pager status --short --branch`
> `$ cd /Users/fujie/app/python/oui/openwebui-extensions && diff -u --label main/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py plugins/pipes/github-copilot-sdk/github_copilot_sdk.py --label worktree/.git-worktrees/github-copilot-sdk-richui/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py .git-worktrees/github-copilot-sdk-richui/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py | sed -n '1,260p'`
> `$ python3 - <<'PY'
from pathlib import Path
src = Path('/Users/fujie/app/python/oui/openwebui-extensions/.git-worktrees/github-copilot-sdk-richui/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py')
dst = Path('/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py')
dst.write_text(src.read_text(encoding='utf-8'), encoding='utf-8')
print(f'copied {src} -> {dst}')
PY
cd /Users/fujie/app/python/oui/openwebui-extensions && git --no-pager diff --stat -- plugins/pipes/github-copilot-sdk/github_copilot_sdk.py`
*...and 12 more shell calls (all exit 0)*
### Edit (10 calls)
> **``**
> **``**
> **``**
> **``**
> **``**
*...and 5 more edits*
### Glob (7 calls)
- `plan.md`
- `**/example.py`
- `**/test*github*copilot*sdk*.py`
- `**/*github*copilot*sdk*.py`
- `plugins/pipes/github-copilot-sdk/tests/**/*.py`
- *...and 2 more glob calls*
### MCP (51 calls)
- `view({"path":"/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk"})`
- `view({"path":"/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/github_co)`
- `view({"path":"/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/example.p)`
- `view({"path":"/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/github_co)`
- `view({"path":"/Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/github_co)`
- *...and 46 more*
### MCP (20 calls)
- `report_intent({"intent":"Reviewing RichUI fix"})`
- `report_intent({"intent":"Syncing RichUI changes"})`
- `report_intent({"intent":"Planning sync work"})`
- `report_intent({"intent":"Syncing SDK file"})`
- `report_intent({"intent":"Verifying SDK sync"})`
- *...and 15 more*
### MCP (1 calls)
- `stop_bash({"shellId":"0"})`
### MCP (40 calls)
- `rg({"pattern":"_build_todo_widget_html|_prepare_richui_embed_html|input:prompt:submit|data-prompt|ready)`
- `rg({"pattern":"def _prepare_richui_embed_html|def _build_todo_widget_html|def _emit_todo_widget_if_chan)`
- `rg({"pattern":"def _prepare_richui_embed_html|RICHUI_BRIDGE_MARKER|RICHUI_BRIDGE_STYLE|RICHUI_BRIDGE_SC)`
- `rg({"pattern":"pending_embeds|type\": \"embeds\"|Content-Disposition|inline|richui|_write_todo_widget_h)`
- `rg({"pattern":"_emit_todo_widget_if_changed\\(","path":"/Users/fujie/app/python/oui/openwebui-extension)`
- *...and 35 more*
### MCP (18 calls)
- `sql({"description":"Create sync todos","query":"INSERT OR REPLACE INTO todos (id, title, description, st)`
- `sql({"description":"Keep compare todo active","query":"UPDATE todos SET status = 'in_progress' WHERE id )`
- `sql({"description":"Advance sync todos","query":"UPDATE todos SET status = 'done' WHERE id = 'compare-wo)`
- `sql({"description":"Advance verify todo","query":"UPDATE todos SET status = 'done' WHERE id = 'apply-ric)`
- `sql({"description":"Complete verification todo","query":"UPDATE todos SET status = 'done' WHERE id = 've)`
- *...and 13 more*
### MCP (4 calls)
- `store_memory({"subject":"richui widgets","fact":"Static RichUI widgets should set data-openwebui-no-default-actio)`
- `store_memory({"subject":"richui widgets","fact":"github_copilot_sdk RichUI opt-out markers are optional; fallback)`
- `store_memory({"subject":"richui interactions","fact":"RichUI bridge now lets inline onclick own click behavior by)`
- `store_memory({"subject":"richui api","fact":"Recommended RichUI interaction contract is 4 actions: data-openwebui)`
### MCP (6 calls)
- `ide-get_diagnostics({"uri":"file:///Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/git)`
- `ide-get_diagnostics({"uri":"file:///Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/git)`
- `ide-get_diagnostics({"uri":"file:///Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/git)`
- `ide-get_diagnostics({"uri":"file:///Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/git)`
- `ide-get_diagnostics({"uri":"file:///Users/fujie/app/python/oui/openwebui-extensions/plugins/pipes/github-copilot-sdk/git)`
- *...and 1 more*
## Recent Conversation
### Assistant
已优化,而且我把交互协议收敛成了 **4 个推荐动作**,专门减少大模型选择困难。
推荐写法现在是:
- `data-openwebui-prompt="..."`:立即继续对话
- `data-openwebui-prompt="..." data-openwebui-action="fill"`:只填输入框,不发送
- `data-openwebui-action="submit"`:提交当前输入框
- `data-openwebui-link="https://..."`:打开链接
JS 推荐也同步收敛为:
- `window.OpenWebUIBridge.prompt(text)`
- `window.OpenWebUIBridge.fill(text)`
- `window.OpenWebUIBridge.submit()`
- `window.OpenWebUIBridge.openLink(url)`
- `window.OpenWebUIBridge.reportHeight()`
另外我做了两点稳定性优化:
- `onclick` 默认优先,避免和 de…
## Session Origin
This session was extracted from **GitHub Copilot CLI** session data.
- **Session file**: `~/.copilot/session-state/231b2651-f3bf-4a24-8680-5ad9d2cdcd22`
- **Session ID**: `231b2651-f3bf-4a24-8680-5ad9d2cdcd22`
- **Project directory**: `/Users/fujie/app/python/oui/openwebui-extensions`
> To access the raw session data, inspect the file path above.
---
**You are continuing this session. Pick up exactly where it left off — review the conversation above, check pending tasks, and keep going.**

View File

@@ -23,12 +23,12 @@ A collection of enhancements, plugins, and prompts for [open-webui](https://gith
### 🔥 Top 6 Popular Plugins
| Rank | Plugin | Version | Downloads | Views | 📅 Updated |
| :---: | :--- | :---: | :---: | :---: | :---: |
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | ![v](https://img.shields.io/badge/v-1.0.0-blue?style=flat) | ![p1_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_dl.json&style=flat) | ![p1_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p2_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_dl.json&style=flat) | ![p2_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | ![v](https://img.shields.io/badge/v-1.2.8-blue?style=flat) | ![p3_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_dl.json&style=flat) | ![p3_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p4_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_dl.json&style=flat) | ![p4_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 5⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | ![v](https://img.shields.io/badge/v-0.4.4-blue?style=flat) | ![p5_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_dl.json&style=flat) | ![p5_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 6⃣ | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | ![v](https://img.shields.io/badge/v-N/A-gray?style=flat) | ![p6_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_dl.json&style=flat) | ![p6_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--01--28-gray?style=flat) |
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | ![v](https://img.shields.io/badge/v-1.0.0-blue?style=flat) | ![p1_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_dl.json&style=flat) | ![p1_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p2_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_dl.json&style=flat) | ![p2_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | ![v](https://img.shields.io/badge/v-1.2.8-blue?style=flat) | ![p3_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_dl.json&style=flat) | ![p3_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p4_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_dl.json&style=flat) | ![p4_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 5⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | ![v](https://img.shields.io/badge/v-0.4.4-blue?style=flat) | ![p5_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_dl.json&style=flat) | ![p5_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 6⃣ | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | ![v](https://img.shields.io/badge/v-N/A-gray?style=flat) | ![p6_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_dl.json&style=flat) | ![p6_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
### 📈 Total Downloads Trend
![Activity](https://gist.githubusercontent.com/Fu-Jie/db3d95687075a880af6f1fba76d679c6/raw/chart.svg)

View File

@@ -20,12 +20,12 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
### 🔥 热门插件 Top 6
| 排名 | 插件 | 版本 | 下载 | 浏览 | 📅 更新 |
| :---: | :--- | :---: | :---: | :---: | :---: |
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | ![v](https://img.shields.io/badge/v-1.0.0-blue?style=flat) | ![p1_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_dl.json&style=flat) | ![p1_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p2_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_dl.json&style=flat) | ![p2_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | ![v](https://img.shields.io/badge/v-1.2.8-blue?style=flat) | ![p3_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_dl.json&style=flat) | ![p3_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p4_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_dl.json&style=flat) | ![p4_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 5⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | ![v](https://img.shields.io/badge/v-0.4.4-blue?style=flat) | ![p5_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_dl.json&style=flat) | ![p5_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--15-gray?style=flat) |
| 6⃣ | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | ![v](https://img.shields.io/badge/v-N/A-gray?style=flat) | ![p6_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_dl.json&style=flat) | ![p6_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--01--28-gray?style=flat) |
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | ![v](https://img.shields.io/badge/v-1.0.0-blue?style=flat) | ![p1_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_dl.json&style=flat) | ![p1_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p1_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p2_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_dl.json&style=flat) | ![p2_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p2_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | ![v](https://img.shields.io/badge/v-1.2.8-blue?style=flat) | ![p3_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_dl.json&style=flat) | ![p3_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p3_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | ![v](https://img.shields.io/badge/v-1.5.0-blue?style=flat) | ![p4_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_dl.json&style=flat) | ![p4_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p4_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 5⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | ![v](https://img.shields.io/badge/v-0.4.4-blue?style=flat) | ![p5_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_dl.json&style=flat) | ![p5_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p5_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
| 6⃣ | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | ![v](https://img.shields.io/badge/v-N/A-gray?style=flat) | ![p6_dl](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_dl.json&style=flat) | ![p6_vw](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_p6_vw.json&style=flat) | ![updated](https://img.shields.io/badge/2026--03--20-gray?style=flat) |
### 📈 总下载量累计趋势
![Activity](https://gist.githubusercontent.com/Fu-Jie/db3d95687075a880af6f1fba76d679c6/raw/chart.svg)

View File

@@ -1,6 +1,6 @@
# GitHub Copilot SDK Pipe for OpenWebUI
| By [Fu-Jie](https://github.com/Fu-Jie) · v0.10.1 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| By [Fu-Jie](https://github.com/Fu-Jie) · v0.11.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-Top%20%3C1%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%93%A6&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) |
@@ -26,11 +26,27 @@ This is a powerful **GitHub Copilot SDK** Pipe for **OpenWebUI** that provides a
---
## ✨ v0.10.1: RichUI Default & Improved HTML Display
## Install with Batch Install Plugins
- **🎨 RichUI Default HTML Display**: Changed default HTML embed type from 'artifacts' to 'richui' for direct, seamless rendering in OpenWebUI chat interface
- **📝 Enhanced System Prompt**: Updated guidance to recommend RichUI mode for HTML presentation by default, with artifacts only when explicitly requested by users
- **⚡ Smoother Workflow**: Eliminates unnecessary modal interactions, allowing agents to display interactive components directly in conversation
If you already use [Batch Install Plugins from GitHub](https://github.com/Fu-Jie/openwebui-extensions/tree/main/plugins/tools/batch-install-plugins), you can install or update this plugin with:
```text
Install plugin from Fu-Jie/openwebui-extensions
```
When the selection dialog opens, search for this plugin, check it, and continue.
> [!IMPORTANT]
> If the official OpenWebUI Community version is already installed, remove it first. After that, Batch Install Plugins can keep this plugin updated in future runs.
## ✨ v0.11.0: High-Speed Pool Fix, BYOK-only Mode & Stable RichUI
- **🚀 Shared Client Pool Fix**: Resolved a critical bug where the shared singleton pool was incorrectly stopped, restoring instant response speeds for subsequent turns.
- **🔑 BYOK-only Mode**: You can now use the plugin with only BYOK settings (OpenAI/Anthropic keys) without requiring a `GH_TOKEN`.
- **🛡️ Environment Isolation**: Improved security by isolating user-specific environment variables, preventing token pollution in concurrent requests.
- **📏 RichUI Height Stability**: Fixed the infinite sizing loop bug in embedded components, ensuring precise auto-height calculation.
- **🩺 Smart Stall Detection**: Integrated `client.ping()` to rescue slow but alive processes from being prematurely aborted during heavy tasks.
- **🧹 Smart TODO Visibility**: Automatically hides the TODO widget in subsequent chats once all tasks are completed to keep the interface clean.
---
@@ -45,6 +61,59 @@ This is a powerful **GitHub Copilot SDK** Pipe for **OpenWebUI** that provides a
---
## 🚀 Quick Start (Read This First)
If you only want to know how to use this plugin, read these sections in order:
1. **Quick Start**
2. **How to Use**
3. **Core Configuration**
Everything else is optional or advanced.
1. **Install the Pipe**
- **Recommended**: Use **Batch Install Plugins** and select this plugin.
- **Manual**: OpenWebUI -> **Workspace** -> **Functions** -> create a new function -> paste `github_copilot_sdk.py`.
2. **Install the Companion Files Filter** if you want uploaded files to reach the Pipe as raw files.
3. **Configure one credential path**
- `GH_TOKEN` for official GitHub Copilot models
- or `BYOK_API_KEY` for OpenAI / Anthropic
4. **Start a new chat and use it normally**
- Select this Pipe's model
- Ask your task in plain language
- Upload files when needed
## 🧭 How to Use
You usually **do not** need to mention tools, skills, internal parameters, or RichUI syntax. Just describe the task naturally.
| Scenario | What you do | Example |
| :--- | :--- | :--- |
| Daily coding / debugging | Ask normally in chat | `Fix the failing tests and explain the root cause.` |
| File analysis | Upload files and ask normally | `Summarize this Excel file and chart the monthly trend.` |
| Long tasks | Ask for the outcome; the Pipe handles planning, status, and TODO tracking automatically | `Refactor this plugin and keep the docs in sync.` |
| HTML reports / dashboards | Ask the agent to generate a report or dashboard | `Create an interactive architecture overview for this repo.` |
> [!TIP]
> Ordinary users only need to remember one rule: if you ask for an interactive HTML result, the Pipe will usually use **RichUI** automatically. Only mention **artifacts** when you explicitly want artifacts-style output.
## 💡 What RichUI actually means
**RichUI = the generated HTML page is rendered directly inside the chat window.**
You can think of it as **a small interactive page inside the conversation**.
- If the agent generates a dashboard, report, timeline, architecture page, or explainer page, you may see RichUI.
- If you are just asking normal coding questions, debugging, writing, or file analysis tasks, you can ignore RichUI completely.
- You do **not** need to write XML, HTML tags, or special RichUI attributes. Just describe the result you want.
| What you ask for | What happens |
| :--- | :--- |
| `Fix this failing test` | Normal chat response. RichUI is not important here. |
| `Create an interactive dashboard for this repo` | RichUI is used by default. |
| `Generate this as artifacts` | Artifacts mode is used instead of RichUI. |
| `Build a project summary page if that helps explain it better` | The agent decides whether a page is useful. |
## ✨ Key Capabilities
- **🔑 Unified Intelligence (Official + BYOK)**: Seamlessly switch between official GitHub Copilot models and your own models (OpenAI, Anthropic, DeepSeek, xAI) via **Bring Your Own Key** mode.
@@ -68,6 +137,25 @@ This is a powerful **GitHub Copilot SDK** Pipe for **OpenWebUI** that provides a
> "Install this skill: <https://github.com/nicobailon/visual-explainer>".
> This skill is specifically optimized for generating high-quality visual components and integrates perfectly with this Pipe.
### 🎛️ How RichUI works in normal use
For normal users, the rule is simple:
1. Ask for the result you want.
2. The AI decides whether a normal chat reply is enough.
3. If a page or dashboard would explain things better, the AI creates it automatically and shows it in chat.
You do **not** need to write XML tags, HTML snippets, or RichUI attributes yourself.
Examples:
- `Explain this repository structure.`
- `If useful, present this as an interactive architecture page.`
- `Turn this CSV into a simple dashboard.`
> [!TIP]
> Only mention **artifacts** when you explicitly want artifacts-style output. Otherwise, let the AI choose the best presentation automatically.
---
## 🧩 Companion Files Filter (Required for raw files)
@@ -127,17 +215,27 @@ Standard users can override these settings in their individual Profile/Function
---
### 📤 Enhanced Publishing & Interactive Components
### 📤 HTML result behavior (advanced)
The `publish_file_from_workspace` tool now uses a clearer delivery contract for production use:
You can skip this section unless you are directly using `publish_file_from_workspace(...)`.
- **Artifacts mode (`artifacts`, default)**: Agent returns `[Preview]` + `[Download]` and may output `html_embed` in a ```html block for direct chat rendering.
- **Rich UI mode (`richui`)**: Agent returns `[Preview]` + `[Download]` only; integrated preview is rendered automatically via emitter (no iframe block in message).
- **📄 PDF delivery safety rule**: Always output Markdown links only (`[Preview]` + `[Download]` when available). **Do not embed PDF via iframe/html blocks.**
- **⚡ Stable dual-channel publishing**: Keeps interactive viewing and persistent file download aligned across local/object-storage backends.
- **✅ Status integration**: Emits real-time publishing progress and completion feedback to the OpenWebUI status bar.
In plain language:
- `richui` = show the generated HTML directly inside the chat
- `artifacts` = use artifacts-style HTML delivery when you explicitly want that style
Internally, this behavior is controlled by the `embed_type` parameter of `publish_file_from_workspace(...)`.
- **Rich UI mode (`richui`, default for HTML)**: The agent returns `[Preview]` + `[Download]` only. OpenWebUI renders the interactive preview automatically after the message.
- **Artifacts mode (`artifacts`)**: Use this only when you explicitly want artifacts-style HTML delivery.
- **📄 PDF safety rule**: Always return Markdown links only (`[Preview]` / `[Download]` when available). Do not embed PDFs with iframe or HTML blocks.
- **⚡ Stable dual-channel publishing**: Keeps interactive viewing and persistent file download aligned across local and object-storage backends.
- **✅ Status integration**: Emits publishing progress and completion feedback to the OpenWebUI status bar.
- **📘 Publishing Tool Guide (GitHub)**: [publish_file_from_workspace Guide](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE.md)
> [!TIP]
> Most users do not need to set `embed_type` manually. Ask for a report or dashboard normally. Only say `use artifacts` when you specifically want artifacts-style presentation. If you are not calling `publish_file_from_workspace(...)` yourself, you can usually ignore this parameter.
---
### 🧩 OpenWebUI Skills Bridge & `manage_skills` Tool

View File

@@ -1,6 +1,6 @@
# GitHub Copilot Official SDK Pipe
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.10.1 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.11.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-Top%20%3C1%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%93%A6&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) |
@@ -27,11 +27,27 @@
---
## ✨ v0.10.1RichUI 默认展示与 HTML 渲染改进
## 使用 Batch Install Plugins 安装
- **🎨 RichUI 默认 HTML 显示**:将默认 HTML 嵌入类型从 'artifacts' 改为 'richui',在 OpenWebUI 聊天界面中实现直观无缝的渲染效果
- **📝 增强系统提示词**:更新系统提示词指导,默认推荐 RichUI 模式展示 HTML 内容,仅当用户显式请求时使用 artifacts 模式
- **⚡ 更顺畅的工作流**:消除不必要的弹窗交互,让 Agent 能直接在对话中展示交互式组件
如果你已经安装了 [Batch Install Plugins from GitHub](https://github.com/Fu-Jie/openwebui-extensions/tree/main/plugins/tools/batch-install-plugins),可以用下面这句来安装或更新当前插件:
```text
从 Fu-Jie/openwebui-extensions 安装插件
```
当选择弹窗打开后,搜索当前插件,勾选后继续安装即可。
> [!IMPORTANT]
> 如果你已经安装了 OpenWebUI 官方社区里的同名版本请先删除旧版本否则重新安装时可能报错。删除后Batch Install Plugins 后续就可以继续负责更新这个插件。
## ✨ v0.11.0:单例进程池修复、纯 BYOK 模式与 RichUI 高度稳定性
- **🚀 共享进程池修复**:修复了 `stream_response` 误停止单例客户端的重大 Bug显著提升多轮对话响应速度。
- **🔑 支持纯 BYOK 模式**现在支持仅配置自带密钥BYOK而不提供 `GH_TOKEN` 的运行模式。
- **🛡️ 并发环境隔离**:重构环境变量注入逻辑,实现用户级 Token 隔离,杜绝高并发下的信息污染。
- **📏 RichUI 稳定性增强**:彻底解决了嵌入式组件高度计算循环导致的页面无限变高问题。
- **🩺 智能防挂死检测**:引入 `client.ping()` 探测机制,有效减少复杂任务(如长时间运行的脚本)被误杀的概率。
- **🧹 智能 TODO 显隐**:当 TODO 任务全部完成后,下一次对话将自动隐藏 UI保持界面整洁。
---
@@ -46,6 +62,59 @@
---
## 🚀 最短上手路径(先看这里)
如果你现在最关心的是“这个插件到底怎么用”,建议按这个顺序阅读:
1. **最短上手路径**
2. **日常怎么用**
3. **核心配置**
其他章节都属于补充说明或进阶内容。
1. **安装 Pipe**
- **推荐**:使用 **Batch Install Plugins** 安装并勾选当前插件。
- **手动**OpenWebUI -> **Workspace** -> **Functions** -> 新建 Function -> 粘贴 `github_copilot_sdk.py`
2. **如果你要处理上传文件**,再安装配套的 `GitHub Copilot SDK Files Filter`
3. **至少配置一种凭据**
- `GH_TOKEN`:使用 GitHub 官方 Copilot 模型
- `BYOK_API_KEY`:使用 OpenAI / Anthropic 自带 Key
4. **新建对话后直接正常提需求**
- 选择当前 Pipe 的模型
- 像平时一样描述任务
- 需要时上传文件
## 🧭 日常怎么用
大多数情况下,你**不需要**主动提 tools、skills、内部参数或 RichUI 语法,直接自然描述任务即可。
| 场景 | 你怎么做 | 示例 |
| :--- | :--- | :--- |
| 日常编码 / 排错 | 直接在聊天里提需求 | `修复失败的测试,并解释根因。` |
| 文件分析 | 上传文件后直接提需求 | `总结这个 Excel并画出每月趋势图。` |
| 长任务 | 只要说出目标即可Pipe 会自动处理规划、状态提示和 TODO 跟踪 | `重构这个插件,并同步更新文档。` |
| HTML 报告 / 看板 | 直接让 Agent 生成交互式报告或看板 | `帮我生成这个仓库的交互式架构总览。` |
> [!TIP]
> 普通用户只要记住一条:如果你让 Agent 生成交互式 HTML 结果,这个 Pipe 通常会自动使用 **RichUI**。只有当你明确想要 artifacts 风格时,才需要特别说明。
## 💡 RichUI 到底是什么意思?
**RichUI = Agent 生成的 HTML 页面,会直接显示在聊天窗口里。**
你可以把它理解为:**对话里面直接出现一个可交互的小网页 / 小看板**。
- 如果 Agent 生成的是看板、报告、时间线、架构图页面或说明型页面,你就可能会看到 RichUI。
- 如果你只是正常问代码问题、调试、写文档、分析文件,其实可以完全忽略 RichUI。
- 你**不需要**自己写 XML、HTML 标签或任何特殊 RichUI 属性,直接描述你想要的结果即可。
| 你怎么说 | 系统会怎么做 |
| :--- | :--- |
| `修复这个失败测试` | 正常聊天回复,这时 RichUI 基本不重要。 |
| `帮我生成一个交互式仓库看板` | 默认使用 RichUI。 |
| `请用 artifacts 形式生成` | 改用 artifacts而不是 RichUI。 |
| `如果做成页面更清楚,就帮我做成页面` | AI 会自己判断页面是否更合适。 |
## ✨ 核心能力 (Key Capabilities)
- **🔑 统一智能体验 (官方 + BYOK)**: 自由切换官方模型与自定义服务商OpenAI, Anthropic, DeepSeek, xAI支持 **BYOK (自带 Key)** 模式。
@@ -69,6 +138,25 @@
> “请安装此技能:<https://github.com/nicobailon/visual-explainer”。>
> 该技能专为生成高质量可视化组件而设计,能够与本 Pipe 完美协作。
### 🎛️ RichUI 在日常使用里怎么理解
对普通用户来说,规则很简单:
1. 直接说出你想要的结果。
2. AI 会自己判断普通聊天回复是否已经足够。
3. 如果做成页面、看板或可视化会更清楚AI 会自动生成并直接显示在聊天里。
你**不需要**自己写 XML 标签、HTML 片段或 RichUI 属性。
例如:
- `请解释这个仓库的结构。`
- `如果用交互式架构页更清楚,就做成页面。`
- `把这个 CSV 做成一个简单看板。`
> [!TIP]
> 只有当你明确想要 **artifacts 风格** 时,才需要特别说明。其他情况下,直接让 AI 自动选择最合适的展示方式即可。
---
## 🧩 配套 Files Filter原始文件必备
@@ -76,7 +164,7 @@
`GitHub Copilot SDK Files Filter` 是本 Pipe 的配套插件,用于阻止 OpenWebUI 默认 RAG 在 Pipe 接手前抢先处理上传文件。
- **作用**: 将上传文件移动到 `copilot_files`,让 Pipe 能直接读取原始二进制。
- **必要性**: 若未安装,文件可能被提前解析/向量化Agent 到原始文件。
- **必要性**: 若未安装,文件可能被提前解析/向量化Agent 可能拿不到原始文件。
- **v0.1.3 重点**:
- 修复 BYOK 模型 ID 识别(支持 `github_copilot_official_sdk_pipe.xxx` 前缀匹配)。
- 新增双通道调试日志(`show_debug_log`):后端 logger + 浏览器控制台。
@@ -161,6 +249,28 @@
---
## 📤 HTML 结果展示方式(进阶)
如果你没有直接使用 `publish_file_from_workspace(...)`,这一节可以跳过。
先用一句人话解释:
- `richui` = 生成的 HTML 直接显示在聊天里
- `artifacts` = 你明确想要 artifacts 风格时使用的另一种 HTML 交付方式
在内部实现上,这个行为由 `publish_file_from_workspace(..., embed_type=...)` 控制。
- **RichUI 模式(`richui`HTML 默认)**Agent 只返回 `[Preview]` + `[Download]`,聊天结束后由 OpenWebUI 自动渲染交互预览。
- **Artifacts 模式(`artifacts`**:只有在你明确想要 artifacts 风格展示时再使用。
- **PDF 安全规则**PDF 只返回 Markdown 链接,不要用 iframe / HTML block 嵌入。
- **双通道发布**:同时兼顾对话内查看与持久下载。
- **状态提示**:发布过程会同步显示在 OpenWebUI 状态栏。
> [!TIP]
> 如果你只是日常使用这个 Pipe通常不需要手动提 `embed_type`。直接说“生成一个交互式报告 / 看板”即可;只有你明确想要 artifacts 风格时再特别说明。如果你并没有直接调用 `publish_file_from_workspace(...)`,那通常可以忽略这个参数。
---
## 🤝 支持 (Support)
如果这个插件对你有帮助,欢迎到 [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) 点个 Star这将是我持续改进的动力感谢支持。

View File

@@ -15,7 +15,7 @@ Pipes allow you to:
## Available Pipe Plugins
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.10.1) - Official GitHub Copilot SDK integration. Features **Workspace Isolation**, **Zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. **NEW in v0.10.1: RichUI Default HTML Display & Enhanced System Prompt guidance**. [View Deep Dive](github-copilot-sdk-deep-dive.md) | [**View Advanced Tutorial**](github-copilot-sdk-tutorial.md) | [**View Detailed Usage Guide**](github-copilot-sdk-usage-guide.md).
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.11.0) - Official GitHub Copilot SDK integration. Features **Workspace Isolation**, **Zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. **NEW in v0.11.0: Shared Client Pool fix (High Performance), Pure BYOK-only Mode, and Stable RichUI auto-sizing**. [View Deep Dive](github-copilot-sdk-deep-dive.md) | [**View Advanced Tutorial**](github-copilot-sdk-tutorial.md) | [**View Detailed Usage Guide**](github-copilot-sdk-usage-guide.md).
- **[Case Study: GitHub 100 Star Growth Analysis](star-prediction-example.md)** - Learn how to use the GitHub Copilot SDK Pipe with Minimax 2.1 to automatically analyze CSV data and generate project growth reports.
- **[Case Study: High-Quality Video to GIF Conversion](video-processing-example.md)** - See how the model uses system-level FFmpeg to accelerate, scale, and optimize colors for screen recordings.

View File

@@ -15,7 +15,7 @@ Pipes 可以用于:
## 可用的 Pipe 插件
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.10.1) - GitHub Copilot SDK 官方集成。具备**工作区安全隔离**、**零配置工具桥接**与**BYOK (自带 Key) 支持**。**v0.10.1 更新:RichUI 默认 HTML 展示与增强的系统提示词指导**。[查看深度架构解析](github-copilot-sdk-deep-dive.zh.md) | [**查看进阶实战教程**](github-copilot-sdk-tutorial.zh.md) | [**查看详细使用手册**](github-copilot-sdk-usage-guide.zh.md)。
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.11.0) - GitHub Copilot SDK 官方集成。具备**工作区安全隔离**、**零配置工具桥接**与**BYOK (自带 Key) 支持**。**v0.11.0 更新:单例进程池 Bug 修复 (极速响应)、纯 BYOK 模式支持与 RichUI 自动高度稳定性增强**。[查看深度架构解析](github-copilot-sdk-deep-dive.zh.md) | [**查看进阶 实战教程**](github-copilot-sdk-tutorial.zh.md) | [**查看详细使用手册**](github-copilot-sdk-usage-guide.zh.md)。
- **[实战案例GitHub 100 Star 增长预测](star-prediction-example.zh.md)** - 展示如何使用 GitHub Copilot SDK Pipe 结合 Minimax 2.1 模型,自动编写脚本分析 CSV 数据并生成详细的项目增长报告。
- **[实战案例:视频高质量 GIF 转换与加速](video-processing-example.zh.md)** - 演示模型如何通过底层 FFmpeg 工具对录屏进行加速、缩放及双阶段色彩优化处理。

View File

@@ -1,6 +1,6 @@
# GitHub Copilot SDK Pipe for OpenWebUI
| By [Fu-Jie](https://github.com/Fu-Jie) · v0.10.1 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| By [Fu-Jie](https://github.com/Fu-Jie) · v0.11.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-Top%20%3C1%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%93%A6&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) |
@@ -39,11 +39,14 @@ When the selection dialog opens, search for this plugin, check it, and continue.
> [!IMPORTANT]
> If the official OpenWebUI Community version is already installed, remove it first. After that, Batch Install Plugins can keep this plugin updated in future runs.
## ✨ v0.10.1: RichUI Default & Improved HTML Display
## ✨ v0.11.0: High-Speed Pool Fix, BYOK-only Mode & Stable RichUI
- **🎨 RichUI Default HTML Display**: Changed default HTML embed type from 'artifacts' to 'richui' for direct, seamless rendering in OpenWebUI chat interface
- **📝 Enhanced System Prompt**: Updated guidance to recommend RichUI mode for HTML presentation by default, with artifacts only when explicitly requested by users
- **⚡ Smoother Workflow**: Eliminates unnecessary modal interactions, allowing agents to display interactive components directly in conversation
- **🚀 Shared Client Pool Fix**: Resolved a critical bug where the shared singleton pool was incorrectly stopped, restoring instant response speeds for subsequent turns.
- **🔑 BYOK-only Mode**: You can now use the plugin with only BYOK settings (OpenAI/Anthropic keys) without requiring a `GH_TOKEN`.
- **🛡️ Environment Isolation**: Improved security by isolating user-specific environment variables, preventing token pollution in concurrent requests.
- **📏 RichUI Height Stability**: Fixed the infinite sizing loop bug in embedded components, ensuring precise auto-height calculation.
- **🩺 Smart Stall Detection**: Integrated `client.ping()` to rescue slow but alive processes from being prematurely aborted during heavy tasks.
- **🧹 Smart TODO Visibility**: Automatically hides the TODO widget in subsequent chats once all tasks are completed to keep the interface clean.
---
@@ -58,6 +61,59 @@ When the selection dialog opens, search for this plugin, check it, and continue.
---
## 🚀 Quick Start (Read This First)
If you only want to know how to use this plugin, read these sections in order:
1. **Quick Start**
2. **How to Use**
3. **Core Configuration**
Everything else is optional or advanced.
1. **Install the Pipe**
- **Recommended**: Use **Batch Install Plugins** and select this plugin.
- **Manual**: OpenWebUI -> **Workspace** -> **Functions** -> create a new function -> paste `github_copilot_sdk.py`.
2. **Install the Companion Files Filter** if you want uploaded files to reach the Pipe as raw files.
3. **Configure one credential path**
- `GH_TOKEN` for official GitHub Copilot models
- or `BYOK_API_KEY` for OpenAI / Anthropic
4. **Start a new chat and use it normally**
- Select this Pipe's model
- Ask your task in plain language
- Upload files when needed
## 🧭 How to Use
You usually **do not** need to mention tools, skills, internal parameters, or RichUI syntax. Just describe the task naturally.
| Scenario | What you do | Example |
| :--- | :--- | :--- |
| Daily coding / debugging | Ask normally in chat | `Fix the failing tests and explain the root cause.` |
| File analysis | Upload files and ask normally | `Summarize this Excel file and chart the monthly trend.` |
| Long tasks | Ask for the outcome; the Pipe handles planning, status, and TODO tracking automatically | `Refactor this plugin and keep the docs in sync.` |
| HTML reports / dashboards | Ask the agent to generate a report or dashboard | `Create an interactive architecture overview for this repo.` |
> [!TIP]
> Ordinary users only need to remember one rule: if you ask for an interactive HTML result, the Pipe will usually use **RichUI** automatically. Only mention **artifacts** when you explicitly want artifacts-style output.
## 💡 What RichUI actually means
**RichUI = the generated HTML page is rendered directly inside the chat window.**
You can think of it as **a small interactive page inside the conversation**.
- If the agent generates a dashboard, report, timeline, architecture page, or explainer page, you may see RichUI.
- If you are just asking normal coding questions, debugging, writing, or file analysis tasks, you can ignore RichUI completely.
- You do **not** need to write XML, HTML tags, or special RichUI attributes. Just describe the result you want.
| What you ask for | What happens |
| :--- | :--- |
| `Fix this failing test` | Normal chat response. RichUI is not important here. |
| `Create an interactive dashboard for this repo` | RichUI is used by default. |
| `Generate this as artifacts` | Artifacts mode is used instead of RichUI. |
| `Build a project summary page if that helps explain it better` | The agent decides whether a page is useful. |
## ✨ Key Capabilities
- **🔑 Unified Intelligence (Official + BYOK)**: Seamlessly switch between official GitHub Copilot models and your own models (OpenAI, Anthropic, DeepSeek, xAI) via **Bring Your Own Key** mode.
@@ -81,6 +137,25 @@ When the selection dialog opens, search for this plugin, check it, and continue.
> "Install this skill: <https://github.com/nicobailon/visual-explainer>".
> This skill is specifically optimized for generating high-quality visual components and integrates perfectly with this Pipe.
### 🎛️ How RichUI works in normal use
For normal users, the rule is simple:
1. Ask for the result you want.
2. The AI decides whether a normal chat reply is enough.
3. If a page or dashboard would explain things better, the AI creates it automatically and shows it in chat.
You do **not** need to write XML tags, HTML snippets, or RichUI attributes yourself.
Examples:
- `Explain this repository structure.`
- `If useful, present this as an interactive architecture page.`
- `Turn this CSV into a simple dashboard.`
> [!TIP]
> Only mention **artifacts** when you explicitly want artifacts-style output. Otherwise, let the AI choose the best presentation automatically.
---
## 🧩 Companion Files Filter (Required for raw files)
@@ -140,17 +215,27 @@ Standard users can override these settings in their individual Profile/Function
---
### 📤 Enhanced Publishing & Interactive Components
### 📤 HTML result behavior (advanced)
The `publish_file_from_workspace` tool now uses a clearer delivery contract for production use:
You can skip this section unless you are directly using `publish_file_from_workspace(...)`.
- **Artifacts mode (`artifacts`, default)**: Agent returns `[Preview]` + `[Download]` and may output `html_embed` in a ```html block for direct chat rendering.
- **Rich UI mode (`richui`)**: Agent returns `[Preview]` + `[Download]` only; integrated preview is rendered automatically via emitter (no iframe block in message).
- **📄 PDF delivery safety rule**: Always output Markdown links only (`[Preview]` + `[Download]` when available). **Do not embed PDF via iframe/html blocks.**
- **⚡ Stable dual-channel publishing**: Keeps interactive viewing and persistent file download aligned across local/object-storage backends.
- **✅ Status integration**: Emits real-time publishing progress and completion feedback to the OpenWebUI status bar.
In plain language:
- `richui` = show the generated HTML directly inside the chat
- `artifacts` = use artifacts-style HTML delivery when you explicitly want that style
Internally, this behavior is controlled by the `embed_type` parameter of `publish_file_from_workspace(...)`.
- **Rich UI mode (`richui`, default for HTML)**: The agent returns `[Preview]` + `[Download]` only. OpenWebUI renders the interactive preview automatically after the message.
- **Artifacts mode (`artifacts`)**: Use this only when you explicitly want artifacts-style HTML delivery.
- **📄 PDF safety rule**: Always return Markdown links only (`[Preview]` / `[Download]` when available). Do not embed PDFs with iframe or HTML blocks.
- **⚡ Stable dual-channel publishing**: Keeps interactive viewing and persistent file download aligned across local and object-storage backends.
- **✅ Status integration**: Emits publishing progress and completion feedback to the OpenWebUI status bar.
- **📘 Publishing Tool Guide (GitHub)**: [publish_file_from_workspace Guide](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE.md)
> [!TIP]
> Most users do not need to set `embed_type` manually. Ask for a report or dashboard normally. Only say `use artifacts` when you specifically want artifacts-style presentation. If you are not calling `publish_file_from_workspace(...)` yourself, you can usually ignore this parameter.
---
### 🧩 OpenWebUI Skills Bridge & `manage_skills` Tool

View File

@@ -1,6 +1,6 @@
# GitHub Copilot Official SDK Pipe
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.10.1 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.11.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) |
| :--- | ---: |
| ![followers](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_followers.json&label=%F0%9F%91%A5&style=flat) | ![points](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_points.json&label=%E2%AD%90&style=flat) | ![top](https://img.shields.io/badge/%F0%9F%8F%86-Top%20%3C1%25-10b981?style=flat) | ![contributions](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_contributions.json&label=%F0%9F%93%A6&style=flat) | ![downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_downloads.json&label=%E2%AC%87%EF%B8%8F&style=flat) | ![saves](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_saves.json&label=%F0%9F%92%BE&style=flat) | ![views](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FFu-Jie%2Fdb3d95687075a880af6f1fba76d679c6%2Fraw%2Fbadge_views.json&label=%F0%9F%91%81%EF%B8%8F&style=flat) |
@@ -40,11 +40,14 @@
> [!IMPORTANT]
> 如果你已经安装了 OpenWebUI 官方社区里的同名版本请先删除旧版本否则重新安装时可能报错。删除后Batch Install Plugins 后续就可以继续负责更新这个插件。
## ✨ v0.10.1RichUI 默认展示与 HTML 渲染改进
## ✨ v0.11.0:单例进程池修复、纯 BYOK 模式与 RichUI 高度稳定性
- **🎨 RichUI 默认 HTML 显示**:将默认 HTML 嵌入类型从 'artifacts' 改为 'richui',在 OpenWebUI 聊天界面中实现直观无缝的渲染效果
- **📝 增强系统提示词**:更新系统提示词指导,默认推荐 RichUI 模式展示 HTML 内容,仅当用户显式请求时使用 artifacts 模式
- **⚡ 更顺畅的工作流**:消除不必要的弹窗交互,让 Agent 能直接在对话中展示交互式组件
- **🚀 共享进程池修复**:修复了 `stream_response` 误停止单例客户端的重大 Bug显著提升多轮对话响应速度。
- **🔑 支持纯 BYOK 模式**现在支持仅配置自带密钥BYOK而不提供 `GH_TOKEN` 的运行模式
- **🛡️ 并发环境隔离**:重构环境变量注入逻辑,实现用户级 Token 隔离,杜绝高并发下的信息污染。
- **📏 RichUI 稳定性增强**:彻底解决了嵌入式组件高度计算循环导致的页面无限变高问题。
- **🩺 智能防挂死检测**:引入 `client.ping()` 探测机制,有效减少复杂任务(如长时间运行的脚本)被误杀的概率。
- **🧹 智能 TODO 显隐**:当 TODO 任务全部完成后,下一次对话将自动隐藏 UI保持界面整洁。
---
@@ -59,6 +62,59 @@
---
## 🚀 最短上手路径(先看这里)
如果你现在最关心的是“这个插件到底怎么用”,建议按这个顺序阅读:
1. **最短上手路径**
2. **日常怎么用**
3. **核心配置**
其他章节都属于补充说明或进阶内容。
1. **安装 Pipe**
- **推荐**:使用 **Batch Install Plugins** 安装并勾选当前插件。
- **手动**OpenWebUI -> **Workspace** -> **Functions** -> 新建 Function -> 粘贴 `github_copilot_sdk.py`
2. **如果你要处理上传文件**,再安装配套的 `GitHub Copilot SDK Files Filter`
3. **至少配置一种凭据**
- `GH_TOKEN`:使用 GitHub 官方 Copilot 模型
- `BYOK_API_KEY`:使用 OpenAI / Anthropic 自带 Key
4. **新建对话后直接正常提需求**
- 选择当前 Pipe 的模型
- 像平时一样描述任务
- 需要时上传文件
## 🧭 日常怎么用
大多数情况下,你**不需要**主动提 tools、skills、内部参数或 RichUI 语法,直接自然描述任务即可。
| 场景 | 你怎么做 | 示例 |
| :--- | :--- | :--- |
| 日常编码 / 排错 | 直接在聊天里提需求 | `修复失败的测试,并解释根因。` |
| 文件分析 | 上传文件后直接提需求 | `总结这个 Excel并画出每月趋势图。` |
| 长任务 | 只要说出目标即可Pipe 会自动处理规划、状态提示和 TODO 跟踪 | `重构这个插件,并同步更新文档。` |
| HTML 报告 / 看板 | 直接让 Agent 生成交互式报告或看板 | `帮我生成这个仓库的交互式架构总览。` |
> [!TIP]
> 普通用户只要记住一条:如果你让 Agent 生成交互式 HTML 结果,这个 Pipe 通常会自动使用 **RichUI**。只有当你明确想要 artifacts 风格时,才需要特别说明。
## 💡 RichUI 到底是什么意思?
**RichUI = Agent 生成的 HTML 页面,会直接显示在聊天窗口里。**
你可以把它理解为:**对话里面直接出现一个可交互的小网页 / 小看板**。
- 如果 Agent 生成的是看板、报告、时间线、架构图页面或说明型页面,你就可能会看到 RichUI。
- 如果你只是正常问代码问题、调试、写文档、分析文件,其实可以完全忽略 RichUI。
- 你**不需要**自己写 XML、HTML 标签或任何特殊 RichUI 属性,直接描述你想要的结果即可。
| 你怎么说 | 系统会怎么做 |
| :--- | :--- |
| `修复这个失败测试` | 正常聊天回复,这时 RichUI 基本不重要。 |
| `帮我生成一个交互式仓库看板` | 默认使用 RichUI。 |
| `请用 artifacts 形式生成` | 改用 artifacts而不是 RichUI。 |
| `如果做成页面更清楚,就帮我做成页面` | AI 会自己判断页面是否更合适。 |
## ✨ 核心能力 (Key Capabilities)
- **🔑 统一智能体验 (官方 + BYOK)**: 自由切换官方模型与自定义服务商OpenAI, Anthropic, DeepSeek, xAI支持 **BYOK (自带 Key)** 模式。
@@ -82,6 +138,25 @@
> “请安装此技能:<https://github.com/nicobailon/visual-explainer”。>
> 该技能专为生成高质量可视化组件而设计,能够与本 Pipe 完美协作。
### 🎛️ RichUI 在日常使用里怎么理解
对普通用户来说,规则很简单:
1. 直接说出你想要的结果。
2. AI 会自己判断普通聊天回复是否已经足够。
3. 如果做成页面、看板或可视化会更清楚AI 会自动生成并直接显示在聊天里。
你**不需要**自己写 XML 标签、HTML 片段或 RichUI 属性。
例如:
- `请解释这个仓库的结构。`
- `如果用交互式架构页更清楚,就做成页面。`
- `把这个 CSV 做成一个简单看板。`
> [!TIP]
> 只有当你明确想要 **artifacts 风格** 时,才需要特别说明。其他情况下,直接让 AI 自动选择最合适的展示方式即可。
---
## 🧩 配套 Files Filter原始文件必备
@@ -89,7 +164,7 @@
`GitHub Copilot SDK Files Filter` 是本 Pipe 的配套插件,用于阻止 OpenWebUI 默认 RAG 在 Pipe 接手前抢先处理上传文件。
- **作用**: 将上传文件移动到 `copilot_files`,让 Pipe 能直接读取原始二进制。
- **必要性**: 若未安装,文件可能被提前解析/向量化Agent 到原始文件。
- **必要性**: 若未安装,文件可能被提前解析/向量化Agent 可能拿不到原始文件。
- **v0.1.3 重点**:
- 修复 BYOK 模型 ID 识别(支持 `github_copilot_official_sdk_pipe.xxx` 前缀匹配)。
- 新增双通道调试日志(`show_debug_log`):后端 logger + 浏览器控制台。
@@ -174,6 +249,28 @@
---
## 📤 HTML 结果展示方式(进阶)
如果你没有直接使用 `publish_file_from_workspace(...)`,这一节可以跳过。
先用一句人话解释:
- `richui` = 生成的 HTML 直接显示在聊天里
- `artifacts` = 你明确想要 artifacts 风格时使用的另一种 HTML 交付方式
在内部实现上,这个行为由 `publish_file_from_workspace(..., embed_type=...)` 控制。
- **RichUI 模式(`richui`HTML 默认)**Agent 只返回 `[Preview]` + `[Download]`,聊天结束后由 OpenWebUI 自动渲染交互预览。
- **Artifacts 模式(`artifacts`**:只有在你明确想要 artifacts 风格展示时再使用。
- **PDF 安全规则**PDF 只返回 Markdown 链接,不要用 iframe / HTML block 嵌入。
- **双通道发布**:同时兼顾对话内查看与持久下载。
- **状态提示**:发布过程会同步显示在 OpenWebUI 状态栏。
> [!TIP]
> 如果你只是日常使用这个 Pipe通常不需要手动提 `embed_type`。直接说“生成一个交互式报告 / 看板”即可;只有你明确想要 artifacts 风格时再特别说明。如果你并没有直接调用 `publish_file_from_workspace(...)`,那通常可以忽略这个参数。
---
## 🤝 支持 (Support)
如果这个插件对你有帮助,欢迎到 [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) 点个 Star这将是我持续改进的动力感谢支持。

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
[![](https://img.shields.io/badge/OpenWebUI%20Community-Get%20Plugin-blue?style=for-the-badge)](https://openwebui.com/posts/ce96f7b4-12fc-4ac3-9a01-875713e69359)
## Overview
This release brings significant performance optimizations and stability enhancements. We fixed a critical bug in the client management logic, eliminating the 1-2s process startup latency between turns and significantly improving Time to First Token (TTFT). Additionally, the plugin now supports a pure BYOK mode and features improved environment isolation for concurrent user requests.
[**View Plugin Source & Documentation**](https://github.com/Fu-Jie/openwebui-extensions/tree/main/plugins/pipes/github-copilot-sdk)
## New Features
- **🔑 Pure BYOK Mode**: Allows the plugin to operate without a `GH_TOKEN` by using custom API keys (OpenAI/Anthropic) via BYOK Valves.
- **🩺 Smart Stall Detection**: Integrated `client.ping()` into the timeout logic. The system now "pokes" the underlying process before aborting, preventing the termination of slow but healthy long-running tasks.
- **🧹 Smart TODO Visibility**: The TODO List widget is now automatically hidden in subsequent chats once all tasks are marked as completed, keeping the UI clean.
## Bug Fixes
- **🚀 Major Performance Optimization**: Fixed a regression where the shared singleton client pool was incorrectly terminated after each response. Restored 1-2s startup speed for all follow-up messages.
- **🛡️ Cross-user Isolation**: Redesigned environment variable injection to prevent token pollution during concurrent requests from different users.
- **📏 RichUI Height Stability**: Fixed the infamous infinite vertical growth bug in embedded HTML components by refining the height measurement and breaking the ResizeObserver feedback loop.
## Migration Notes
- If you previously relied on `GH_TOKEN` for standard Copilot models but want to switch to a pure BYOK setup, you can now safely clear the `GH_TOKEN` Valve and only configure `BYOK_BASE_URL` and `BYOK_API_KEY`.

View File

@@ -0,0 +1,23 @@
[![](https://img.shields.io/badge/OpenWebUI%20%E7%A4%BE%E5%8C%BA-%E8%8E%B7%E5%8F%96%E6%8F%92%E4%BB%B6-blue?style=for-the-badge)](https://openwebui.com/posts/ce96f7b4-12fc-4ac3-9a01-875713e69359)
## Overview
本次更新带来了重大的性能优化与稳定性提升。我们修复了客户端管理逻辑中的关键 Bug消除了多轮对话中由于进程频繁重启导致的 1-2 秒冷启动延迟显著优化了首字响应速度TTFT。此外插件现在支持纯 BYOK 运行模式,并针对多用户并发请求强化了环境隔离机制。
[**查看插件源码与文档**](https://github.com/Fu-Jie/openwebui-extensions/tree/main/plugins/pipes/github-copilot-sdk)
## 新功能
- **🔑 纯 BYOK 模式支持**:解除对 `GH_TOKEN` 的强制依赖。现在您可以仅通过配置 BYOK 选项(如 OpenAI/Anthropic 密钥)来完整运行插件。
- **🩺 智能防挂死探测**:在超时逻辑中集成了 `client.ping()`。系统会在强行中断前先探测底层进程存活状态,有效避免误杀正在处理复杂长任务的健康进程。
- **🧹 智能 TODO 显隐**:优化了 TODO List 小组件显示策略。当所有子任务标记为完成后,下一次聊天将自动隐藏该组件,保持界面清爽。
## 问题修复
- **🚀 核心性能修复**:修复了一个导致共享单例客户端池在每次响应后被误停止的 Bug。恢复了后续对话中 1-2 秒的极速启动能力。
- **🛡️ 增强并发安全性**:重构了环境变量注入逻辑,实现了严格的用户级环境隔离,彻底杜绝了高并发场景下多用户 Token 互相污染的风险。
- **📏 RichUI 稳定性增强**:通过改进高度测量算法并打破 ResizeObserver 递归反馈链,彻底解决了嵌入式 HTML 组件高度无限增长的问题。
## 迁移指南
- 如果您之前为了兼容性同时配置了 `GH_TOKEN` 和 BYOK现在您可以安全地移除 `GH_TOKEN`,仅保留 BYOK 相关配置。