From 63d39667f2fd89c4b010e310563524ff0b039720 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 25 Dec 2023 18:20:47 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20small=20updates=20to=20ctx=20pro?= =?UTF-8?q?viders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/context/providers/GoogleContextProvider.ts | 2 +- gui/src/components/mainInput/getSuggestion.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/context/providers/GoogleContextProvider.ts b/core/context/providers/GoogleContextProvider.ts index 8516efe71..a31009c26 100644 --- a/core/context/providers/GoogleContextProvider.ts +++ b/core/context/providers/GoogleContextProvider.ts @@ -7,7 +7,7 @@ class GoogleContextProvider extends BaseContextProvider { displayTitle: "Google", description: "Attach the results of a Google search", dynamic: true, - requiresQuery: false, + requiresQuery: true, }; private _serperApiKey: string; diff --git a/gui/src/components/mainInput/getSuggestion.ts b/gui/src/components/mainInput/getSuggestion.ts index a4b0aae25..8407b4800 100644 --- a/gui/src/components/mainInput/getSuggestion.ts +++ b/gui/src/components/mainInput/getSuggestion.ts @@ -90,9 +90,10 @@ function getFileItems( } return ( res?.slice(0, 10).map((hit) => { + const lastTwoParts = hit.id.split(/[\\/]/).slice(-2).join("/"); const item = { title: hit.basename, - description: hit.basename, + description: lastTwoParts, id: hit.id, content: hit.id, label: hit.basename,