Skip to content

Commit 0d10b86

Browse files
committed
chore: Update npm dependencies and add framer-motion library for animations
1 parent 8695e49 commit 0d10b86

File tree

5 files changed

+5943
-4874
lines changed

5 files changed

+5943
-4874
lines changed

app/ui/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"d3": "^7.8.5",
2424
"dayjs": "^1.11.10",
2525
"eventsource-parser": "^1.0.0",
26+
"framer-motion": "^11.3.2",
2627
"js-cookie": "^3.0.5",
2728
"localforage": "^1.10.0",
2829
"match-sorter": "^6.3.1",

app/ui/src/components/Bot/Playground/HistoryList.tsx

+11-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React from "react";
77
import { useMessage } from "../../../hooks/useMessage";
88
import { Empty, Skeleton } from "antd";
99
import { useStoreMessage } from "../../../store";
10+
import { motion } from "framer-motion";
1011

1112
export const PlaygroundHistoryList = () => {
1213
const params = useParams<{ id: string; history_id?: string }>();
@@ -72,9 +73,16 @@ export const PlaygroundHistoryList = () => {
7273
</div>
7374
)}
7475
<div className="flex flex-col gap-2 overflow-hidden text-gray-100 text-sm dark:text-gray-400">
75-
{data.history.map((item, index) => {
76-
return <PlaygroundHistoryCard key={index} item={item} />;
77-
})}
76+
{data.history.map((item, index) => (
77+
<motion.div
78+
key={item.id || index}
79+
initial={{ opacity: 0, y: 20 }}
80+
animate={{ opacity: 1, y: 0 }}
81+
transition={{ duration: 0.3, delay: index * 0.1 }}
82+
>
83+
<PlaygroundHistoryCard item={item} />
84+
</motion.div>
85+
))}
7886
</div>
7987
</div>
8088
)}

app/ui/src/components/Bot/Settings/SettingsCard.tsx renamed to app/ui/src/components/Bot/Settings/SettingsBody.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from "../../../utils/prompts";
1919
import { BotSettings } from "../../../@types/bot";
2020

21-
export const SettingsCard: React.FC<BotSettings> = ({
21+
export const SettingsBody: React.FC<BotSettings> = ({
2222
data,
2323
chatModel,
2424
embeddingModel,

app/ui/src/routes/bot/settings.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useNavigate, useParams } from "react-router-dom";
33
import api from "../../services/api";
44
import React from "react";
55
import { SkeletonLoading } from "../../components/Common/SkeletonLoading";
6-
import { SettingsCard } from "../../components/Bot/Settings/SettingsCard";
6+
import { SettingsBody } from "../../components/Bot/Settings/SettingsBody";
77
import { BotSettings } from "../../@types/bot";
88

99
export default function BotSettingsRoot() {
@@ -30,7 +30,7 @@ export default function BotSettingsRoot() {
3030
return (
3131
<div className="mx-auto my-3 w-full max-w-7xl">
3232
{status === "loading" && <SkeletonLoading />}
33-
{status === "success" && <SettingsCard {...data} />}
33+
{status === "success" && <SettingsBody {...data} />}
3434
</div>
3535
);
3636
}

0 commit comments

Comments
 (0)