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,