feat: support resizing and other xterm.js addons
This commit is contained in:
parent
a0a80852eb
commit
ccde3513dc
8 changed files with 282 additions and 30 deletions
|
|
@ -8,7 +8,7 @@ export interface Command {
|
|||
payload: unknown;
|
||||
}
|
||||
|
||||
interface SSHConnectCommand extends Command {
|
||||
export interface SSHConnectCommand extends Command {
|
||||
op: 'ssh_conn';
|
||||
payload: {
|
||||
sessionId: string;
|
||||
|
|
@ -18,14 +18,31 @@ interface SSHConnectCommand extends Command {
|
|||
};
|
||||
}
|
||||
|
||||
interface SSHCloseCommand extends Command {
|
||||
export interface SSHCloseCommand extends Command {
|
||||
op: 'ssh_term';
|
||||
payload: {
|
||||
sessionId: string;
|
||||
};
|
||||
}
|
||||
|
||||
type AgentCommand = SSHConnectCommand | SSHCloseCommand;
|
||||
export interface SSHResizeCommand extends Command {
|
||||
op: 'ssh_resize';
|
||||
payload: {
|
||||
sessionId: string;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SSHDataCommand extends Command {
|
||||
op: 'ssh_data';
|
||||
payload: {
|
||||
sessionId: string;
|
||||
data: Uint8Array;
|
||||
};
|
||||
}
|
||||
|
||||
type AgentCommand = SSHConnectCommand | SSHCloseCommand | SSHResizeCommand;
|
||||
|
||||
export async function dispatchCommand(
|
||||
dispatcher: Writable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue