Skip to content

Commit c02ba25

Browse files
committed
fix:调整启用压缩的上下文长度为4k
1 parent 8079d0f commit c02ba25

File tree

6 files changed

+773
-1
lines changed

6 files changed

+773
-1
lines changed

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
out/**
44
node_modules/**
55
src/**
6+
testdata/**
67
.gitignore
78
.yarnrc
89
webpack.config.js

prompt/agent.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,3 +1232,9 @@ queryCodeReDesign 这个函数输出的代码太长了,超过了大模型的to
12321232
这些子任务执行的时候就不需要实时的输出内容到channel了
12331233
只需要在主调度的地方输出开始+子任务内容, 子任务结束的提示就行
12341234
主任务可以在生成后也在channel输出一次
1235+
1236+
同时注意原流程里有一个callDeepSeekFixApi的自我修正流程
1237+
里面的实现依赖于lastmessage
1238+
但是在多并发的改造下,这个实现会出现冲突
1239+
需要把这个lastmessage改为每个对话自由有一个独立的session
1240+
也就是每个子任务有自己的session,输出的TCVB自己尝试merge,失败了就调用自己的callDeepSeekFixApi

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function doUploadCommand(cvbFilePath: string, userPrompt: string, o
6767
}
6868

6969
let cvbContent = fs.readFileSync(cvbFilePath, 'utf-8');
70-
const CVB_QUERY_LENGTH_LIMIT = 1024 * 2;
70+
const CVB_QUERY_LENGTH_LIMIT = 1024 * 4;
7171
const inputCvb = new Cvb(cvbContent);
7272
if(cvbContent.length > CVB_QUERY_LENGTH_LIMIT && !inputCvb.getMetaData("compressFrom")) {
7373
if (!inputCvb.getMetaData("compressFrom")) {

src/test/fixapi.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as assert from 'assert';
2+
import * as vscode from 'vscode';
3+
import * as cvbMgr from '../cvbManager';
4+
5+
6+
suite('Extension Test Suite', () => {
7+
vscode.window.showInformationMessage('Start all tests.');
8+
9+
test('testmerge', () => {
10+
const cvbFilePath = "test/";
11+
let cvbContent = fs.readFileSync(cvbFilePath, 'utf-8');
12+
});
13+
});

0 commit comments

Comments
 (0)