Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit 0df1bc9

Browse files
committed
truncate prompt
1 parent 8e3c801 commit 0df1bc9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/components/Chat.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export function Chat() {
3333
</BreadcrumbItem>
3434
<BreadcrumbSeparator />
3535
<BreadcrumbItem>
36-
<BreadcrumbPage>{extractTitleFromMessage(title)}</BreadcrumbPage>
36+
<BreadcrumbPage className="truncate w-96">
37+
{extractTitleFromMessage(title)}
38+
</BreadcrumbPage>
3739
</BreadcrumbItem>
3840
</BreadcrumbList>
3941
</Breadcrumb>

src/components/PromptList.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ export function PromptList({ prompts }: { prompts: Prompt[] }) {
1414
<h2 className="font-bold text-sm text-gray-700 mb-2 mt-6">{group}</h2>
1515
<ul className="space-y-2">
1616
{prompts.map((prompt) => (
17-
<li key={prompt.chat_id} className="flex items-center p-1 ">
18-
<Link to={`/prompt/${prompt.chat_id}`}>
19-
<p className="text-gray-800 text-sm line-clamp-1 hover:text-gray-500">
20-
{extractTitleFromMessage(
21-
prompt.question_answers?.[0].question.message ??
22-
`Prompt ${prompt.conversation_timestamp}`
23-
)}
24-
</p>
17+
<li key={prompt.chat_id} className="flex items-center p-1 w-full">
18+
<Link
19+
to={`/prompt/${prompt.chat_id}`}
20+
className="text-gray-800 text-sm truncate hover:text-gray-500"
21+
>
22+
{extractTitleFromMessage(
23+
prompt.question_answers?.[0].question.message ??
24+
`Prompt ${prompt.conversation_timestamp}`
25+
)}
2526
</Link>
2627
</li>
2728
))}

0 commit comments

Comments
 (0)