summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src/components
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-10-28 06:20:43 -0500
committerAdam <[email protected]>2025-10-28 15:29:15 -0500
commit1da24f6adb7fce37af79678dd053090831fda2f2 (patch)
treea0e23d30d4a4f9534ea9af0413b0b3055b2fb311 /packages/desktop/src/components
parente29dd27632da70d6e716fbca8a909b8361e8187f (diff)
downloadopencode-1da24f6adb7fce37af79678dd053090831fda2f2.tar.gz
opencode-1da24f6adb7fce37af79678dd053090831fda2f2.zip
wip: desktop work
Diffstat (limited to 'packages/desktop/src/components')
-rw-r--r--packages/desktop/src/components/assistant-message.tsx14
-rw-r--r--packages/desktop/src/components/prompt-input.tsx2
2 files changed, 8 insertions, 8 deletions
diff --git a/packages/desktop/src/components/assistant-message.tsx b/packages/desktop/src/components/assistant-message.tsx
index 38c06bbe5..7b4cfc71d 100644
--- a/packages/desktop/src/components/assistant-message.tsx
+++ b/packages/desktop/src/components/assistant-message.tsx
@@ -1,11 +1,11 @@
import type { Part, AssistantMessage, ReasoningPart, TextPart, ToolPart } from "@opencode-ai/sdk"
-import type { Tool } from "opencode/tool/tool"
-import type { ReadTool } from "opencode/tool/read"
import { children, Component, createMemo, For, Match, Show, Switch, type JSX } from "solid-js"
import { Dynamic } from "solid-js/web"
import { Markdown } from "./markdown"
import { Collapsible, Icon, IconProps } from "@opencode-ai/ui"
import { getDirectory, getFilename } from "@/utils"
+import type { Tool } from "opencode/tool/tool"
+import type { ReadTool } from "opencode/tool/read"
import type { ListTool } from "opencode/tool/ls"
import type { GlobTool } from "opencode/tool/glob"
import type { GrepTool } from "opencode/tool/grep"
@@ -188,7 +188,7 @@ ToolRegistry.register<typeof ListTool>({
name: "list",
render(props) {
return (
- <BasicTool icon="bullet-list" trigger={{ title: props.tool, subtitle: props.input.path || "/" }}>
+ <BasicTool icon="bullet-list" trigger={{ title: props.tool, subtitle: getDirectory(props.input.path || "/") }}>
<Show when={false && props.output}>
<div class="whitespace-pre">{props.output}</div>
</Show>
@@ -205,7 +205,7 @@ ToolRegistry.register<typeof GlobTool>({
icon="magnifying-glass-menu"
trigger={{
title: props.tool,
- subtitle: props.input.path || "/",
+ subtitle: getDirectory(props.input.path || "/"),
args: props.input.pattern ? ["pattern=" + props.input.pattern] : [],
}}
>
@@ -228,7 +228,7 @@ ToolRegistry.register<typeof GrepTool>({
icon="magnifying-glass-menu"
trigger={{
title: props.tool,
- subtitle: props.input.path || "/",
+ subtitle: getDirectory(props.input.path || "/"),
args,
}}
>
@@ -315,7 +315,7 @@ ToolRegistry.register<typeof EditTool>({
<div class="text-12-medium text-text-base capitalize">Edit</div>
<div class="flex">
<Show when={props.input.filePath?.includes("/")}>
- <span class="text-text-weak">{getDirectory(props.input.filePath!)}/</span>
+ <span class="text-text-weak">{getDirectory(props.input.filePath!)}</span>
</Show>
<span class="text-text-strong">{getFilename(props.input.filePath ?? "")}</span>
</div>
@@ -344,7 +344,7 @@ ToolRegistry.register<typeof WriteTool>({
<div class="text-12-medium text-text-base capitalize">Write</div>
<div class="flex">
<Show when={props.input.filePath?.includes("/")}>
- <span class="text-text-weak">{getDirectory(props.input.filePath!)}/</span>
+ <span class="text-text-weak">{getDirectory(props.input.filePath!)}</span>
</Show>
<span class="text-text-strong">{getFilename(props.input.filePath ?? "")}</span>
</div>
diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx
index 3838d19ba..dd549a045 100644
--- a/packages/desktop/src/components/prompt-input.tsx
+++ b/packages/desktop/src/components/prompt-input.tsx
@@ -289,7 +289,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<FileIcon node={{ path: i, type: "file" }} class="shrink-0 size-4" />
<div class="flex items-center text-14-regular">
<span class="text-text-weak whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0">
- {getDirectory(i)}/
+ {getDirectory(i)}
</span>
<span class="text-text-strong whitespace-nowrap">{getFilename(i)}</span>
</div>