调整保存时间
This commit is contained in:
@@ -658,37 +658,19 @@ export const Settings: React.FC<SettingsProps> = ({
|
|||||||
{/* Cleanup Period */}
|
{/* Cleanup Period */}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="cleanup">{t('settings.generalOptions.chatRetention')}</Label>
|
<Label htmlFor="cleanup">{t('settings.generalOptions.chatRetention')}</Label>
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
<Input
|
<Input
|
||||||
id="cleanup"
|
id="cleanup"
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
placeholder="30"
|
placeholder="30"
|
||||||
value={settings?.cleanupPeriodDays === -1 ? "" : (settings?.cleanupPeriodDays || "")}
|
value={settings?.cleanupPeriodDays || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value ? parseInt(e.target.value) : undefined;
|
const value = e.target.value ? parseInt(e.target.value) : undefined;
|
||||||
updateSetting("cleanupPeriodDays", value);
|
updateSetting("cleanupPeriodDays", value);
|
||||||
}}
|
}}
|
||||||
disabled={settings?.cleanupPeriodDays === -1}
|
|
||||||
className="flex-1"
|
|
||||||
/>
|
/>
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<Switch
|
|
||||||
id="permanent-retention"
|
|
||||||
checked={settings?.cleanupPeriodDays === -1}
|
|
||||||
onCheckedChange={(checked) => {
|
|
||||||
updateSetting("cleanupPeriodDays", checked ? -1 : undefined);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Label htmlFor="permanent-retention" className="text-sm cursor-pointer">
|
|
||||||
{t('settings.generalOptions.permanentRetention')}
|
|
||||||
</Label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p className="text-xs text-muted-foreground">
|
<p className="text-xs text-muted-foreground">
|
||||||
{settings?.cleanupPeriodDays === -1
|
{t('settings.generalOptions.chatRetentionDesc')}
|
||||||
? t('settings.generalOptions.chatRetentionPermanent')
|
|
||||||
: t('settings.generalOptions.chatRetentionDesc')}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -426,8 +426,6 @@
|
|||||||
"verboseOutputDesc": "Show full bash and command outputs",
|
"verboseOutputDesc": "Show full bash and command outputs",
|
||||||
"chatRetention": "Chat Transcript Retention (days)",
|
"chatRetention": "Chat Transcript Retention (days)",
|
||||||
"chatRetentionDesc": "How long to retain chat transcripts locally (default: 30 days)",
|
"chatRetentionDesc": "How long to retain chat transcripts locally (default: 30 days)",
|
||||||
"chatRetentionPermanent": "Permanent retention enabled, chat records will not be automatically deleted",
|
|
||||||
"permanentRetention": "Permanent Retention",
|
|
||||||
"claudeCodeInstallation": "Claude Code Installation",
|
"claudeCodeInstallation": "Claude Code Installation",
|
||||||
"choosePreferredInstallation": "Choose your preferred Claude Code installation.",
|
"choosePreferredInstallation": "Choose your preferred Claude Code installation.",
|
||||||
"loadingAvailableInstallations": "Loading available installations...",
|
"loadingAvailableInstallations": "Loading available installations...",
|
||||||
|
|||||||
@@ -413,8 +413,6 @@
|
|||||||
"verboseOutputDesc": "显示完整的 bash 和命令输出",
|
"verboseOutputDesc": "显示完整的 bash 和命令输出",
|
||||||
"chatRetention": "聊天记录保留期 (天)",
|
"chatRetention": "聊天记录保留期 (天)",
|
||||||
"chatRetentionDesc": "本地保留聊天记录的时长(默认:30 天)",
|
"chatRetentionDesc": "本地保留聊天记录的时长(默认:30 天)",
|
||||||
"chatRetentionPermanent": "已启用永久保存,聊天记录将不会被自动删除",
|
|
||||||
"permanentRetention": "永久保存",
|
|
||||||
"claudeCodeInstallation": "Claude Code 安装",
|
"claudeCodeInstallation": "Claude Code 安装",
|
||||||
"choosePreferredInstallation": "选择您偏好的 Claude Code 安装。",
|
"choosePreferredInstallation": "选择您偏好的 Claude Code 安装。",
|
||||||
"loadingAvailableInstallations": "正在加载可用安装...",
|
"loadingAvailableInstallations": "正在加载可用安装...",
|
||||||
|
|||||||
Reference in New Issue
Block a user