mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 00:05:51 +00:00
feat: 添加 RSS 内存指示器并解绑 auto 权限模式与 TRANSCRIPT_CLASSIFIER
- 在 REPL 底栏添加 RSS 内存使用显示,512MB 以下 dimColor,512MB-1GB warning 色,1GB 以上 error 色 - auto 权限模式不再依赖 TRANSCRIPT_CLASSIFIER feature flag,classifier 不可用时 fallback 到 prompting - Config 面板 defaultPermissionMode 使用类型安全的 permissionModeFromString,显示改用 shortTitle - bypassPermissions title 缩短为 Bypass 与 shortTitle 一致 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
import chalk from 'chalk';
|
||||
import {
|
||||
permissionModeTitle,
|
||||
permissionModeShortTitle,
|
||||
permissionModeFromString,
|
||||
toExternalPermissionMode,
|
||||
isExternalPermissionMode,
|
||||
@@ -167,6 +168,9 @@ export function Config({
|
||||
const thinkingEnabled = useAppState(s => s.thinkingEnabled);
|
||||
const isFastMode = useAppState(s => (isFastModeEnabled() ? s.fastMode : false));
|
||||
const promptSuggestionEnabled = useAppState(s => s.promptSuggestionEnabled);
|
||||
const currentDefaultPermissionMode = permissionModeFromString(
|
||||
settingsData?.permissions?.defaultMode ?? 'default',
|
||||
);
|
||||
// Show auto in the default-mode dropdown when the user has opted in OR the
|
||||
// config is fully 'enabled' — even if currently circuit-broken ('disabled'),
|
||||
// an opted-in user should still see it in settings (it's a temporary state).
|
||||
@@ -558,7 +562,7 @@ export function Config({
|
||||
{
|
||||
id: 'defaultPermissionMode',
|
||||
label: 'Default permission mode',
|
||||
value: settingsData?.permissions?.defaultMode || 'default',
|
||||
value: currentDefaultPermissionMode,
|
||||
options: (() => {
|
||||
const priorityOrder: PermissionMode[] = ['default', 'plan'];
|
||||
return [...priorityOrder, ...PERMISSION_MODES.filter(m => !priorityOrder.includes(m))];
|
||||
@@ -1961,7 +1965,7 @@ export function Config({
|
||||
</Text>
|
||||
) : setting.id === 'defaultPermissionMode' ? (
|
||||
<Text color={isSelected ? 'suggestion' : undefined}>
|
||||
{permissionModeTitle(setting.value as PermissionMode)}
|
||||
{permissionModeShortTitle(setting.value as PermissionMode)}
|
||||
</Text>
|
||||
) : setting.id === 'autoUpdatesChannel' && autoUpdaterDisabledReason ? (
|
||||
<Box flexDirection="column">
|
||||
|
||||
Reference in New Issue
Block a user