fix(ui): import term tooltip helpers in config pages

Gateway 配置页和模型配置页都会在 label 中渲染术语帮助按钮,并在页面渲染后调用 tooltip 绑定逻辑。

这两个页面之前引用了 termHelpHtml / attachTermTooltips,但没有导入对应 helper,导致 Gateway 配置页加载配置后直接抛出 ReferenceError,页面停在加载失败状态。

## 修复
- Gateway 配置页补充 term-tooltip helper import
- 模型配置页补充同一 helper import,避免进入编辑服务商弹窗时触发同类运行时错误

## 验证
- npm run build:PASS
This commit is contained in:
晴天
2026-05-15 18:54:13 +08:00
parent 8b690cb6a7
commit 7f078a3c49
2 changed files with 2 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import { toast } from '../components/toast.js'
import { humanizeError } from '../lib/humanize-error.js'
import { tryShowEngagement } from '../components/engagement.js'
import { t } from '../lib/i18n.js'
import { termHelpHtml, attachTermTooltips } from '../lib/term-tooltip.js'
// 兼容新版 SecretReftoken 可能是 string 或 { $env: "VAR" } / { $ref: "x/y" }
function _tokenDisplayStr(token) {

View File

@@ -10,6 +10,7 @@ import { icon, statusIcon } from '../lib/icons.js'
import { API_TYPES, PROVIDER_PRESETS, QTCOOL, MODEL_PRESETS, fetchQtcoolModels } from '../lib/model-presets.js'
import { t } from '../lib/i18n.js'
import { scheduleGatewayRestart, fireRestartNow, cancelPendingRestart, onRestartState } from '../lib/gateway-restart-queue.js'
import { termHelpHtml, attachTermTooltips } from '../lib/term-tooltip.js'
// HTML 转义,防止错误信息中的特殊字符破坏页面或被注入
function escapeHtml(str) {