优化页面交互并增强 Provider 配置能力
- 表单下拉框不再用 label 包裹,改为 div + aria-label,避免点击后 下拉面板瞬间关闭 - Provider 卡片新增「从上游获取模型」和「修改」入口,支持编辑 base URL、API Key 与 api_mode,凭据写入对应的环境变量 - 服务端抽出 provider-model-discovery 统一不同 api_mode 的模型发现, 旧的 custom_providers 与新的 providers 字典结构都能正确更新 - Agent Bridge 改为后台启动,HTTP 接口在 Python 运行时就绪前即可用; worker 连接被拒时按类型重试,不重放可能已产生副作用的请求 - 断线重连后恢复 profiles、models 与会话列表,健康检查改为自调度 的 setTimeout,离线时 2 秒后重试 - 批量删除确认文案改用 Popconfirm content,避免变成侧栏触发器文本
This commit is contained in:
@@ -18,7 +18,7 @@ import { setGroupChatServer } from './routes/hermes/group-chat'
|
||||
import { setChatRunServer } from './routes/hermes/chat-run'
|
||||
import { GroupChatServer } from './services/hermes/group-chat'
|
||||
import { ChatRunSocket } from './services/hermes/run-chat'
|
||||
import { startAgentBridgeManager } from './services/hermes/agent-bridge'
|
||||
import { getAgentBridgeManager } from './services/hermes/agent-bridge'
|
||||
import { HermesSkillInjector } from './services/hermes/skill-injector'
|
||||
import { injectBundledMcpServer } from './services/hermes/studio-mcp-autoinject'
|
||||
import { ensureProfileGatewaysRunning } from './services/hermes/gateway-autostart'
|
||||
@@ -109,7 +109,7 @@ function skillInjectionDisabled(): boolean {
|
||||
return envFlagEnabled('HERMES_WEB_UI_DISABLE_SKILL_INJECTION')
|
||||
}
|
||||
|
||||
async function startRuntimeServicesBeforeListen(): Promise<void> {
|
||||
async function startRuntimeServices(): Promise<void> {
|
||||
if (gatewayAutostartDisabled()) {
|
||||
console.log('[bootstrap] profile gateway check disabled by HERMES_WEB_UI_DISABLE_GATEWAY_AUTOSTART')
|
||||
} else {
|
||||
@@ -122,7 +122,7 @@ async function startRuntimeServicesBeforeListen(): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
agentBridgeManager = await startAgentBridgeManager()
|
||||
await agentBridgeManager.start()
|
||||
console.log('[bootstrap] agent bridge started')
|
||||
} catch (err) {
|
||||
logger.warn(err, '[bootstrap] agent bridge failed to start')
|
||||
@@ -187,8 +187,6 @@ export async function bootstrap() {
|
||||
console.warn('[bootstrap] failed to inject bundled MCP server:', err instanceof Error ? err.message : err)
|
||||
}
|
||||
|
||||
await startRuntimeServicesBeforeListen()
|
||||
|
||||
const app = new Koa()
|
||||
// Initialize all web-ui SQLite tables
|
||||
const { initAllStores } = await import('./db/hermes/init')
|
||||
@@ -291,7 +289,10 @@ export async function bootstrap() {
|
||||
})
|
||||
})
|
||||
|
||||
agentBridgeManager = getAgentBridgeManager()
|
||||
bindShutdown(servers, groupChatServer, chatRunServer, agentBridgeManager)
|
||||
// Session/history APIs must remain available while the Python runtime starts.
|
||||
void startRuntimeServices()
|
||||
startVersionCheck()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user