Commit 34e3a2b
authored
Add real Copilot SDK integration tests for agent host protocol (#310372)
* Add real Copilot SDK integration tests for agent host protocol
Add integration tests that exercise the agent host protocol server against
the real Copilot SDK (gated behind AGENT_HOST_REAL_SDK=1 env var). Tests
cover:
- Simple message round-trip
- Tool call permission request flow
- Turn abort
- Working directory correctness via sessionAdded notification and subscribe
snapshot
- Worktree isolation: verifies the resolved worktree path survives a
session refresh triggered by tool changes (activeClientChanged)
Also adds a startRealServer() helper to testHelpers.ts for launching the
server without a mock agent.
(Written by Copilot)
* Address Copilot review: fix URIs, timeouts, temp dir cleanup, git identity
- Fix invalid file URIs: use URI.file() instead of string interpolation
- Add 30s timeouts to authenticate/createSession calls in helper
- Use real temp dirs for permission test instead of hard-coded path
- Move temp dir cleanup to teardown via tempDirs tracking array
- Configure git user.name/email in worktree test for portability
- Remove forbidden 'path' import (ESLint layer restriction)
- Fix JSDoc on startRealServer() removing incorrect GITHUB_TOKEN mention
(Written by Copilot)1 parent 1f63695 commit 34e3a2b
File tree
2 files changed
+419
-0
lines changed- src/vs/platform/agentHost/test/node/protocol
2 files changed
+419
-0
lines changedLines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
220 | 262 | | |
221 | 263 | | |
222 | 264 | | |
| |||
0 commit comments