@@ -31,6 +31,7 @@ const THINKING_DESCRIPTIONS: Record<ThinkingLevel, string> = {
|
||||
export interface SettingsConfig {
|
||||
autoCompact: boolean;
|
||||
showImages: boolean;
|
||||
imageWidthCells: number;
|
||||
autoResizeImages: boolean;
|
||||
blockImages: boolean;
|
||||
enableSkillCommands: boolean;
|
||||
@@ -56,6 +57,7 @@ export interface SettingsConfig {
|
||||
export interface SettingsCallbacks {
|
||||
onAutoCompactChange: (enabled: boolean) => void;
|
||||
onShowImagesChange: (enabled: boolean) => void;
|
||||
onImageWidthCellsChange: (width: number) => void;
|
||||
onAutoResizeImagesChange: (enabled: boolean) => void;
|
||||
onBlockImagesChange: (blocked: boolean) => void;
|
||||
onEnableSkillCommandsChange: (enabled: boolean) => void;
|
||||
@@ -292,10 +294,17 @@ export class SettingsSelectorComponent extends Container {
|
||||
currentValue: config.showImages ? "true" : "false",
|
||||
values: ["true", "false"],
|
||||
});
|
||||
items.splice(2, 0, {
|
||||
id: "image-width-cells",
|
||||
label: "Image width",
|
||||
description: "Preferred inline image width in terminal cells",
|
||||
currentValue: String(config.imageWidthCells),
|
||||
values: ["60", "80", "120"],
|
||||
});
|
||||
}
|
||||
|
||||
// Image auto-resize toggle (always available, affects both attached and read images)
|
||||
items.splice(supportsImages ? 2 : 1, 0, {
|
||||
items.splice(supportsImages ? 3 : 1, 0, {
|
||||
id: "auto-resize-images",
|
||||
label: "Auto-resize images",
|
||||
description: "Resize large images to 2000x2000 max for better model compatibility",
|
||||
@@ -378,6 +387,9 @@ export class SettingsSelectorComponent extends Container {
|
||||
case "show-images":
|
||||
callbacks.onShowImagesChange(newValue === "true");
|
||||
break;
|
||||
case "image-width-cells":
|
||||
callbacks.onImageWidthCellsChange(parseInt(newValue, 10));
|
||||
break;
|
||||
case "auto-resize-images":
|
||||
callbacks.onAutoResizeImagesChange(newValue === "true");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user