AI Coder Pro
A VS Code extension that provides both a custom chat panel for interactive conversations and intelligent code autocompletion. With this extension, you can chat via a dedicated webview panel, view your chat history, and trigger autocompletion suggestions manually or using a simple in‑file request syntax.
Features
Custom Chat Panel:
Engage in conversations using a dedicated webview panel within VS Code.
Intelligent Code Autocompletion:
Get context‑aware code suggestions based on the entire file content.
- Manual Trigger: Use a key combination (e.g.,
Ctrl+Shift+C
) to request a code suggestion based on the current file.
- User Request Prefix: Type a line starting with
#
followed by your instruction (for example,
# write a factorial function and add comments on each statement
) and then trigger the autocomplete. The extension extracts your request, splits the file into preceding and succeeding segments, and constructs a prompt for a targeted suggestion.
Markdown Support:
Format your chat messages using Markdown—including code blocks, inline code, bold, italics, and newlines—and view them rendered properly within the chat panel.
API Key Security:
Your API key is stored securely using VS Code's secret storage. You are prompted for the key the first time you use the extension.
Configurable Timeout:
Adjust the timeout for calls within the VS Code settings to fit your needs.
Chat History:
Browse past conversations in a dedicated "Chat History" view in the Activity Bar, making it easy to review previous interactions.
Installation
- Open VS Code.
- Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
- Search for "AI Coder Pro" (once published) or install it from the
.vsix
file if you are developing locally.
- Click Install.
Usage
Chat Panel
- Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
- Type "Open AI Chat" and select the command.
- The chat panel will open.
- Enter your message in the input box and press Enter or click the Send button.
- The response will be displayed in the chat window.
- To view the chat history, click the Chat History icon in the Activity Bar.
Code Autocompletion
There are two ways to trigger autocompletion suggestions:
1. Manual Trigger with Key Combo
- How: Press the key combination (default is
Ctrl+Shift+C
).
- What Happens:
- If your current line does not start with
#
, the extension sends the entire file content to the service and inserts the suggestion at the cursor.
- If your current line starts with
#
, the extension extracts the text following the prefix as your request, splits the file into preceding and succeeding segments, and then replaces that line with the autocomplete suggestion.
2. Using the "# " Prefix (User Request)
How: Type a line that begins with #
followed by your instruction. For example:
# write a factorial function and add comments on each statement
What Happens:
The extension uses the line as a marker to extract your instruction. It then builds a prompt that looks like:
Provide the next autocomplete code suggestion based on what's written so far:
[preceding code segment]
your code suggestion gets inserted here
[succeeding code segment]
User request: a piece of user request
When you trigger the autocomplete (by the key combo), the entire line with the request is replaced with the suggestion.
Configuration
You can configure various settings for AI Coder Pro:
- Open VS Code settings (File > Preferences > Settings or Code > Preferences > Settings).
- Search for "AI Coder Pro".
- Adjust settings such as:
- Api Timeout: Set the timeout for calls (in milliseconds).
- Autocomplete Model: Select the model used for autocompletion.
- Other settings as needed.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
Issues
If you encounter any issues or have suggestions, please open an issue on the GitHub repository.
Release Notes
See the CHANGELOG for release notes. (Create this file as you release new versions.)
License
[Your License Here (e.g., MIT, Apache 2.0)]
Credits
Thanks to Brain Room Media.