mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 20:01:24 +00:00
feat(coding-agent): add blockImages setting to prevent image uploads
This commit is contained in:
parent
9063a71fe6
commit
b582a6b70d
9 changed files with 266 additions and 25 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue