feat:新增点击示例直接发送之前加一层工作区检测逻辑

This commit is contained in:
Roe-xin
2026-01-14 11:52:42 +08:00
parent 342bf22f3f
commit 606f757699
6 changed files with 28 additions and 3 deletions

View File

@ -226,8 +226,20 @@ export function getExampleShowcaseScript(): string {
'生成一个GMII接口的以太网UDP通信模块'
];
// 存储待发送的示例索引
let pendingExampleIndex = -1;
// 直接发送示例消息
function sendExample(index) {
// 先检查工作区
pendingExampleIndex = index;
vscode.postMessage({
command: 'checkWorkspace'
});
}
// 实际发送示例消息
function doSendExample(index) {
const messageInput = document.getElementById('messageInput');
const sendButton = document.getElementById('sendButton');