Conversation
There was a problem hiding this comment.
Pull request overview
Adds SessionFs (virtual/session-scoped filesystem) support across the Python, Go, and .NET SDKs so the client can register as a filesystem provider and the CLI can call back into the SDK for session file I/O.
Changes:
- Introduces SessionFs config + handler interfaces and wires JSON-RPC request handling for
sessionFs.*methods in Python/Go/.NET clients. - Extends session creation/resume APIs to require a per-session SessionFs handler factory when SessionFs is enabled at the client level.
- Adds unit + E2E coverage for SessionFs behavior (routing writes through provider + resuming from provider state).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| python/test_client.py | Unit tests for Python SessionFs config storage + missing handler validation. |
| python/e2e/test_session_fs.py | Python E2E coverage using an in-memory SessionFs handler and replay snapshots. |
| python/copilot/session.py | Stores per-session SessionFs handler on CopilotSession. |
| python/copilot/client.py | Adds SessionFsConfig/SessionFsHandler, registers provider, and handles sessionFs.* RPC callbacks. |
| python/copilot/init.py | Exports SessionFs types from the package. |
| go/types.go | Adds Go SessionFsConfig + SessionFsHandler and handler factory fields on session configs. |
| go/session.go | Stores per-session SessionFs handler on Session. |
| go/internal/e2e/session_fs_test.go | Go E2E coverage using an in-memory SessionFs handler and replay snapshots. |
| go/client.go | Registers SessionFs provider and implements sessionFs.* JSON-RPC request handlers. |
| go/client_test.go | Unit tests for Go SessionFs options + missing handler validation. |
| dotnet/test/SessionFsTests.cs | .NET unit tests for SessionFs config + handler factory cloning behavior. |
| dotnet/test/SessionFsE2ETests.cs | .NET E2E coverage using an in-memory SessionFs handler and replay snapshots. |
| dotnet/src/Types.cs | Adds .NET SessionFs types and JSON source-gen registrations; extends session configs. |
| dotnet/src/Session.cs | Stores per-session SessionFs handler and routes sessionFs.* requests to it. |
| dotnet/src/Client.cs | Registers provider on connect; enforces handler factory requirement; wires RPC handlers. |
|
Closing because of #1036 |
|
Thanks for submitting this, @j1m-ryan! I started by thinking we'd use this, but then realised we needed to add a load of new codegen logic to C#/Python/Go, and by the time I had done that Copilot finished off most of the rest of it. So I hope you don't mind the duplication of work. It was easier to complete by letting Copilot get to the end of the process on its own. |
|
Not at all, thank you @SteveSandersonMS, we are glad its being worked on by the team |
Adds SessionFs virtual file system support to the .NET, Go, and Python SDKs.