把排队消息标题的嵌套三元改成提前返回
- apps/ai-game-creator-shell/src/view/project-development/chat/components/DirectProjectComposer/chatComposerQueue.ts 的 queuedChatTurnLabel 先处理空文本再判断截断 - 返回值不变
This commit is contained in:
+2
-5
@@ -88,9 +88,6 @@ export function queuedChatTurnLabel(
|
||||
const text = directCodexContentToPromptText(turn.userItem.content, assets)
|
||||
.trim()
|
||||
.replace(/\s+/gu, ' ');
|
||||
return text
|
||||
? text.length > 24
|
||||
? `${text.slice(0, 24)}…`
|
||||
: text
|
||||
: '未命名消息';
|
||||
if (!text) return '未命名消息';
|
||||
return text.length > 24 ? `${text.slice(0, 24)}…` : text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user