Skip to content

Commit 875ac3c

Browse files
committed
Unify Agent/Memeory/Models/Knowledges components to be vertical aligned
1 parent 577f036 commit 875ac3c

File tree

5 files changed

+47
-37
lines changed

5 files changed

+47
-37
lines changed

frontend/app/[locale]/agents/AgentsContent.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ export default function AgentsContent({
7474
transition={pageTransition}
7575
style={{width: "100%", height: "100%"}}
7676
>
77-
{canAccessProtectedData ? (
78-
<AgentConfig ref={agentConfigRef} canAccessProtectedData={canAccessProtectedData} />
79-
) : null}
77+
<div className="w-full h-full flex items-center justify-center">
78+
{canAccessProtectedData ? (
79+
<AgentConfig ref={agentConfigRef} canAccessProtectedData={canAccessProtectedData} />
80+
) : null}
81+
</div>
8082
</motion.div>
8183

8284
<SaveConfirmModal

frontend/app/[locale]/knowledges/KnowledgesContent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ export default function KnowledgesContent({
9999
transition={pageTransition}
100100
style={{width: "100%", height: "100%"}}
101101
>
102-
<DataConfig isActive={true} />
102+
<div className="w-full h-full flex items-center justify-center">
103+
<DataConfig isActive={true} />
104+
</div>
103105
</motion.div>
104106
) : null}
105107
</>

frontend/app/[locale]/memory/MemoryContent.tsx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -349,29 +349,31 @@ export default function MemoryContent({ onNavigate }: MemoryContentProps) {
349349
style={{ width: "100%", height: "100%" }}
350350
>
351351
{canAccessProtectedData ? (
352-
<div
353-
className="w-full mx-auto"
354-
style={{
355-
maxWidth: SETUP_PAGE_CONTAINER.MAX_WIDTH,
356-
padding: `0 ${SETUP_PAGE_CONTAINER.HORIZONTAL_PADDING}`,
357-
}}
358-
>
352+
<div className="w-full h-full flex items-center justify-center">
359353
<div
360-
className={STANDARD_CARD.BASE_CLASSES}
354+
className="w-full mx-auto"
361355
style={{
362-
height: SETUP_PAGE_CONTAINER.MAIN_CONTENT_HEIGHT,
363-
padding: "25px",
356+
maxWidth: SETUP_PAGE_CONTAINER.MAX_WIDTH,
357+
padding: `0 ${SETUP_PAGE_CONTAINER.HORIZONTAL_PADDING}`,
364358
}}
365359
>
366-
<Tabs
367-
size="middle"
368-
items={tabItems}
369-
activeKey={memory.activeTabKey}
370-
onChange={(key) => memory.setActiveTabKey(key)}
371-
tabBarStyle={{
372-
marginBottom: "16px",
360+
<div
361+
className={STANDARD_CARD.BASE_CLASSES}
362+
style={{
363+
height: SETUP_PAGE_CONTAINER.MAIN_CONTENT_HEIGHT,
364+
padding: "25px",
373365
}}
374-
/>
366+
>
367+
<Tabs
368+
size="middle"
369+
items={tabItems}
370+
activeKey={memory.activeTabKey}
371+
onChange={(key) => memory.setActiveTabKey(key)}
372+
tabBarStyle={{
373+
marginBottom: "16px",
374+
}}
375+
/>
376+
</div>
375377
</div>
376378
</div>
377379
) : null}

frontend/app/[locale]/models/ModelsContent.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,18 @@ export default function ModelsContent({
130130
transition={pageTransition}
131131
style={{width: "100%", height: "100%"}}
132132
>
133-
{canAccessProtectedData ? (
134-
<AppModelConfig
135-
onSelectedModelsChange={(selected) =>
136-
setLiveSelectedModels(selected)
137-
}
138-
onEmbeddingConnectivityChange={() => {}}
139-
forwardedRef={modelConfigSectionRef}
140-
canAccessProtectedData={canAccessProtectedData}
141-
/>
142-
) : null}
133+
<div className="w-full h-full flex items-center justify-center">
134+
{canAccessProtectedData ? (
135+
<AppModelConfig
136+
onSelectedModelsChange={(selected) =>
137+
setLiveSelectedModels(selected)
138+
}
139+
onEmbeddingConnectivityChange={() => {}}
140+
forwardedRef={modelConfigSectionRef}
141+
canAccessProtectedData={canAccessProtectedData}
142+
/>
143+
) : null}
144+
</div>
143145
</motion.div>
144146

145147
<EmbedderCheckModal

frontend/app/[locale]/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export default function Home() {
324324

325325
case "models":
326326
return (
327-
<div className="w-full h-full p-1">
327+
<div className="w-full h-full p-8">
328328
<ModelsContent
329329
connectionStatus={connectionStatus}
330330
isCheckingConnection={isCheckingConnection}
@@ -502,10 +502,12 @@ export default function Home() {
502502
currentView={currentView}
503503
showFooter={currentView !== "setup"}
504504
contentMode={
505-
currentView === "home"
506-
? "centered"
507-
: currentView === "memory" || currentView === "models"
508-
? "centered"
505+
currentView === "home"
506+
? "centered"
507+
: currentView === "memory" ||
508+
currentView === "models" ||
509+
currentView === "knowledges"
510+
? "centered"
509511
: currentView === "chat"
510512
? "fullscreen"
511513
: "scrollable"

0 commit comments

Comments
 (0)