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

Function submit

packages/app-core/src/components/PromptModal.tsx:103–112  ·  view source on GitHub ↗
(raw: string = value)

Source from the content-addressed store, hash-verified

101 }, [activeSuggestion, showSuggestions])
102
103 const submit = (raw: string = value): void => {
104 const v = raw.trim()
105 if (!v && !options.allowEmptySubmit) return
106 const err = options.validate?.(v) ?? null
107 if (err) {
108 setError(err)
109 return
110 }
111 onSubmit(v)
112 }
113
114 // Picking a suggestion submits it directly (e.g. create in that folder).
115 const chooseSuggestion = (next: PromptSuggestion): void => {

Callers 4

chooseSuggestionFunction · 0.70
PromptModalFunction · 0.70
handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected