update pay function
This commit is contained in:
@@ -7,9 +7,6 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
CardHeader,
|
|
||||||
CardBody,
|
|
||||||
CardFooter,
|
|
||||||
Input,
|
Input,
|
||||||
Avatar,
|
Avatar,
|
||||||
Chip,
|
Chip,
|
||||||
@@ -1136,7 +1133,7 @@ const AgentChat = () => {
|
|||||||
: 'bg-gray-800/50 border-2 border-gray-700 hover:border-gray-600'
|
: 'bg-gray-800/50 border-2 border-gray-700 hover:border-gray-600'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<CardBody className="p-3">
|
<Card.Content className="p-3">
|
||||||
<div className="flex items-start gap-3">
|
<div className="flex items-start gap-3">
|
||||||
<div className="p-2 rounded-lg bg-gradient-to-br from-blue-500/20 to-purple-500/20">
|
<div className="p-2 rounded-lg bg-gradient-to-br from-blue-500/20 to-purple-500/20">
|
||||||
{model.icon}
|
{model.icon}
|
||||||
@@ -1149,7 +1146,7 @@ const AgentChat = () => {
|
|||||||
<Check className="w-5 h-5 text-blue-400" />
|
<Check className="w-5 h-5 text-blue-400" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -1267,7 +1264,7 @@ const AgentChat = () => {
|
|||||||
>
|
>
|
||||||
<div className="p-4 space-y-4">
|
<div className="p-4 space-y-4">
|
||||||
<Card className="bg-gray-800/50 border border-gray-700">
|
<Card className="bg-gray-800/50 border border-gray-700">
|
||||||
<CardBody className="p-4">
|
<Card.Content className="p-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<p className="text-xs text-gray-400">对话数</p>
|
<p className="text-xs text-gray-400">对话数</p>
|
||||||
@@ -1275,11 +1272,11 @@ const AgentChat = () => {
|
|||||||
</div>
|
</div>
|
||||||
<MessageSquare className="w-8 h-8 text-blue-400 opacity-50" />
|
<MessageSquare className="w-8 h-8 text-blue-400 opacity-50" />
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card className="bg-gray-800/50 border border-gray-700">
|
<Card className="bg-gray-800/50 border border-gray-700">
|
||||||
<CardBody className="p-4">
|
<Card.Content className="p-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<p className="text-xs text-gray-400">消息数</p>
|
<p className="text-xs text-gray-400">消息数</p>
|
||||||
@@ -1287,11 +1284,11 @@ const AgentChat = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Activity className="w-8 h-8 text-purple-400 opacity-50" />
|
<Activity className="w-8 h-8 text-purple-400 opacity-50" />
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card className="bg-gray-800/50 border border-gray-700">
|
<Card className="bg-gray-800/50 border border-gray-700">
|
||||||
<CardBody className="p-4">
|
<Card.Content className="p-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<p className="text-xs text-gray-400">已选工具</p>
|
<p className="text-xs text-gray-400">已选工具</p>
|
||||||
@@ -1299,7 +1296,7 @@ const AgentChat = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Code className="w-8 h-8 text-green-400 opacity-50" />
|
<Code className="w-8 h-8 text-green-400 opacity-50" />
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</Tab>
|
</Tab>
|
||||||
@@ -1328,7 +1325,7 @@ const SessionCard = ({ session, isActive, onPress }) => {
|
|||||||
: 'bg-gray-800/30 border border-gray-800 hover:bg-gray-800/50 hover:border-gray-700'
|
: 'bg-gray-800/30 border border-gray-800 hover:bg-gray-800/50 hover:border-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<CardBody className="p-3">
|
<Card.Content className="p-3">
|
||||||
<div className="flex items-start justify-between gap-2">
|
<div className="flex items-start justify-between gap-2">
|
||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<p className="text-sm font-medium truncate text-gray-100">
|
<p className="text-sm font-medium truncate text-gray-100">
|
||||||
@@ -1356,7 +1353,7 @@ const SessionCard = ({ session, isActive, onPress }) => {
|
|||||||
</Chip>
|
</Chip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1371,7 +1368,7 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<div className="flex items-start gap-3 max-w-[75%]">
|
<div className="flex items-start gap-3 max-w-[75%]">
|
||||||
<Card className="bg-gradient-to-br from-blue-600 to-purple-600 shadow-lg shadow-blue-500/20">
|
<Card className="bg-gradient-to-br from-blue-600 to-purple-600 shadow-lg shadow-blue-500/20">
|
||||||
<CardBody className="px-5 py-3">
|
<Card.Content className="px-5 py-3">
|
||||||
<p className="text-sm text-white whitespace-pre-wrap">{message.content}</p>
|
<p className="text-sm text-white whitespace-pre-wrap">{message.content}</p>
|
||||||
{message.files && message.files.length > 0 && (
|
{message.files && message.files.length > 0 && (
|
||||||
<div className="mt-2 flex gap-2 flex-wrap">
|
<div className="mt-2 flex gap-2 flex-wrap">
|
||||||
@@ -1383,7 +1380,7 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
<Avatar
|
<Avatar
|
||||||
src={userAvatar}
|
src={userAvatar}
|
||||||
@@ -1409,10 +1406,10 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Card className="bg-gray-800/50 border border-gray-700 backdrop-blur-sm">
|
<Card className="bg-gray-800/50 border border-gray-700 backdrop-blur-sm">
|
||||||
<CardBody className="px-5 py-3 flex items-center gap-2">
|
<Card.Content className="px-5 py-3 flex items-center gap-2">
|
||||||
<Spinner size="sm" color="primary" />
|
<Spinner size="sm" color="primary" />
|
||||||
<p className="text-sm text-gray-300">{message.content}</p>
|
<p className="text-sm text-gray-300">{message.content}</p>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1430,7 +1427,7 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Card className="bg-gray-800/80 border border-gray-700 backdrop-blur-sm shadow-lg">
|
<Card className="bg-gray-800/80 border border-gray-700 backdrop-blur-sm shadow-lg">
|
||||||
<CardBody className="px-5 py-3">
|
<Card.Content className="px-5 py-3">
|
||||||
<p className="text-sm text-gray-100 whitespace-pre-wrap leading-relaxed">
|
<p className="text-sm text-gray-100 whitespace-pre-wrap leading-relaxed">
|
||||||
{message.content}
|
{message.content}
|
||||||
</p>
|
</p>
|
||||||
@@ -1480,7 +1477,7 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1490,9 +1487,9 @@ const MessageRenderer = ({ message, userAvatar }) => {
|
|||||||
return (
|
return (
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<Card className="bg-red-500/10 border border-red-500/50 backdrop-blur-sm">
|
<Card className="bg-red-500/10 border border-red-500/50 backdrop-blur-sm">
|
||||||
<CardBody className="px-5 py-3">
|
<Card.Content className="px-5 py-3">
|
||||||
<p className="text-sm text-red-400">{message.content}</p>
|
<p className="text-sm text-red-400">{message.content}</p>
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -1539,7 +1536,7 @@ const ExecutionStepsDisplay = ({ steps, plan }) => {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
{steps.map((result, idx) => (
|
{steps.map((result, idx) => (
|
||||||
<Card key={idx} className="bg-gray-900/30 border border-gray-700">
|
<Card key={idx} className="bg-gray-900/30 border border-gray-700">
|
||||||
<CardBody className="p-3">
|
<Card.Content className="p-3">
|
||||||
<div className="flex items-start justify-between gap-2">
|
<div className="flex items-start justify-between gap-2">
|
||||||
<p className="text-xs font-medium text-gray-300">
|
<p className="text-xs font-medium text-gray-300">
|
||||||
步骤 {idx + 1}: {result.tool_name}
|
步骤 {idx + 1}: {result.tool_name}
|
||||||
@@ -1558,7 +1555,7 @@ const ExecutionStepsDisplay = ({ steps, plan }) => {
|
|||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-gray-500 mt-1">{result.execution_time?.toFixed(2)}s</p>
|
<p className="text-xs text-gray-500 mt-1">{result.execution_time?.toFixed(2)}s</p>
|
||||||
{result.error && <p className="text-xs text-red-400 mt-1">⚠️ {result.error}</p>}
|
{result.error && <p className="text-xs text-red-400 mt-1">⚠️ {result.error}</p>}
|
||||||
</CardBody>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user