yolo mode - auto accept agent edits setting
This commit is contained in:
parent
59d79f5a06
commit
4a481d33fd
6 changed files with 32 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
1
core/index.d.ts
vendored
1
core/index.d.ts
vendored
|
|
@ -1192,6 +1192,7 @@ export interface ContinueUIConfig {
|
|||
showChatScrollbar?: boolean;
|
||||
codeWrap?: boolean;
|
||||
showSessionTabs?: boolean;
|
||||
autoAcceptEditToolDiffs?: boolean;
|
||||
}
|
||||
|
||||
export interface ContextMenuConfig {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ Below that, the following settings which are not part of a configuration file ar
|
|||
- `Wrap Codeblocks`: If on, enables text wrapping in code blocks. Off by default.
|
||||
- `Show Chat Scrollbar`: If on, enables a scrollbar in the chat window. Off by default.
|
||||
- `Text-to-Speech Output`: If on, reads LLM responses aloud with TTS. Off by default.
|
||||
- `Auto-Accept Agent Edits`: If on, automatically accepts diffs generated by the edit tool and proceeds with the next conversational turn. Off by default.
|
||||
- `Enable Session Titles`: If on, generates summary titles for each chat session after the first message, using the current Chat model. On by default.
|
||||
- `Format Markdown`: If off, shows responses as raw text. On by default.
|
||||
- `Allow Anonymous Telemetry`: If on, allows Continue to send anonymous telemetry. **On** by default.
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ export function UserSettingsForm() {
|
|||
const codeWrap = config.ui?.codeWrap ?? false;
|
||||
const showChatScrollbar = config.ui?.showChatScrollbar ?? false;
|
||||
const readResponseTTS = config.experimental?.readResponseTTS ?? false;
|
||||
const autoAcceptEditToolDiffs = config.ui?.autoAcceptEditToolDiffs ?? false;
|
||||
const displayRawMarkdown = config.ui?.displayRawMarkdown ?? false;
|
||||
const disableSessionTitles = config.disableSessionTitles ?? false;
|
||||
|
||||
|
|
@ -162,7 +163,15 @@ export function UserSettingsForm() {
|
|||
}
|
||||
text="Text-to-Speech Output"
|
||||
/>
|
||||
|
||||
<ToggleSwitch
|
||||
isToggled={autoAcceptEditToolDiffs}
|
||||
onToggle={() =>
|
||||
handleUpdate({
|
||||
autoAcceptEditToolDiffs: !autoAcceptEditToolDiffs,
|
||||
})
|
||||
}
|
||||
text="Auto-Accept Agent Edits"
|
||||
/>
|
||||
{/* <ToggleSwitch
|
||||
isToggled={useChromiumForDocsCrawling}
|
||||
onToggle={() =>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ export const editToolImpl: ClientToolImpl = async (
|
|||
if (apply.status === "error") {
|
||||
throw new Error(apply.error);
|
||||
}
|
||||
const state = extras.getState();
|
||||
if (state.config.config.ui?.autoAcceptEditToolDiffs) {
|
||||
await extras.ideMessenger.request("acceptDiff", {
|
||||
streamId: extras.streamId,
|
||||
filepath: firstUriMatch,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
respondImmediately: false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue