feat(app): show full names on composer attachment chips (#21306)

pull/21314/head^2
Shoubhit Dash 2026-04-07 15:45:22 +05:30 committed by GitHub
parent 3c96bf8468
commit 3a1ec27feb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 30 additions and 27 deletions

View File

@ -1,5 +1,6 @@
import { Component, For, Show } from "solid-js" import { Component, For, Show } from "solid-js"
import { Icon } from "@opencode-ai/ui/icon" import { Icon } from "@opencode-ai/ui/icon"
import { Tooltip } from "@opencode-ai/ui/tooltip"
import type { ImageAttachmentPart } from "@/context/prompt" import type { ImageAttachmentPart } from "@/context/prompt"
type PromptImageAttachmentsProps = { type PromptImageAttachmentsProps = {
@ -22,6 +23,7 @@ export const PromptImageAttachments: Component<PromptImageAttachmentsProps> = (p
<div class="flex flex-wrap gap-2 px-3 pt-3"> <div class="flex flex-wrap gap-2 px-3 pt-3">
<For each={props.attachments}> <For each={props.attachments}>
{(attachment) => ( {(attachment) => (
<Tooltip value={attachment.filename} placement="top" contentClass="break-all">
<div class="relative group"> <div class="relative group">
<Show <Show
when={attachment.mime.startsWith("image/")} when={attachment.mime.startsWith("image/")}
@ -50,6 +52,7 @@ export const PromptImageAttachments: Component<PromptImageAttachmentsProps> = (p
<span class="text-10-regular text-white truncate block">{attachment.filename}</span> <span class="text-10-regular text-white truncate block">{attachment.filename}</span>
</div> </div>
</div> </div>
</Tooltip>
)} )}
</For> </For>
</div> </div>