feat(coding-agent): add blockImages setting to prevent image uploads
This commit is contained in:
@@ -36,6 +36,7 @@ export interface TerminalSettings {
|
||||
|
||||
export interface ImageSettings {
|
||||
autoResize?: boolean; // default: true (resize images to 2000x2000 max for better model compatibility)
|
||||
blockImages?: boolean; // default: false - when true, prevents all images from being sent to LLM providers
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
@@ -398,6 +399,23 @@ export class SettingsManager {
|
||||
this.save();
|
||||
}
|
||||
|
||||
getBlockImages(): boolean {
|
||||
return this.settings.images?.blockImages ?? false;
|
||||
}
|
||||
|
||||
setBlockImages(blocked: boolean): void {
|
||||
if (!this.globalSettings.images) {
|
||||
this.globalSettings.images = {};
|
||||
}
|
||||
this.globalSettings.images.blockImages = blocked;
|
||||
// Also update active settings for inMemory mode
|
||||
if (!this.settings.images) {
|
||||
this.settings.images = {};
|
||||
}
|
||||
this.settings.images.blockImages = blocked;
|
||||
this.save();
|
||||
}
|
||||
|
||||
getEnabledModels(): string[] | undefined {
|
||||
return this.settings.enabledModels;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user