Click the little chevron next to the name — that’s the disclosure button
Save Panel
/ NSSavePanel · View.fileExporter(isPresented:document:contentType:defaultFilename:onCompletion:) /
also called save dialog, save-as panel, file save picker, NSSavePanel
A save panel is the system dialog for choosing a filename, location, and sometimes file format. Its compact form can expand into a Finder-like browser with a sidebar and directory contents. NSSavePanel supplies the native behavior, validation, sandbox integration, and sheet presentation.
If you called it…
…you meant a save panel.
Anatomy — every part, named
- 1Name field
NSSavePanel.nameFieldStringValueThe editable Save As text box is the panel's name field.
- 3Format pop-up
NSSavePanel.allowedContentTypesThe file-type selector beneath the name is the format pop-up, constrained by the panel's allowed content types.
Prompt — paste into your agent
Present the standard Save Panel with NSSavePanel (SwiftUI workflow: View.fileExporter), including its editable name field, disclosure button for the expanded file browser, allowed-content-type format pop-up, and Finder-style sidebar. Do not rebuild the system save dialog from custom controls.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my macOS save panel (NSSavePanel, NSOpenPanel). Rule out: sandboxed URLs failing later because startAccessingSecurityScopedResource was never called or a bookmark was never saved; allowedContentTypes filtering out everything so Save stays disabled; runModal blocking the app when beginSheetModal was intended; the panel opening in the wrong folder because directoryURL is set after presentation. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSSavePanel | |
| SwiftUI | View.fileExporter(isPresented:document:contentType:defaultFilename:onCompletion:) | |
| AppKit | NSSavePanel.beginSheetModal(for:completionHandler:) |