Merge pull request #27 from covespace/fix_context_miss_field

add file field for contextDetailResponse message
This commit is contained in:
boob.yang 2023-05-08 13:17:14 +08:00 committed by GitHub
commit 8ac8c72ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,6 @@ import { handleRefCommand } from '../context/contextRef';
// return json string
export async function contextDetail(message: any, panel: vscode.WebviewPanel): Promise<void> {
const fileContent = fs.readFileSync(message.file, 'utf-8');
panel.webview.postMessage({ command: 'contextDetailResponse', result: fileContent });
panel.webview.postMessage({ command: 'contextDetailResponse', 'file':message.file, result: fileContent });
return;
}