MCPcopy Create free account
hub / github.com/massCodeIO/massCode / search

Function search

src/renderer/composables/useSnippets.ts:732–750  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

730}
731
732async function search() {
733 if (searchQuery.value) {
734 if (!isSearch.value) {
735 saveStateSnapshot('beforeSearch')
736 state.snippetContentIndex = 0
737 }
738
739 isSearch.value = true
740 isRestoreStateBlocked.value = false
741
742 await getSnippets()
743 selectFirstSnippet()
744 searchSelectedIndex.value = 0
745 nextTick(() => scrollToSnippetIndex(0))
746 }
747 else {
748 isSearch.value = false
749 }
750}
751
752function selectSearchSnippet(index: number) {
753 if (

Callers

nothing calls this directly

Calls 4

scrollToSnippetIndexFunction · 0.90
saveStateSnapshotFunction · 0.85
selectFirstSnippetFunction · 0.85
getSnippetsFunction · 0.70

Tested by

no test coverage detected