Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# logs
*.log
2 changes: 1 addition & 1 deletion components/copilot-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function CopilotDisplay({ content }: CopilotDisplayProps) {

return (
<Card className="p-3 md:p-4 w-full flex justify-between items-center">
<h5 className="text-muted-foreground text-xs truncate">{query}</h5>
<h5 className="text-muted-foreground text-xs break-words">{query}</h5>
Comment on lines 22 to +23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing truncate with break-words will allow wrapping, but it also removes the single-line constraint and ellipsis behavior entirely. Depending on the layout, a very long query could now expand the card vertically a lot and potentially push other UI elements down in an undesirable way.

If the design intent is to keep things compact while still preventing horizontal overflow, you might want to combine classes to both limit lines and allow wrapping (e.g., using a line-clamp-* utility if available) rather than fully unbounded wrapping. Otherwise, this change trades one UI issue (overflow) for another (unbounded height).

Suggestion

Consider constraining the text to a small number of lines while still permitting wrapping, for example by using a line clamp utility if your Tailwind setup includes it, such as line-clamp-2 break-words, so the card doesn't grow arbitrarily tall for long inputs:

<h5 className="text-muted-foreground text-xs break-words line-clamp-2">{query}</h5>

If your design system prefers a different max-line behavior, adjust the clamp value accordingly. Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this change or a variant tailored to your Tailwind configuration.

<Check size={16} className="text-green-500 w-4 h-4" />
</Card>
)
Expand Down