import { Component } from "solid-js" import { useLocal } from "@/context/local" import { Dialog } from "@opencode-ai/ui/dialog" import { List } from "@opencode-ai/ui/list" import { FileIcon } from "@opencode-ai/ui/file-icon" import { getDirectory, getFilename } from "@opencode-ai/util/path" export const DialogFileSelect: Component<{ onOpenChange?: (open: boolean) => void onSelect?: (path: string) => void }> = (props) => { const local = useLocal() let closeButton!: HTMLButtonElement return ( Select file x} onSelect={(x) => { if (x) { props.onSelect?.(x) } closeButton.click() }} > {(i) => (
{getDirectory(i)} {getFilename(i)}
)}
) }