11import * as vscode from 'vscode' ;
22import * as path from 'path' ;
33import * as fs from 'fs' ;
4- import { applyCvbToWorkspace , generateTimestamp , Cvb , TCVB , mergeCvb } from './cvbManager' ;
5- import { queryCodeReDesign , analyzeCode , generateFilenameFromRequest } from './deepseekApi' ;
4+ import { applyCvbToWorkspace } from './cvbManager' ;
5+ import { analyzeCode } from './deepseekApi' ;
66import { getCurrentOperationController , resetCurrentOperationController , clearCurrentOperationController , doUploadCommand } from './extension' ;
7+ import { showInputMultiLineBox } from './UIComponents' ;
78
89export function registerCvbContextMenu ( context : vscode . ExtensionContext ) {
910
@@ -128,6 +129,7 @@ class CvbFile extends vscode.TreeItem {
128129 arguments : [ uri ]
129130 } ;
130131 this . iconPath = new vscode . ThemeIcon ( 'files' ) ; // 使用代码图标
132+ this . resourceUri = uri ;
131133 this . contextValue = 'cvbFile' ; // 上下文值保持不变
132134 }
133135}
@@ -144,6 +146,7 @@ class MDFile extends vscode.TreeItem {
144146 arguments : [ uri ]
145147 } ;
146148 this . iconPath = new vscode . ThemeIcon ( 'comment-discussion' ) ; // 使用文档图标
149+ this . resourceUri = uri ;
147150 this . contextValue = 'mdFile' ; // 新的上下文值
148151 }
149152}
@@ -192,7 +195,7 @@ async function uploadThisCvb(filePath: string) {
192195 }
193196 // 测试 end
194197*/
195- const userPrompt = await vscode . window . showInputBox ( {
198+ const userPrompt = await showInputMultiLineBox ( {
196199 prompt : 'Enter your prompt for the refactoring' ,
197200 placeHolder : 'e.g., Refactor the code to improve readability' ,
198201 } ) ;
@@ -209,7 +212,7 @@ async function uploadThisCvb(filePath: string) {
209212 * @param filePath .cvb 文件的路径
210213 */
211214async function analyzeThisCvb ( filePath : string ) {
212- const userRequest = await vscode . window . showInputBox ( {
215+ const userRequest = await showInputMultiLineBox ( {
213216 prompt : 'Enter your analysis request' ,
214217 placeHolder : 'e.g., Analyze the code for potential bugs' ,
215218 } ) ;
0 commit comments