Skip to content

Commit 7b987eb

Browse files
fix(web): questions without options no longer mention a selected option
The pending-question placeholder only checked whether the question was choice-only, so free-text questions with no options (Codex, ACP elicitations) told the user to leave the field blank to use a selected option that does not exist. Show "Type your answer" when the question has no options. AI-assisted; verified with the tests and tools listed above.
1 parent 62dc589 commit 7b987eb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ export interface ChatComposerProps {
402402
customAnswer: string;
403403
activeQuestion: {
404404
id: string;
405+
options: ReadonlyArray<unknown>;
405406
initialAnswer?: string | undefined;
406407
multiSelect?: boolean | undefined;
407408
allowCustomAnswer?: boolean | undefined;
@@ -3557,7 +3558,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
35573558
: activePendingProgress
35583559
? isChoiceOnlyPendingQuestion
35593560
? "Choose an option above"
3560-
: "Type your own answer, or leave this blank to use the selected option"
3561+
: activePendingProgress.activeQuestion?.options.length === 0
3562+
? "Type your answer"
3563+
: "Type your own answer, or leave this blank to use the selected option"
35613564
: projectSelectionRequired
35623565
? "Choose a project above to start a thread"
35633566
: showProviderUnavailable

0 commit comments

Comments
 (0)