| 77 | } |
| 78 | |
| 79 | function createEditors() { |
| 80 | const optsCommon = { |
| 81 | language: "plaintext", |
| 82 | wordWrap: "on", |
| 83 | scrollBeyondLastLine: false, |
| 84 | minimap: { enabled: false }, |
| 85 | fontLigatures: false, |
| 86 | fontSize: 14, |
| 87 | lineNumbers: "on", |
| 88 | renderLineHighlight: "line", |
| 89 | automaticLayout: true, |
| 90 | }; |
| 91 | |
| 92 | promptEditor = monaco.editor.create(promptHost, { |
| 93 | ...optsCommon, |
| 94 | readOnly: true, |
| 95 | theme: "vs-dark", |
| 96 | value: currentPromptText || "", |
| 97 | }); |
| 98 | |
| 99 | answerEditor = monaco.editor.create(answerHost, { |
| 100 | ...optsCommon, |
| 101 | readOnly: false, |
| 102 | theme: "hc-black", |
| 103 | value: "", |
| 104 | }); |
| 105 | } |
| 106 | |
| 107 | function disposeEditors() { |
| 108 | if (promptEditor) { promptEditor.dispose(); promptEditor = null; } |