Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/browser/components/DirectoryPickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const DirectoryPickerModal: React.FC<DirectoryPickerModalProps> = ({
</DialogDescription>
</DialogHeader>
{error && <div className="text-error mb-3 text-xs">{error}</div>}
<div className="bg-modal-bg border-border-medium mb-4 h-64 overflow-hidden rounded border">
<div className="bg-modal-bg border-border-medium mb-4 h-80 overflow-hidden rounded border">
<DirectoryTree
currentPath={root ? root.path : null}
entries={entries}
Expand Down
17 changes: 10 additions & 7 deletions src/browser/components/DirectoryTree.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import { Folder, FolderUp } from "lucide-react";

interface DirectoryTreeEntry {
name: string;
Expand Down Expand Up @@ -26,36 +27,38 @@ export const DirectoryTree: React.FC<DirectoryTreeProps> = (props) => {
}, [currentPath]);

return (
<div ref={containerRef} className="h-full overflow-y-auto p-2 font-mono text-xs">
<div ref={containerRef} className="h-full overflow-y-auto p-2 text-sm">
{isLoading && !currentPath ? (
<div className="text-muted py-4 text-center">Loading directories...</div>
) : (
<ul className="m-0 list-none p-0">
{currentPath && (
<li
className="text-muted cursor-pointer rounded px-2 py-1 text-xs hover:bg-white/5"
className="text-muted flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 hover:bg-white/5"
onClick={onNavigateParent}
>
...
<FolderUp size={16} className="text-muted shrink-0" />
<span>..</span>
</li>
)}

{!isLoading && !hasEntries ? (
<li className="text-muted px-2 py-1 text-xs">No subdirectories found</li>
<li className="text-muted px-2 py-1.5">No subdirectories found</li>
) : null}

{entries.map((entry) => (
<li
key={entry.path}
className="text-muted cursor-pointer rounded px-2 py-1 text-xs hover:bg-white/5"
className="flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 hover:bg-white/5"
onClick={() => onNavigateTo(entry.path)}
>
{entry.name}
<Folder size={16} className="shrink-0 text-yellow-500/80" />
<span className="truncate">{entry.name}</span>
</li>
))}

{isLoading && currentPath && !hasEntries ? (
<li className="text-muted px-2 py-1 text-xs">Loading directories...</li>
<li className="text-muted px-2 py-1.5">Loading directories...</li>
) : null}
</ul>
)}
Expand Down