Skip to content

Conversation

@peterschmidt85
Copy link
Contributor

@peterschmidt85 peterschmidt85 commented Jan 22, 2026

If invoked in the interactive mode, both dstack project and dstack project set-default allow the user to select/change the default project interactively via ꜛꜜ Enter

…al is in the interactive mode)

Fixing test and review
…I, updating dependencies in pyproject.toml accordingly.
@peterschmidt85
Copy link
Contributor Author

@r4victor FYI, replaced the library to support Windows too

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

default=True,
)
config_manager.save()
console.print("[grey58]OK[/]")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated code for interactive project selection

Low Severity

The interactive project selection logic in _project (lines 222-234) is duplicated verbatim in _set_default's else branch (lines 251-263). Both blocks create a ConfigManager, get project configs, call select_default_project, and save the selection. This 13-line block could be extracted into a private helper method like _select_and_set_default_project() to reduce maintenance burden and ensure consistent behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

@peterschmidt85 peterschmidt85 changed the title [UX] (Minor) Allow to select the project interactively (if the terminal is in the interactive mode) [UX] Make dstack project and dstack project set-default interactive for default project selection Jan 23, 2026
@peterschmidt85 peterschmidt85 merged commit 802c450 into master Jan 23, 2026
29 checks passed
@peterschmidt85 peterschmidt85 deleted the dstack-project-interactive branch January 23, 2026 14:52
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.

3 participants