mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Handle new-style suggestions (#152)
This commit is contained in:
parent
e93daaf9ec
commit
d56a9229ea
1 changed files with 6 additions and 2 deletions
|
|
@ -9,9 +9,11 @@ type MessagesProps = {
|
|||
messages: Message[];
|
||||
};
|
||||
|
||||
type SuggestionItem = string | { answer: string };
|
||||
|
||||
type QuestionData = {
|
||||
question: string;
|
||||
suggestions: string[];
|
||||
suggestions: SuggestionItem[];
|
||||
};
|
||||
|
||||
const parseQuestionData = (text: string): QuestionData | null => {
|
||||
|
|
@ -97,7 +99,9 @@ export const Messages = ({ messages }: MessagesProps) => {
|
|||
key={index}
|
||||
className="px-4 py-3 bg-background border border-border rounded-md text-sm hover:bg-muted/50 cursor-pointer transition-colors"
|
||||
>
|
||||
{suggestion}
|
||||
{typeof suggestion === 'string'
|
||||
? suggestion
|
||||
: suggestion.answer}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue