Beam: fix styles

This commit is contained in:
Enrico Ros
2024-03-11 23:13:20 -07:00
parent 5c22061415
commit c8a7123da9
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ export function BeamRay(props: {
/>
{/* Ray Message */}
{(!!ray?.message?.text || !!ray?.message?.updated) && (
{(!!ray?.message?.text || ray?.status === 'scattering') && (
<Box sx={{
minHeight: '1.5rem',
display: 'flex',
+2 -2
View File
@@ -118,8 +118,8 @@ function BeamViewBase(props: {
const userMessageDecorator = React.useMemo(() => {
return (otherHistoryCount >= 1) ? (
<Typography level='body-xs' sx={{ lineHeight: '3rem', opacity: 0.5 }}>
{otherHistoryCount === 1 ? (isFirstMessageSystem ? '1 system message' : '1 message') : `${otherHistoryCount} messages`} above
<Typography level='body-xs' sx={{ my: 1.5, opacity: 0.8 }}>
{otherHistoryCount === 1 ? (isFirstMessageSystem ? '1 system message' : '1 message') : `${otherHistoryCount} messages`} before
</Typography>
) : null;
}, [isFirstMessageSystem, otherHistoryCount]);
+4 -2
View File
@@ -62,7 +62,8 @@ function rayScatterStart(ray: DRay, onlyIdle: boolean, beamStore: BeamStore): DR
message: {
...ray.message,
...update,
updated: Date.now(),
// only update the timestamp when the text changes
...(update.text ? { updated: Date.now() } : {}),
},
}));
@@ -91,7 +92,8 @@ function rayScatterStart(ray: DRay, onlyIdle: boolean, beamStore: BeamStore): DR
message: {
...ray.message,
text: PLACEHOLDER_SCATTER_TEXT,
updated: Date.now(),
created: Date.now(),
updated: null,
},
scatterLlmId: rayLlmId,
scatterIssue: undefined,