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

This commit is contained in:
Shoubhit Dash
2026-04-07 10:15:22 +00:00
committed by GitHub
parent 3c96bf8468
commit 3a1ec27feb
@@ -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>