From 751e25589475fc16c90752594f543767a9da2599 Mon Sep 17 00:00:00 2001 From: fujie Date: Tue, 24 Mar 2026 03:40:33 +0800 Subject: [PATCH] feat(copilot-sdk): v0.12.1 - disable terminal tools for AI, improve RichUI theme --- plugins/pipes/github-copilot-sdk/README.md | 2 +- plugins/pipes/github-copilot-sdk/README_CN.md | 2 +- .../github-copilot-sdk/github_copilot_sdk.py | 82 +++++++++++++++++-- plugins/pipes/github-copilot-sdk/v0.12.1.md | 23 ++++++ .../pipes/github-copilot-sdk/v0.12.1_CN.md | 23 ++++++ 5 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 plugins/pipes/github-copilot-sdk/v0.12.1.md create mode 100644 plugins/pipes/github-copilot-sdk/v0.12.1_CN.md diff --git a/plugins/pipes/github-copilot-sdk/README.md b/plugins/pipes/github-copilot-sdk/README.md index cbc6895..a41814d 100644 --- a/plugins/pipes/github-copilot-sdk/README.md +++ b/plugins/pipes/github-copilot-sdk/README.md @@ -1,6 +1,6 @@ # GitHub Copilot SDK Pipe for OpenWebUI -| By [Fu-Jie](https://github.com/Fu-Jie) · v0.12.0 | [⭐ Star this repo](https://github.com/Fu-Jie/openwebui-extensions) | +| By [Fu-Jie](https://github.com/Fu-Jie) · v0.12.1 | [⭐ 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) | diff --git a/plugins/pipes/github-copilot-sdk/README_CN.md b/plugins/pipes/github-copilot-sdk/README_CN.md index adf7436..65694fb 100644 --- a/plugins/pipes/github-copilot-sdk/README_CN.md +++ b/plugins/pipes/github-copilot-sdk/README_CN.md @@ -1,6 +1,6 @@ # GitHub Copilot Official SDK Pipe -| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.12.0 | [⭐ 点个 Star 支持项目](https://github.com/Fu-Jie/openwebui-extensions) | +| 作者:[Fu-Jie](https://github.com/Fu-Jie) · v0.12.1 | [⭐ 点个 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) | diff --git a/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py b/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py index a14cb7e..344b825 100644 --- a/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py +++ b/plugins/pipes/github-copilot-sdk/github_copilot_sdk.py @@ -78,10 +78,74 @@ RICHUI_BRIDGE_STYLE = """ \n" ) @@ -5108,6 +5172,10 @@ class Pipe: __event_call__, ) continue + tool_type = t_dict.get("type", "") + tool_id = t_dict.get("tool_id", "") + if tool_type == "terminal" or str(tool_id).startswith("terminal:"): + continue try: copilot_tool = self._convert_openwebui_tool_to_sdk( tool_name, @@ -9608,7 +9676,7 @@ class Pipe: break now_ts = time.monotonic() - no_progress_timeout = min(float(self.valves.TIMEOUT), 90.0) + no_progress_timeout = float(self.valves.TIMEOUT) time_since_last_event = now_ts - state.get( "last_event_ts", stream_start_ts ) diff --git a/plugins/pipes/github-copilot-sdk/v0.12.1.md b/plugins/pipes/github-copilot-sdk/v0.12.1.md new file mode 100644 index 0000000..781a7dc --- /dev/null +++ b/plugins/pipes/github-copilot-sdk/v0.12.1.md @@ -0,0 +1,23 @@ +# v0.12.1 Release Notes + +This update (`v0.12.1`) disables terminal server tools from being exposed to AI while keeping terminal functionality available to users, and improves RichUI theme compatibility. + +## 📊 New Features + +### 1. Disable Terminal Tools for AI +Terminal server tools (e.g., `run_command`) are now filtered out at the pipe level, preventing AI from calling terminal tools while preserving terminal functionality for users through the OpenWebUI interface. + +### 2. RichUI Theme-Aware CSS Variables +Added CSS custom properties (`--richui-text`, `--richui-bg`, etc.) that automatically adapt to light/dark themes, improving text contrast and readability in AI-generated HTML content. + +--- + +## 🛠️ Improvements + +1. **Fallback Actions Styling**: Updated fallback action buttons to use theme-aware CSS variables for consistent appearance across themes. +2. **Default Timeout**: Increased default stream timeout from 300s to 3600s for better handling of long-running tasks. + +--- + +## 📖 Docs Update +* Version synchronization pushed up to `v0.12.1`. diff --git a/plugins/pipes/github-copilot-sdk/v0.12.1_CN.md b/plugins/pipes/github-copilot-sdk/v0.12.1_CN.md new file mode 100644 index 0000000..fb2ced9 --- /dev/null +++ b/plugins/pipes/github-copilot-sdk/v0.12.1_CN.md @@ -0,0 +1,23 @@ +# v0.12.1 发布说明 + +本次更新 (`v0.12.1`) 在管道层面禁用了终端服务器工具的 AI 调用,同时保留用户通过界面使用终端的功能,并改进了 RichUI 主题兼容性。 + +## 📊 新功能 + +### 1. 禁用终端工具的 AI 调用 +终端服务器工具(如 `run_command`)现在已在管道层面被过滤,AI 无法调用这些工具,但用户仍可通过 OpenWebUI 界面使用终端功能。 + +### 2. RichUI 主题感知 CSS 变量 +新增 CSS 自定义属性(`--richui-text`、`--richui-bg` 等),自动适配浅色/深色主题,改善 AI 生成 HTML 内容的文字对比度和可读性。 + +--- + +## 🛠️ 改进 + +1. **Fallback Actions 样式优化**:更新 fallback action 按钮使用主题感知 CSS 变量,确保跨主题一致性。 +2. **默认超时时间**:将默认流超时从 300 秒增加到 3600 秒,更好地处理长时间运行的任务。 + +--- + +## 📖 文档更新 +* 版本同步更新至 `v0.12.1`。