From 68640c0869f21c86b8f09c718163bbe56cc730ed Mon Sep 17 00:00:00 2001 From: kartik-gupta-ij Date: Wed, 18 Dec 2024 20:06:49 +0530 Subject: [PATCH] feat[console]: add code snippet generation feature in codeEditorWindow --- src/components/CodeEditorWindow/config/Autocomplete.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/CodeEditorWindow/config/Autocomplete.js b/src/components/CodeEditorWindow/config/Autocomplete.js index 2738ac21..f95f7501 100644 --- a/src/components/CodeEditorWindow/config/Autocomplete.js +++ b/src/components/CodeEditorWindow/config/Autocomplete.js @@ -45,6 +45,12 @@ export const autocomplete = async (monaco, qdrantClient) => { }; }); + autocomplete.getSnippets().forEach((snippet) => { + if (snippet.label.startsWith(header)) { + suggestions.push(snippet); + } + }); + return { suggestions }; } else { // Autocomplete for request body