MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / runFoldCommand

Function runFoldCommand

packages/app-core/src/lib/commands.ts:31–37  ·  view source on GitHub ↗
(command: FoldCommand)

Source from the content-addressed store, hash-verified

29type FoldCommand = 'foldCode' | 'unfoldCode' | 'foldAll' | 'unfoldAll'
30
31async function runFoldCommand(command: FoldCommand): Promise<void> {
32 const view = useStore.getState().editorViewRef
33 if (!view) return
34 const foldModule = await import('@codemirror/language')
35 foldModule[command](view)
36 view.focus()
37}
38
39export interface Command {
40 /** Stable identifier — used as React key and for analytics. */

Callers 1

buildCommandsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected