UNPKG

agentlang

Version:

The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans

38 lines 1.35 kB
import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper'; import monarchSyntax from './syntaxes/agentlang.monarch.js'; export const setupConfigClassic = () => { return { $type: 'classic', editorAppConfig: { codeResources: { modified: { uri: '/workspace/example.al', text: `// Agentlang is running in the web!`, }, }, useDiffEditor: false, languageDef: { languageExtensionConfig: { id: 'agentlang' }, monarchLanguage: monarchSyntax, }, editorOptions: { 'semanticHighlighting.enabled': true, theme: 'vs-dark', }, }, }; }; export const executeClassic = async (htmlElement) => { try { const config = setupConfigClassic(); const wrapper = new MonacoEditorLanguageClientWrapper(); // Add the HTML container to the config const wrapperConfig = Object.assign(Object.assign({}, config), { htmlContainer: htmlElement }); // Initialize and start the wrapper await wrapper.initAndStart(wrapperConfig); } catch (error) { console.error('Error initializing monaco editor:', error); } }; //# sourceMappingURL=setupClassic.js.map