diff options
| author | Ali Al Jufairi <[email protected]> | 2025-08-10 09:04:52 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-10 00:04:52 +0000 |
| commit | 8a9a9275440e3681e9be73d741a5aba429ae501f (patch) | |
| tree | cc2c17101c57d0c34049a6ee390d0f1b9bf38018 /packages/cli/src/config/settings.ts | |
| parent | c632ec8b03ac5b459da9ccb041b9fca19252f69b (diff) | |
feat(ui): add /settings command and UI panel (#4738)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/cli/src/config/settings.ts')
| -rw-r--r-- | packages/cli/src/config/settings.ts | 91 |
1 files changed, 4 insertions, 87 deletions
diff --git a/packages/cli/src/config/settings.ts b/packages/cli/src/config/settings.ts index 3c4270d7..36fd50f1 100644 --- a/packages/cli/src/config/settings.ts +++ b/packages/cli/src/config/settings.ts @@ -9,18 +9,15 @@ import * as path from 'path'; import { homedir, platform } from 'os'; import * as dotenv from 'dotenv'; import { - MCPServerConfig, GEMINI_CONFIG_DIR as GEMINI_DIR, getErrorMessage, - BugCommandSettings, - ChatCompressionSettings, - TelemetrySettings, - AuthType, } from '@google/gemini-cli-core'; import stripJsonComments from 'strip-json-comments'; import { DefaultLight } from '../ui/themes/default-light.js'; import { DefaultDark } from '../ui/themes/default.js'; -import { CustomTheme } from '../ui/themes/theme.js'; +import { Settings, MemoryImportFormat } from './settingsSchema.js'; + +export type { Settings, MemoryImportFormat }; export const SETTINGS_DIRECTORY_NAME = '.gemini'; export const USER_SETTINGS_DIR = path.join(homedir(), SETTINGS_DIRECTORY_NAME); @@ -44,7 +41,7 @@ export function getWorkspaceSettingsPath(workspaceDir: string): string { return path.join(workspaceDir, SETTINGS_DIRECTORY_NAME, 'settings.json'); } -export type DnsResolutionOrder = 'ipv4first' | 'verbatim'; +export type { DnsResolutionOrder } from './settingsSchema.js'; export enum SettingScope { User = 'User', @@ -64,86 +61,6 @@ export interface AccessibilitySettings { disableLoadingPhrases?: boolean; } -export interface Settings { - theme?: string; - customThemes?: Record<string, CustomTheme>; - selectedAuthType?: AuthType; - useExternalAuth?: boolean; - sandbox?: boolean | string; - coreTools?: string[]; - excludeTools?: string[]; - toolDiscoveryCommand?: string; - toolCallCommand?: string; - mcpServerCommand?: string; - mcpServers?: Record<string, MCPServerConfig>; - allowMCPServers?: string[]; - excludeMCPServers?: string[]; - showMemoryUsage?: boolean; - contextFileName?: string | string[]; - accessibility?: AccessibilitySettings; - telemetry?: TelemetrySettings; - usageStatisticsEnabled?: boolean; - preferredEditor?: string; - bugCommand?: BugCommandSettings; - checkpointing?: CheckpointingSettings; - autoConfigureMaxOldSpaceSize?: boolean; - /** The model name to use (e.g 'gemini-9.0-pro') */ - model?: string; - - // Git-aware file filtering settings - fileFiltering?: { - respectGitIgnore?: boolean; - respectGeminiIgnore?: boolean; - enableRecursiveFileSearch?: boolean; - }; - - hideWindowTitle?: boolean; - - hideTips?: boolean; - hideBanner?: boolean; - - // Setting for setting maximum number of user/model/tool turns in a session. - maxSessionTurns?: number; - - // A map of tool names to their summarization settings. - summarizeToolOutput?: Record<string, SummarizeToolOutputSettings>; - - vimMode?: boolean; - memoryImportFormat?: 'tree' | 'flat'; - - // Flag to be removed post-launch. - ideModeFeature?: boolean; - /// IDE mode setting configured via slash command toggle. - ideMode?: boolean; - - // Flag to be removed post-launch. - folderTrustFeature?: boolean; - // Setting to track whether Folder trust is enabled. - folderTrust?: boolean; - - // Setting to track if the user has seen the IDE integration nudge. - hasSeenIdeIntegrationNudge?: boolean; - - // Setting for disabling auto-update. - disableAutoUpdate?: boolean; - - // Setting for disabling the update nag message. - disableUpdateNag?: boolean; - - memoryDiscoveryMaxDirs?: number; - - // Environment variables to exclude from project .env files - excludedProjectEnvVars?: string[]; - dnsResolutionOrder?: DnsResolutionOrder; - - includeDirectories?: string[]; - - loadMemoryFromIncludeDirectories?: boolean; - - chatCompression?: ChatCompressionSettings; - showLineNumbers?: boolean; -} - export interface SettingsError { message: string; path: string; |
