feat: 增加新特性,可以正则过滤编辑器选中的内容,提问内容更加精简,明确 #174
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
需求开发背景:我有一个提示词模板,但是相关的代码,在整个代码文件中,存在于多处,我不希望把所有的代码都一并上传,让大模型进行分析,那样提供的信息太多太杂,大模型分析的结果往往会受到干扰,生成的结果并不完美,因此我想考虑在选中内容时,有一个正则工具对提问的选择内容进行提前筛洗。
特性功能:在AutoDev的Custome Engine Prompt(Json) 中,属性:prompts 属性中, 增加属性:selectedRegex, 此属性表示标准正则表达式内容,用于在将选中的编辑器内容,进行正则匹配,将匹配的内容,筛选出来,如果有多个匹配符合,则会用 \n 隔开, 最后将匹配的内容,给予至模型调用方法