chore(workflow): 工作流相关代码中文文案全部英文化

源码(src/workflow/ + packages/workflow-engine/src/)的中文注释、
用户可见错误消息、字符串字面量;测试文件的标题与注释;同步 6 条
硬编码断言到英文化后的错误消息。

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-14 15:48:29 +08:00
parent 490714dbcb
commit 4903f544b7
71 changed files with 1091 additions and 1077 deletions

View File

@@ -11,7 +11,7 @@ import {
agentMetaText,
} from '../panel/status.js'
test('STATUS_DOT / RUN_STATUS_COLOR / RUN_STATUS_TEXT 覆盖四种 run 状态', () => {
test('STATUS_DOT / RUN_STATUS_COLOR / RUN_STATUS_TEXT cover four run states', () => {
const statuses: RunProgress['status'][] = [
'running',
'completed',
@@ -31,19 +31,19 @@ test('STATUS_DOT / RUN_STATUS_COLOR / RUN_STATUS_TEXT 覆盖四种 run 状态',
expect(RUN_STATUS_TEXT.running).toBe('running')
})
test('PHASE_MARK / PHASE_COLOR 覆盖 running/done/pending', () => {
test('PHASE_MARK / PHASE_COLOR cover running/done/pending', () => {
expect(PHASE_MARK.running).toBe('●')
expect(PHASE_MARK.done).toBe('✓')
expect(PHASE_MARK.pending).toBe('○')
expect(PHASE_COLOR.pending).toBe('subtle')
})
test('agentVisualrunning → ● warning', () => {
test('agentVisual: running → ● warning', () => {
const a: AgentProgress = { id: 1, status: 'running' }
expect(agentVisual(a)).toEqual({ mark: '●', color: 'warning' })
})
test('agentVisualdone·ok → ✓ success(不再带 outputShape 后缀)', () => {
test('agentVisual: done·ok → ✓ success (no longer carries outputShape suffix)', () => {
const a: AgentProgress = {
id: 1,
status: 'done',
@@ -53,12 +53,12 @@ test('agentVisualdone·ok → ✓ success不再带 outputShape 后缀)',
expect(agentVisual(a)).toEqual({ mark: '✓', color: 'success' })
})
test('agentVisualdead → ✗ error', () => {
test('agentVisual: dead → ✗ error', () => {
const a: AgentProgress = { id: 1, status: 'done', resultKind: 'dead' }
expect(agentVisual(a)).toEqual({ mark: '✗', color: 'error' })
})
test('formatTokenCount<1000 原值≥1000 保留 1 位小数 + k', () => {
test('formatTokenCount: <1000 original value, ≥1000 keeps 1 decimal + k', () => {
expect(formatTokenCount(undefined)).toBe('0')
expect(formatTokenCount(0)).toBe('0')
expect(formatTokenCount(42)).toBe('42')
@@ -66,7 +66,7 @@ test('formatTokenCount<1000 原值≥1000 保留 1 位小数 + k', () => {
expect(formatTokenCount(22900)).toBe('22.9k')
})
test('agentMetaTextmodel · Nk tok · N tool', () => {
test('agentMetaText: model · Nk tok · N tool', () => {
const a: AgentProgress = {
id: 1,
status: 'done',
@@ -77,7 +77,7 @@ test('agentMetaTextmodel · Nk tok · N tool', () => {
expect(agentMetaText(a)).toBe('glm-5.2 · 22.9k tok · 1 tool')
})
test('agentMetaText:无 model 时省略前段', () => {
test('agentMetaText: omits prefix when no model', () => {
const a: AgentProgress = {
id: 1,
status: 'running',