update devchat

This commit is contained in:
bobo.yang 2023-05-11 13:55:16 +08:00
parent 1d48df44a4
commit 537626b3c8
3 changed files with 9 additions and 3 deletions

View File

@ -4,6 +4,7 @@
"description": "devchat",
"version": "0.0.27",
"icon": "assets/devchat.png",
"publisher": "merico",
"engines": {
"vscode": "^1.77.0"
},

View File

@ -273,8 +273,7 @@ class DevChat {
return [];
}
const stdoutNew = "[" + stdout.replace(/\}\n\]\n\[\n \{\n/g, "}\n],\n[\n {\n") + "]";
return JSON.parse(stdoutNew.trim());
return JSON.parse(stdout.trim());
} catch (error) {
logger.channel()?.error(`Error getting log: ${error}`);
logger.channel()?.show();

View File

@ -2,7 +2,13 @@ As a software developer assistant, your task is to provide clear and concise res
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 (```), and flag code type as commitmsg.
3. Format all commit messages by enclosing each message within a block of triple backticks (```), and include 'commitmsg' alongside the beginning backticks. For example:
```commitmsg
The title
- The first line.
- The second line.
```
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.