mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-07-21 20:54:09 +08:00
feat: Hermes Agent 多引擎架构核心代码
- 新增 src/engines/hermes/ 完整引擎(仪表盘/服务管理/模型配置/Agent管理/对话) - 新增 src/lib/engine-manager.js 引擎管理器(切换/检测/状态) - 新增 src-tauri/src/commands/hermes.rs 后端命令(Gateway控制/配置读写/Agent Run SSE) - sidebar 引擎切换器 UI - i18n 新增 engine 模块(中/英/繁体) - 多安装清理工具(gateway-ownership.js) - 晴辰助手文件访问开关 - Hermes 对话工具调用可视化、SSE 流式输出 - Cargo.lock / dev-api.js 同步更新
This commit is contained in:
@@ -6,6 +6,7 @@ import { api, invalidate } from '../lib/tauri-api.js'
|
||||
import { showConfirm, showUpgradeModal } from '../components/modal.js'
|
||||
import { toast } from '../components/toast.js'
|
||||
import { setUpgrading, isMacPlatform } from '../lib/app-state.js'
|
||||
import { getActiveEngine } from '../lib/engine-manager.js'
|
||||
import { diagnoseInstallError } from '../lib/error-diagnosis.js'
|
||||
import { icon, statusIcon } from '../lib/icons.js'
|
||||
import { t } from '../lib/i18n.js'
|
||||
@@ -582,19 +583,16 @@ function bindEvents(page, nodeOk, detectState) {
|
||||
window.location.hash = '/assistant'
|
||||
})
|
||||
|
||||
// 进入面板
|
||||
page.querySelector('#btn-enter')?.addEventListener('click', () => {
|
||||
window.location.hash = '/dashboard'
|
||||
})
|
||||
page.querySelector('#btn-goto-models')?.addEventListener('click', () => {
|
||||
window.location.hash = '/models'
|
||||
})
|
||||
page.querySelector('#btn-goto-gateway')?.addEventListener('click', () => {
|
||||
window.location.hash = '/gateway'
|
||||
})
|
||||
page.querySelector('#btn-goto-channels')?.addEventListener('click', () => {
|
||||
window.location.hash = '/channels'
|
||||
})
|
||||
// 进入面板(刷新引擎 ready 状态,触发侧边栏更新)
|
||||
async function refreshAndNavigate(route) {
|
||||
const engine = getActiveEngine()
|
||||
if (engine?.detect) await engine.detect()
|
||||
window.location.hash = route
|
||||
}
|
||||
page.querySelector('#btn-enter')?.addEventListener('click', () => refreshAndNavigate('/dashboard'))
|
||||
page.querySelector('#btn-goto-models')?.addEventListener('click', () => refreshAndNavigate('/models'))
|
||||
page.querySelector('#btn-goto-gateway')?.addEventListener('click', () => refreshAndNavigate('/gateway'))
|
||||
page.querySelector('#btn-goto-channels')?.addEventListener('click', () => refreshAndNavigate('/channels'))
|
||||
|
||||
// 一键安装 Git
|
||||
page.querySelector('#btn-auto-install-git')?.addEventListener('click', async () => {
|
||||
|
||||
Reference in New Issue
Block a user