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

@ -635,6 +635,14 @@ export function getWebviewContent(
if (typeof hasWorkspace !== 'undefined') {
hasWorkspace = message.hasWorkspace;
console.log('[WebView] 工作区状态:', hasWorkspace);
// 如果有待发送的示例,且工作区存在,则发送
if (hasWorkspace && typeof pendingExampleIndex !== 'undefined' && pendingExampleIndex >= 0) {
if (typeof doSendExample === 'function') {
doSendExample(pendingExampleIndex);
pendingExampleIndex = -1; // 重置
}
}
}
break;