feat: 添加工作区状态检查功能,优化用户体验

- 用户鼠标聚焦到输入框中就弹窗提示用户打开 优化用户体验
This commit is contained in:
Roe-xin
2025-12-30 16:02:36 +08:00
parent 0f458f6299
commit 3f0cc8ae29
4 changed files with 88 additions and 21 deletions

View File

@ -443,8 +443,6 @@ export function getWebviewContent(iconUri?: string): string {
}
}
messageInput.focus();
// 监听来自插件的消息
window.addEventListener('message', event => {
const message = event.data;
@ -516,6 +514,14 @@ export function getWebviewContent(iconUri?: string): string {
hideLoadingIndicator();
break;
case 'workspaceStatus':
// 更新工作区状态
if (typeof hasWorkspace !== 'undefined') {
hasWorkspace = message.hasWorkspace;
console.log('[WebView] 工作区状态:', hasWorkspace);
}
break;
case 'vcdInfo':
// 渲染迷你波形预览信息
try {