pulse-coder-engine 0.0.1-alpha.14 → 0.0.1-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2828,6 +2828,17 @@ var Engine = class {
|
|
|
2828
2828
|
}
|
|
2829
2829
|
return resultText;
|
|
2830
2830
|
}
|
|
2831
|
+
/**
|
|
2832
|
+
* 手动触发上下文压缩
|
|
2833
|
+
* 默认复用 Engine 初始化时配置的 provider/model
|
|
2834
|
+
*/
|
|
2835
|
+
async compactContext(context, options) {
|
|
2836
|
+
return await maybeCompactContext(context, {
|
|
2837
|
+
force: options?.force,
|
|
2838
|
+
provider: options?.provider ?? this.options.llmProvider,
|
|
2839
|
+
model: options?.model ?? this.options.model
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2831
2842
|
/**
|
|
2832
2843
|
* 获取插件状态
|
|
2833
2844
|
*/
|