forked from github/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (19 loc) · 805 Bytes
/
index.js
File metadata and controls
23 lines (19 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// main.js - Main entry point for the Monaco Editor diff view
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
import { initDiffEditor } from './js/monaco-diff-editor.js';
import { setupUI } from './js/ui-controller.js';
import DiffViewer from './js/api.js';
// Initialize everything when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
// Hide loading indicator as Monaco is directly imported
const loadingElement = document.getElementById('loading');
if (loadingElement) {
loadingElement.style.display = 'none';
}
// Set up UI elements and event handlers
setupUI();
});
// Expose the MonacoDiffViewer API to the global scope
window.DiffViewer = DiffViewer;
// Export the MonacoDiffViewer for webpack
export default DiffViewer;