From 829be553eeccef529e32cfcf4b6f06676ccf2d55 Mon Sep 17 00:00:00 2001 From: "bobo.yang" Date: Fri, 19 May 2023 08:56:46 +0800 Subject: [PATCH] remove /code_action --- README.md | 1 - src/toolwrapper/devchat.ts | 8 ++++---- workflows/code/_setting_.json | 4 ++-- workflows/code_actions/_setting_.json | 7 ------- workflows/code_actions/instruct.txt | 24 ------------------------ workflows/code_actions/python.txt | 1 - workflows/commit_message/_setting_.json | 2 +- 7 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 workflows/code_actions/_setting_.json delete mode 100644 workflows/code_actions/instruct.txt delete mode 100644 workflows/code_actions/python.txt diff --git a/README.md b/README.md index 4663c78..cacd7cf 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/src/toolwrapper/devchat.ts b/src/toolwrapper/devchat.ts index 84ccdcc..34f9d3a 100644 --- a/src/toolwrapper/devchat.ts +++ b/src/toolwrapper/devchat.ts @@ -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}`); diff --git a/workflows/code/_setting_.json b/workflows/code/_setting_.json index c277529..6109d3d 100644 --- a/workflows/code/_setting_.json +++ b/workflows/code/_setting_.json @@ -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"] } \ No newline at end of file diff --git a/workflows/code_actions/_setting_.json b/workflows/code_actions/_setting_.json deleted file mode 100644 index d0e1a3c..0000000 --- a/workflows/code_actions/_setting_.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pattern": "code_actions", - "description": "work for generate code", - "message": "", - "default": true, - "instructions": ["instruct.txt", "python.txt"] -} \ No newline at end of file diff --git a/workflows/code_actions/instruct.txt b/workflows/code_actions/instruct.txt deleted file mode 100644 index f9efa23..0000000 --- a/workflows/code_actions/instruct.txt +++ /dev/null @@ -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 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. diff --git a/workflows/code_actions/python.txt b/workflows/code_actions/python.txt deleted file mode 100644 index 5742151..0000000 --- a/workflows/code_actions/python.txt +++ /dev/null @@ -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. diff --git a/workflows/commit_message/_setting_.json b/workflows/commit_message/_setting_.json index edc927b..3c11416 100644 --- a/workflows/commit_message/_setting_.json +++ b/workflows/commit_message/_setting_.json @@ -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"]