Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 32 additions & 58 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-dialog": "^1.1.6",
"@radix-ui/react-scroll-area": "^1.2.3",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
"@radix-ui/react-checkbox": "^1.3.11",
"@radix-ui/react-dialog": "^1.1.23",
"@radix-ui/react-scroll-area": "^1.2.18",
"@radix-ui/react-select": "^2.3.7",
"@radix-ui/react-separator": "^1.1.15",
"@radix-ui/react-slot": "^1.3.3",
"@radix-ui/react-tabs": "^1.1.21",
"@radix-ui/react-tooltip": "^1.2.16",
"@tanstack/react-query": "^5.102.8",
"@tanstack/react-virtual": "^3.14.10",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"lucide-react": "^0.475.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"sonner": "^1.7.4",
"tailwind-merge": "^3.6.0",
"tailwindcss-animate": "^1.0.7",
"zustand": "^5.0.15"
},
"devDependencies": {
"@types/node": "^22.13.0",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.7",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.26",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/insights/ToolsAuditSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// 运行体检/重新体检 recomputes with refresh=1 and writes into the same cache entry.

import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { useState } from 'react';
import { useState, type ReactElement } from 'react';
import { getToolsAudit } from '@/api/client';
import type { ToolsAudit } from '@/api/types';
import { Button } from '@/components/ui/button';
Expand Down Expand Up @@ -58,7 +58,7 @@ export function ToolsAuditSection() {
const maxCalls = tools.length ? Math.max(tools[0].calls, 1) : 1;
const unused = audit?.configuredUnused || [];

let body: JSX.Element;
let body: ReactElement;
if (loading && !audit) {
body = <div className="text-sm text-muted-foreground">体检中…扫描全部平台会话统计工具调用</div>;
} else if (error && !refresh.isPending) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/prompts/PromptItemRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { errorMessage } from './promptsLib';
/** Copy-to-clipboard button with the legacy 1.2s "Copied!" flash. */
export function CopyButton({ text, className }: { text: string; className?: string }) {
const [copied, setCopied] = useState(false);
const timer = useRef<number>();
const timer = useRef<number | undefined>(undefined);
useEffect(() => () => window.clearTimeout(timer.current), []);
return (
<Button
Expand Down Expand Up @@ -59,7 +59,7 @@ export function PromptItemRow({
const [clamped, setClamped] = useState(true);
const [rewrite, setRewrite] = useState<RewriteResult | null>(null);
const [rewriteError, setRewriteError] = useState('');
const errorTimer = useRef<number>();
const errorTimer = useRef<number | undefined>(undefined);
useEffect(() => () => window.clearTimeout(errorTimer.current), []);

const rewriteMutation = useMutation({
Expand Down