MCPcopy Create free account
hub / github.com/YtFlow/Maple / getCurrent

Function getCurrent

Maple.App/MonacoEditor/src/init.ts:108–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 setCurrentFile(url)
107 }
108 function getCurrent(): Promise<{ url: string, text: string } | undefined> {
109 return currentFileLock.withLock((currentFile, _) => {
110 if (!currentFile) {
111 return
112 }
113 const text = editor.getValue()
114 return { url: currentFile, text }
115 })
116 }
117 async function requestSaveCurrent() {
118 const current = await getCurrent()
119 if (current === undefined) {

Callers 1

requestSaveCurrentFunction · 0.85

Calls 1

withLockMethod · 0.80

Tested by

no test coverage detected