LLM 请求透明化

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-06 11:03:07 +08:00
parent fb2b4fad9f
commit 883faa2d54
12 changed files with 144 additions and 0 deletions
+4
View File
@@ -7,6 +7,9 @@ export default tool({
description:
"通过本地 Agent 桥接调用 TJWater 后端 API。需提供 API 路径、可选的请求方法以及查询参数。",
args: {
reason: tool.schema
.string()
.describe("Why this tool call is required for the current user request."),
path: tool.schema.string().describe("Target backend API path, starting with '/'."),
method: tool.schema
.string()
@@ -27,6 +30,7 @@ export default tool({
},
body: JSON.stringify({
sessionId: context.sessionID,
reason: args.reason,
path: args.path,
method: args.method,
arguments: args.arguments,
+3
View File
@@ -3,6 +3,9 @@ import { tool } from "@opencode-ai/plugin";
export default tool({
description: "在前端地图上定位并高亮指定的管网要素。",
args: {
reason: tool.schema
.string()
.describe("Why this map positioning action is needed for the user request."),
ids: tool.schema.array(tool.schema.string()).describe("Feature ids to locate."),
feature_type: tool.schema
.enum(["junction", "pipe", "valve", "reservoir", "pump", "tank"])
+3
View File
@@ -3,6 +3,9 @@ import { tool } from "@opencode-ai/plugin";
export default tool({
description: "在前端对话界面中渲染图表。",
args: {
reason: tool.schema
.string()
.describe("Why this chart should be rendered for the user request."),
title: tool.schema.string().optional().describe("Chart title."),
chart_type: tool.schema
.enum(["line", "bar", "pie"])
+3
View File
@@ -3,6 +3,9 @@ import { tool } from "@opencode-ai/plugin";
export default tool({
description: "为选定的管网要素打开前端的历史记录或计算结果面板。",
args: {
reason: tool.schema
.string()
.describe("Why this history panel should be opened for the current task."),
feature_infos: tool.schema
.array(tool.schema.tuple([tool.schema.string(), tool.schema.string()]))
.describe("List of [id, type] pairs."),
+3
View File
@@ -3,6 +3,9 @@ import { tool } from "@opencode-ai/plugin";
export default tool({
description: "打开前端的 SCADA 监测数据历史面板。",
args: {
reason: tool.schema
.string()
.describe("Why SCADA panel interaction is required for this request."),
device_ids: tool.schema
.array(tool.schema.string())
.optional()