tfrere HF Staff Cursor commited on
Commit
d539bd6
·
1 Parent(s): 08e1214

Fix TS build errors: unused imports, unknown-as-ReactNode casts

Browse files
frontend/src/components/Chat/ChatInput.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import { useState, useCallback, useEffect, useRef, KeyboardEvent } from 'react';
2
- import { Box, TextField, IconButton, CircularProgress, Typography } from '@mui/material';
3
  import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
4
 
5
  interface ChatInputProps {
@@ -118,7 +118,6 @@ export default function ChatInput({ onSend, disabled = false }: ChatInputProps)
118
  {disabled ? <CircularProgress size={20} color="inherit" /> : <ArrowUpwardIcon fontSize="small" />}
119
  </IconButton>
120
  </Box>
121
-
122
  </Box>
123
  </Box>
124
  );
 
1
  import { useState, useCallback, useEffect, useRef, KeyboardEvent } from 'react';
2
+ import { Box, TextField, IconButton, CircularProgress } from '@mui/material';
3
  import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
4
 
5
  interface ChatInputProps {
 
118
  {disabled ? <CircularProgress size={20} color="inherit" /> : <ArrowUpwardIcon fontSize="small" />}
119
  </IconButton>
120
  </Box>
 
121
  </Box>
122
  </Box>
123
  );
frontend/src/components/Chat/ToolCallGroup.tsx CHANGED
@@ -12,7 +12,7 @@ import { useLayoutStore } from '@/store/layoutStore';
12
  import { useSessionStore } from '@/store/sessionStore';
13
  import { apiFetch } from '@/utils/api';
14
  import { logger } from '@/utils/logger';
15
- import type { TraceLog, ApprovalStatus } from '@/types/agent';
16
 
17
  interface ToolCallGroupProps {
18
  tools: TraceLog[];
@@ -85,7 +85,7 @@ function InlineApproval({
85
  <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
86
  {String(log.args.hardware_flavor || 'default')}
87
  </Box>
88
- {log.args.timeout && (
89
  <> with timeout <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
90
  {String(log.args.timeout)}
91
  </Box></>
@@ -284,7 +284,7 @@ export default function ToolCallGroup({ tools }: ToolCallGroupProps) {
284
  </Typography>
285
 
286
  {/* Quick action links for completed jobs */}
287
- {log.completed && log.tool === 'hf_jobs' && log.args?.script && (
288
  <Box sx={{ display: 'flex', gap: 0.5 }} onClick={(e) => e.stopPropagation()}>
289
  <Typography
290
  component="span"
 
12
  import { useSessionStore } from '@/store/sessionStore';
13
  import { apiFetch } from '@/utils/api';
14
  import { logger } from '@/utils/logger';
15
+ import type { TraceLog } from '@/types/agent';
16
 
17
  interface ToolCallGroupProps {
18
  tools: TraceLog[];
 
85
  <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
86
  {String(log.args.hardware_flavor || 'default')}
87
  </Box>
88
+ {!!log.args.timeout && (
89
  <> with timeout <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
90
  {String(log.args.timeout)}
91
  </Box></>
 
284
  </Typography>
285
 
286
  {/* Quick action links for completed jobs */}
287
+ {log.completed && log.tool === 'hf_jobs' && !!log.args?.script && (
288
  <Box sx={{ display: 'flex', gap: 0.5 }} onClick={(e) => e.stopPropagation()}>
289
  <Typography
290
  component="span"