简化工作流检查提示拼接
移除请检查文案探测逻辑 终态文案统一直接追加检查提示
This commit is contained in:
@@ -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, '')},请检查。`;
|
||||
}
|
||||
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user