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
106 changes: 105 additions & 1 deletion package-lock.json

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

1 change: 1 addition & 0 deletions src/app/api/settings/app/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const ALLOWED_KEYS = [
'anthropic_auth_token',
'anthropic_base_url',
'dangerously_skip_permissions',
'disable_conflict_checking',
'generative_ui_enabled',
'locale',
'thinking_mode',
Expand Down
3 changes: 3 additions & 0 deletions src/components/settings/GeneralSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ export function GeneralSection() {
const [skipPermSaving, setSkipPermSaving] = useState(false);
const [generativeUI, setGenerativeUI] = useState(true);
const [generativeUISaving, setGenerativeUISaving] = useState(false);
const [disableConflictChecking, setDisableConflictChecking] = useState(false);
const [conflictCheckSaving, setConflictCheckSaving] = useState(false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: conflictCheckSaving is declared here with all the confidence of someone who swears they'll finish the feature this weekend. Spoiler: it's never read, never toggled, and sits there like a participation trophy in state management.

🩹 The Fix: Remove it until the save handler is actually implemented. Dead state variables are a code smell — they signal "I'll get to it" energy that never arrives.

📏 Severity: nitpick

const { accountInfo } = useAccountInfo();
const { t, locale, setLocale } = useTranslation();

Expand All @@ -140,6 +142,7 @@ export function GeneralSection() {
setSkipPermissions(appSettings.dangerously_skip_permissions === "true");
// generative_ui_enabled defaults to true when not set
setGenerativeUI(appSettings.generative_ui_enabled !== "false");
setDisableConflictChecking(appSettings.disable_conflict_checking === "true");
}
} catch {
// ignore
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ const en = {
'settings.enableAutoApprove': 'Enable Auto-approve',
'settings.generativeUITitle': 'Generative UI',
'settings.generativeUIDesc': 'Enable interactive visualizations (charts, diagrams, mockups) in chat responses. Disabling saves tokens but removes visual generation capability.',
'settings.disableConflictCheckingTitle': 'Hide Conflict Warnings',
'settings.disableConflictCheckingDesc': 'Hide warnings about multiple Claude Code installations. Enable this if you intentionally run multiple versions side by side.',
'settings.language': 'Language',
'settings.languageDesc': 'Choose the display language for the interface',
'settings.usage': 'Usage',
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ const zh: Record<TranslationKey, string> = {
'settings.enableAutoApprove': '启用自动批准',
'settings.generativeUITitle': '生成式 UI',
'settings.generativeUIDesc': '启用聊天中的交互式可视化功能(图表、流程图、原型图等)。关闭后可节省 token,但将无法生成可视化内容。',
'settings.disableConflictCheckingTitle': '隐藏版本冲突警告',
'settings.disableConflictCheckingDesc': '隐藏多个 Claude Code 安装版本的冲突警告。如果你有意同时使用多个版本,可以开启此选项。',
'settings.language': '语言',
'settings.languageDesc': '选择界面显示语言',
'settings.usage': '用量统计',
Expand Down