MCPcopy Create free account
hub / github.com/simstudioai/sim / getSuggestions

Method getSuggestions

apps/sim/lib/logs/search-suggestions.ts:153–171  ·  view source on GitHub ↗

* Get suggestions based ONLY on current input (no cursor position!)

(input: string)

Source from the content-addressed store, hash-verified

151 * Get suggestions based ONLY on current input (no cursor position!)
152 */
153 getSuggestions(input: string): SuggestionGroup | null {
154 const trimmed = input.trim()
155
156 if (!trimmed) {
157 return this.getFilterKeysList()
158 }
159
160 if (trimmed.endsWith(':')) {
161 const key = trimmed.slice(0, -1)
162 return this.getFilterValues(key)
163 }
164
165 if (trimmed.includes(':')) {
166 const [key, partial] = trimmed.split(':')
167 return this.getFilterValues(key, partial)
168 }
169
170 return this.getMultiSectionResults(trimmed)
171 }
172
173 /**
174 * Get filter keys list (empty input state)

Callers 2

LogsFunction · 0.80

Calls 3

getFilterKeysListMethod · 0.95
getFilterValuesMethod · 0.95

Tested by

no test coverage detected