Skip to content

Commit

Permalink
Filter empty suggestions (#217)
Browse files Browse the repository at this point in the history
* filter empty suggestions

* npm audi fix
  • Loading branch information
trean authored Aug 26, 2024
1 parent 1879fb3 commit f9d1b28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
17 changes: 8 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions src/components/CodeEditorWindow/config/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ export const autocomplete = async (monaco, qdrantClient) => {

let suggestions = autocomplete.completeRequestHeader(header);

suggestions = suggestions.map((s) => {
return {
label: s,
kind: 17,
insertText: s,
};
});
suggestions = suggestions
.filter((s) => s !== '')
.map((s) => {
return {
label: s,
kind: 17,
insertText: s,
};
});

return { suggestions };
} else {
Expand Down

0 comments on commit f9d1b28

Please sign in to comment.