update pay function
This commit is contained in:
@@ -23,8 +23,8 @@ import { FiTarget, FiCheckCircle, FiXCircle, FiClock, FiTool } from 'react-icons
|
||||
* 执行计划卡片组件
|
||||
*/
|
||||
export const PlanCard = ({ plan, stepResults }) => {
|
||||
const cardBg = useColorModeValue('blue.50', 'blue.900');
|
||||
const borderColor = useColorModeValue('blue.200', 'blue.700');
|
||||
const cardBg = useColorModeValue('blue.50', 'rgba(40, 45, 50, 0.8)');
|
||||
const borderColor = useColorModeValue('blue.200', 'rgba(255, 215, 0, 0.3)');
|
||||
const successColor = useColorModeValue('green.500', 'green.300');
|
||||
const errorColor = useColorModeValue('red.500', 'red.300');
|
||||
const pendingColor = useColorModeValue('gray.400', 'gray.500');
|
||||
@@ -73,7 +73,7 @@ export const PlanCard = ({ plan, stepResults }) => {
|
||||
<Icon as={FiTarget} color="blue.500" boxSize={5} />
|
||||
<Text fontWeight="bold" fontSize="md">执行目标</Text>
|
||||
</HStack>
|
||||
<Text fontSize="sm" color="gray.600" pl={7}>
|
||||
<Text fontSize="sm" color={useColorModeValue('gray.600', '#9BA1A6')} pl={7}>
|
||||
{plan.goal}
|
||||
</Text>
|
||||
|
||||
@@ -83,7 +83,7 @@ export const PlanCard = ({ plan, stepResults }) => {
|
||||
{plan.reasoning && (
|
||||
<>
|
||||
<Text fontSize="sm" fontWeight="bold">规划思路:</Text>
|
||||
<Text fontSize="sm" color="gray.600">
|
||||
<Text fontSize="sm" color={useColorModeValue('gray.600', '#9BA1A6')}>
|
||||
{plan.reasoning}
|
||||
</Text>
|
||||
<Divider />
|
||||
@@ -106,7 +106,7 @@ export const PlanCard = ({ plan, stepResults }) => {
|
||||
<HStack
|
||||
key={index}
|
||||
p={2}
|
||||
bg={useColorModeValue('white', 'gray.700')}
|
||||
bg={useColorModeValue('white', 'rgba(50, 55, 60, 0.6)')}
|
||||
borderRadius="md"
|
||||
borderWidth="1px"
|
||||
borderColor={stepColor}
|
||||
@@ -129,7 +129,7 @@ export const PlanCard = ({ plan, stepResults }) => {
|
||||
status === 'failed' ? '✗ 失败' : '⏳ 等待'}
|
||||
</Badge>
|
||||
</HStack>
|
||||
<Text fontSize="xs" color="gray.600">
|
||||
<Text fontSize="xs" color={useColorModeValue('gray.600', '#9BA1A6')}>
|
||||
{step.reason}
|
||||
</Text>
|
||||
</VStack>
|
||||
|
||||
@@ -23,8 +23,8 @@ import { FiChevronDown, FiChevronUp, FiCheckCircle, FiXCircle, FiClock, FiDataba
|
||||
export const StepResultCard = ({ stepResult }) => {
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
|
||||
const cardBg = useColorModeValue('white', 'gray.700');
|
||||
const borderColor = useColorModeValue('gray.200', 'gray.600');
|
||||
const cardBg = useColorModeValue('white', 'rgba(40, 45, 50, 0.8)');
|
||||
const borderColor = useColorModeValue('gray.200', 'rgba(255, 215, 0, 0.2)');
|
||||
const successColor = useColorModeValue('green.500', 'green.300');
|
||||
const errorColor = useColorModeValue('red.500', 'red.300');
|
||||
|
||||
@@ -80,7 +80,7 @@ export const StepResultCard = ({ stepResult }) => {
|
||||
justify="space-between"
|
||||
cursor="pointer"
|
||||
onClick={() => setIsExpanded(!isExpanded)}
|
||||
_hover={{ bg: useColorModeValue('gray.50', 'gray.600') }}
|
||||
_hover={{ bg: useColorModeValue('gray.50', 'rgba(50, 55, 60, 0.7)') }}
|
||||
>
|
||||
<HStack flex={1}>
|
||||
<Icon as={StatusIcon} color={`${statusColorScheme}.500`} boxSize={5} />
|
||||
@@ -94,7 +94,7 @@ export const StepResultCard = ({ stepResult }) => {
|
||||
stepResult.status === 'failed' ? '失败' : '执行中'}
|
||||
</Badge>
|
||||
</HStack>
|
||||
<Text fontSize="xs" color="gray.500">
|
||||
<Text fontSize="xs" color={useColorModeValue('gray.500', '#9BA1A6')}>
|
||||
耗时: {stepResult.execution_time?.toFixed(2)}s
|
||||
</Text>
|
||||
</VStack>
|
||||
@@ -140,7 +140,7 @@ export const StepResultCard = ({ stepResult }) => {
|
||||
maxH="300px"
|
||||
overflowY="auto"
|
||||
p={2}
|
||||
bg={useColorModeValue('gray.50', 'gray.800')}
|
||||
bg={useColorModeValue('gray.50', 'rgba(25, 28, 32, 0.6)')}
|
||||
borderRadius="md"
|
||||
fontSize="xs"
|
||||
>
|
||||
@@ -155,7 +155,7 @@ export const StepResultCard = ({ stepResult }) => {
|
||||
</Code>
|
||||
))}
|
||||
{stepResult.result.length > 3 && (
|
||||
<Text fontSize="xs" color="gray.500">
|
||||
<Text fontSize="xs" color={useColorModeValue('gray.500', '#9BA1A6')}>
|
||||
...还有 {stepResult.result.length - 3} 条记录
|
||||
</Text>
|
||||
)}
|
||||
@@ -172,7 +172,7 @@ export const StepResultCard = ({ stepResult }) => {
|
||||
{stepResult.status === 'failed' && stepResult.error && (
|
||||
<VStack align="stretch" spacing={2}>
|
||||
<Text fontSize="xs" fontWeight="bold" color="red.500">错误信息:</Text>
|
||||
<Text fontSize="xs" color="red.600" p={2} bg="red.50" borderRadius="md">
|
||||
<Text fontSize="xs" color={useColorModeValue('red.600', 'red.300')} p={2} bg={useColorModeValue('red.50', 'rgba(220, 38, 38, 0.15)')} borderRadius="md">
|
||||
{stepResult.error}
|
||||
</Text>
|
||||
</VStack>
|
||||
|
||||
Reference in New Issue
Block a user