vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Test: terminal chat agent `cwd` awareness

Open meganrogge opened this issue 7 months ago • 0 comments

Refs #17486

  • [ ] Windows
  • [ ] macOS
  • [ ] Linux

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

  1. 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).
  2. Run terminal commands via the chat agent in agent mode.
  3. 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.

Shell Integration: Rich example

meganrogge avatar May 23 '25 19:05 meganrogge