Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5ca4b5
Assistant: pick several files at once or a whole folder; files past t…
sethml Nov 14, 2026
acdd8d9
Assistant: the file chips scroll past about three rows, so a large ba…
sethml Nov 14, 2026
f1a2231
Merge branch 'main' into agent-chat-attach-many-files
sethml Nov 16, 2026
5634b35
Merge fix: the file picker hands its chosen paths to the completion
sethml Nov 17, 2026
d06780b
Assistant: Claude Code can read files sent by path, and the agent is …
sethml Nov 17, 2026
718de6b
Merge branch 'main' into agent-chat-attach-many-files
sethml Nov 17, 2026
b97e2cb
Assistant: the + menu picks several files and folders of any type, in…
sethml Nov 17, 2026
3c5e8fa
Assistant: turning Claude Code's read tools on no longer loses a firs…
sethml Nov 17, 2026
ff6a3cc
Assistant: attachments by agent kind; endpoints get PDFs as documents…
sethml Nov 18, 2026
0f93d19
Assistant: format the endpoint attachments test (#16452)
sethml Nov 18, 2026
9a649e7
Assistant: New chat replaces a reopening session; only named paths re…
sethml Nov 18, 2026
851ce53
Assistant: note that Claude Code's Glob and Grep don't follow links o…
sethml Nov 20, 2026
12429b4
Assistant chat: Claude Code's read tools are on from the start; reads…
sethml Nov 20, 2026
86e3347
Merge main into agent-chat-attach-many-files
sethml Nov 20, 2026
d08b712
Merge remote-tracking branch 'origin/main' into agent-chat-attach-man…
sethml Nov 20, 2026
7dbae76
Merge main into agent-chat-attach-many-files
sethml Nov 22, 2026
2eab160
Merge main into agent-chat-attach-many-files
sethml Nov 23, 2026
8ee761f
Merge main into agent-chat-attach-many-files
sethml Nov 23, 2026
8e11069
Assistant: Claude Code's read tools fail closed when its adapter isn'…
sethml Nov 23, 2026
fc1eea8
Merge main into agent-chat-attach-many-files
sethml Nov 28, 2026
aeed3ca
Merge remote-tracking branch 'origin/main' into agent-chat-attach-man…
sethml Nov 28, 2026
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
233 changes: 41 additions & 192 deletions Cargo.lock

Large diffs are not rendered by default.

68 changes: 60 additions & 8 deletions apps/solidcraft/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,15 @@ impl DialogFolder {
Some(picked.path().to_string_lossy().into_owned())
}

/// A dialog's answer of several files as paths, their folder remembered for the next dialog.
fn answer_all(&self, picked: Option<Vec<rfd::FileHandle>>) -> Vec<String> {
let picked = picked.unwrap_or_default();
if let Some(first) = picked.first() {
self.chosen(first.path());
}
picked.iter().map(|p| p.path().to_string_lossy().into_owned()).collect()
}

/// A file was chosen in a dialog of this kind: remember its folder for the next one.
fn picked(&self, kind: DialogKind, file: &std::path::Path) {
self.chosen(file);
Expand Down Expand Up @@ -1059,6 +1068,19 @@ impl DialogFolder {
}
}

/// Extensions as given and in lower and upper case, each once (Linux dialogs match case).
fn any_case(exts: &[&str]) -> Vec<String> {
let mut all: Vec<String> = Vec::new();
for e in exts {
for v in [e.to_string(), e.to_ascii_lowercase(), e.to_ascii_uppercase()] {
if !all.contains(&v) {
all.push(v);
}
}
}
all
}

/// Linux file dialogs match patterns by case, so each extension goes in as lower and upper
/// case, plus FreeCAD's own mixed casing.
fn case_variants(exts: &[&str]) -> Vec<String> {
Expand Down Expand Up @@ -1128,8 +1150,15 @@ fn services(cc: &eframe::CreationContext<'_>, folder: &DialogFolder) -> Services
let open_parent = parent.clone();
let program_parent = parent.clone();
let file_parent = parent.clone();
let files_parent = parent.clone();
let folders_parent = parent.clone();
let folder_parent = parent.clone();
#[cfg(target_os = "macos")]
let any_parent = parent.clone();
let (open_folder, file_folder, save_folder, browse_folder) = (folder.clone(), folder.clone(), folder.clone(), folder.clone());
let (files_folder, folders_folder) = (folder.clone(), folder.clone());
#[cfg(target_os = "macos")]
let any_folder = folder.clone();
Services {
pick_open: Some(Box::new(move |first: &[&str]| {
// The chooser that opens may not be the desktop's own (#10159).
Expand Down Expand Up @@ -1164,20 +1193,43 @@ fn services(cc: &eframe::CreationContext<'_>, folder: &DialogFolder) -> Services
// One kind of file (the agent chat's attachments): only the types it names, as given and in
// lower and upper case (Linux dialogs match case; macOS allows just the listed types).
pick_file: Some(Box::new(move |label: &str, exts: &[&str]| {
let mut all: Vec<String> = Vec::new();
for e in exts {
for v in [e.to_string(), e.to_ascii_lowercase(), e.to_ascii_uppercase()] {
if !all.contains(&v) {
all.push(v);
}
}
}
let all = any_case(exts);
let all: Vec<&str> = all.iter().map(String::as_str).collect();
// Any other file attaches by reference, so the list is not the only choice.
let future = file_folder.start(DialogKind::Open, file_parent.clone()).add_filter(label, &all).add_filter("All files", &["*"]).pick_file();
let folder = file_folder.clone();
Box::pin(async move { folder.answer(DialogKind::Open, future.await) })
})),
// Several files at once (the agent chat's attachments: a batch of photos): only the types
// named, as `pick_file` lists them (for an endpoint, which is refused any other); with none
// named (for a coding agent, which reads any file itself), any file.
pick_files: Some(Box::new(move |label: &str, exts: &[&str]| {
let mut dialog = files_folder.start(DialogKind::Open, files_parent.clone());
if !exts.is_empty() {
let all = any_case(exts);
let all: Vec<&str> = all.iter().map(String::as_str).collect();
dialog = dialog.add_filter(label, &all);
}
let future = dialog.pick_files();
let folder = files_folder.clone();
Box::pin(async move { folder.answer_all(future.await) })
})),
// Several folders at once (the agent chat attaches them by path).
pick_folders: Some(Box::new(move || {
let future = folders_folder.start(DialogKind::Open, folders_parent.clone()).pick_folders();
let folder = folders_folder.clone();
Box::pin(async move { folder.answer_all(future.await) })
})),
// macOS's open panel chooses files and folders together; Windows' and Linux's dialogs
// choose one or the other, so there the chat offers both.
#[cfg(target_os = "macos")]
pick_files_or_folders: Some(Box::new(move || {
let future = any_folder.start(DialogKind::Open, any_parent.clone()).pick_files_or_folders();
let folder = any_folder.clone();
Box::pin(async move { folder.answer_all(future.await) })
})),
#[cfg(not(target_os = "macos"))]
pick_files_or_folders: None,
pick_program: Some(Box::new(move || {
let dialog = program_parent.clone().set_title("Choose your slicer");
let dialog = if cfg!(target_os = "windows") { dialog.add_filter("Programs", &["exe"]) } else { dialog };
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6401,7 +6401,7 @@
"ui.add_parameter": "إضافة معامل",
"ui.agent_chat": "محادثة الوكيل",
"ui.agent_chat_add": "إرفاق ملفات",
"ui.agent_chat_add_file": "اختر ملفًا…",
"ui.agent_chat_add_file": "اختر ملفات…",
"ui.agent_chat_allow": "سماح",
"ui.agent_chat_allow_once": "السماح مرة واحدة",
"ui.agent_chat_allowed": "مسموح",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6389,7 +6389,7 @@
"ui.add_parameter": "Parameter hinzufügen",
"ui.agent_chat": "Agenten-Chat",
"ui.agent_chat_add": "Dateien anhängen",
"ui.agent_chat_add_file": "Datei auswählen…",
"ui.agent_chat_add_file": "Dateien auswählen…",
"ui.agent_chat_allow": "Erlauben",
"ui.agent_chat_allow_once": "Einmal erlauben",
"ui.agent_chat_allowed": "Erlaubt",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6401,7 +6401,7 @@
"ui.add_parameter": "Add parameter",
"ui.agent_chat": "Agent chat",
"ui.agent_chat_add": "Attach files",
"ui.agent_chat_add_file": "Choose a file…",
"ui.agent_chat_add_file": "Choose files…",
"ui.agent_chat_allow": "Allow",
"ui.agent_chat_allow_once": "Allow once",
"ui.agent_chat_allowed": "Allowed",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5827,7 +5827,7 @@
"ui.add_parameter": "Añadir parámetro",
"ui.agent_chat": "Chat del agente",
"ui.agent_chat_add": "Adjuntar archivos",
"ui.agent_chat_add_file": "Elegir un archivo…",
"ui.agent_chat_add_file": "Elegir archivos…",
"ui.agent_chat_allow": "Permitir",
"ui.agent_chat_allow_once": "Permitir una vez",
"ui.agent_chat_allowed": "Permitido",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5973,7 +5973,7 @@
"ui.add_parameter": "Ajouter un paramètre",
"ui.agent_chat": "Chat de l'agent",
"ui.agent_chat_add": "Joindre des fichiers",
"ui.agent_chat_add_file": "Choisir un fichier…",
"ui.agent_chat_add_file": "Choisir des fichiers…",
"ui.agent_chat_allow": "Autoriser",
"ui.agent_chat_allow_once": "Autoriser une fois",
"ui.agent_chat_allowed": "Autorisé",
Expand Down
2 changes: 1 addition & 1 deletion assets/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -6401,7 +6401,7 @@
"ui.add_parameter": "הוספת פרמטר",
"ui.agent_chat": "צ'אט עם סוכן",
"ui.agent_chat_add": "צירוף קבצים",
"ui.agent_chat_add_file": "בחירת קובץ…",
"ui.agent_chat_add_file": "בחירת קבצים…",
"ui.agent_chat_allow": "התרה",
"ui.agent_chat_allow_once": "התרה פעם אחת",
"ui.agent_chat_allowed": "הותר",
Expand Down
Loading
Loading