project_panel: Add auto_open settings (#40435)

- Based on #40234, and improvement of #40331

Release Notes:

- Added granular settings to control when files auto-open in the project
panel (project_panel.auto_open.on_create, on_paste, on_drop)

<img width="662" height="367" alt="Screenshot_2025-10-16_17-28-31"
src="https://github.com/user-attachments/assets/930a0a50-fc89-4c5d-8d05-b1fa2279de8b"
/>

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
Miguel Cárdenas
2025-11-12 03:23:40 +05:30
committed by GitHub
co-authored by Smit Barmase
parent 854c6873c7
commit 2ad7ecbcf0
13 changed files with 542 additions and 34 deletions
+25 -1
View File
@@ -4280,7 +4280,11 @@ Run the {#action theme_selector::Toggle} action in the command palette to see a
"hide_root": false,
"hide_hidden": false,
"starts_open": true,
"open_file_on_paste": true
"auto_open": {
"on_create": true,
"on_paste": true,
"on_drop": true
}
}
}
```
@@ -4489,6 +4493,26 @@ Run the {#action theme_selector::Toggle} action in the command palette to see a
}
```
### Auto Open
- Description: Control whether files are opened automatically after different creation flows in the project panel.
- Setting: `auto_open`
- Default:
```json [settings]
"auto_open": {
"on_create": true,
"on_paste": true,
"on_drop": true
}
```
**Options**
- `on_create`: Whether to automatically open newly created files in the editor.
- `on_paste`: Whether to automatically open files after pasting or duplicating them.
- `on_drop`: Whether to automatically open files dropped from external sources.
## Agent
Visit [the Configuration page](./ai/configuration.md) under the AI section to learn more about all the agent-related settings.