diff --git a/ee/tabby-ui/components/prompt-form.tsx b/ee/tabby-ui/components/prompt-form.tsx index 16dcb49..cf52608 100644 --- a/ee/tabby-ui/components/prompt-form.tsx +++ b/ee/tabby-ui/components/prompt-form.tsx @@ -57,9 +57,10 @@ export function PromptForm({ const end = e.target?.selectionEnd ?? 0 const queryname = getSearchCompletionQueryName(value, end) if (queryname) { - let url = `/v1beta/search?q=name:${queryname}` + const query = encodeURIComponent(`name:${queryname} kind:function`) + const url = `/v1beta/search?q=${query}` latestFetchKey.current = url - setQueryCompletionUrl(`/v1beta/search?q=name:${queryname}`) + setQueryCompletionUrl(url) } else { setOptions([]) }