diff --git a/agent/app/api/v2/agents.go b/agent/app/api/v2/agents.go index 854a4b183663..29160903f17b 100644 --- a/agent/app/api/v2/agents.go +++ b/agent/app/api/v2/agents.go @@ -189,3 +189,64 @@ func (b *BaseApi) DeleteAgentAccount(c *gin.Context) { } helper.Success(c) } + +// @Tags AI +// @Summary Get Agent Feishu channel config +// @Accept json +// @Param request body dto.AgentFeishuConfigReq true "request" +// @Success 200 {object} dto.AgentFeishuConfig +// @Security ApiKeyAuth +// @Security Timestamp +// @Router /ai/agents/channel/feishu/get [post] +func (b *BaseApi) GetAgentFeishuConfig(c *gin.Context) { + var req dto.AgentFeishuConfigReq + if err := helper.CheckBindAndValidate(&req, c); err != nil { + return + } + data, err := agentService.GetFeishuConfig(req) + if err != nil { + helper.BadRequest(c, err) + return + } + helper.SuccessWithData(c, data) +} + +// @Tags AI +// @Summary Update Agent Feishu channel config +// @Accept json +// @Param request body dto.AgentFeishuConfigUpdateReq true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Security Timestamp +// @Router /ai/agents/channel/feishu/update [post] +func (b *BaseApi) UpdateAgentFeishuConfig(c *gin.Context) { + var req dto.AgentFeishuConfigUpdateReq + if err := helper.CheckBindAndValidate(&req, c); err != nil { + return + } + if err := agentService.UpdateFeishuConfig(req); err != nil { + helper.BadRequest(c, err) + return + } + helper.Success(c) +} + +// @Tags AI +// @Summary Approve Agent Feishu pairing code +// @Accept json +// @Param request body dto.AgentFeishuPairingApproveReq true "request" +// @Success 200 +// @Security ApiKeyAuth +// @Security Timestamp +// @Router /ai/agents/channel/feishu/approve [post] +func (b *BaseApi) ApproveAgentFeishuPairing(c *gin.Context) { + var req dto.AgentFeishuPairingApproveReq + if err := helper.CheckBindAndValidate(&req, c); err != nil { + return + } + if err := agentService.ApproveFeishuPairing(req); err != nil { + helper.BadRequest(c, err) + return + } + helper.Success(c) +} diff --git a/agent/app/dto/agents.go b/agent/app/dto/agents.go index 3ea7a15f62dd..9734f50560c8 100644 --- a/agent/app/dto/agents.go +++ b/agent/app/dto/agents.go @@ -44,6 +44,7 @@ type AgentItem struct { BridgePort int `json:"bridgePort"` Path string `json:"path"` ConfigPath string `json:"configPath"` + Upgradable bool `json:"upgradable"` CreatedAt time.Time `json:"createdAt"` } @@ -108,3 +109,29 @@ type ProviderInfo struct { BaseURL string `json:"baseUrl"` Models []ProviderModelInfo `json:"models"` } + +type AgentFeishuConfigReq struct { + AgentID uint `json:"agentId" validate:"required"` +} + +type AgentFeishuConfigUpdateReq struct { + AgentID uint `json:"agentId" validate:"required"` + BotName string `json:"botName" validate:"required"` + AppID string `json:"appId" validate:"required"` + AppSecret string `json:"appSecret" validate:"required"` + Enabled bool `json:"enabled"` + DmPolicy string `json:"dmPolicy" validate:"required"` +} + +type AgentFeishuPairingApproveReq struct { + AgentID uint `json:"agentId" validate:"required"` + PairingCode string `json:"pairingCode" validate:"required"` +} + +type AgentFeishuConfig struct { + Enabled bool `json:"enabled"` + DmPolicy string `json:"dmPolicy"` + BotName string `json:"botName"` + AppID string `json:"appId"` + AppSecret string `json:"appSecret"` +} diff --git a/agent/app/service/agents.go b/agent/app/service/agents.go index dac101349ff7..02fe416fc289 100644 --- a/agent/app/service/agents.go +++ b/agent/app/service/agents.go @@ -20,6 +20,8 @@ import ( "github.com/1Panel-dev/1Panel/agent/buserr" "github.com/1Panel-dev/1Panel/agent/constant" "github.com/1Panel-dev/1Panel/agent/global" + "github.com/1Panel-dev/1Panel/agent/utils/cmd" + "github.com/1Panel-dev/1Panel/agent/utils/common" "github.com/1Panel-dev/1Panel/agent/utils/files" ) @@ -35,6 +37,9 @@ type IAgentService interface { PageAccounts(req dto.AgentAccountSearch) (int64, []dto.AgentAccountInfo, error) VerifyAccount(req dto.AgentAccountVerifyReq) error DeleteAccount(req dto.AgentAccountDeleteReq) error + GetFeishuConfig(req dto.AgentFeishuConfigReq) (*dto.AgentFeishuConfig, error) + UpdateFeishuConfig(req dto.AgentFeishuConfigUpdateReq) error + ApproveFeishuPairing(req dto.AgentFeishuPairingApproveReq) error } func NewIAgentService() IAgentService { @@ -172,7 +177,9 @@ func (a AgentService) Page(req dto.SearchWithPage) (int64, []dto.AgentItem, erro for _, item := range list { appInstall, _ := appInstallRepo.GetFirst(repo.WithByID(item.AppInstallID)) envMap := readInstallEnv(appInstall.Env) - items = append(items, buildAgentItem(&item, &appInstall, envMap)) + agentItem := buildAgentItem(&item, &appInstall, envMap) + agentItem.Upgradable = checkAgentUpgradable(appInstall) + items = append(items, agentItem) } return count, items, nil } @@ -349,6 +356,156 @@ func (a AgentService) DeleteAccount(req dto.AgentAccountDeleteReq) error { return agentAccountRepo.DeleteByID(req.ID) } +func (a AgentService) GetFeishuConfig(req dto.AgentFeishuConfigReq) (*dto.AgentFeishuConfig, error) { + agent, install, err := a.loadAgentAndInstall(req.AgentID) + if err != nil { + return nil, err + } + _ = install + conf, err := readOpenclawConfig(agent.ConfigPath) + if err != nil { + return nil, err + } + result := extractFeishuConfig(conf) + return &result, nil +} + +func (a AgentService) UpdateFeishuConfig(req dto.AgentFeishuConfigUpdateReq) error { + agent, _, err := a.loadAgentAndInstall(req.AgentID) + if err != nil { + return err + } + conf, err := readOpenclawConfig(agent.ConfigPath) + if err != nil { + return err + } + if req.DmPolicy == "" { + req.DmPolicy = "pairing" + } + setFeishuConfig(conf, dto.AgentFeishuConfig{ + Enabled: req.Enabled, + DmPolicy: req.DmPolicy, + BotName: req.BotName, + AppID: req.AppID, + AppSecret: req.AppSecret, + }) + if err := writeOpenclawConfigRaw(agent.ConfigPath, conf); err != nil { + return err + } + return nil +} + +func (a AgentService) ApproveFeishuPairing(req dto.AgentFeishuPairingApproveReq) error { + _, install, err := a.loadAgentAndInstall(req.AgentID) + if err != nil { + return err + } + if err := cmd.RunDefaultBashCf( + "docker exec %s openclaw pairing approve feishu %q", + install.ContainerName, + strings.TrimSpace(req.PairingCode), + ); err != nil { + return err + } + return nil +} + +func (a AgentService) loadAgentAndInstall(agentID uint) (*model.Agent, *model.AppInstall, error) { + agent, err := agentRepo.GetFirst(repo.WithByID(agentID)) + if err != nil { + return nil, nil, err + } + if agent.AppInstallID == 0 { + return nil, nil, buserr.New("ErrRecordNotFound") + } + install, err := appInstallRepo.GetFirst(repo.WithByID(agent.AppInstallID)) + if err != nil { + return nil, nil, err + } + return agent, &install, nil +} + +func readOpenclawConfig(configPath string) (map[string]interface{}, error) { + if strings.TrimSpace(configPath) == "" { + return nil, buserr.New("ErrRecordNotFound") + } + fileOp := files.NewFileOp() + content, err := fileOp.GetContent(configPath) + if err != nil { + return nil, err + } + conf := map[string]interface{}{} + if err := json.Unmarshal(content, &conf); err != nil { + return nil, err + } + return conf, nil +} + +func writeOpenclawConfigRaw(configPath string, conf map[string]interface{}) error { + payload, err := json.MarshalIndent(conf, "", " ") + if err != nil { + return err + } + fileOp := files.NewFileOp() + return fileOp.SaveFile(configPath, string(payload), 0600) +} + +func extractFeishuConfig(conf map[string]interface{}) dto.AgentFeishuConfig { + result := dto.AgentFeishuConfig{Enabled: true, DmPolicy: "pairing"} + channels, ok := conf["channels"].(map[string]interface{}) + if !ok { + return result + } + feishu, ok := channels["feishu"].(map[string]interface{}) + if !ok { + return result + } + if enabled, ok := feishu["enabled"].(bool); ok { + result.Enabled = enabled + } + if dmPolicy, ok := feishu["dmPolicy"].(string); ok && strings.TrimSpace(dmPolicy) != "" { + result.DmPolicy = dmPolicy + } + accounts, ok := feishu["accounts"].(map[string]interface{}) + if !ok { + return result + } + main, ok := accounts["main"].(map[string]interface{}) + if !ok { + return result + } + if appID, ok := main["appId"].(string); ok { + result.AppID = appID + } + if appSecret, ok := main["appSecret"].(string); ok { + result.AppSecret = appSecret + } + if botName, ok := main["botName"].(string); ok { + result.BotName = botName + } + return result +} + +func setFeishuConfig(conf map[string]interface{}, config dto.AgentFeishuConfig) { + channels, ok := conf["channels"].(map[string]interface{}) + if !ok { + channels = map[string]interface{}{} + conf["channels"] = channels + } + feishu := map[string]interface{}{ + "enabled": config.Enabled, + "dmPolicy": config.DmPolicy, + "accounts": map[string]interface{}{ + "main": map[string]interface{}{ + "appId": config.AppID, + "appSecret": config.AppSecret, + "botName": config.BotName, + }, + }, + } + channels["feishu"] = feishu +} + func (a AgentService) syncAgentsByAccount(account *model.AgentAccount) error { agents, err := agentRepo.List(repo.WithByAccountID(account.ID)) if err != nil { @@ -436,6 +593,39 @@ func buildAgentItem(agent *model.Agent, appInstall *model.AppInstall, envMap map return item } +func checkAgentUpgradable(install model.AppInstall) bool { + if install.ID == 0 || install.Version == "" || install.Version == "latest" { + return false + } + if install.App.ID == 0 { + return false + } + details, err := appDetailRepo.GetBy(appDetailRepo.WithAppId(install.App.ID)) + if err != nil || len(details) == 0 { + return false + } + versions := make([]string, 0, len(details)) + for _, item := range details { + ignores, _ := appIgnoreUpgradeRepo.List(runtimeRepo.WithDetailId(item.ID), appIgnoreUpgradeRepo.WithScope("version")) + if len(ignores) > 0 { + continue + } + if common.IsCrossVersion(install.Version, item.Version) && !install.App.CrossVersionUpdate { + continue + } + versions = append(versions, item.Version) + } + if len(versions) == 0 { + return false + } + versions = common.GetSortedVersions(versions) + lastVersion := versions[0] + if common.IsCrossVersion(install.Version, lastVersion) { + return install.App.CrossVersionUpdate + } + return common.CompareVersion(lastVersion, install.Version) +} + func (a AgentService) waitAndDeleteAgent(agentID uint, appInstallID uint) { if appInstallID == 0 { _ = agentRepo.DeleteByID(agentID) diff --git a/agent/router/ro_ai.go b/agent/router/ro_ai.go index 0f5649b735ff..affc89093f30 100644 --- a/agent/router/ro_ai.go +++ b/agent/router/ro_ai.go @@ -49,5 +49,8 @@ func (a *AIToolsRouter) InitRouter(Router *gin.RouterGroup) { aiToolsRouter.POST("/agents/accounts/search", baseApi.PageAgentAccounts) aiToolsRouter.POST("/agents/accounts/verify", baseApi.VerifyAgentAccount) aiToolsRouter.POST("/agents/accounts/delete", baseApi.DeleteAgentAccount) + aiToolsRouter.POST("/agents/channel/feishu/get", baseApi.GetAgentFeishuConfig) + aiToolsRouter.POST("/agents/channel/feishu/update", baseApi.UpdateAgentFeishuConfig) + aiToolsRouter.POST("/agents/channel/feishu/approve", baseApi.ApproveAgentFeishuPairing) } } diff --git a/frontend/src/api/interface/ai.ts b/frontend/src/api/interface/ai.ts index 9fe265d41ff9..4d5a063ba460 100644 --- a/frontend/src/api/interface/ai.ts +++ b/frontend/src/api/interface/ai.ts @@ -278,6 +278,7 @@ export namespace AI { bridgePort: number; path: string; configPath: string; + upgradable: boolean; createdAt: string; } @@ -343,4 +344,30 @@ export namespace AI { export interface AgentAccountDeleteReq { id: number; } + + export interface AgentFeishuConfigReq { + agentId: number; + } + + export interface AgentFeishuConfig { + enabled: boolean; + dmPolicy: string; + botName: string; + appId: string; + appSecret: string; + } + + export interface AgentFeishuConfigUpdateReq { + agentId: number; + enabled: boolean; + dmPolicy: string; + botName: string; + appId: string; + appSecret: string; + } + + export interface AgentFeishuPairingApproveReq { + agentId: number; + pairingCode: string; + } } diff --git a/frontend/src/api/modules/ai.ts b/frontend/src/api/modules/ai.ts index afb2f1014ba4..7c9e63be358c 100644 --- a/frontend/src/api/modules/ai.ts +++ b/frontend/src/api/modules/ai.ts @@ -127,3 +127,15 @@ export const verifyAgentAccount = (req: AI.AgentAccountVerifyReq) => { export const deleteAgentAccount = (req: AI.AgentAccountDeleteReq) => { return http.post(`/ai/agents/accounts/delete`, req); }; + +export const getAgentFeishuConfig = (req: AI.AgentFeishuConfigReq) => { + return http.post(`/ai/agents/channel/feishu/get`, req); +}; + +export const updateAgentFeishuConfig = (req: AI.AgentFeishuConfigUpdateReq) => { + return http.post(`/ai/agents/channel/feishu/update`, req); +}; + +export const approveAgentFeishuPairing = (req: AI.AgentFeishuPairingApproveReq) => { + return http.post(`/ai/agents/channel/feishu/approve`, req); +}; diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 933e035fe111..5699814b9982 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -695,6 +695,21 @@ const message = { token: 'Token', manualModel: 'Manual input', verified: 'Verified', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Models', diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index 977739fcde03..1bb00e412c82 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -691,6 +691,21 @@ const message = { token: 'Token', manualModel: 'Entrada manual de modelo', verified: 'Verificado', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Modelo', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index d41140a0d313..fdc81a2144fd 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -680,6 +680,21 @@ const message = { token: 'トークン', manualModel: '手動入力', verified: '検証済み', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'モデル', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 2909dfb909b0..8ab98ecf2a69 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -677,6 +677,21 @@ const message = { token: '토큰', manualModel: '수동 입력', verified: '검증됨', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: '모델', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 9f82ae234d44..ce1e2ecc782a 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -692,6 +692,21 @@ const message = { token: 'Token', manualModel: 'Input manual', verified: 'Disahkan', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Model', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 1597f76dbc00..28ca1acf1b77 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -689,6 +689,21 @@ const message = { token: 'Token', manualModel: 'Entrada manual', verified: 'Verificado', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Modelo', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index b324263be4eb..918d06ccd4ae 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -685,6 +685,21 @@ const message = { token: 'Токен', manualModel: 'Ручной ввод', verified: 'Проверено', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Модель', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 3ffb1807ee94..be827ac4ec3e 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -699,6 +699,21 @@ const message = { token: 'Token', manualModel: 'Manuel giriş', verified: 'Doğrulandı', + configTitle: 'Configuration', + channelsTab: 'Channels', + feishu: 'Feishu', + dmPolicy: 'DM Policy', + botName: 'Bot Name', + appId: 'App ID', + appSecret: 'App Secret', + saveAndRestartGateway: 'Save and restart gateway', + pairingCode: 'Pairing Code', + pairingCodePlaceholder: 'Enter pairing code', + approvePairing: 'Approve Pairing', + feishuRequired: 'Please fill botName / appId / appSecret', + feishuSaveSuccess: 'Saved successfully', + pairingCodeRequired: 'Please enter pairing code', + pairingApproveSuccess: 'Pairing approved successfully', }, model: { model: 'Model', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index cf6e27b28b26..4baecd9f4ca1 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -667,6 +667,21 @@ const message = { token: 'Token', manualModel: '手動輸入模型', verified: '驗證狀態', + configTitle: '配置', + channelsTab: '聊天渠道', + feishu: '飛書', + dmPolicy: '私聊策略', + botName: '機器人名稱', + appId: '應用 App ID', + appSecret: '應用 App Secret', + saveAndRestartGateway: '保存並重啟網關', + pairingCode: '配對碼', + pairingCodePlaceholder: '請輸入配對碼', + approvePairing: '批准配對', + feishuRequired: '請填寫 botName / appId / appSecret', + feishuSaveSuccess: '保存成功', + pairingCodeRequired: '請輸入配對碼', + pairingApproveSuccess: '配對成功', }, model: { model: '模型', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index aa9be7201294..ae7c3797e9bc 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -669,6 +669,21 @@ const message = { token: 'Token', manualModel: '手动输入模型', verified: '验证状态', + configTitle: '配置', + channelsTab: '聊天渠道', + feishu: '飞书', + dmPolicy: '私聊策略', + botName: '机器人名称', + appId: '应用 App ID', + appSecret: '应用 App Secret', + saveAndRestartGateway: '保存并重启网关', + pairingCode: '配对码', + pairingCodePlaceholder: '请输入配对码', + approvePairing: '批准配对', + feishuRequired: '请填写 botName / appId / appSecret', + feishuSaveSuccess: '保存成功', + pairingCodeRequired: '请输入配对码', + pairingApproveSuccess: '配对成功', }, model: { model: '模型', diff --git a/frontend/src/views/ai/agents/agent/config/index.vue b/frontend/src/views/ai/agents/agent/config/index.vue new file mode 100644 index 000000000000..1847b1e5c666 --- /dev/null +++ b/frontend/src/views/ai/agents/agent/config/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/frontend/src/views/ai/agents/agent/config/tabs/channels.vue b/frontend/src/views/ai/agents/agent/config/tabs/channels.vue new file mode 100644 index 000000000000..e7bcd2d7db27 --- /dev/null +++ b/frontend/src/views/ai/agents/agent/config/tabs/channels.vue @@ -0,0 +1,128 @@ + + + diff --git a/frontend/src/views/ai/agents/agent/index.vue b/frontend/src/views/ai/agents/agent/index.vue index d1bd7c317168..9665bebb5b2e 100644 --- a/frontend/src/views/ai/agents/agent/index.vue +++ b/frontend/src/views/ai/agents/agent/index.vue @@ -23,7 +23,14 @@ - + + + @@ -74,6 +81,8 @@ + + @@ -83,14 +92,17 @@