From 4e0d7b6ed99a827d9727f99fc8599457533b7e91 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 12 Mar 2024 10:41:16 -0700 Subject: [PATCH] Beam: down to non-removable 1 --- src/common/beam/BeamRay.tsx | 21 ++++++++++++--------- src/common/beam/BeamScatterControls.tsx | 6 ++++-- src/common/beam/BeamView.tsx | 7 +++++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/common/beam/BeamRay.tsx b/src/common/beam/BeamRay.tsx index aa37ad153..907e300ed 100644 --- a/src/common/beam/BeamRay.tsx +++ b/src/common/beam/BeamRay.tsx @@ -71,13 +71,14 @@ function rayCardStatusSx(isError: boolean, isSelectable: boolean, isSelected: bo const ControlsRowMemo = React.memo(ControlsRow); function ControlsRow(props: { - isEmpty: boolean; - isLlmLinked: boolean; - isScattering: boolean; - llmComponent: React.ReactNode; - onLink: () => void; - onRemove: () => void; - onToggleGenerate: () => void; + isEmpty: boolean, + isLlmLinked: boolean, + isRemovable: boolean + isScattering: boolean, + llmComponent: React.ReactNode, + onLink: () => void, + onRemove: () => void, + onToggleGenerate: () => void, }) { return {SHOW_DRAG_HANDLE && ( @@ -113,7 +114,7 @@ function ControlsRow(props: { )} - + @@ -134,8 +135,9 @@ const chatMessageEmbeddedSx: SxProps = { export function BeamRay(props: { beamStore: BeamStoreApi, - rayId: string + rayId: string, isMobile: boolean, + isRemovable: boolean gatherLlmId: DLLMId | null, }) { @@ -187,6 +189,7 @@ export function BeamRay(props: { *': { border: '1px solid red' }, -} +}; export function BeamScatterControls(props: { @@ -75,7 +77,7 @@ export function BeamScatterControls(props: { {/* xN buttons */} *': { flex: 1 } }}> - {[2, 4, 8].map((n) => { + {CONTROLS_RAY_PRESETS.map((n) => { const isActive = n === props.rayCount; return (