mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-23 21:08:09 +00:00
* feat: mcp能力调整为 streamhttp的独立服务 不再依赖gva本体 * feat: 增加MCP启动能力,增加AI工作流需求整理能力。 * feat: 增加需求梳理能力 * feat: 清理无用日志 * feat: 移除无用的Dify Chatflow文本和代码生成器按钮
49 lines
1.5 KiB
Go
49 lines
1.5 KiB
Go
package mcpTool
|
|
|
|
import (
|
|
"context"
|
|
|
|
commonReq "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
|
model "github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
|
systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
|
)
|
|
|
|
func fetchAutoCodePackages(ctx context.Context) ([]model.SysAutoCodePackage, error) {
|
|
resp, err := postUpstream[map[string][]model.SysAutoCodePackage](ctx, "/autoCode/getPackage", map[string]any{})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return resp.Data["pkgs"], nil
|
|
}
|
|
|
|
func fetchAutoCodeHistories(ctx context.Context) ([]model.SysAutoCodeHistory, error) {
|
|
resp, err := postUpstream[pageResultData[[]model.SysAutoCodeHistory]](ctx, "/autoCode/getSysHistory", commonReq.PageInfo{
|
|
Page: 1,
|
|
PageSize: 10000,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return resp.Data.List, nil
|
|
}
|
|
|
|
func createAutoCodePackage(ctx context.Context, info *systemReq.SysAutoCodePackageCreate) error {
|
|
_, err := postUpstream[map[string]any](ctx, "/autoCode/createPackage", info)
|
|
return err
|
|
}
|
|
|
|
func createAutoCodeModule(ctx context.Context, info systemReq.AutoCode) error {
|
|
_, err := postUpstream[map[string]any](ctx, "/autoCode/createTemp", info)
|
|
return err
|
|
}
|
|
|
|
func deleteAutoCodePackage(ctx context.Context, id uint) error {
|
|
_, err := postUpstream[map[string]any](ctx, "/autoCode/delPackage", commonReq.GetById{ID: int(id)})
|
|
return err
|
|
}
|
|
|
|
func deleteAutoCodeHistory(ctx context.Context, id uint) error {
|
|
_, err := postUpstream[map[string]any](ctx, "/autoCode/delSysHistory", commonReq.GetById{ID: int(id)})
|
|
return err
|
|
}
|