fix: remove english ui leftovers

This commit is contained in:
Yoilun
2026-05-25 20:40:25 +08:00
parent 10f1beb3c8
commit 88113304a0
5 changed files with 21 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import {
normalizeRuntime,
normalizeWorkflow,
} from './normalizers.js'
import { settings } from '../data.js'
test('maps source kind and confidence to Chinese display text', () => {
assert.equal(formatSourceKind('sqlite_readonly'), 'SQLite 只读')
@@ -58,6 +59,14 @@ test('normalizes valid agent TOML with visible parse status', () => {
assert.match(agent.toml, /角色设定/)
})
test('empty agent and settings copy stay Chinese', () => {
const agents = normalizeAgent({})
assert.doesNotMatch(agents.description, /\bagent\b/i)
assert.ok(settings.some((item) => item.name === 'Codex 主目录'))
assert.ok(settings.every((item) => item.name !== 'Codex home'))
})
test('normalizes empty runtime without falling back to fake real data', () => {
const runtime = normalizeRuntime({
items: [],

View File

@@ -155,7 +155,7 @@ export const drafts = [
]
export const settings = [
{ name: 'Codex home', value: '/Users/yoilun/.codex', detail: '由后端配置提供', enabled: true },
{ name: 'Codex 主目录', value: '/Users/yoilun/.codex', detail: '由后端配置提供', enabled: true },
{ name: 'SQLite 状态读取', value: '只读 mode=ro&immutable=1', detail: '通过只读接口展示', enabled: true },
{ name: '本机进程辅助判断', value: '等待后端聚合', detail: '只显示来源与置信度,不伪装确定状态', enabled: true },
{ name: '写回能力', value: '阶段 6 才启用', detail: '当前没有保存、写入或批量写回按钮', enabled: false },

View File

@@ -82,7 +82,7 @@ async function loadAgents() {
<div v-if="!selectedAgent && !loading" class="empty-state">
<strong>没有智能体内容</strong>
<p>后端返回空列表当前保持只读空状态不使用示例数据伪装真实 agent</p>
<p>后端返回空列表当前保持只读空状态不使用示例数据伪装真实智能体</p>
</div>
<div v-else class="form-grid" aria-label="智能体字段预览">