把策划输入框提交按钮文案的嵌套三元改成顺序分支
- apps/ai-game-creator-shell/src/view/project-development/planning/PlanningChatView.tsx 的 submitLabel 改为先给默认值再按 needsUserInput / controlBusy 覆盖 - 取值结果不变,只是去掉三层嵌套三元表达式
This commit is contained in:
+6
-5
@@ -193,11 +193,12 @@ export function PlanningChatView({
|
||||
onDesignClarify,
|
||||
onDesignRetry,
|
||||
}: PlanningChatViewProps) {
|
||||
const submitLabel = needsUserInput
|
||||
? '等待回答'
|
||||
: controlBusy
|
||||
? '思考中'
|
||||
: '发送';
|
||||
let submitLabel = '发送';
|
||||
if (needsUserInput) {
|
||||
submitLabel = '等待回答';
|
||||
} else if (controlBusy) {
|
||||
submitLabel = '思考中';
|
||||
}
|
||||
const submitting = controlBusy && !needsUserInput;
|
||||
|
||||
const renderMessage = (message: ChatMessage, index: number) => (
|
||||
|
||||
Reference in New Issue
Block a user