refactor: Add PromptGroups context provider and integrate it into relevant components

This commit is contained in:
Danny Avila 2025-08-11 22:15:33 -04:00
parent a928115a84
commit 6137a089b3
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
11 changed files with 106 additions and 156 deletions

View file

@ -9,6 +9,7 @@ import {
useFileMap,
} from '~/hooks';
import {
PromptGroupsProvider,
AssistantsMapContext,
AgentsMapContext,
SetConvoProvider,
@ -68,16 +69,18 @@ export default function Root() {
<FileMapContext.Provider value={fileMap}>
<AssistantsMapContext.Provider value={assistantsMap}>
<AgentsMapContext.Provider value={agentsMap}>
<Banner onHeightChange={setBannerHeight} />
<div className="flex" style={{ height: `calc(100dvh - ${bannerHeight}px)` }}>
<div className="relative z-0 flex h-full w-full overflow-hidden">
<Nav navVisible={navVisible} setNavVisible={setNavVisible} />
<div className="relative flex h-full max-w-full flex-1 flex-col overflow-hidden">
<MobileNav setNavVisible={setNavVisible} />
<Outlet context={{ navVisible, setNavVisible } satisfies ContextType} />
<PromptGroupsProvider>
<Banner onHeightChange={setBannerHeight} />
<div className="flex" style={{ height: `calc(100dvh - ${bannerHeight}px)` }}>
<div className="relative z-0 flex h-full w-full overflow-hidden">
<Nav navVisible={navVisible} setNavVisible={setNavVisible} />
<div className="relative flex h-full max-w-full flex-1 flex-col overflow-hidden">
<MobileNav setNavVisible={setNavVisible} />
<Outlet context={{ navVisible, setNavVisible } satisfies ContextType} />
</div>
</div>
</div>
</div>
</PromptGroupsProvider>
</AgentsMapContext.Provider>
{config?.interface?.termsOfService?.modalAcceptance === true && (
<TermsAndConditionsModal