Browse Source

fix(app): folder suggestions missing last part

Adam 1 month ago
parent
commit
07015aae07
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/app/src/components/prompt-input.tsx

+ 4 - 1
packages/app/src/components/prompt-input.tsx

@@ -1394,7 +1394,10 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
                             />
                             />
                             <div class="flex items-center text-14-regular min-w-0">
                             <div class="flex items-center text-14-regular min-w-0">
                               <span class="text-text-weak whitespace-nowrap truncate min-w-0">
                               <span class="text-text-weak whitespace-nowrap truncate min-w-0">
-                                {getDirectory((item as { type: "file"; path: string }).path)}
+                                {(() => {
+                                  const path = (item as { type: "file"; path: string }).path
+                                  return path.endsWith("/") ? path : getDirectory(path)
+                                })()}
                               </span>
                               </span>
                               <Show when={!(item as { type: "file"; path: string }).path.endsWith("/")}>
                               <Show when={!(item as { type: "file"; path: string }).path.endsWith("/")}>
                                 <span class="text-text-strong whitespace-nowrap">
                                 <span class="text-text-strong whitespace-nowrap">