Skip to content

Commit

Permalink
Beam Fusion: sticky header
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Dec 30, 2024
1 parent 0a002a0 commit af78068
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/modules/beam/gather/Fusion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export function Fusion(props: {
factory={factory}
isFusing={isFusing}
isInterrupted={isStopped}
isMobile={props.isMobile}
isUsable={isUsable}
llmLabel={llmLabel}
llmVendorIcon={llmVendorIcon}
Expand Down
5 changes: 4 additions & 1 deletion src/modules/beam/gather/FusionControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import StopRoundedIcon from '@mui/icons-material/StopRounded';
import { GoodTooltip } from '~/common/components/GoodTooltip';
import { TooltipOutlined } from '~/common/components/TooltipOutlined';

import { rayControlsMobileSx, rayControlsSx } from '../scatter/BeamRay';

import type { BFusion } from './beam.gather';
import type { FusionFactorySpec } from './instructions/beam.gather.factories';

Expand All @@ -20,6 +22,7 @@ function FusionControls(props: {
factory: FusionFactorySpec,
isFusing: boolean,
isInterrupted: boolean,
isMobile: boolean,
isUsable: boolean,
llmLabel: string,
llmVendorIcon?: React.FunctionComponent<SvgIconProps>,
Expand All @@ -28,7 +31,7 @@ function FusionControls(props: {
onToggleGenerate: () => void,
}) {
return (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<Box sx={props.isMobile ? rayControlsMobileSx : rayControlsSx}>

{/* LLM Icon with Tooltip */}
{!!props.llmVendorIcon && (
Expand Down
4 changes: 2 additions & 2 deletions src/modules/beam/scatter/BeamRay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ import { useMessageAvatarLabel } from '~/common/util/dMessageUtils';
textAlign: 'center',
};*/

const rayControlsSx: SxProps = {
export const rayControlsSx: SxProps = {
// layout
display: 'flex', alignItems: 'center', gap: 1,
};

const rayControlsMobileSx: SxProps = {
export const rayControlsMobileSx: SxProps = {
...rayControlsSx,

// anchor top
Expand Down

0 comments on commit af78068

Please sign in to comment.