feat: 编程助手按聊天模型过滤并补充 MCP 工具 thinking 事件,README 补充 copilot/uniapp 仓库

- CodingController.models 按 category=chat 过滤,编程对话只展示聊天模型
- 各 MCP 文件/命令工具在执行前推送 thinking 提示事件
- README/README_EN 项目源码表新增 ruoyi-copilot、ruoyi-uniapp 三端链接

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ageerle@163.com
2026-07-17 14:47:18 +08:00
parent fece90b307
commit 5d834d924a
9 changed files with 15 additions and 2 deletions

View File

@@ -46,6 +46,8 @@
| 🎨 用户前端 | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
| 🛠️ 管理后台 | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
| 🎬 短剧平台 | [ruoyi-drama](https://github.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitee.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitcode.com/ageerle/ruoyi-drama) |
| 🤖 编程助手 | [ruoyi-copilot](https://github.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitee.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitcode.com/ageerle/ruoyi-copilot) |
| 📱 小程序端 | [ruoyi-uniapp](https://github.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitee.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitcode.com/ageerle/ruoyi-uniapp) |
### 合作项目
| 项目名称 | GitHub 仓库 | Gitee 仓库

View File

@@ -48,6 +48,8 @@
| 🎨 User Frontend | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
| 🛠️ Admin Panel | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
| 🎬 Drama | [ruoyi-drama](https://github.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitee.com/ageerle/ruoyi-drama) | |
| 🤖 Copilot | [ruoyi-copilot](https://github.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitee.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitcode.com/ageerle/ruoyi-copilot) |
| 📱 Mini-App | [ruoyi-uniapp](https://github.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitee.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitcode.com/ageerle/ruoyi-uniapp) |
### Partner Projects
| Project Name | GitHub Repository | Gitee Repository |

View File

@@ -7,6 +7,7 @@ import org.ruoyi.common.core.domain.R;
import org.ruoyi.common.chat.domain.bo.chat.ChatModelBo;
import org.ruoyi.common.chat.service.chat.IChatModelService;
import org.ruoyi.domain.bo.coding.CodingRequestBo;
import org.ruoyi.enums.ModelType;
import org.ruoyi.service.coding.CodingWorkspaceService;
import org.ruoyi.service.coding.ICodingService;
import org.springframework.http.MediaType;
@@ -62,8 +63,10 @@ public class CodingController {
@GetMapping("/models")
public R<List<ModelOption>> models() {
List<ModelOption> models = chatModelService.queryList(new ChatModelBo()).stream()
.filter(model -> "1".equals(model.getModelShow()))
// 编程对话只能用聊天模型,按 category=chat 过滤
ChatModelBo bo = new ChatModelBo();
bo.setCategory(ModelType.CHAT.getKey());
List<ModelOption> models = chatModelService.queryList(bo).stream()
.map(model -> new ModelOption(model.getId(), model.getModelName(), model.getProviderCode()))
.toList();
return R.ok(models);

View File

@@ -77,6 +77,7 @@ public class DeleteFileTool implements BuiltinToolProvider {
}
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在删除:" + filePath));
channel.send(CodingSseEvent.of("delete-start", filePath, null, null, "running"));
}

View File

@@ -87,6 +87,7 @@ public class EditFileTool implements BuiltinToolProvider {
// 推送编辑开始事件
String relativePath = getRelativePath(path);
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在编辑文件:" + filePath));
channel.send(CodingSseEvent.of("edit-start", filePath, null, null, "running"));
}

View File

@@ -113,6 +113,7 @@ public class ExecuteCommandTool implements BuiltinToolProvider {
cmdList.set(0, resolvedCmd);
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在执行命令:" + command));
channel.send(CodingSseEvent.of("cmd", null, command, null, "running"));
}

View File

@@ -90,6 +90,7 @@ public class ListDirectoryTool implements BuiltinToolProvider {
// 推送列目录开始事件
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在扫描目录结构:" + getRelativePath(dirPath)));
channel.send(CodingSseEvent.of("list-progress", null, null,
"扫描 " + getRelativePath(dirPath), "running"));
}

View File

@@ -86,6 +86,7 @@ public class ReadFileTool implements BuiltinToolProvider {
// 推送读取开始事件(前端展示为正在读取)
String relativePath = getRelativePath(path);
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在读取文件:" + filePath));
channel.send(CodingSseEvent.of("edit-start", filePath, null, null, "running"));
}

View File

@@ -75,6 +75,7 @@ public class WriteFileTool implements BuiltinToolProvider {
}
if (channel != null) {
channel.send(CodingSseEvent.thinking("正在新建/写入文件:" + filePath));
channel.send(CodingSseEvent.of("add-start", filePath, null, null, "running"));
}