Skip to content

Rename directory command to workspace#21877

Open
LyalinDotCom wants to merge 9 commits intomainfrom
workspace-command-scope-20737
Open

Rename directory command to workspace#21877
LyalinDotCom wants to merge 9 commits intomainfrom
workspace-command-scope-20737

Conversation

@LyalinDotCom
Copy link
Copy Markdown
Collaborator

@LyalinDotCom LyalinDotCom commented Mar 10, 2026

Summary

  • rename the slash command to /workspace while keeping /directory and /dir as compatibility aliases
  • update footer, settings, docs, and tips to use workspace terminology consistently
  • update MCP scope messaging to use workspace wording while keeping project as a compatibility alias

Closes #20737

Inspired by #20740.

@LyalinDotCom LyalinDotCom requested review from a team as code owners March 10, 2026 14:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 10, 2026

Size Change: +225 B (0%)

Total Size: 26.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 26 MB +225 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@gemini-cli gemini-cli bot added priority/p1 Important and should be addressed in the near term. area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 10, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the core terminology around managing multiple directories, transitioning from 'directory' to 'workspace' for enhanced conceptual clarity and consistency across the CLI. The changes ensure that user-facing commands, internal settings, and documentation reflect this new standard, while carefully preserving backward compatibility for existing workflows and configurations.

Highlights

  • Command Renaming: The /directory slash command has been renamed to /workspace for improved clarity and consistency. The old /directory and /dir commands will continue to function as compatibility aliases.
  • Terminology Update: All related documentation, settings, and UI elements have been updated to consistently use 'workspace' terminology instead of 'directory' or 'CWD' (Current Working Directory).
  • MCP Scope Alignment: The mcp (Multi-Config Provider) commands now default to a 'workspace' scope instead of 'project', with 'project' retained as a compatibility alias for existing configurations.
Changelog
  • docs/cli/settings.md
    • Updated the setting description for 'Hide CWD' to 'Hide Workspace Path'.
  • docs/reference/commands.md
    • Renamed the /directory command to /workspace and updated its usage examples to reflect the new name, while noting /directory and /dir as aliases.
  • docs/reference/configuration.md
    • Modified the description for the ui.footer.hideCWD setting to refer to 'workspace path'.
  • docs/tools/mcp-server.md
    • Changed the default configuration scope for gemini mcp add and gemini mcp remove commands from 'project' to 'workspace' in the documentation.
  • packages/cli/src/commands/mcp/add.test.ts
    • Updated test descriptions to use 'workspace settings' instead of 'project settings' for MCP server addition tests.
    • Added a test case to explicitly support --scope=project as a compatibility alias.
  • packages/cli/src/commands/mcp/add.ts
    • Introduced a displayScope variable to consistently show 'workspace' or 'user' in logs.
    • Updated the logic to check displayScope when determining if a command is run in the home directory.
    • Modified the command options to set 'workspace' as the default scope and include 'project' as a valid choice.
  • packages/cli/src/commands/mcp/remove.test.ts
    • Updated test descriptions to use 'workspace settings' instead of 'project settings' for MCP server removal tests.
  • packages/cli/src/commands/mcp/remove.ts
    • Introduced a displayScope variable for consistent logging messages.
    • Updated log messages to refer to 'workspace settings' instead of 'scope settings'.
    • Modified the command options to set 'workspace' as the default scope and include 'project' as a valid choice.
  • packages/cli/src/config/footerItems.ts
    • Updated the header and description for the 'workspace' footer item to remove the /directory alias mention and clarify it as 'Current workspace path'.
  • packages/cli/src/config/settingsSchema.ts
    • Updated the label and description for the ui.footer.hideCWD setting to 'Hide Workspace Path'.
  • packages/cli/src/services/BuiltinCommandLoader.ts
    • Renamed the import of directoryCommand to workspaceCommand and updated its usage in the command loader.
  • packages/cli/src/ui/commands/directoryCommand.test.tsx
    • Renamed the test file to workspaceCommand.test.tsx.
    • Updated imports and test suite descriptions to reflect workspaceCommand.
    • Modified error messages to refer to /workspace add instead of /directory add.
  • packages/cli/src/ui/commands/directoryCommand.tsx
    • Renamed the file to workspaceCommand.tsx.
    • Updated the command definition to workspaceCommand, setting its name to 'workspace' and adding 'directory' and 'dir' as alternative names.
    • Modified the sandbox profile error message to reference /workspace add.
  • packages/cli/src/ui/components/Footer.test.tsx
    • Updated test assertions to expect 'workspace' in the footer output instead of 'workspace (/directory)'.
  • packages/cli/src/ui/components/FooterConfigDialog.test.tsx
    • Updated test assertions to expect 'workspace' in the footer configuration dialog output instead of 'workspace (/directory)'.
  • packages/cli/src/ui/components/snapshots/Footer.test.tsx.snap
    • Updated snapshot tests to reflect the change from 'workspace (/directory)' to 'workspace' in the footer display.
  • packages/cli/src/ui/components/snapshots/FooterConfigDialog--FooterConfigDialog-highlights-the-active-item-in-the-preview.snap.svg
    • Updated SVG snapshot to reflect 'Current workspace path' and adjusted text lengths and positions for the 'workspace' item.
  • packages/cli/src/ui/components/snapshots/FooterConfigDialog--FooterConfigDialog-renders-correctly-with-default-settings.snap.svg
    • Updated SVG snapshot to reflect 'Current workspace path' and adjusted text lengths and positions for the 'workspace' item.
  • packages/cli/src/ui/components/snapshots/FooterConfigDialog--FooterConfigDialog-updates-the-preview-when-Show-footer-labels-is-toggled-off.snap.svg
    • Updated SVG snapshot to reflect 'Current workspace path' for the 'workspace' item.
  • packages/cli/src/ui/constants/tips.ts
    • Updated informative tips to use /workspace command and clarify that /dir and /directory are now shortcuts for /workspace.
  • schemas/settings.schema.json
    • Updated the title, description, and markdownDescription for the hideCWD setting to 'Hide Workspace Path'.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the terminology used for directories and project scope, renaming them to 'workspace'. The changes are consistently applied across documentation, UI, commands, and tests, with backward compatibility maintained through aliases. The implementation is thorough and I found no issues with the changes.

Copy link
Copy Markdown
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm

@jacob314
Copy link
Copy Markdown
Contributor

Great work on this terminology shift! Everything looks clean and the backward compatibility aliases for commands and scopes are well-implemented.

Minor nit / Suggestion for follow-up:
There is some lingering internal project terminology in the core architecture. For example, getProjectCommandsDir() in packages/core/src/config/storage.ts, and internal comments in packages/cli/src/services/FileCommandLoader.ts referring to // 2. Project commands.

It might be worth creating a quick follow-up issue to align these internal storage and loader methods with the new workspace terminology for complete cohesion.

Otherwise, this looks solid!

@LyalinDotCom LyalinDotCom added this pull request to the merge queue Mar 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. priority/p1 Important and should be addressed in the near term.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename 'directory' command to 'workspace' and unify terminology

2 participants