mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
test(vscode-ide-companion): registerWebviewPanelSerializer 添加 mock 实现
This commit is contained in:
@@ -40,10 +40,6 @@ To debug and develop this extension locally:
|
|||||||
|
|
||||||
3. **Start debugging**
|
3. **Start debugging**
|
||||||
|
|
||||||
You have two options:
|
|
||||||
|
|
||||||
**Option A: Debug from Project Root (Recommended)**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
code . # Open the project root in VS Code
|
code . # Open the project root in VS Code
|
||||||
```
|
```
|
||||||
@@ -52,19 +48,6 @@ To debug and develop this extension locally:
|
|||||||
- Select **"Launch Companion VS Code Extension"** from the debug dropdown
|
- Select **"Launch Companion VS Code Extension"** from the debug dropdown
|
||||||
- Press `F5` to launch Extension Development Host
|
- Press `F5` to launch Extension Development Host
|
||||||
|
|
||||||
**Option B: Debug from Extension Directory**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd packages/vscode-ide-companion
|
|
||||||
code . # Open the extension directory in VS Code
|
|
||||||
```
|
|
||||||
- Open the `src/extension.ts` file
|
|
||||||
- Open Debug panel (`Ctrl+Shift+D` or `Cmd+Shift+D`)
|
|
||||||
- Select **"Run Extension"** from the debug dropdown
|
|
||||||
- Press `F5` to launch Extension Development Host
|
|
||||||
|
|
||||||
> 💡 **Tip**: Option A is recommended if you need to debug both the extension and core packages together.
|
|
||||||
|
|
||||||
4. **Make changes and reload**
|
4. **Make changes and reload**
|
||||||
- Edit the source code in the original VS Code window
|
- Edit the source code in the original VS Code window
|
||||||
- To see your changes, reload the Extension Development Host window by:
|
- To see your changes, reload the Extension Development Host window by:
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ vi.mock('vscode', () => ({
|
|||||||
},
|
},
|
||||||
showTextDocument: vi.fn(),
|
showTextDocument: vi.fn(),
|
||||||
showWorkspaceFolderPick: vi.fn(),
|
showWorkspaceFolderPick: vi.fn(),
|
||||||
|
registerWebviewPanelSerializer: vi.fn(() => ({
|
||||||
|
dispose: vi.fn(),
|
||||||
|
})),
|
||||||
},
|
},
|
||||||
workspace: {
|
workspace: {
|
||||||
workspaceFolders: [],
|
workspaceFolders: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user