fix(knowledge): format progress percentage to 2 decimal places

This commit is contained in:
2025-10-24 17:56:19 +08:00
parent fd256025b3
commit 49742f6219
2 changed files with 2 additions and 2 deletions

View File

@@ -160,7 +160,7 @@ const getRunStatusChip = (run: RunningStatus, progress: number) => {
<CircularProgress size={16} /> <CircularProgress size={16} />
<Box sx={{ minWidth: 80 }}> <Box sx={{ minWidth: 80 }}>
<Typography variant="caption" color="text.secondary"> <Typography variant="caption" color="text.secondary">
{progress}% {(progress*100).toFixed(2)}%
</Typography> </Typography>
<LinearProgress variant="determinate" value={progress} sx={{ height: 4, borderRadius: 2 }} /> <LinearProgress variant="determinate" value={progress} sx={{ height: 4, borderRadius: 2 }} />
</Box> </Box>

View File

@@ -500,7 +500,7 @@ function KnowledgeBaseDetail() {
</Typography> </Typography>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}> <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
<Chip <Chip
label={`${100 * (selectedFileDetails.progress || 0)}%`} label={`${(100 * (selectedFileDetails.progress || 0)).toFixed(2)}%`}
color="primary" color="primary"
size="small" size="small"
/> />