Add /show-images command to toggle inline image display

- Add terminal.showImages setting to settings-manager.ts
- Add /show-images slash command (only visible if terminal supports images)
- ToolExecutionComponent checks both terminal support and user setting
- Shows text fallback when inline images are disabled
This commit is contained in:
Mario Zechner 2025-12-13 23:14:46 +01:00
parent 215c10664a
commit f68a933d2c
3 changed files with 87 additions and 7 deletions

View file

@ -18,6 +18,10 @@ export interface SkillsSettings {
enabled?: boolean; // default: true
}
export interface TerminalSettings {
showImages?: boolean; // default: true (only relevant if terminal supports images)
}
export interface Settings {
lastChangelogVersion?: string;
defaultProvider?: string;
@ -33,6 +37,7 @@ export interface Settings {
hooks?: string[]; // Array of hook file paths
hookTimeout?: number; // Timeout for hook execution in ms (default: 30000)
skills?: SkillsSettings;
terminal?: TerminalSettings;
}
export class SettingsManager {
@ -237,4 +242,16 @@ export class SettingsManager {
this.settings.skills.enabled = enabled;
this.save();
}
getShowImages(): boolean {
return this.settings.terminal?.showImages ?? true;
}
setShowImages(show: boolean): void {
if (!this.settings.terminal) {
this.settings.terminal = {};
}
this.settings.terminal.showImages = show;
this.save();
}
}