Skip to content

Commit bd3f116

Browse files
committed
Fix:调整提示词,防止自我迭代的时候解析出现歧义
1 parent 0fb7438 commit bd3f116

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/deepseekApi.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ export async function queryCodeReDesign(
146146
outputChannel: vscode.OutputChannel
147147
): Promise<string | null> {
148148
const requestContent = `
149-
这是我的需求:
150-
${userRequest}
151149
152150
这是 CVB 格式的说明:
153151
${getCvbFormatDescription()}
@@ -161,8 +159,15 @@ ${getCvbFormatDescription()}
161159
最后的输出需要是 CVB 格式,
162160
尤其注意,输出除了CVB的正文内容以外,别的地方出现CVB的开始符和结束符(比如一些关于CVB的附加说明,或者正好字符串前缀和CVB符号一样)要做转义,
163161
以免接收的时候被错误的当成CVB块(比如前面加入一些空格)
164-
(注意要完整输出所有文件,不管是否有修改,CVB是一个当前所有文件的快照,所以你不能偷懒):
162+
(注意要完整输出所有文件,不管是否有修改,CVB是一个当前所有文件的快照,所以你不能偷懒)
163+
164+
输入代码:
165165
${cvbContent}
166+
167+
这是我的需求:
168+
${userRequest}
169+
170+
请输出CVB格式的代码:
166171
`;
167172

168173
return callDeepSeekApi(requestContent, undefined, outputChannel, true, '## END_CVB'); // 添加结束字符串

0 commit comments

Comments
 (0)