MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / showLoadingEditor

Function showLoadingEditor

src/lib/editorManager.js:1454–1469  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

1452 }
1453
1454 function showLoadingEditor(file) {
1455 const loadingState = EditorState.create({
1456 doc: "",
1457 extensions: [
1458 themeCompartment.of(getConfiguredThemeExtension()),
1459 ...getBaseExtensionsFromOptions(),
1460 languageCompartment.of([]),
1461 lspCompartment.of([]),
1462 readOnlyCompartment.of(EditorState.readOnly.of(true)),
1463 EditorView.editable.of(false),
1464 placeholder(`Loading ${file.filename || "file"}...`),
1465 ],
1466 });
1467 editor.setState(loadingState);
1468 touchSelectionController?.onSessionChanged();
1469 }
1470
1471 // Helper: apply a file's content and language to the editor view
1472 function applyFileToEditor(file, options = {}) {

Callers 1

switchFileFunction · 0.85

Calls 4

onSessionChangedMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected