From a6397f07db0d11e98bea5168a1001f951a199bf6 Mon Sep 17 00:00:00 2001 From: thzxx Date: Sat, 27 Jun 2026 22:12:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=80=BB=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E4=BB=8E=E6=BB=91=E5=9D=97=E6=94=B9=E4=B8=BA=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86(120-3600=E7=A7=92)=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=9C=AA=E7=94=A8=E7=9A=84Slider=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/settings/SettingsModal.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/settings/SettingsModal.tsx b/src/components/settings/SettingsModal.tsx index ad37345..5e6feb2 100644 --- a/src/components/settings/SettingsModal.tsx +++ b/src/components/settings/SettingsModal.tsx @@ -3,7 +3,7 @@ */ import { useState, useEffect, useCallback } from 'react'; -import { Dialog, DialogContent, DialogTitle, Button, TextField, Select, MenuItem, Tabs, Tab, Slider, Checkbox, Box, Typography, Stack, Divider, FormControlLabel, InputLabel, FormControl, IconButton, Chip } from '@mui/material'; +import { Dialog, DialogContent, DialogTitle, Button, TextField, Select, MenuItem, Tabs, Tab, Checkbox, Box, Typography, Stack, Divider, FormControlLabel, InputLabel, FormControl, IconButton, Chip } from '@mui/material'; import { X, Settings, Bot, Wrench, Server, Palette, FileText, Eye, EyeOff, FolderOpen } from 'lucide-react'; import { useUIStore, type ThemeMode } from '@renderer/stores/ui-store'; import { useAgentStore } from '@renderer/stores/agent-store'; @@ -156,10 +156,17 @@ function AgentSettings() { ))} - - 总超时 (秒){timeout / 1000}s - setTimeout_((v as number) * 1000)} min={60} max={1800} step={60} size="small" /> - + { + const v = Number(e.target.value); + if (v >= 120 && v <= 3600) setTimeout_(v * 1000); + }} + slotProps={{ htmlInput: { min: 120, max: 3600, step: 30 } }} + /> setThinking(e.target.checked)} size="small" />} label={启用思考模式} /> {thinking && ( 思考强度