Files
qiweimanager-master/frontend/wailsjs/go/main/App.js
yuanzhipeng 1517be2a25 feat(auto-reply): 接入万川平台模型配置 + 各模型独立网关回退
万川平台对接
- 新增 wanchuan_proxy.go:WanchuanLogin/WanchuanGetModel 代理登录与按 code 拉取模型,
  日志对 password/token/apiKey 打码(含 encryptedConfig 二次解析)
- 新增 PlatformConfig(baseUrl/username/password)及 Get/SavePlatformConfig 持久化
- 前端万川卡片:登录→拉取 chat/vision/embedding/rerank/voice→回填 form 并保存→必要时重建向量索引

各模型独立网关(url+key),留空回退聊天网关
- RetrievalConfig 新增 embeddingBaseUrl/embeddingApiKey、rerankBaseUrl/rerankApiKey
- embeddingRequestConfig/rerankRequestConfig:优先独立网关,未配置回退 AI.BaseURL/APIKey
- vision/audio 同模式:非 DashScope 网关下视觉/语音模型留空时不再锁死或强写 DashScope,
  运行期由 fallbackString(VisionModel, Model) 动态复用聊天模型

陈旧向量空间防护
- loadEmbeddingIndex 检测磁盘索引与当前 embedding 模型/维度不一致时清空向量、回退关键词检索,
  并提示重建(embeddingIndexStaleReason,兼容旧版无模型名索引)

UI 状态修复
- 登录拉模型期间统一置全局 busy,禁用闸门收敛为 busy(与刷新联系人等按钮同范式),
  platformBusy 仅保留用于按钮「处理中…」文案,杜绝并发读写 form 与反向可点洞

其他
- 删除遗留 helper/auto_reply_ai.go.bak
- 补充 config/helper 单元测试(视觉回退分支、陈旧索引判定)
2026-06-26 10:17:02 +08:00

244 lines
7.0 KiB
JavaScript

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function AddLogEntry(arg1, arg2, arg3, arg4) {
return window['go']['main']['App']['AddLogEntry'](arg1, arg2, arg3, arg4);
}
export function ArchivePendingAfterSalesIssues() {
return window['go']['main']['App']['ArchivePendingAfterSalesIssues']();
}
export function AssignAfterSalesIssue(arg1, arg2) {
return window['go']['main']['App']['AssignAfterSalesIssue'](arg1, arg2);
}
export function BatchNotifyAfterSalesEngineers(arg1) {
return window['go']['main']['App']['BatchNotifyAfterSalesEngineers'](arg1);
}
export function DebugLoadLogEntries() {
return window['go']['main']['App']['DebugLoadLogEntries']();
}
export function DeleteIssue(arg1) {
return window['go']['main']['App']['DeleteIssue'](arg1);
}
export function DeleteWxWorkAccount(arg1) {
return window['go']['main']['App']['DeleteWxWorkAccount'](arg1);
}
export function ExportIssuesToExcel() {
return window['go']['main']['App']['ExportIssuesToExcel']();
}
export function GetActiveClientCount() {
return window['go']['main']['App']['GetActiveClientCount']();
}
export function GetAfterSalesDispatchConfig() {
return window['go']['main']['App']['GetAfterSalesDispatchConfig']();
}
export function GetAfterSalesDispatchQueue() {
return window['go']['main']['App']['GetAfterSalesDispatchQueue']();
}
export function GetAfterSalesImageData(arg1) {
return window['go']['main']['App']['GetAfterSalesImageData'](arg1);
}
export function GetAfterSalesIssueStatus() {
return window['go']['main']['App']['GetAfterSalesIssueStatus']();
}
export function GetAutoReplyConfig() {
return window['go']['main']['App']['GetAutoReplyConfig']();
}
export function GetAutoReplyGroupOptions() {
return window['go']['main']['App']['GetAutoReplyGroupOptions']();
}
export function GetAutoReplyIdentityOptions() {
return window['go']['main']['App']['GetAutoReplyIdentityOptions']();
}
export function GetAutoReplyStatus() {
return window['go']['main']['App']['GetAutoReplyStatus']();
}
export function GetCallbackConfig() {
return window['go']['main']['App']['GetCallbackConfig']();
}
export function GetIssues() {
return window['go']['main']['App']['GetIssues']();
}
export function GetKingdeeMonitorConfig() {
return window['go']['main']['App']['GetKingdeeMonitorConfig']();
}
export function GetKingdeeMonitorStatus() {
return window['go']['main']['App']['GetKingdeeMonitorStatus']();
}
export function GetPendingAfterSalesArchiveSummary() {
return window['go']['main']['App']['GetPendingAfterSalesArchiveSummary']();
}
export function GetPlatformConfig() {
return window['go']['main']['App']['GetPlatformConfig']();
}
export function GetSystemMemoryUsage() {
return window['go']['main']['App']['GetSystemMemoryUsage']();
}
export function GetWxWorkAccountList() {
return window['go']['main']['App']['GetWxWorkAccountList']();
}
export function Greet(arg1) {
return window['go']['main']['App']['Greet'](arg1);
}
export function ImportAfterSalesHistory(arg1) {
return window['go']['main']['App']['ImportAfterSalesHistory'](arg1);
}
export function ListAfterSalesKnowledgeArchives() {
return window['go']['main']['App']['ListAfterSalesKnowledgeArchives']();
}
export function ListAfterSalesKnowledgeCases() {
return window['go']['main']['App']['ListAfterSalesKnowledgeCases']();
}
export function LogFrontend(arg1, arg2) {
return window['go']['main']['App']['LogFrontend'](arg1, arg2);
}
export function NotifyAfterSalesEngineer(arg1) {
return window['go']['main']['App']['NotifyAfterSalesEngineer'](arg1);
}
export function PrepareWeComHistoryCopy() {
return window['go']['main']['App']['PrepareWeComHistoryCopy']();
}
export function RebuildKnowledgeIndex() {
return window['go']['main']['App']['RebuildKnowledgeIndex']();
}
export function RefreshAutoReplyContacts() {
return window['go']['main']['App']['RefreshAutoReplyContacts']();
}
export function RefreshAutoReplyGroups() {
return window['go']['main']['App']['RefreshAutoReplyGroups']();
}
export function ResolveAfterSalesIssue(arg1, arg2) {
return window['go']['main']['App']['ResolveAfterSalesIssue'](arg1, arg2);
}
export function RevealAfterSalesAttachment(arg1) {
return window['go']['main']['App']['RevealAfterSalesAttachment'](arg1);
}
export function RevealAfterSalesKnowledgeArchive(arg1) {
return window['go']['main']['App']['RevealAfterSalesKnowledgeArchive'](arg1);
}
export function RevealAfterSalesKnowledgeCase(arg1) {
return window['go']['main']['App']['RevealAfterSalesKnowledgeCase'](arg1);
}
export function RunKingdeeMonitorOnce() {
return window['go']['main']['App']['RunKingdeeMonitorOnce']();
}
export function SaveAfterSalesDispatchConfig(arg1) {
return window['go']['main']['App']['SaveAfterSalesDispatchConfig'](arg1);
}
export function SaveAutoReplyConfig(arg1) {
return window['go']['main']['App']['SaveAutoReplyConfig'](arg1);
}
export function SaveCallbackConfig(arg1) {
return window['go']['main']['App']['SaveCallbackConfig'](arg1);
}
export function SaveIssue(arg1) {
return window['go']['main']['App']['SaveIssue'](arg1);
}
export function SaveKingdeeMonitorConfig(arg1) {
return window['go']['main']['App']['SaveKingdeeMonitorConfig'](arg1);
}
export function SavePlatformConfig(arg1) {
return window['go']['main']['App']['SavePlatformConfig'](arg1);
}
export function SendWxWorkData(arg1, arg2) {
return window['go']['main']['App']['SendWxWorkData'](arg1, arg2);
}
export function SetAutoCollectTask(arg1) {
return window['go']['main']['App']['SetAutoCollectTask'](arg1);
}
export function SetAutoReplyEnabled(arg1) {
return window['go']['main']['App']['SetAutoReplyEnabled'](arg1);
}
export function StartNewWxWorkInstance() {
return window['go']['main']['App']['StartNewWxWorkInstance']();
}
export function SyncAutoReplyInternalGroups() {
return window['go']['main']['App']['SyncAutoReplyInternalGroups']();
}
export function SyncAutoReplyMaterials() {
return window['go']['main']['App']['SyncAutoReplyMaterials']();
}
export function SyncCurrentWeComChatHistory(arg1) {
return window['go']['main']['App']['SyncCurrentWeComChatHistory'](arg1);
}
export function TestAIConnection() {
return window['go']['main']['App']['TestAIConnection']();
}
export function TestHumanHandoff() {
return window['go']['main']['App']['TestHumanHandoff']();
}
export function TestKingdeeMonitorConnection(arg1) {
return window['go']['main']['App']['TestKingdeeMonitorConnection'](arg1);
}
export function TriggerManualCollect(arg1) {
return window['go']['main']['App']['TriggerManualCollect'](arg1);
}
export function UpdateAfterSalesKnowledgeCase(arg1, arg2) {
return window['go']['main']['App']['UpdateAfterSalesKnowledgeCase'](arg1, arg2);
}
export function WanchuanGetModel(arg1, arg2, arg3) {
return window['go']['main']['App']['WanchuanGetModel'](arg1, arg2, arg3);
}
export function WanchuanLogin(arg1, arg2, arg3) {
return window['go']['main']['App']['WanchuanLogin'](arg1, arg2, arg3);
}