Skip to content

Commit 3d3d94c

Browse files
committed
feat: limit display
1 parent b0e25b3 commit 3d3d94c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

templates/types/streaming/nextjs/app/components/ui/chat/csv-content.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { CsvData } from ".";
22

3+
const LIMIT_DISPLAY = 100; // Limit the display of CSV content to 100 characters
4+
35
export default function CsvContent({ data }: { data: CsvData }) {
6+
const summaryContent = data.content.slice(0, LIMIT_DISPLAY) + "...";
47
return (
58
<div className="space-y-2">
69
<h3 className="font-semibold">CSV Raw Content</h3>
710
<pre className="bg-secondary max-h-[200px] overflow-auto rounded-md p-4 block text-sm">
8-
{data.content}
11+
{summaryContent}
912
</pre>
1013
</div>
1114
);

0 commit comments

Comments
 (0)