fix closed terminal feedback loop + add some addons

This commit is contained in:
lda
2026-07-15 22:17:38 +07:00 Verified
parent eaa77fa54e
commit 27fc515fe7
5 changed files with 1457 additions and 2789 deletions
+3
View File
@@ -17,6 +17,9 @@
"@tailwindcss/vite": "^4.2.2",
"@xterm/addon-clipboard": "^0.2.0",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-unicode-graphemes": "^0.4.0",
"@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-web-links": "^0.12.0",
"@xterm/xterm": "^6.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
+1392 -2775
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -1,6 +1,9 @@
import { useCallback, useEffect, useRef, useState } from "react";
import { ClipboardAddon } from "@xterm/addon-clipboard";
import { FitAddon } from "@xterm/addon-fit";
import { Unicode11Addon } from "@xterm/addon-unicode11";
import { UnicodeGraphemesAddon } from "@xterm/addon-unicode-graphemes";
import { WebLinksAddon } from "@xterm/addon-web-links";
import { Terminal as XTerm } from "@xterm/xterm";
import { Eraser, PlugZap, RotateCcw, Square, Terminal } from "lucide-react";
import { toast } from "sonner";
@@ -274,7 +277,12 @@ export function TerminalPage({
scrollbarSliderHoverBackground: "#6b7c8dcc",
scrollbarSliderActiveBackground: "#8294a6",
},
allowProposedApi: true, // this for unicode11 addon. FOR SOME reason xtermjs doesnt tell me this in the readme.
});
terminal.loadAddon(new Unicode11Addon());
terminal.unicode.activeVersion = "11";
terminal.loadAddon(new UnicodeGraphemesAddon());
terminal.loadAddon(new WebLinksAddon());
const fit = new FitAddon();
terminal.loadAddon(new ClipboardAddon());
terminal.loadAddon(fit);
+1
View File
@@ -545,6 +545,7 @@
fitted canvas, so keep it on the same surface as the terminal theme. */
background-color: #0b1117;
overscroll-behavior: contain;
scrollbar-width: none;
}
.terminal-surface .xterm-scrollable-element > .scrollbar,