MCPcopy Create free account
hub / github.com/anus-dev/ANUS / isEditorAvailable

Function isEditorAvailable

packages/core/src/utils/editor.ts:88–93  ·  view source on GitHub ↗
(editor: string | undefined)

Source from the content-addressed store, hash-verified

86 * Returns false if preferred editor is not set / invalid / not available / not allowed in sandbox.
87 */
88export function isEditorAvailable(editor: string | undefined): boolean {
89 if (editor && isValidEditorType(editor)) {
90 return checkHasEditorType(editor) && allowEditorTypeInSandbox(editor);
91 }
92 return false;
93}
94
95/**
96 * Get the diff command for a specific editor.

Callers 3

editor.test.tsFile · 0.85
AppFunction · 0.85
EditorSettingsDialogFunction · 0.85

Calls 3

isValidEditorTypeFunction · 0.85
checkHasEditorTypeFunction · 0.85
allowEditorTypeInSandboxFunction · 0.85

Tested by

no test coverage detected