Description:
Describe the bug
When using the extension in an environment with multiple active workspaces (e.g., multiple repositories or different versions of the same project open at the same time), the extension/IDE integration does not reliably detect or pass the active editor window's context to the agent.
As a result, the agent frequently executes terminal commands, performs searches, or makes file modifications in a random or incorrect workspace (e.g., targeting a legacy directory or a completely different repository) rather than the one the user is currently focused on.
Steps to Reproduce
- Open multiple workspaces/folders in the IDE environment (e.g., project-a , project-a-legacy , and project-b ). It can be separated VSC windows
- Have a file from project-a open and focused in the active editor.
- Ask the agent a general prompt to search or edit a file (e.g., "Find the main configuration file and update it").
- Observe that the agent executes the task in project-a-legacy or project-b because the request metadata lacks the active file path or workspace context.
Expected Behavior
- The extension should automatically track which workspace/editor tab has the user's current focus/cursor.
- This focus context (active workspace path, active file path) should be automatically attached to the metadata sent with the prompt.
- The agent should prioritize the focused workspace as the default path for executing shell commands and editing files, unless the user explicitly specifies a different
directory.
Proposed Solutions / Suggestions
• Always include an active_file and active_workspace key in the request metadata.
• If the editor focus is lost or ambiguous, the system should prompt the user to select the target workspace/repository before proceeding, instead of letting the agent make
a guess.
Description:
Describe the bug
When using the extension in an environment with multiple active workspaces (e.g., multiple repositories or different versions of the same project open at the same time), the extension/IDE integration does not reliably detect or pass the active editor window's context to the agent.
As a result, the agent frequently executes terminal commands, performs searches, or makes file modifications in a random or incorrect workspace (e.g., targeting a legacy directory or a completely different repository) rather than the one the user is currently focused on.
Steps to Reproduce
Expected Behavior
directory.
Proposed Solutions / Suggestions
• Always include an active_file and active_workspace key in the request metadata.
• If the editor focus is lost or ambiguous, the system should prompt the user to select the target workspace/repository before proceeding, instead of letting the agent make
a guess.