MCPcopy
hub / github.com/wavetermdev/waveterm / handleSelect

Function handleSelect

frontend/app/view/preview/preview.tsx:126–137  ·  view source on GitHub ↗
(s: SuggestionType, queryStr: string)

Source from the content-addressed store, hash-verified

124 return null;
125 }
126 const handleSelect = (s: SuggestionType, queryStr: string): boolean => {
127 if (s == null) {
128 if (isBlank(queryStr)) {
129 globalStore.set(model.openFileModal, false);
130 return true;
131 }
132 model.handleOpenFile(queryStr);
133 return true;
134 }
135 model.handleOpenFile(s["file:path"]);
136 return true;
137 };
138 const handleTab = (s: SuggestionType, query: string): string => {
139 if (s["file:mimetype"] == "directory") {
140 return s["file:name"] + "/";

Callers

nothing calls this directly

Calls 3

isBlankFunction · 0.90
setMethod · 0.80
handleOpenFileMethod · 0.80

Tested by

no test coverage detected