mirror of
https://github.com/voideditor/void
synced 2026-05-23 17:38:23 +00:00
commit
3ec6973a0f
5 changed files with 39 additions and 0 deletions
|
|
@ -12,3 +12,5 @@ Do not add or remove semicolons to any of my files. Just go with convention and
|
|||
Never modify files outside src/vs/workbench/contrib/void without consulting with the user first.
|
||||
|
||||
All types that map from a value A to B should be called bOfA. For example, if you create a hashmap that goes from toolId to toolName, it should be called toolNameOfToolId, etc.
|
||||
|
||||
No need to check that it compiles by running compile, just stop.
|
||||
|
|
|
|||
|
|
@ -1179,6 +1179,11 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
this._onDidChangeStreamingInDiffZone.fire({ uri, diffareaid: diffZone.diffareaid })
|
||||
this._refreshStylesAndDiffsInURI(uri)
|
||||
onFinishEdit()
|
||||
|
||||
// auto accept
|
||||
if (this._settingsService.state.globalSettings.autoAcceptLLMChanges) {
|
||||
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: false, behavior: 'accept', _addToHistory: false })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1218,6 +1223,11 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
this._onDidChangeStreamingInDiffZone.fire({ uri, diffareaid: diffZone.diffareaid })
|
||||
this._refreshStylesAndDiffsInURI(uri)
|
||||
onFinishEdit()
|
||||
|
||||
// auto accept
|
||||
if (this._settingsService.state.globalSettings.autoAcceptLLMChanges) {
|
||||
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: false, behavior: 'accept', _addToHistory: false })
|
||||
}
|
||||
}
|
||||
|
||||
this._writeURIText(uri, newContent, 'wholeFileRange', { shouldRealignDiffAreas: true })
|
||||
|
|
@ -1448,6 +1458,11 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
}
|
||||
this._refreshStylesAndDiffsInURI(uri)
|
||||
onFinishEdit()
|
||||
|
||||
// auto accept
|
||||
if (this._settingsService.state.globalSettings.autoAcceptLLMChanges) {
|
||||
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: false, behavior: 'accept', _addToHistory: false })
|
||||
}
|
||||
}
|
||||
|
||||
// throws
|
||||
|
|
@ -1732,6 +1747,11 @@ class EditCodeService extends Disposable implements IEditCodeService {
|
|||
this._deleteTrackingZone(trackingZone)
|
||||
|
||||
onFinishEdit()
|
||||
|
||||
// auto accept
|
||||
if (this._settingsService.state.globalSettings.autoAcceptLLMChanges) {
|
||||
this.acceptOrRejectAllDiffAreas({ uri, removeCtrlKs: false, behavior: 'accept', _addToHistory: false })
|
||||
}
|
||||
}
|
||||
|
||||
const onError = (e: { message: string; fullError: Error | null; }) => {
|
||||
|
|
|
|||
|
|
@ -1319,6 +1319,18 @@ export const Settings = () => {
|
|||
<span className='text-void-fg-3 text-xs pointer-events-none'>{settingsState.globalSettings.includeToolLintErrors ? 'Fix lint errors' : `Fix lint errors`}</span>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
|
||||
{/* Auto Accept LLM Changes Switch */}
|
||||
<ErrorBoundary>
|
||||
<div className='flex items-center gap-x-2 my-2'>
|
||||
<VoidSwitch
|
||||
size='xs'
|
||||
value={settingsState.globalSettings.autoAcceptLLMChanges}
|
||||
onChange={(newVal) => voidSettingsService.setGlobalSetting('autoAcceptLLMChanges', newVal)}
|
||||
/>
|
||||
<span className='text-void-fg-3 text-xs pointer-events-none'>Auto-accept LLM changes</span>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -289,6 +289,9 @@ class VoidSettingsService extends Disposable implements IVoidSettingsService {
|
|||
}
|
||||
// add disableSystemMessage feature
|
||||
if (readS.globalSettings.disableSystemMessage === undefined) readS.globalSettings.disableSystemMessage = false;
|
||||
|
||||
// add autoAcceptLLMChanges feature
|
||||
if (readS.globalSettings.autoAcceptLLMChanges === undefined) readS.globalSettings.autoAcceptLLMChanges = false;
|
||||
}
|
||||
catch (e) {
|
||||
readS = defaultState()
|
||||
|
|
|
|||
|
|
@ -454,6 +454,7 @@ export type GlobalSettings = {
|
|||
includeToolLintErrors: boolean;
|
||||
isOnboardingComplete: boolean;
|
||||
disableSystemMessage: boolean;
|
||||
autoAcceptLLMChanges: boolean;
|
||||
}
|
||||
|
||||
export const defaultGlobalSettings: GlobalSettings = {
|
||||
|
|
@ -469,6 +470,7 @@ export const defaultGlobalSettings: GlobalSettings = {
|
|||
includeToolLintErrors: true,
|
||||
isOnboardingComplete: false,
|
||||
disableSystemMessage: false,
|
||||
autoAcceptLLMChanges: false,
|
||||
}
|
||||
|
||||
export type GlobalSettingName = keyof GlobalSettings
|
||||
|
|
|
|||
Loading…
Reference in a new issue