Skip to content

Commit dbfbe39

Browse files
fix(web): questions without options no longer mention a selected option (#34806)
1 parent 31a108c commit dbfbe39

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)