Align Hermes modules with desktop IA
This commit is contained in:
18
src/app.js
18
src/app.js
@@ -1127,7 +1127,7 @@ function modelProfileCard(profile) {
|
||||
<div class="model-profile-actions">
|
||||
<button type="button" onclick="editModelProfile('${escapeHTML(profile.id)}')">编辑</button>
|
||||
<button type="button" onclick="makeModelProfileDefault('${escapeHTML(profile.id)}')">设默认</button>
|
||||
<button type="button" onclick="applyModelProfileToRuntime('${escapeHTML(profile.id)}')">应用到运行配置</button>
|
||||
<button type="button" onclick="applyModelProfileToRuntime('${escapeHTML(profile.id)}')">填入提供商</button>
|
||||
<button type="button" class="danger" onclick="deleteModelProfile('${escapeHTML(profile.id)}')">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1264,7 +1264,7 @@ function applyModelProfileToRuntime(id) {
|
||||
document.getElementById("hermesModelDefault").value = profile.model || "";
|
||||
document.getElementById("hermesModelProvider").value = profile.provider || "";
|
||||
document.getElementById("hermesModelBaseUrl").value = profile.baseUrl || "";
|
||||
toast("已填入运行配置,点击“保存模型并重启”后生效");
|
||||
toast("已填入提供商页,去「提供商」点击“保存 Provider 并重启”后生效");
|
||||
}
|
||||
|
||||
async function deleteModelProfile(id) {
|
||||
@@ -1298,14 +1298,14 @@ async function saveModelConfig() {
|
||||
toast("默认模型不能为空");
|
||||
return;
|
||||
}
|
||||
if (!confirm("保存模型页的运行模型配置后会重启线上 Hermes agent,当前正在生成的任务可能中断。继续吗?")) return;
|
||||
if (!confirm("保存提供商页的运行模型配置后会重启线上 Hermes agent,当前正在生成的任务可能中断。继续吗?")) return;
|
||||
const btn = document.getElementById("hermesModelSaveBtn");
|
||||
const oldHTML = btn?.innerHTML;
|
||||
if (btn) {
|
||||
btn.disabled = true;
|
||||
btn.textContent = "保存模型中...";
|
||||
btn.textContent = "保存 Provider 中...";
|
||||
}
|
||||
setHermesModelStatus("正在写入 model 配置并重启 Hermes agent...");
|
||||
setHermesModelStatus("正在写入 Provider/model 配置并重启 Hermes agent...");
|
||||
try {
|
||||
const saved = await postHermesRuntimeConfig({
|
||||
model,
|
||||
@@ -1327,8 +1327,8 @@ async function saveModelConfig() {
|
||||
saveSharedConfig({ silent: true }).catch((error) => {
|
||||
setSharedConfigStatus("模型 Profile 共享保存失败: " + (error.message || error), true);
|
||||
});
|
||||
setHermesModelStatus("模型配置已保存并重启 · 备份 " + (saved.backup || "已创建"));
|
||||
toast("模型页配置已生效");
|
||||
setHermesModelStatus("Provider 配置已保存并重启 · 备份 " + (saved.backup || "已创建"));
|
||||
toast("提供商配置已生效");
|
||||
setTimeout(() => {
|
||||
pingBackend();
|
||||
refreshDashboard();
|
||||
@@ -1346,7 +1346,7 @@ async function saveModelConfig() {
|
||||
|
||||
async function saveMcpConfig() {
|
||||
const mcpServersYaml = document.getElementById("mcpServersYaml")?.value || "";
|
||||
if (!confirm("保存工具集里的 MCP 配置后会重启线上 Hermes agent,当前正在生成的任务可能中断。继续吗?")) return;
|
||||
if (!confirm("保存工具里的 MCP 配置后会重启线上 Hermes agent,当前正在生成的任务可能中断。继续吗?")) return;
|
||||
const btn = document.getElementById("hermesMcpSaveBtn");
|
||||
const oldHTML = btn?.innerHTML;
|
||||
if (btn) {
|
||||
@@ -1373,7 +1373,7 @@ async function saveMcpConfig() {
|
||||
};
|
||||
_hermesConfigLoaded = false;
|
||||
setHermesMcpStatus("MCP 配置已保存并重启 · 备份 " + (saved.backup || "已创建"));
|
||||
toast("工具集 MCP 配置已生效");
|
||||
toast("工具 MCP 配置已生效");
|
||||
setTimeout(() => {
|
||||
pingBackend();
|
||||
refreshDashboard();
|
||||
|
||||
@@ -822,7 +822,7 @@
|
||||
<div class="panel-head">
|
||||
<div class="panel-head-row">
|
||||
<div>
|
||||
<h2>工具集</h2>
|
||||
<h2>工具</h2>
|
||||
<p>Hermes 已注册工具包 · <code>hermes tools list</code> 输出 · 每分钟同步</p>
|
||||
</div>
|
||||
<div class="panel-head-actions">
|
||||
@@ -1337,7 +1337,7 @@ git push # Gitea kangwan/hermes-glass-ui-personal
|
||||
<div class="settings-help">只显示 App ID、回调地址和服务状态;Secret 与 Token 只保存在服务器环境文件。</div>
|
||||
</div>
|
||||
<div class="feishu-apps" id="feishuApps">
|
||||
<div class="settings-help">打开集成页后自动读取飞书桥接服务。</div>
|
||||
<div class="settings-help">打开网关页后自动读取飞书桥接服务。</div>
|
||||
</div>
|
||||
<form class="feishu-form" id="feishuAddForm" onsubmit="saveFeishuApp(event)">
|
||||
<div class="settings-field">
|
||||
|
||||
Reference in New Issue
Block a user