Skip to content

Commit

Permalink
ui(tool result): only hide content if there are extra lines
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcMcIntosh committed Jun 18, 2024
1 parent 7675873 commit bdf6057
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/ChatContent/ToolsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Result: React.FC<{ children: string }> = ({ children }) => {
const lines = children.split("\n");
const [open, setOpen] = React.useState(false);
if (lines.length < 4 || open)
if (lines.length < 6 || open)
return <Markdown className={styles.tool_result}>{children}</Markdown>;
const toShow = lines.slice(0, 6).join("\n") + "\n ";
return (
Expand Down

0 comments on commit bdf6057

Please sign in to comment.