diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts index 02fd867f8..1c0bfbfa0 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts @@ -9,7 +9,6 @@ export type WorkflowCompletionNotice = { export function appendWorkflowCheckPrompt(message: string): string { const trimmed = message.trim(); if (!trimmed) return '请检查。'; - if (trimmed.includes('请检查')) return trimmed; return `${trimmed.replace(/[。!?!?]+$/u, '')},请检查。`; } diff --git a/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts b/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts index d583aa737..01016c4ae 100644 --- a/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts +++ b/apps/ai-game-creator-shell/tests/workflowCompletionNotice.test.ts @@ -6,13 +6,10 @@ import { } from '../src/view/ui-editor/components/workflowCompletionNotice'; describe('workflow completion notice helpers', () => { - it('appends the review prompt without duplicating it', () => { + it('appends the review prompt to a terminal status', () => { expect(appendWorkflowCheckPrompt('已应用 3 条建议。')).toBe( '已应用 3 条建议,请检查。', ); - expect(appendWorkflowCheckPrompt('已应用 3 条建议,请检查。')).toBe( - '已应用 3 条建议,请检查。', - ); }); it('maps every workflow step to a user-facing label', () => {