Skip to content

Commit de0df88

Browse files
committed
fix:修复之前预览的文件已经打开过导致不刷新 && 优化分析功能的输出格式
1 parent f71da40 commit de0df88

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function saveAnalyzeCodeResult(request: string, respond: string){
132132
const summary = await generateFilenameFromRequest(request);
133133
const mdFileName = `${timestamp}_${summary}.md`;
134134
const mdFilePath = path.join(tmpDir, mdFileName);
135-
const mdContent = `## 提问:\n\n${request}\n\n## 结果:\n\n${respond}`;
135+
const mdContent = `@user:\n\n${request}\n\n@AI:\n\n${respond}`;
136136
fs.writeFileSync(mdFilePath, mdContent, 'utf-8');
137137
}
138138

src/siderBar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export function registerCvbContextMenu(context: vscode.ExtensionContext) {
123123
provider.writeFile(previewUri, Buffer.from(decoratedText));
124124

125125
// 打开或刷新预览
126+
await vscode.commands.executeCommand('markdown.preview.refresh');
126127
await vscode.commands.executeCommand('markdown.showPreview', previewUri);
127128
})
128129
);

0 commit comments

Comments
 (0)