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
7 changes: 5 additions & 2 deletions client/src/components/PromptsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import IconDisplay, { WithIcons } from "./IconDisplay";

export type Prompt = {
name: string;
title?: string;
description?: string;
arguments?: {
name: string;
Expand Down Expand Up @@ -120,7 +121,7 @@ const PromptsTab = ({
<IconDisplay icons={prompt.icons} size="sm" />
</div>
<div className="flex flex-col flex-1 min-w-0">
<span className="truncate">{prompt.name}</span>
<span className="truncate">{prompt.title || prompt.name}</span>
<span className="text-sm text-gray-500 text-left line-clamp-2">
{prompt.description}
</span>
Expand All @@ -143,7 +144,9 @@ const PromptsTab = ({
/>
)}
<h3 className="font-semibold">
{selectedPrompt ? selectedPrompt.name : "Select a prompt"}
{selectedPrompt
? selectedPrompt.title || selectedPrompt.name
: "Select a prompt"}
</h3>
</div>
</div>
Expand Down
14 changes: 9 additions & 5 deletions client/src/components/ResourcesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const ResourcesTab = ({
<FileText className="w-4 h-4 mr-2 flex-shrink-0 text-gray-500" />
)}
<span className="flex-1 truncate" title={resource.uri.toString()}>
{resource.name}
{resource.title || resource.name}
</span>
<ChevronRight className="w-4 h-4 flex-shrink-0 text-gray-400" />
</div>
Expand Down Expand Up @@ -168,7 +168,7 @@ const ResourcesTab = ({
<FileText className="w-4 h-4 mr-2 flex-shrink-0 text-gray-500" />
)}
<span className="flex-1 truncate" title={template.uriTemplate}>
{template.name}
{template.title || template.name}
</span>
<ChevronRight className="w-4 h-4 flex-shrink-0 text-gray-400" />
</div>
Expand All @@ -193,12 +193,16 @@ const ResourcesTab = ({
)}
<h3
className="font-semibold truncate"
title={selectedResource?.name || selectedTemplate?.name}
title={
selectedResource
? selectedResource.title || selectedResource.name
: selectedTemplate?.title || selectedTemplate?.name
}
>
{selectedResource
? selectedResource.name
? selectedResource.title || selectedResource.name
: selectedTemplate
? selectedTemplate.name
? selectedTemplate.title || selectedTemplate.name
: "Select a resource or template"}
</h3>
</div>
Expand Down