diff --git a/core/config/migrateSharedConfig.ts b/core/config/migrateSharedConfig.ts index e1e66000df..67dfeeffd5 100644 --- a/core/config/migrateSharedConfig.ts +++ b/core/config/migrateSharedConfig.ts @@ -173,6 +173,13 @@ export function migrateJsonSharedConfig(filepath: string, ide: IDE): void { effected = true; } + const { autoAcceptEditToolDiffs, ...withoutAutoApply } = migratedUI; + if (autoAcceptEditToolDiffs !== undefined) { + shareConfigUpdates.autoAcceptEditToolDiffs = autoAcceptEditToolDiffs; + migratedUI = withoutAutoApply; + effected = true; + } + const { showChatScrollbar, ...withoutShowChatScrollbar } = migratedUI; if (showChatScrollbar !== undefined) { shareConfigUpdates.showChatScrollbar = showChatScrollbar; diff --git a/core/config/sharedConfig.ts b/core/config/sharedConfig.ts index b8ac205841..ad8b81341c 100644 --- a/core/config/sharedConfig.ts +++ b/core/config/sharedConfig.ts @@ -26,6 +26,7 @@ export const sharedConfigSchema = z codeWrap: z.boolean(), displayRawMarkdown: z.boolean(), showChatScrollbar: z.boolean(), + autoAcceptEditToolDiffs: z.boolean(), // `tabAutocompleteOptions` in `ContinueConfig` useAutocompleteCache: z.boolean(), @@ -106,8 +107,7 @@ export function modifyAnyConfigWithSharedConfig< sharedConfig.disableAutocompleteInFiles; } if (sharedConfig.modelTimeout !== undefined) { - configCopy.tabAutocompleteOptions.modelTimeout = - sharedConfig.modelTimeout; + configCopy.tabAutocompleteOptions.modelTimeout = sharedConfig.modelTimeout; } if (sharedConfig.debounceDelay !== undefined) { configCopy.tabAutocompleteOptions.debounceDelay = @@ -134,6 +134,10 @@ export function modifyAnyConfigWithSharedConfig< if (sharedConfig.showChatScrollbar !== undefined) { configCopy.ui.showChatScrollbar = sharedConfig.showChatScrollbar; } + if (sharedConfig.autoAcceptEditToolDiffs !== undefined) { + configCopy.ui.autoAcceptEditToolDiffs = + sharedConfig.autoAcceptEditToolDiffs; + } if (sharedConfig.allowAnonymousTelemetry !== undefined) { configCopy.allowAnonymousTelemetry = sharedConfig.allowAnonymousTelemetry; diff --git a/core/index.d.ts b/core/index.d.ts index d15c73b50a..a9f003a50a 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1192,6 +1192,7 @@ export interface ContinueUIConfig { showChatScrollbar?: boolean; codeWrap?: boolean; showSessionTabs?: boolean; + autoAcceptEditToolDiffs?: boolean; } export interface ContextMenuConfig { diff --git a/docs/docs/customize/deep-dives/settings.md b/docs/docs/customize/deep-dives/settings.md index 0d3b57127e..82af98c15e 100644 --- a/docs/docs/customize/deep-dives/settings.md +++ b/docs/docs/customize/deep-dives/settings.md @@ -6,11 +6,11 @@ keywords: [config, settings, configuration, customize, customization, sidebar] # The User Settings Page -The **User Settings page** can be accessed by clicking the gear icon in the header of the Continue sidebar. +The **User Settings page** can be accessed by clicking the gear icon in the header of the Continue sidebar and then selecting the "Settings" tab. -![slash-commands](/img/header-buttons.png) +![settings](/img/settings-header.png) -Which takes you to this page: +Which takes you to this page (select the "Settings" tab): ![User Settings Page](/img/settings-page.png) @@ -26,7 +26,15 @@ Below that, the following settings which are not part of a configuration file ar - `Enable Indexing`: Enables indexing of the codebase for the @codebase and @code context providers. **On** by default. - `Font Size`: Specifies base font size for UI elements - `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto` -- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., "\_/.md, \*/.txt" +- `Autocomplete timeout`: Maximum time in milliseconds for autocomplete request/retreival. Defaults to 150 +- `Autocomplete debounce`: Minimum time in milliseconds to trigger an autocomplete request after a change. Defaults to 250 +- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., `**/*.{txt,md}` + +### Experimental settings + +At the bottom of the User Settings page there is an "Experimental Settings" section which contains new or otherwise experimental settings, including: + +- `Auto-Accept Agent Edits`: **CAUTION: Be very careful with this setting. When turned on, Agent mode's edit tool can make changes to files with no manual review or guaranteed stopping point. If on, diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn.** Off by default. diff --git a/docs/static/img/header-buttons.png b/docs/static/img/header-buttons.png deleted file mode 100644 index 6824043cf7..0000000000 Binary files a/docs/static/img/header-buttons.png and /dev/null differ diff --git a/docs/static/img/settings-header.png b/docs/static/img/settings-header.png new file mode 100644 index 0000000000..9b241b164b Binary files /dev/null and b/docs/static/img/settings-header.png differ diff --git a/gui/src/components/gui/NumberInput.tsx b/gui/src/components/gui/NumberInput.tsx index 60693571e9..fa622d5e5e 100644 --- a/gui/src/components/gui/NumberInput.tsx +++ b/gui/src/components/gui/NumberInput.tsx @@ -34,7 +34,7 @@ const NumberInput: React.FC = ({ const handleInputChange = (e: React.ChangeEvent) => { const newInputValue = e.target.value; setInputValue(newInputValue); - + // Only update the actual value if it's a valid number const numValue = parseInt(newInputValue, 10); if (!isNaN(numValue)) { @@ -63,10 +63,12 @@ const NumberInput: React.FC = ({ WebkitAppearance: "none", MozAppearance: "none", }} + min={min} + max={max} />