MCPcopy Index your code
hub / github.com/massCodeIO/massCode / getCaptureValidationMessage

Function getCaptureValidationMessage

src/main/api/routes/captures.ts:363–377  ·  view source on GitHub ↗
(body: CaptureRequest)

Source from the content-addressed store, hash-verified

361}
362
363function getCaptureValidationMessage(body: CaptureRequest): string | null {
364 if (body.target === 'code' && !trimToValue(body.text)) {
365 return 'Code capture requires selected text'
366 }
367
368 if (
369 body.target === 'notes'
370 && !trimToValue(body.text)
371 && !trimToValue(body.markdown)
372 ) {
373 return 'Notes capture requires text or markdown content'
374 }
375
376 return null
377}
378
379function notifyStorageSynced(): void {
380 BrowserWindow.getAllWindows().forEach((window) => {

Callers 1

captures.tsFile · 0.85

Calls 1

trimToValueFunction · 0.70

Tested by

no test coverage detected