Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code execution support in Shell Copilot #43

Open
daxian-dbw opened this issue Oct 25, 2023 · 0 comments
Open

Code execution support in Shell Copilot #43

daxian-dbw opened this issue Oct 25, 2023 · 0 comments
Labels
code-execution Issue-Enhancement The issue is a feature or idea

Comments

@daxian-dbw
Copy link
Member

Summary of the new feature / enhancement

I think the shell should have utility functions for running

  • shell code (PowerShell and CMD on Windows, PowerShell and bash on Unix)
  • python code, if python is installed and available in PATH
  • node JS code, if node is installed and available in PATH

An individual plugin can decide how to integrate those code invocation functionality with its LLM backend (via function calling for example).

At the meantime, we can enhance the existing /code command with /code run sub command, to execute the code block from the last response.

We will prompt for user's approval to run code -- need to display the code block to be executed, and we may want to analyze the code block using an LLM and show the analysis result to user too when prompt for approval.

Alternatively, we could have a /code analyze sub command for user to explicitly ask LLM to analyze the code block. And /code run just runs the code after user confirms yes.

Proposed technical implementation details (optional)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-execution Issue-Enhancement The issue is a feature or idea
Projects
None yet
Development

No branches or pull requests

2 participants