File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
apps/web/src/app/(authenticated)/usage Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ type MessagesProps = {
99 messages : Message [ ] ;
1010} ;
1111
12+ type SuggestionItem = string | { answer : string } ;
13+
1214type QuestionData = {
1315 question : string ;
14- suggestions : string [ ] ;
16+ suggestions : SuggestionItem [ ] ;
1517} ;
1618
1719const parseQuestionData = ( text : string ) : QuestionData | null => {
@@ -97,7 +99,9 @@ export const Messages = ({ messages }: MessagesProps) => {
9799 key = { index }
98100 className = "px-4 py-3 bg-background border border-border rounded-md text-sm hover:bg-muted/50 cursor-pointer transition-colors"
99101 >
100- { suggestion }
102+ { typeof suggestion === 'string'
103+ ? suggestion
104+ : suggestion . answer }
101105 </ div >
102106 ) ) }
103107 </ div >
You can’t perform that action at this time.
0 commit comments