Skip to content

Conversation

@NaccOll
Copy link
Contributor

@NaccOll NaccOll commented Aug 10, 2025

#6897

In multi-folder workspaces, mimic the history and index status, binding the dialog to the CWD when creating a new ChatView. This will prevent CWD switching during a conversation and further confusion.


Important

Fixes multi-folder workspace handling by using cline.cwd for workspace path determination in getCheckpointService() and codebaseSearchTool().

  • Behavior:
    • In getCheckpointService() in index.ts, use cline.cwd as the workspace directory if available, preventing CWD switching during conversations.
    • In codebaseSearchTool() in codebaseSearchTool.ts, use cline.cwd as the workspace path if available, ensuring correct path determination.
  • Misc:

This description was created by Ellipsis for ded505d6e8e1f24dc0070737ff34fe5543a8a5dd. You can customize this summary. It will automatically update as commits are pushed.

@NaccOll NaccOll requested review from cte, jr and mrubens as code owners August 10, 2025 16:25
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Aug 10, 2025
@NaccOll NaccOll force-pushed the hotfix-multiple-folder-workspace-checkpoint branch from ded505d to e05e5a6 Compare August 10, 2025 16:26
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and found that the PR partially addresses issue #6897 but appears to be incomplete based on the description.

Missing Implementation:
The PR description mentions fixing both getCheckpointService() and codebaseSearchTool(), but I notice that codebaseSearchTool in src/core/tools/codebaseSearchTool.ts (line 20) still uses getWorkspacePath() directly instead of cline.cwd || getWorkspacePath(). Was this intentionally left out or should it be included in this PR?


try {
const workspaceDir = getWorkspacePath()
const workspaceDir = cline.cwd || getWorkspacePath()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change sufficient? Looking at the Task class implementation, cline.cwd is just a getter that returns this.workspacePath (lines 2286-2288 in Task.ts), which is already set from getWorkspacePath() during Task construction. This means cline.cwd || getWorkspacePath() might return the same value in both cases.

Could you clarify if there's a scenario where cline.cwd would differ from getWorkspacePath() in multi-folder workspaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

switch folder will cause incorrent

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 10, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 12, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 12, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Thank you @NaccOll!

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Aug 14, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 14, 2025
@mrubens mrubens merged commit 57389bf into RooCodeInc:main Aug 14, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 14, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Aug 14, 2025
@NaccOll NaccOll deleted the hotfix-multiple-folder-workspace-checkpoint branch August 15, 2025 11:57
fxcl added a commit to tameslabs/Roo-Cline that referenced this pull request Aug 16, 2025
* main: (70 commits)
  fix: use native Ollama API instead of OpenAI compatibility layer (RooCodeInc#7137)
  feat: add support for OpenAI gpt-5-chat-latest model (RooCodeInc#7058)
  Make enhance with task history default to true (RooCodeInc#7140)
  Bump cloud version to 0.16.0 (RooCodeInc#7135)
  Release: v1.51.0 (RooCodeInc#7130)
  Add an API for resuming tasks by ID (RooCodeInc#7122)
  Add support for task page event population (RooCodeInc#7117)
  fix: add type check before calling .match() on diffItem.content (RooCodeInc#6905) (RooCodeInc#6906)
  Fix: Enable save button for provider dropdown and checkbox changes (RooCodeInc#7113)
  fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (RooCodeInc#6902)
  Hotfix multiple folder workspace checkpoint (RooCodeInc#6903)
  fix: prevent XML entity decoding in diff tools (RooCodeInc#7107) (RooCodeInc#7108)
  Refactor task execution system: improve call stack management (RooCodeInc#7035)
  Changeset version bump (RooCodeInc#7104)
  feat(web): fill missing SEO-related values (RooCodeInc#7096)
  Update contributors list (RooCodeInc#6883)
  Release v3.25.15 (RooCodeInc#7103)
  fix: add /evals page to sitemap generation (RooCodeInc#7102)
  feat: implement sitemap generation in TypeScript and remove XML file (RooCodeInc#6206)
  fix: reset condensing state when switching tasks (RooCodeInc#6922)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants