Skip to content

Commit

Permalink
feat(agent): add shell capability support
Browse files Browse the repository at this point in the history
Enabling terminal capability in Visual Studio for testing agentic chat: https://sourcegraph.com/github.com/sourcegraph/cody@main/-/blob/agent/bindings/kotlin/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientCapabilities.kt?L22

## Test plan

- Create a new solution
- Start adding code
- Check if shell commands can be executed
- Verify that the shell capability is properly configured in the client
  • Loading branch information
abeatrix committed Jan 8, 2025
1 parent cb73d11 commit af024fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Cody.AgentTester/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private static async Task Initialize()
WebviewMessages = "string-encoded",
GlobalState = "stateless",
Secrets = "stateless",
Shell = Capability.Enabled,
},
ExtensionConfiguration = new ExtensionConfiguration
{
Expand Down
1 change: 1 addition & 0 deletions src/Cody.Core/Agent/Protocol/ClientCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class ClientCapabilities
public Capability? Edit { get; set; }
public Capability? EditWorkspace { get; set; }
public Capability? UntitledDocuments { get; set; }
public Capability? Shell { get; set; }
public Capability? ShowDocument { get; set; }
public Capability? CodeLenses { get; set; }
public ShowWindowMessageCapability? ShowWindowMessage { get; set; }
Expand Down
1 change: 1 addition & 0 deletions src/Cody.Core/Infrastructure/ConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public ClientInfo GetClientInfo()
EditWorkspace = Capability.None,
ProgressBars = Capability.Enabled,
CodeLenses = Capability.None,
Shell = Capability.Enabled,
ShowDocument = Capability.Enabled,
Ignore = Capability.Enabled,
UntitledDocuments = Capability.None,
Expand Down

0 comments on commit af024fb

Please sign in to comment.