fix(shell): resolve TypeScript errors in PTY terminal components
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m48s
PR Review Automation / review (pull_request) Successful in 4m26s
Test / rust-fmt-check (pull_request) Successful in 12m9s
Test / rust-clippy (pull_request) Successful in 13m43s
Test / rust-tests (pull_request) Successful in 15m24s
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m48s
PR Review Automation / review (pull_request) Successful in 4m26s
Test / rust-fmt-check (pull_request) Successful in 12m9s
Test / rust-clippy (pull_request) Successful in 13m43s
Test / rust-tests (pull_request) Successful in 15m24s
- Remove rows/cols from ITerminalOptions (not in xterm.js 5.x) - Fix startPtyExecSessionCmd signature (add shell parameter) - Fix startPtyAttachSessionCmd signature (handle optional container) - Fix sendPtyStdinCmd call (send string directly, not byte array) All TypeScript errors resolved, build now passes cleanly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7f12baec9c
commit
44d33035de
@ -29,8 +29,6 @@ const XTERM_OPTIONS: ITerminalOptions = {
|
|||||||
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
|
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
convertEol: true,
|
convertEol: true,
|
||||||
rows: 24,
|
|
||||||
cols: 80,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function InteractiveAttachModal({
|
export function InteractiveAttachModal({
|
||||||
@ -79,7 +77,7 @@ export function InteractiveAttachModal({
|
|||||||
clusterId,
|
clusterId,
|
||||||
namespace,
|
namespace,
|
||||||
pod,
|
pod,
|
||||||
container
|
container || ""
|
||||||
);
|
);
|
||||||
sessionIdRef.current = sid;
|
sessionIdRef.current = sid;
|
||||||
|
|
||||||
@ -111,8 +109,7 @@ export function InteractiveAttachModal({
|
|||||||
// Handle user input
|
// Handle user input
|
||||||
term.onData((data) => {
|
term.onData((data) => {
|
||||||
if (sid) {
|
if (sid) {
|
||||||
const bytes = Array.from(new TextEncoder().encode(data));
|
sendPtyStdinCmd(sid, data).catch((err) => {
|
||||||
sendPtyStdinCmd(sid, bytes).catch((err) => {
|
|
||||||
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
|
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,8 +29,6 @@ const XTERM_OPTIONS: ITerminalOptions = {
|
|||||||
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
|
fontFamily: '"JetBrains Mono", "Fira Code", monospace',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
convertEol: true,
|
convertEol: true,
|
||||||
rows: 24,
|
|
||||||
cols: 80,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function InteractiveShellModal({
|
export function InteractiveShellModal({
|
||||||
@ -79,7 +77,8 @@ export function InteractiveShellModal({
|
|||||||
clusterId,
|
clusterId,
|
||||||
namespace,
|
namespace,
|
||||||
pod,
|
pod,
|
||||||
container
|
container || "",
|
||||||
|
"/bin/sh"
|
||||||
);
|
);
|
||||||
sessionIdRef.current = sid;
|
sessionIdRef.current = sid;
|
||||||
|
|
||||||
@ -111,8 +110,7 @@ export function InteractiveShellModal({
|
|||||||
// Handle user input
|
// Handle user input
|
||||||
term.onData((data) => {
|
term.onData((data) => {
|
||||||
if (sid) {
|
if (sid) {
|
||||||
const bytes = Array.from(new TextEncoder().encode(data));
|
sendPtyStdinCmd(sid, data).catch((err) => {
|
||||||
sendPtyStdinCmd(sid, bytes).catch((err) => {
|
|
||||||
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
|
term.write(`\r\n\x1b[31mError sending input: ${err}\x1b[0m\r\n`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user