terminal_view: Add support for opening the terminal in the current file directory (#47739)

Closes #14863

Changes:
- Added `CurrentFileDirectory` variant to the `WorkingDirectory` enum.
- New terminals now open in the directory of the currently active file
when this option is set.
- Falls back to project directory, then first workspace directory if no
file is active.

Release Notes:

- Added `current_file_directory` option for terminal's
`working_directory` setting. Set `"working_directory":
current_file_directory"` to open new terminals in the directory of your
currently open file.

---

Still relatively new to Rust, so happy to receive any feedback! 😁
6d772579e1Ruben Fricke committed on 2/2/2026, 8:49:09 AM· committed by GitHubparent782f91f
7 files changedLine totals unavailable