Closed
Description
Refs #17486
- Windows @eleanorjboyd
- macOS @isidorn
- Linux @chrmarti
Complexity: 4
Authors: @meganrogge, @roblourens
Terminal Chat Agent: cwd
Awareness
We've introduced current working directory (cwd) awareness to the terminal chat agent this iteration to address issues like #17486. Note that this only applies to non-background terminals.
Key Changes
- Terminal and chat session tracking has been refactored.
- This refactor and other changes enable the agent to accurately understand the terminal's cwd when shell integration is active and a Copilot terminal is present.
Test Instructions
- Open a new terminal with shell integration enabled.
- You can confirm shell integration is working by hovering over the terminal tab and checking that it says
Shell Integration: Rich
(see screenshot below).
- You can confirm shell integration is working by hovering over the terminal tab and checking that it says
- Run terminal commands via the chat agent in agent mode.
- Verify that:
- The command executes in the correct working directory.
- Chat accurately reflects the current directory in its responses or logic.
- Closing sessions closes the terminals.
- Reloading the window persists Copilot terminals.
💡 This feature depends on shell integration, so please ensure it’s active during testing.
