MCPcopy Create free account
hub / github.com/chhoumann/quickadd / persist

Method persist

src/utils/InputPromptDraftHandler.ts:32–48  ·  view source on GitHub ↗
(value: string, didSubmit: boolean)

Source from the content-addressed store, hash-verified

30 }
31
32 persist(value: string, didSubmit: boolean): void {
33 if (!this.shouldPersist()) return;
34
35 if (didSubmit) {
36 this.store.handleSubmittedDraft(this.draftKey, value);
37 return;
38 }
39
40 if (!this.didChange || value === this.initialValue) return;
41
42 if (!value.trim()) {
43 this.store.clear(this.draftKey);
44 return;
45 }
46
47 this.store.set(this.draftKey, value);
48 }
49}

Callers 4

formatContentOnlyMethod · 0.95
persistDraftMethod · 0.80
persistDraftMethod · 0.80

Calls 3

handleSubmittedDraftMethod · 0.80
clearMethod · 0.45
setMethod · 0.45

Tested by 1

formatContentOnlyMethod · 0.76