Skip to content

Configurable working directory#19

Merged
dliedke merged 3 commits intodliedke:masterfrom
adrian-schmidt-foehre-mint:configurable-working-directory
Mar 16, 2026
Merged

Configurable working directory#19
dliedke merged 3 commits intodliedke:masterfrom
adrian-schmidt-foehre-mint:configurable-working-directory

Conversation

@adrian-schmidt-foehre-mint
Copy link

@adrian-schmidt-foehre-mint adrian-schmidt-foehre-mint commented Mar 12, 2026

Summary

  • Adds a "Set Working Directory..." option to the settings menu that allows starting the terminal in a custom directory instead of the default solution directory
  • Supports absolute paths (e.g. C:\Projects\MyRepo) and relative paths to the solution directory (e.g. ..\OtherRepo)
  • Leave empty to use the default solution directory (fully backwards compatible)
  • Setting is persisted in the existing JSON settings file and restored across sessions
  • Changing the directory restarts the terminal automatically
  • Real-time path validation in the input dialog - text turns red when the typed path doesn't exist

Files changed

  • ClaudeCodeModels.cs - new CustomWorkingDirectory setting property
  • ClaudeCodeControl.Workspace.cs - split directory resolution into base + override logic
  • ClaudeCodeControl.ProviderManagement.cs - menu handler, WPF input dialog with live validation
  • ClaudeCodeControl.xaml - new menu item

Test plan

  • Open a solution, verify default behavior is unchanged (terminal starts in solution directory)
  • Set an absolute path via the menu, verify terminal restarts in that directory
  • Set a relative path (e.g. ..), verify it resolves correctly against the solution directory
  • Type an invalid path in the dialog, verify text turns red
  • Clear the setting, verify terminal returns to the default solution directory
  • Press Cancel in the dialog, verify nothing changes
  • Close and reopen VS, verify the setting persists

@dliedke
Copy link
Owner

dliedke commented Mar 15, 2026

Thanks for the contributions @adrian-schmidt-foehre-mint , can you pelase fix conflicts and post new version? Thanks!

Resolve conflict in ClaudeCodeModels.cs by keeping both
SelectedEffortLevel (from master) and CustomWorkingDirectory
(from this branch).
@adrian-schmidt-foehre-mint
Copy link
Author

You are welcome. The conflicts were resolved. I am not so familiar with c#, feel free to adapt :)

@dliedke dliedke merged commit 4e93dbf into dliedke:master Mar 16, 2026
@dliedke
Copy link
Owner

dliedke commented Mar 16, 2026

Thanks, I had a hardtime to finish the code because I used sonnet low model but I could finish it. I added support for dark/light theme and flags like skip-permissions (claude code) and full auto (codex) are now applied as well when changing working directory.

Version 7.5 was deployed to production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants