Skip to content

Configurable working directory#19

Open
adrian-schmidt-foehre-mint wants to merge 2 commits intodliedke:masterfrom
adrian-schmidt-foehre-mint:configurable-working-directory
Open

Configurable working directory#19
adrian-schmidt-foehre-mint wants to merge 2 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

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.

1 participant