feat:对本地文件进行修改
- 对某一行进行修改 - 将文件中的某些词进行替换 - 将文件重命名
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
import * as vscode from "vscode";
|
||||
import { getWebviewContent } from "../views/webviewContent";
|
||||
import { handleUserMessage, insertCodeToEditor, handleReadFile } from "../utils/messageHandler";
|
||||
import {
|
||||
handleUserMessage,
|
||||
insertCodeToEditor,
|
||||
handleReadFile,
|
||||
handleUpdateFile,
|
||||
handleRenameFile,
|
||||
handleReplaceInFile
|
||||
} from "../utils/messageHandler";
|
||||
|
||||
/**
|
||||
* 创建并显示 IC 助手面板
|
||||
@ -39,6 +46,15 @@ export function showICHelperPanel(context: vscode.ExtensionContext) {
|
||||
case "readFile":
|
||||
handleReadFile(panel, message.filePath);
|
||||
break;
|
||||
case "updateFile":
|
||||
handleUpdateFile(panel, message.filePath, message.content);
|
||||
break;
|
||||
case "renameFile":
|
||||
handleRenameFile(panel, message.oldPath, message.newPath);
|
||||
break;
|
||||
case "replaceInFile":
|
||||
handleReplaceInFile(panel, message.filePath, message.searchText, message.replaceText);
|
||||
break;
|
||||
case "insertCode":
|
||||
insertCodeToEditor(message.code);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user