diff options
| author | David Hill <[email protected]> | 2026-01-23 21:49:24 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2026-01-24 06:18:55 +0000 |
| commit | 75cccc305aea05bc605da93ba441e0891461e8df (patch) | |
| tree | a5998eac643724da5f69b0b44f498636e177d7a3 /packages/app/src/components | |
| parent | 18ea09868a0f04235ceadb2f9e5a3c7f2f20a6e4 (diff) | |
| download | opencode-75cccc305aea05bc605da93ba441e0891461e8df.tar.gz opencode-75cccc305aea05bc605da93ba441e0891461e8df.zip | |
feat(app): add middle truncation for filename in comment card
Diffstat (limited to 'packages/app/src/components')
| -rw-r--r-- | packages/app/src/components/prompt-input.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index b6c4d3c85..86e6c1870 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -39,7 +39,7 @@ import type { IconName } from "@opencode-ai/ui/icons/provider" import { Tooltip, TooltipKeybind } from "@opencode-ai/ui/tooltip" import { IconButton } from "@opencode-ai/ui/icon-button" import { Select } from "@opencode-ai/ui/select" -import { getDirectory, getFilename } from "@opencode-ai/util/path" +import { getDirectory, getFilename, getFilenameTruncated } from "@opencode-ai/util/path" import { useDialog } from "@opencode-ai/ui/context/dialog" import { ImagePreview } from "@opencode-ai/ui/image-preview" import { ModelSelectorPopover } from "@/components/dialog-select-model" @@ -1691,18 +1691,13 @@ export const PromptInput: Component<PromptInputProps> = (props) => { tabs().open("review") }} > - <div class="flex items-center gap-2"> + <div class="flex items-center gap-1.5"> <FileIcon node={{ path: item.path, type: "file" }} class="shrink-0 size-3.5" /> <div class="flex-1 flex items-center text-11-regular min-w-0" style={{ "font-weight": "var(--font-weight-medium)" }} > - <span class="truncate min-w-0" style={{ direction: "rtl", "text-align": "left" }}> - <bdi> - <span class="text-text-weak">{getDirectory(item.path)}</span> - <span class="text-text-strong">{getFilename(item.path)}</span> - </bdi> - </span> + <span class="text-text-strong whitespace-nowrap">{getFilenameTruncated(item.path, 18)}</span> <Show when={item.selection}> {(sel) => ( <span class="text-text-weak whitespace-nowrap shrink-0"> |
