feat:新增点击示例直接发送之前加一层工作区检测逻辑
This commit is contained in:
@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user