Path: blob/main/extensions/mermaid-chat-features/chat-webview-src/index.ts
5303 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/4import { initializeMermaidWebview } from './mermaidWebview';5import { VsCodeApi } from './vscodeApi';67declare function acquireVsCodeApi(): VsCodeApi;8const vscode = acquireVsCodeApi();91011async function main() {12await initializeMermaidWebview(vscode);1314// Set up the "Open in Editor" button15const openBtn = document.querySelector('.open-in-editor-btn');16if (openBtn) {17openBtn.addEventListener('click', e => {18e.stopPropagation();19vscode.postMessage({ type: 'openInEditor' });20});21}22}23main();242526