Add a home-restricted folder picker to the new-chat dialog

Server: list_directory returns a directory_listing (path, home, parent,
entries with is_dir/is_git_repo/hidden, truncated) confined to the server
user's home subtree after cleaning and resolving symlinks, refusing pseudo
filesystems and capping entries at 2000. Documented in docs/cli.md.

App: "Choose folder…" in the create dialog opens a picker (full-screen page
on phones, large dialog on wide windows, Material and Cupertino) with
breadcrumbs, filter, Show hidden, git badges, dimmed files, recent folders,
inline errors and "Start chat here". The probe app gains a folder fixture
for captures.
This commit is contained in:
2026-11-01 21:51:48 +00:00
parent eadd017bdc
commit eed3806efb
25 changed files with 2333 additions and 9 deletions
+4
View File
@@ -234,6 +234,10 @@ type Message struct {
ChatShellOutputQuery *ChatShellOutputQuery `json:"chat_shell_output_query,omitempty"`
ChatShells []ChatShell `json:"chat_shells,omitempty"`
ChatShellOutput *ChatShellOutputPage `json:"chat_shell_output,omitempty"`
// ListDirectory is the list_directory body and DirectoryListing its reply:
// the home-restricted folder picker listing (see directories.go).
ListDirectory *DirectoryListRequest `json:"list_directory,omitempty"`
DirectoryListing *DirectoryListingResult `json:"directory_listing,omitempty"`
// ChatAttachmentImageRequest is the chat_attachment_image body and
// ChatAttachmentImage its reply.
ChatAttachmentImageRequest *ChatAttachmentImageRequest `json:"chat_attachment_image_request,omitempty"`