Skip to content

Commit c7b080f

Browse files
committed
feat: show readme for prompts when available
1 parent 81e8bd7 commit c7b080f

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/features/workspace/components/workspace-custom-instructions.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,25 @@ function PromptPresetPicker({ onActivate }: PromptPresetPickerProps) {
215215
<div className="flex gap-4 justify-between p-2">
216216
<div className="h-full items-center">
217217
<div className="flex h-full items-center max-w-52 text-clip">
218-
{item.commiters.map((contributor) => (
219-
<Link
220-
className="font-bold text-sm no-underline text-secondary flex gap-1 items-center hover:bg-gray-200 h-full px-2 rounded-md"
221-
target="_blank"
222-
href={`https://github.com/${contributor}/`}
223-
>
224-
<img
225-
className="size-6 rounded-full"
226-
src={`https://github.com/${contributor}.png?size=24`}
227-
/>
228-
<span className="truncate">{contributor}</span>
218+
{item.readme ? (
219+
<Link target="_blank" href={item.readme}>
220+
README.md
229221
</Link>
230-
))}
222+
) : (
223+
item.commiters.map((contributor) => (
224+
<Link
225+
className="font-bold text-sm no-underline text-secondary flex gap-1 items-center hover:bg-gray-200 h-full px-2 rounded-md"
226+
target="_blank"
227+
href={`https://github.com/${contributor}/`}
228+
>
229+
<img
230+
className="size-6 rounded-full"
231+
src={`https://github.com/${contributor}.png?size=24`}
232+
/>
233+
<span className="truncate">{contributor}</span>
234+
</Link>
235+
))
236+
)}
231237
</div>
232238
</div>
233239
<Button

0 commit comments

Comments
 (0)