Skip to content

Commit 4013d4a

Browse files
Copilotstephentoub
andauthored
Fix build: update .NET test Workspace→Workspaces, fix Python rpc.py lint errors
Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/89ca7d21-b99f-493f-9155-4ba940ad7293 Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 16df240 commit 4013d4a

2 files changed

Lines changed: 1221 additions & 309 deletions

File tree

dotnet/test/RpcTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,25 @@ public async Task Should_Create_List_And_Read_Workspace_Files()
135135
var session = await CreateSessionAsync();
136136

137137
// Initially no files
138-
var initialFiles = await session.Rpc.Workspace.ListFilesAsync();
138+
var initialFiles = await session.Rpc.Workspaces.ListFilesAsync();
139139
Assert.Empty(initialFiles.Files);
140140

141141
// Create a file
142142
var fileContent = "Hello, workspace!";
143-
await session.Rpc.Workspace.CreateFileAsync("test.txt", fileContent);
143+
await session.Rpc.Workspaces.CreateFileAsync("test.txt", fileContent);
144144

145145
// List files
146-
var afterCreate = await session.Rpc.Workspace.ListFilesAsync();
146+
var afterCreate = await session.Rpc.Workspaces.ListFilesAsync();
147147
Assert.Contains("test.txt", afterCreate.Files);
148148

149149
// Read file
150-
var readResult = await session.Rpc.Workspace.ReadFileAsync("test.txt");
150+
var readResult = await session.Rpc.Workspaces.ReadFileAsync("test.txt");
151151
Assert.Equal(fileContent, readResult.Content);
152152

153153
// Create nested file
154-
await session.Rpc.Workspace.CreateFileAsync("subdir/nested.txt", "Nested content");
154+
await session.Rpc.Workspaces.CreateFileAsync("subdir/nested.txt", "Nested content");
155155

156-
var afterNested = await session.Rpc.Workspace.ListFilesAsync();
156+
var afterNested = await session.Rpc.Workspaces.ListFilesAsync();
157157
Assert.Contains("test.txt", afterNested.Files);
158158
Assert.Contains(afterNested.Files, f => f.Contains("nested.txt"));
159159
}

0 commit comments

Comments
 (0)