microsoft / microsoft/vscode

Gaps in Multi-root workspace folders in Agents Window

Open
#330,148 0 comments 0 reactions 1 assignee Claimed by @lszomoru View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

This issue merely captures the left over items after this https://github.com/microsoft/vscode/pull/329531

**Background: What does PR solve https://github.com/microsoft/vscode/pull/329531**
1. Display diff summary in Sessions List from all folders
* The PR ensures we display the sum of all changes across all folders
* Works in Editor and Agents Window
2. Display the changed files at the end of each turn in Chat View
* The PR ensures we display the sum of all changes across all folders
* Works in Editor and Agents Window

**Decisions made in the above PR:**
* The sum of changes is across non-git + git repos
* Changes for non-git is computed using the existing fallback Edit Tracker
* Git re-pos (roots) are de-dupted
* If you have a multi-root folder, with folders `A/src/`, `A/tests/`, `B`, `C`
* If `A` is a git repo, then changes from `A` are counted once
* Nested Git repos are not accounted for.
* If you have a multi-root folder, with folders `A/src/`, `A/tests/`, `B`, `C`
* If `A/src/packages/xyz` is a nested git repo, then that is not taken into account.
* This is the behaviour in single folders today, hence no change
* No operations for Turn Changesets in multi-root sessions
* If a mult-root session is opened in Agents Window, there will be no Changeset operations for these turn changesets
* The solution is left for proper multi-root support in Agents Window.
* This had to be done as Turn Changesets have to support multi-root scenarios to get item 2. working (`2. Display the changed files at the end of each turn in Chat View`)
* Computing of changes is done with a limiter of 5 repos at a time.
* If we have 20 repos, then computing changes would be limited to 5 repos at a time.
* Borrowed technique and number 5 from SCM today
* Deferred monitoring changes in other folders
* Today we have file monitor only for primary folder,
* Will need to support all folders (will probably work on this, during this week)

**Note:** This is not an exhaustive list of the gaps in Agents Window for Changesets, its a list of areas identified/ignored when working on the above PR.

**Gaps/what is remaining in Agents Window (areas left/ignored when working on above PR):**
* Turn Changeset
* Review disablement of Changeset operations
* Review list of files displayed when viewing turn changes (currently list of files is limited to primary folder)
* Session, Uncommitted, Branch changesets still return/display changes from Primary workspace folder
* Similarly operations would need to be looked at (e.g. `Create PR` from across all folders/repos?)
* Last turn changes in Chat View of Agents Window
* We do display changes from all folders and the end of each turn in Chat View of Agents Window.
* However the file names are incorrect, (see difference below, Editor Window vs Agents Window)
* Editor Window vs Agents Window (see file paths)
Image
Image

* Changes view would need to support multi-root scenario (drive by the above two issue)
* PR link displayed in chat title might need to account for multiples from different repos
* Sometimes we display the PR in chat title, if we end up with multiple PRs across multiple repos, what do we do?
* Session List tooltip displays primary folder
* However over a multi-root session in sessions list, and we only display primary folder details
Image
* Changes pill in title of Chat Session focuses on primary folder
* Display other repo names? (or workspace folder name) Probably unrelated and addressed by @sandy081
* Branch name,
* Link must open all changes
Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.