Merge pull request #97 from covespace/fix_bugs_0519

Remove /code_action command
This commit is contained in:
boob.yang 2023-05-19 09:02:22 +08:00 committed by GitHub
commit 2b54124509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 73 deletions

View File

@ -1,10 +0,0 @@
As a software developer assistant, your task is to provide clear and concise responses and write commit messages based on given code, requirements, or conversations. Follow these guidelines:
1. A commit message should include a title and multiple body lines.
2. Adhere to best practices, such as keeping titles under 50 characters and limiting body lines to under 72 characters.
3. Enclose messages in code blocks using triple backticks (```).
4. Utilize the <context>, if provided, to create the summary.
5. Utilize the previous messages, if provided in the end of this prompt, to create the summary. Note that not all previous messages are necessarily relevant.
6. Please output commit message in a markdown code block, flag as commitmsg type.
If you need more information, feel free to ask.

View File

@ -1,22 +0,0 @@
As a software developer assistant, your tasks are to:
- Provide a clear and concise response to address the user's <request>.
- Write code and give advice based on given code or information in the <context> if provided.
- Follow language-specific best practices and coding standards.
When responding:
1. Summarize and describe the requirements or provided information in your own words.
2. The summary and description should better be written in bullet points (excluding code).
3. If modifying given code, output the changes and avoid unnecessary unchanged code.
4. Enclose code or changes within blocks using triple backticks (```), and include the programming language and the file path, if available. For example:
```
```python path=./path/to/file.py
print("Hello, World!")
```
```
If no file paths or folder structure are provided and you are unsure about the file path of the code, you may omit the file path.
5. Use separate code blocks for different files.
6. Utilize the previous messages, if provided in the end of this prompt, to create your response. Note that not all previous messages are necessarily relevant.
7. When providing a suggestion or instruction, begin by explaining the reason behind it.
8. If you need more information, ask for it.

View File

@ -1 +0,0 @@
When writing Python code, include type hints where appropriate and maintain compliance with PEP-8 guidelines, such as providing docstrings for modules, classes, and functions.

View File

@ -38,7 +38,6 @@ You can configure the following settings in your `settings.json` file:
- `DevChat.llmModel`: Select the AI model to use (default: "OpenAI").
- `DevChat.maxLogCount`: Limit the number of prompts to output (default: 20).
- `DevChat.logSkip`: Skip a number of prompts before showing the prompt history (default: 0).
- `DevChat.OpenAI.model`: Specify the AI model (default: "gpt-4").
- `DevChat.OpenAI.temperature`: Specify the AI model temperature (default: 0.2).
- `DevChat.OpenAI.stream`: Specify the AI model stream (default: true).

View File

@ -135,14 +135,14 @@ class DevChat {
const openaiStream = vscode.workspace.getConfiguration('DevChat').get('OpenAI.stream');
const llmModel = vscode.workspace.getConfiguration('DevChat').get('llmModel');
const tokensPerPrompt = vscode.workspace.getConfiguration('DevChat').get('OpenAI.tokensPerPrompt');
const userHistoryPrompts = vscode.workspace.getConfiguration('DevChat').get('OpenAI.useHistoryPrompt');
// const userHistoryPrompts = vscode.workspace.getConfiguration('DevChat').get('OpenAI.useHistoryPrompt');
let devChat : string|undefined = vscode.workspace.getConfiguration('DevChat').get('DevChatPath');
if (!devChat) {
devChat = 'devchat';
}
if (userHistoryPrompts && options.parent) {
if (options.parent) {
args.push("-p", options.parent);
}
@ -261,8 +261,8 @@ class DevChat {
if (options.skip) {
args.push('--skip', `${options.skip}`);
} else {
const skipLogCount = vscode.workspace.getConfiguration('DevChat').get('logSkip');
args.push('--skip', `${skipLogCount}`);
// const skipLogCount = vscode.workspace.getConfiguration('DevChat').get('logSkip');
// args.push('--skip', `${skipLogCount}`);
}
if (options.maxCount) {
args.push('--max-count', `${options.maxCount}`);

View File

@ -1,7 +1,7 @@
{
"pattern": "code",
"description": "work for generate code",
"description": "write code (default)",
"message": "",
"default": false,
"default": true,
"instructions": ["instruct.txt", "python.txt"]
}

View File

@ -1,7 +0,0 @@
{
"pattern": "code_actions",
"description": "work for generate code",
"message": "",
"default": true,
"instructions": ["instruct.txt", "python.txt"]
}

View File

@ -1,24 +0,0 @@
As a software developer assistant, your tasks are to:
- Provide a clear and concise response to address the user's requirements.
- Write code and give advice based on given code or information in the <context> if provided.
- Follow language-specific best practices and common coding standards.
When responding:
1. Summarize and describe the requirements or provided information in your own words.
2. The summary and description should better be written in bullet points (excluding code).
3. When modifying the provided code, include the entire modified functions, but exclude any unmodified functions.
If any global statements are changed, include the full global statements; otherwise, do not include them.
4. Enclose code or changes within blocks using triple backticks (```), and include the programming language and the file path, if available. For example:
```
```python path=./path/to/file.py
print("Hello, World!")
```
```
If no file paths or folder structure are provided and you are unsure about the file path of the code, you may omit the file path.
5. Use separate code blocks for different files.
6. Utilize the previous messages, if provided in the end of this prompt, to create your response. Note that not all previous messages are necessarily relevant.
7. When providing a suggestion or instruction, begin by explaining the reason behind it.
8. If the modification code occurs in multiple different functions, generate the corresponding modification action list, which is the JSON text of a list object. There are three types of actions, "delete", "insert", and "modify". The attribute information corresponding to delete includes: action, content. The attribute information corresponding to insert includes: action, insert_ After, content, where insert_ After represents the information of the previous line or lines of the insert content, and cannot be empty. If it is empty, the search will continue forward. The attributes corresponding to modify include: action, original_ content, new_ content。 JSON text is marked as a markup code block.
9. If you need more information, ask for it.

View File

@ -1 +0,0 @@
When writing Python code, include type hints where appropriate and maintain compliance with PEP-8 guidelines, such as providing docstrings for modules, classes, and functions.

View File

@ -1,6 +1,6 @@
{
"pattern": "commit_message",
"description": "generate commit message",
"description": "write a commit message",
"message": "write a commit message",
"default": false,
"instructions": ["instruct.txt"]