Skip to content

Commit 4f99207

Browse files
authored
Merge branch 'develop' into tests/redis-adapter
2 parents 90f9445 + 7100fe7 commit 4f99207

File tree

5 files changed

+358
-76
lines changed

5 files changed

+358
-76
lines changed

.github/workflows/smoke-tests.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@ on:
1010
jobs:
1111
smoke-tests:
1212
runs-on: ubuntu-latest
13+
container:
14+
image: node:23-bullseye
15+
env:
16+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1317
steps:
1418
- uses: actions/checkout@v4
1519

16-
- uses: pnpm/action-setup@v3
20+
- name: Cache pnpm
21+
uses: actions/cache@v4
1722
with:
18-
version: 9.15.0
23+
path: |
24+
~/.pnpm-store
25+
**/node_modules
26+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
27+
restore-keys: ${{ runner.os }}-pnpm-
1928

20-
- uses: actions/setup-node@v4
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v3
2131
with:
22-
node-version: "23.3.0"
23-
cache: "pnpm"
32+
version: 9.15.0
2433

2534
- name: Run smoke tests
2635
run: pnpm run smokeTests

client/src/components/chat.tsx

+18-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "@/components/ui/chat/chat-bubble";
77
import { ChatInput } from "@/components/ui/chat/chat-input";
88
import { ChatMessageList } from "@/components/ui/chat/chat-message-list";
9-
import { useTransition, animated } from "@react-spring/web";
9+
import { useTransition, animated, AnimatedProps } from "@react-spring/web";
1010
import { Paperclip, Send, X } from "lucide-react";
1111
import { useEffect, useRef, useState } from "react";
1212
import { Content, UUID } from "@elizaos/core";
@@ -23,14 +23,18 @@ import { IAttachment } from "@/types";
2323
import { AudioRecorder } from "./audio-recorder";
2424
import { Badge } from "./ui/badge";
2525

26-
interface ExtraContentFields {
26+
type ExtraContentFields = {
2727
user: string;
2828
createdAt: number;
2929
isLoading?: boolean;
30-
}
30+
};
3131

3232
type ContentWithUser = Content & ExtraContentFields;
3333

34+
type AnimatedDivProps = AnimatedProps<{ style: React.CSSProperties }> & {
35+
children?: React.ReactNode;
36+
};
37+
3438
export default function Page({ agentId }: { agentId: UUID }) {
3539
const { toast } = useToast();
3640
const [selectedFile, setSelectedFile] = useState<File | null>(null);
@@ -67,7 +71,6 @@ export default function Page({ agentId }: { agentId: UUID }) {
6771
}
6872
};
6973

70-
7174
const handleSendMessage = (e: React.FormEvent<HTMLFormElement>) => {
7275
e.preventDefault();
7376
if (!input) return;
@@ -167,17 +170,23 @@ export default function Page({ agentId }: { agentId: UUID }) {
167170
leave: { opacity: 0, transform: "translateY(10px)" },
168171
});
169172

173+
const CustomAnimatedDiv = animated.div as React.FC<AnimatedDivProps>;
174+
170175
return (
171176
<div className="flex flex-col w-full h-[calc(100dvh)] p-4">
172177
<div className="flex-1 overflow-y-auto">
173178
<ChatMessageList ref={messagesContainerRef}>
174179
{transitions((styles, message) => {
175180
const variant = getMessageVariant(message?.user);
176181
return (
177-
// @ts-expect-error
178-
<animated.div
179-
style={styles}
180-
className="flex flex-col gap-2 p-4"
182+
<CustomAnimatedDiv
183+
style={{
184+
...styles,
185+
display: "flex",
186+
flexDirection: "column",
187+
gap: "0.5rem",
188+
padding: "1rem",
189+
}}
181190
>
182191
<ChatBubble
183192
variant={variant}
@@ -266,7 +275,7 @@ export default function Page({ agentId }: { agentId: UUID }) {
266275
</div>
267276
</div>
268277
</ChatBubble>
269-
</animated.div>
278+
</CustomAnimatedDiv>
270279
);
271280
})}
272281
</ChatMessageList>

0 commit comments

Comments
 (0)