Merge pull request #689 from Sari-me/fix_imageaddon_clean

fix(terminal): 修复 ImageAddon 初始化失败并恢复 Sixel 图片渲染
This commit is contained in:
Kang
2026-09-17 20:34:41 +08:00
committed by GitHub
3 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
"enable": true,
"scope": []
},
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: http://asset.localhost https://asset.localhost; font-src 'self' data:; connect-src ipc: http://ipc.localhost"
"csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: http://asset.localhost https://asset.localhost; font-src 'self' data:; connect-src ipc: http://ipc.localhost"
}
},
"bundle": {
@@ -3,6 +3,7 @@ import type { Terminal } from "@xterm/xterm";
import { logger } from "@/lib/logger";
export const TERMINAL_IMAGE_ADDON_OPTIONS = {
enableSizeReports: false,
sixelSupport: true,
iipSupport: true,
kittySupport: false,
+9 -4
View File
@@ -4,7 +4,12 @@ import type { IWindowOptions } from "@xterm/xterm";
* Do not reflect application-controlled icon/window titles back into the PTY.
* Keep this explicit instead of depending on xterm.js defaults.
*/
export const XTERM_SECURE_WINDOW_OPTIONS: IWindowOptions = Object.freeze({
getIconTitle: false,
getWinTitle: false,
});
export const XTERM_SECURE_WINDOW_OPTIONS: IWindowOptions =
Object.freeze({
getIconTitle: false,
getWinTitle: false,
getWinSizePixels: true,
getCellSizePixels: true,
getWinSizeChars: true,
});