feat(coding-agent): add blockImages setting to prevent image uploads

This commit is contained in:
Josh 2026-01-06 00:20:44 -06:00
parent 9063a71fe6
commit b582a6b70d
No known key found for this signature in database
9 changed files with 266 additions and 25 deletions

View file

@ -25,6 +25,7 @@ export interface SettingsConfig {
autoCompact: boolean;
showImages: boolean;
autoResizeImages: boolean;
blockImages: boolean;
steeringMode: "all" | "one-at-a-time";
followUpMode: "all" | "one-at-a-time";
thinkingLevel: ThinkingLevel;
@ -40,6 +41,7 @@ export interface SettingsCallbacks {
onAutoCompactChange: (enabled: boolean) => void;
onShowImagesChange: (enabled: boolean) => void;
onAutoResizeImagesChange: (enabled: boolean) => void;
onBlockImagesChange: (blocked: boolean) => void;
onSteeringModeChange: (mode: "all" | "one-at-a-time") => void;
onFollowUpModeChange: (mode: "all" | "one-at-a-time") => void;
onThinkingLevelChange: (level: ThinkingLevel) => void;
@ -243,6 +245,16 @@ export class SettingsSelectorComponent extends Container {
values: ["true", "false"],
});
// Block images toggle (always available, insert after auto-resize-images)
const autoResizeIndex = items.findIndex((item) => item.id === "auto-resize-images");
items.splice(autoResizeIndex + 1, 0, {
id: "block-images",
label: "Block images",
description: "Prevent images from being sent to LLM providers (restart session for full effect)",
currentValue: config.blockImages ? "true" : "false",
values: ["true", "false"],
});
// Add borders
this.addChild(new DynamicBorder());
@ -261,6 +273,9 @@ export class SettingsSelectorComponent extends Container {
case "auto-resize-images":
callbacks.onAutoResizeImagesChange(newValue === "true");
break;
case "block-images":
callbacks.onBlockImagesChange(newValue === "true");
break;
case "steering-mode":
callbacks.onSteeringModeChange(newValue as "all" | "one-at-a-time");
break;