mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 19:14:33 -07:00
Merge branch 'main' into show_thinking
# Conflicts: # packages/cli/src/ui/components/MainContent.test.tsx # packages/cli/src/ui/components/MainContent.tsx # packages/cli/src/ui/hooks/useGeminiStream.ts
This commit is contained in:
@@ -9,19 +9,17 @@
|
||||
// to regenerate the settings reference in `docs/get-started/configuration.md`.
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
import type {
|
||||
MCPServerConfig,
|
||||
BugCommandSettings,
|
||||
TelemetrySettings,
|
||||
AuthType,
|
||||
} from '@google/gemini-cli-core';
|
||||
import {
|
||||
DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
|
||||
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
||||
DEFAULT_MODEL_CONFIGS,
|
||||
GEMINI_MODEL_ALIAS_AUTO,
|
||||
type MCPServerConfig,
|
||||
type BugCommandSettings,
|
||||
type TelemetrySettings,
|
||||
type AuthType,
|
||||
type AgentOverride,
|
||||
type CustomTheme,
|
||||
} from '@google/gemini-cli-core';
|
||||
import type { CustomTheme } from '../ui/themes/theme.js';
|
||||
import type { SessionRetentionSettings } from './settings.js';
|
||||
import { DEFAULT_MIN_RETENTION } from '../utils/sessionCleanup.js';
|
||||
|
||||
@@ -108,6 +106,7 @@ export interface SettingDefinition {
|
||||
key?: string;
|
||||
properties?: SettingsSchema;
|
||||
showInDialog?: boolean;
|
||||
ignoreInDocs?: boolean;
|
||||
mergeStrategy?: MergeStrategy;
|
||||
/** Enum type options */
|
||||
options?: readonly SettingEnumOption[];
|
||||
@@ -190,22 +189,22 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Enable Vim keybindings',
|
||||
showInDialog: true,
|
||||
},
|
||||
disableAutoUpdate: {
|
||||
enableAutoUpdate: {
|
||||
type: 'boolean',
|
||||
label: 'Disable Auto Update',
|
||||
label: 'Enable Auto Update',
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Disable automatic updates',
|
||||
default: true,
|
||||
description: 'Enable automatic updates.',
|
||||
showInDialog: true,
|
||||
},
|
||||
disableUpdateNag: {
|
||||
enableAutoUpdateNotification: {
|
||||
type: 'boolean',
|
||||
label: 'Disable Update Nag',
|
||||
label: 'Enable Auto Update Notification',
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Disable update notification prompts.',
|
||||
default: true,
|
||||
description: 'Enable update notification prompts.',
|
||||
showInDialog: false,
|
||||
},
|
||||
checkpointing: {
|
||||
@@ -323,7 +322,7 @@ const SETTINGS_SCHEMA = {
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
default: 'text',
|
||||
description: 'The format of the CLI output.',
|
||||
description: 'The format of the CLI output. Can be `text` or `json`.',
|
||||
showInDialog: true,
|
||||
options: [
|
||||
{ value: 'text', label: 'Text' },
|
||||
@@ -386,12 +385,32 @@ const SETTINGS_SCHEMA = {
|
||||
},
|
||||
showStatusInTitle: {
|
||||
type: 'boolean',
|
||||
label: 'Show Status in Title',
|
||||
label: 'Show Thoughts in Title',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Show Gemini CLI status and thoughts in the terminal window title',
|
||||
'Show Gemini CLI model thoughts in the terminal window title during the working phase',
|
||||
showInDialog: true,
|
||||
},
|
||||
dynamicWindowTitle: {
|
||||
type: 'boolean',
|
||||
label: 'Dynamic Window Title',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description:
|
||||
'Update the terminal window title with current status icons (Ready: ◇, Action Required: ✋, Working: ✦)',
|
||||
showInDialog: true,
|
||||
},
|
||||
showHomeDirectoryWarning: {
|
||||
type: 'boolean',
|
||||
label: 'Show Home Directory Warning',
|
||||
category: 'UI',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description:
|
||||
'Show a warning when running Gemini CLI in the home directory.',
|
||||
showInDialog: true,
|
||||
},
|
||||
hideTips: {
|
||||
@@ -515,13 +534,14 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Show the model name in the chat for each model turn.',
|
||||
showInDialog: true,
|
||||
},
|
||||
useFullWidth: {
|
||||
showUserIdentity: {
|
||||
type: 'boolean',
|
||||
label: 'Use Full Width',
|
||||
label: 'Show User Identity',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'Use the entire width of the terminal for output.',
|
||||
description:
|
||||
"Show the logged-in user's identity (e.g. email) in the UI.",
|
||||
showInDialog: true,
|
||||
},
|
||||
useAlternateBuffer: {
|
||||
@@ -534,6 +554,15 @@ const SETTINGS_SCHEMA = {
|
||||
'Use an alternate screen buffer for the UI, preserving shell history.',
|
||||
showInDialog: true,
|
||||
},
|
||||
useBackgroundColor: {
|
||||
type: 'boolean',
|
||||
label: 'Use Background Color',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'Whether to use background colors in the UI.',
|
||||
showInDialog: true,
|
||||
},
|
||||
incrementalRendering: {
|
||||
type: 'boolean',
|
||||
label: 'Incremental Rendering',
|
||||
@@ -544,6 +573,15 @@ const SETTINGS_SCHEMA = {
|
||||
'Enable incremental rendering for the UI. This option will reduce flickering but may cause rendering artifacts. Only supported when useAlternateBuffer is enabled.',
|
||||
showInDialog: true,
|
||||
},
|
||||
showSpinner: {
|
||||
type: 'boolean',
|
||||
label: 'Show Spinner',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'Show the spinner during operations.',
|
||||
showInDialog: true,
|
||||
},
|
||||
customWittyPhrases: {
|
||||
type: 'array',
|
||||
label: 'Custom Witty Phrases',
|
||||
@@ -566,13 +604,13 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Accessibility settings.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
disableLoadingPhrases: {
|
||||
enableLoadingPhrases: {
|
||||
type: 'boolean',
|
||||
label: 'Disable Loading Phrases',
|
||||
label: 'Enable Loading Phrases',
|
||||
category: 'UI',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Disable loading phrases for accessibility',
|
||||
default: true,
|
||||
description: 'Enable loading phrases during operations.',
|
||||
showInDialog: true,
|
||||
},
|
||||
screenReader: {
|
||||
@@ -605,7 +643,7 @@ const SETTINGS_SCHEMA = {
|
||||
category: 'IDE',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable IDE integration mode',
|
||||
description: 'Enable IDE integration mode.',
|
||||
showInDialog: true,
|
||||
},
|
||||
hasSeenNudge: {
|
||||
@@ -775,6 +813,32 @@ const SETTINGS_SCHEMA = {
|
||||
},
|
||||
},
|
||||
|
||||
agents: {
|
||||
type: 'object',
|
||||
label: 'Agents',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description: 'Settings for subagents.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
overrides: {
|
||||
type: 'object',
|
||||
label: 'Agent Overrides',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: {} as Record<string, AgentOverride>,
|
||||
description:
|
||||
'Override settings for specific agents, e.g. to disable the agent, set a custom model config, or run config.',
|
||||
showInDialog: false,
|
||||
additionalProperties: {
|
||||
type: 'object',
|
||||
ref: 'AgentOverride',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
context: {
|
||||
type: 'object',
|
||||
label: 'Context',
|
||||
@@ -854,7 +918,7 @@ const SETTINGS_SCHEMA = {
|
||||
category: 'Context',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Respect .gitignore files when searching',
|
||||
description: 'Respect .gitignore files when searching.',
|
||||
showInDialog: true,
|
||||
},
|
||||
respectGeminiIgnore: {
|
||||
@@ -863,7 +927,7 @@ const SETTINGS_SCHEMA = {
|
||||
category: 'Context',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Respect .geminiignore files when searching',
|
||||
description: 'Respect .geminiignore files when searching.',
|
||||
showInDialog: true,
|
||||
},
|
||||
enableRecursiveFileSearch: {
|
||||
@@ -877,15 +941,27 @@ const SETTINGS_SCHEMA = {
|
||||
`,
|
||||
showInDialog: true,
|
||||
},
|
||||
disableFuzzySearch: {
|
||||
enableFuzzySearch: {
|
||||
type: 'boolean',
|
||||
label: 'Disable Fuzzy Search',
|
||||
label: 'Enable Fuzzy Search',
|
||||
category: 'Context',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Disable fuzzy search when searching for files.',
|
||||
default: true,
|
||||
description: 'Enable fuzzy search when searching for files.',
|
||||
showInDialog: true,
|
||||
},
|
||||
customIgnoreFilePaths: {
|
||||
type: 'array',
|
||||
label: 'Custom Ignore File Paths',
|
||||
category: 'Context',
|
||||
requiresRestart: true,
|
||||
default: [] as string[],
|
||||
description:
|
||||
'Additional ignore file paths to respect. These files take precedence over .geminiignore and .gitignore. Files earlier in the array take precedence over files later in the array, e.g. the first file takes precedence over the second one.',
|
||||
showInDialog: true,
|
||||
items: { type: 'string' },
|
||||
mergeStrategy: MergeStrategy.UNION,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -986,6 +1062,24 @@ const SETTINGS_SCHEMA = {
|
||||
`,
|
||||
showInDialog: true,
|
||||
},
|
||||
approvalMode: {
|
||||
type: 'enum',
|
||||
label: 'Approval Mode',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: 'default',
|
||||
description: oneLine`
|
||||
The default approval mode for tool execution.
|
||||
'default' prompts for approval, 'auto_edit' auto-approves edit tools,
|
||||
and 'plan' is read-only mode. 'yolo' is not supported yet.
|
||||
`,
|
||||
showInDialog: true,
|
||||
options: [
|
||||
{ value: 'default', label: 'Default' },
|
||||
{ value: 'auto_edit', label: 'Auto Edit' },
|
||||
{ value: 'plan', label: 'Plan' },
|
||||
],
|
||||
},
|
||||
core: {
|
||||
type: 'array',
|
||||
label: 'Core Tools',
|
||||
@@ -1083,15 +1177,17 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'The number of lines to keep when truncating tool output.',
|
||||
showInDialog: true,
|
||||
},
|
||||
enableHooks: {
|
||||
disableLLMCorrection: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Hooks System',
|
||||
category: 'Advanced',
|
||||
label: 'Disable LLM Correction',
|
||||
category: 'Tools',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description:
|
||||
'Enable the hooks system for intercepting and customizing Gemini CLI behavior. When enabled, hooks configured in settings will execute at appropriate lifecycle events (BeforeTool, AfterTool, BeforeModel, etc.). Requires MessageBus integration.',
|
||||
showInDialog: false,
|
||||
default: true,
|
||||
description: oneLine`
|
||||
Disable LLM-based error correction for edit tools.
|
||||
When enabled, tools will fail immediately if exact string matches are not found, instead of attempting to self-correct.
|
||||
`,
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1182,6 +1278,17 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Blocks installing and loading extensions from Git.',
|
||||
showInDialog: true,
|
||||
},
|
||||
allowedExtensions: {
|
||||
type: 'array',
|
||||
label: 'Extension Source Regex Allowlist',
|
||||
category: 'Security',
|
||||
requiresRestart: true,
|
||||
default: [] as string[],
|
||||
description:
|
||||
'List of Regex patterns for allowed extensions. If nonempty, only extensions that match the patterns in this list are allowed. Overrides the blockGitExtensions setting.',
|
||||
showInDialog: true,
|
||||
items: { type: 'string' },
|
||||
},
|
||||
folderTrust: {
|
||||
type: 'object',
|
||||
label: 'Folder Trust',
|
||||
@@ -1365,6 +1472,24 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Enable extension management features.',
|
||||
showInDialog: false,
|
||||
},
|
||||
extensionConfig: {
|
||||
type: 'boolean',
|
||||
label: 'Extension Configuration',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable requesting and fetching of extension settings.',
|
||||
showInDialog: false,
|
||||
},
|
||||
enableEventDrivenScheduler: {
|
||||
type: 'boolean',
|
||||
label: 'Event Driven Scheduler',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enables event-driven scheduler within the CLI session.',
|
||||
showInDialog: false,
|
||||
},
|
||||
extensionReloading: {
|
||||
type: 'boolean',
|
||||
label: 'Extension Reloading',
|
||||
@@ -1384,94 +1509,24 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Enable Just-In-Time (JIT) context loading.',
|
||||
showInDialog: false,
|
||||
},
|
||||
skills: {
|
||||
useOSC52Paste: {
|
||||
type: 'boolean',
|
||||
label: 'Agent Skills',
|
||||
label: 'Use OSC 52 Paste',
|
||||
category: 'Experimental',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Use OSC 52 sequence for pasting instead of clipboardy (useful for remote sessions).',
|
||||
showInDialog: true,
|
||||
},
|
||||
plan: {
|
||||
type: 'boolean',
|
||||
label: 'Plan',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable Agent Skills (experimental).',
|
||||
showInDialog: false,
|
||||
},
|
||||
codebaseInvestigatorSettings: {
|
||||
type: 'object',
|
||||
label: 'Codebase Investigator Settings',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description: 'Configuration for Codebase Investigator.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Codebase Investigator',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enable the Codebase Investigator agent.',
|
||||
showInDialog: true,
|
||||
},
|
||||
maxNumTurns: {
|
||||
type: 'number',
|
||||
label: 'Codebase Investigator Max Num Turns',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: 10,
|
||||
description:
|
||||
'Maximum number of turns for the Codebase Investigator agent.',
|
||||
showInDialog: true,
|
||||
},
|
||||
maxTimeMinutes: {
|
||||
type: 'number',
|
||||
label: 'Max Time (Minutes)',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: 3,
|
||||
description:
|
||||
'Maximum time for the Codebase Investigator agent (in minutes).',
|
||||
showInDialog: false,
|
||||
},
|
||||
thinkingBudget: {
|
||||
type: 'number',
|
||||
label: 'Thinking Budget',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: 8192,
|
||||
description:
|
||||
'The thinking budget for the Codebase Investigator agent.',
|
||||
showInDialog: false,
|
||||
},
|
||||
model: {
|
||||
type: 'string',
|
||||
label: 'Model',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: GEMINI_MODEL_ALIAS_AUTO,
|
||||
description:
|
||||
'The model to use for the Codebase Investigator agent.',
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
introspectionAgentSettings: {
|
||||
type: 'object',
|
||||
label: 'Introspection Agent Settings',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description: 'Configuration for Introspection Agent.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Introspection Agent',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable the Introspection Agent.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
description: 'Enable planning features (Plan Mode and tools).',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1518,8 +1573,17 @@ const SETTINGS_SCHEMA = {
|
||||
requiresRestart: true,
|
||||
default: {},
|
||||
description: 'Settings for agent skills.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Agent Skills',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enable Agent Skills.',
|
||||
showInDialog: true,
|
||||
},
|
||||
disabled: {
|
||||
type: 'array',
|
||||
label: 'Disabled Skills',
|
||||
@@ -1534,9 +1598,9 @@ const SETTINGS_SCHEMA = {
|
||||
},
|
||||
},
|
||||
|
||||
hooks: {
|
||||
hooksConfig: {
|
||||
type: 'object',
|
||||
label: 'Hooks',
|
||||
label: 'HooksConfig',
|
||||
category: 'Advanced',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
@@ -1544,6 +1608,16 @@ const SETTINGS_SCHEMA = {
|
||||
'Hook configurations for intercepting and customizing agent behavior.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Hooks',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: true,
|
||||
description:
|
||||
'Canonical toggle for the hooks system. When disabled, no hooks will be executed.',
|
||||
showInDialog: true,
|
||||
},
|
||||
disabled: {
|
||||
type: 'array',
|
||||
label: 'Disabled Hooks',
|
||||
@@ -1559,6 +1633,27 @@ const SETTINGS_SCHEMA = {
|
||||
},
|
||||
mergeStrategy: MergeStrategy.UNION,
|
||||
},
|
||||
notifications: {
|
||||
type: 'boolean',
|
||||
label: 'Hook Notifications',
|
||||
category: 'Advanced',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'Show visual indicators when hooks are executing.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
hooks: {
|
||||
type: 'object',
|
||||
label: 'Hook Events',
|
||||
category: 'Advanced',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Event-specific hook configurations.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
BeforeTool: {
|
||||
type: 'array',
|
||||
label: 'Before Tool Hooks',
|
||||
@@ -1699,6 +1794,96 @@ const SETTINGS_SCHEMA = {
|
||||
mergeStrategy: MergeStrategy.CONCAT,
|
||||
},
|
||||
},
|
||||
|
||||
admin: {
|
||||
type: 'object',
|
||||
label: 'Admin',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Settings configured remotely by enterprise admins.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
properties: {
|
||||
secureModeEnabled: {
|
||||
type: 'boolean',
|
||||
label: 'Secure Mode Enabled',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'If true, disallows yolo mode from being used.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
},
|
||||
extensions: {
|
||||
type: 'object',
|
||||
label: 'Extensions Settings',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Extensions-specific admin settings.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Extensions Enabled',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description:
|
||||
'If false, disallows extensions from being installed or used.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
},
|
||||
},
|
||||
},
|
||||
mcp: {
|
||||
type: 'object',
|
||||
label: 'MCP Settings',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'MCP-specific admin settings.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'MCP Enabled',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'If false, disallows MCP servers from being used.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
},
|
||||
},
|
||||
},
|
||||
skills: {
|
||||
type: 'object',
|
||||
label: 'Skills Settings',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Agent Skills-specific admin settings.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'Skills Enabled',
|
||||
category: 'Admin',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'If false, disallows agent skills from being used.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const satisfies SettingsSchema;
|
||||
|
||||
export type SettingsSchemaType = typeof SETTINGS_SCHEMA;
|
||||
@@ -1883,6 +2068,36 @@ export const SETTINGS_SCHEMA_DEFINITIONS: Record<
|
||||
},
|
||||
},
|
||||
},
|
||||
AgentOverride: {
|
||||
type: 'object',
|
||||
description: 'Override settings for a specific agent.',
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
modelConfig: {
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
},
|
||||
runConfig: {
|
||||
type: 'object',
|
||||
description: 'Run configuration for an agent.',
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
maxTimeMinutes: {
|
||||
type: 'number',
|
||||
description: 'The maximum execution time for the agent in minutes.',
|
||||
},
|
||||
maxTurns: {
|
||||
type: 'number',
|
||||
description: 'The maximum number of conversational turns.',
|
||||
},
|
||||
},
|
||||
},
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
description: 'Whether to enable the agent.',
|
||||
},
|
||||
},
|
||||
},
|
||||
CustomTheme: {
|
||||
type: 'object',
|
||||
description:
|
||||
@@ -2047,4 +2262,17 @@ type InferSettings<T extends SettingsSchema> = {
|
||||
: T[K]['default'];
|
||||
};
|
||||
|
||||
type InferMergedSettings<T extends SettingsSchema> = {
|
||||
-readonly [K in keyof T]-?: T[K] extends { properties: SettingsSchema }
|
||||
? InferMergedSettings<T[K]['properties']>
|
||||
: T[K]['type'] extends 'enum'
|
||||
? T[K]['options'] extends readonly SettingEnumOption[]
|
||||
? T[K]['options'][number]['value']
|
||||
: T[K]['default']
|
||||
: T[K]['default'] extends boolean
|
||||
? boolean
|
||||
: T[K]['default'];
|
||||
};
|
||||
|
||||
export type Settings = InferSettings<SettingsSchemaType>;
|
||||
export type MergedSettings = InferMergedSettings<SettingsSchemaType>;
|
||||
|
||||
Reference in New Issue
Block a user