diff --git a/apps/ai-game-creator-shell/src/view/project-development/chat/conversation/directCodexConversation.ts b/apps/ai-game-creator-shell/src/view/project-development/chat/conversation/directCodexConversation.ts index 2d662afe9..0285a1692 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/chat/conversation/directCodexConversation.ts +++ b/apps/ai-game-creator-shell/src/view/project-development/chat/conversation/directCodexConversation.ts @@ -91,6 +91,10 @@ export function readDirectTurnRejection( * * 名单只放"用户自己就能改、且不需要宿主诊断"的变体:`environmentNotReady` / * `hostStateUnavailable` 这类是宿主 / 环境事实,必须走上报通道,所以不在这里。 + * + * 空文案按"没有提示"处理:这个函数要么给一条能显示的话,要么给 `null`——宿主给不出可展示的文案 + * 时返回 `null`,而不是让调用方拿到一条空串(`''` 显示不出任何东西,却会被按 `!== null` 判据的 + * 调用方当成"有提示")。 */ export function directTurnRejectionNotice( rejection: DirectTurnRejection, @@ -104,7 +108,7 @@ export function directTurnRejectionNotice( case 'permissionRejected': case 'inputRejected': case 'contentEmpty': - return rejection.message.trim(); + return rejection.message.trim() || null; default: return null; }