Skip to content

Commit 2a822dc

Browse files
committed
Delete some extraneous wrapper boxes
1 parent 8d747f5 commit 2a822dc

File tree

2 files changed

+59
-75
lines changed

2 files changed

+59
-75
lines changed

cli/src/app.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,14 @@ export const App = ({
169169
])
170170

171171
return (
172-
<box style={{ flexDirection: 'column', gap: 0, flexGrow: 1 }}>
173-
<Chat
174-
headerContent={headerContent}
175-
initialPrompt={initialPrompt}
176-
agentId={agentId}
177-
requireAuth={requireAuth}
178-
hasInvalidCredentials={hasInvalidCredentials}
179-
loadedAgentsData={loadedAgentsData}
180-
validationErrors={validationErrors}
181-
/>
182-
</box>
172+
<Chat
173+
headerContent={headerContent}
174+
initialPrompt={initialPrompt}
175+
agentId={agentId}
176+
requireAuth={requireAuth}
177+
hasInvalidCredentials={hasInvalidCredentials}
178+
loadedAgentsData={loadedAgentsData}
179+
validationErrors={validationErrors}
180+
/>
183181
)
184182
}

cli/src/chat.tsx

Lines changed: 50 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -593,78 +593,64 @@ export const Chat = ({
593593
flexGrow: 1,
594594
}}
595595
>
596-
<box
596+
<scrollbox
597+
ref={scrollRef}
598+
stickyScroll
599+
stickyStart="bottom"
600+
scrollX={false}
601+
scrollbarOptions={{ visible: false }}
602+
{...appliedScrollboxProps}
597603
style={{
598-
flexDirection: 'column',
599604
flexGrow: 1,
600-
paddingLeft: 0,
601-
paddingRight: 0,
602-
paddingTop: 0,
603-
paddingBottom: 0,
604-
backgroundColor: 'transparent',
605+
rootOptions: {
606+
flexGrow: 1,
607+
padding: 0,
608+
gap: 0,
609+
flexDirection: 'column',
610+
shouldFill: true,
611+
backgroundColor: 'transparent',
612+
},
613+
wrapperOptions: {
614+
flexGrow: 1,
615+
border: false,
616+
shouldFill: true,
617+
backgroundColor: 'transparent',
618+
},
619+
contentOptions: {
620+
flexDirection: 'column',
621+
gap: 0,
622+
shouldFill: true,
623+
justifyContent: 'flex-end',
624+
backgroundColor: 'transparent',
625+
},
605626
}}
606627
>
607-
<scrollbox
608-
ref={scrollRef}
609-
stickyScroll
610-
stickyStart="bottom"
611-
scrollX={false}
612-
scrollbarOptions={{ visible: false }}
613-
{...appliedScrollboxProps}
614-
style={{
615-
flexGrow: 1,
616-
rootOptions: {
617-
flexGrow: 1,
618-
padding: 0,
619-
gap: 0,
620-
flexDirection: 'column',
621-
shouldFill: true,
622-
backgroundColor: 'transparent',
623-
},
624-
wrapperOptions: {
625-
flexGrow: 1,
626-
border: false,
627-
shouldFill: true,
628-
backgroundColor: 'transparent',
629-
},
630-
contentOptions: {
631-
flexDirection: 'column',
632-
gap: 0,
633-
shouldFill: true,
634-
justifyContent: 'flex-end',
635-
backgroundColor: 'transparent',
636-
},
637-
}}
638-
>
639-
{headerContent}
640-
{virtualizationNotice}
641-
<MessageRenderer
642-
messages={messages}
643-
messageTree={messageTree}
644-
topLevelMessages={virtualTopLevelMessages}
645-
availableWidth={separatorWidth}
646-
theme={theme}
647-
markdownPalette={markdownPalette}
648-
collapsedAgents={collapsedAgents}
649-
streamingAgents={streamingAgents}
650-
isWaitingForResponse={isWaitingForResponse}
651-
timerStartTime={timerStartTime}
652-
onCollapseToggle={handleCollapseToggle}
653-
setCollapsedAgents={setCollapsedAgents}
654-
setFocusedAgentId={setFocusedAgentId}
655-
userOpenedAgents={userOpenedAgents}
656-
setUserOpenedAgents={setUserOpenedAgents}
657-
onBuildFast={handleBuildFast}
658-
onBuildMax={handleBuildMax}
659-
/>
660-
</scrollbox>
661-
</box>
628+
{headerContent}
629+
{virtualizationNotice}
630+
<MessageRenderer
631+
messages={messages}
632+
messageTree={messageTree}
633+
topLevelMessages={virtualTopLevelMessages}
634+
availableWidth={separatorWidth}
635+
theme={theme}
636+
markdownPalette={markdownPalette}
637+
collapsedAgents={collapsedAgents}
638+
streamingAgents={streamingAgents}
639+
isWaitingForResponse={isWaitingForResponse}
640+
timerStartTime={timerStartTime}
641+
onCollapseToggle={handleCollapseToggle}
642+
setCollapsedAgents={setCollapsedAgents}
643+
setFocusedAgentId={setFocusedAgentId}
644+
userOpenedAgents={userOpenedAgents}
645+
setUserOpenedAgents={setUserOpenedAgents}
646+
onBuildFast={handleBuildFast}
647+
onBuildMax={handleBuildMax}
648+
/>
649+
</scrollbox>
662650

663651
<box
664652
style={{
665653
flexShrink: 0,
666-
paddingLeft: 0,
667-
paddingRight: 0,
668654
backgroundColor: 'transparent',
669655
}}
670656
>

0 commit comments

Comments
 (0)