Compare commits

...

12 Commits

Author SHA1 Message Date
sawka e2ff745f55 checkpoint, filedb cache, wait, migrations 2024-02-13 12:56:16 -05:00
sawka eab8e3be02 checkpoint 2024-02-13 08:43:51 -05:00
sawka e589d9c4fa move screendir functions (and ptyout file func to fileops) 2024-02-12 09:40:21 -03:00
sawka 94de0460b4 fix history layout (item height and table width) 2024-02-11 23:14:29 -03:00
sawka 71b09cb44e fix typescript errors in emain.ts 2024-02-11 17:23:40 -03:00
sawka 07abaa92fa fix types for GlobalModel / GlobalCommandRunner so references work 2024-02-11 15:34:31 -03:00
Red J Adaya 2a4d85430a Fix term width in view connection detail modal (#274)
* fix term width

* add horizontal scroll to terminal when it overflows

* revert width of modal
2024-02-10 19:18:50 -03:00
Evan Simkowitz d319e72609 Refactor ModelUpdate to set up for decoupling sstore (#280)
This PR changes ModelUpdate mechanism from a statically-typed struct to an interface, allowing us to define the update mechanism and the update types separately. This sets us up to move app logic and update mechanisms into separate packages. Ultimately, sstore will only define low-level persistence logic.
2024-02-09 17:19:44 -08:00
sawka 7a5afccab3 do not unset ZDOTDIR otherwise interactive configs will be unnecessarily re-read (causing big performance problem for zsh command initialization) 2024-02-09 20:05:00 -03:00
sawka efe567398a fix ts warning 2024-02-09 18:57:07 -03:00
Sylvia Crowe 187509504d fix: type mismatch in userinput modal
A null was used in a place where a string should have been. It has been
updated to a string to remove the error associated with it.
2024-02-08 21:04:38 -08:00
Sylvie Crowe 903b26bfca Use ssh library: add user input (#281)
* feat: create backend for user input requests

This is the first part of a change that allows the backend to request
user input from the frontend. Essentially, the backend will send a
request for the user to answer some query, and the frontend will send
that answer back. It is blocking, so it needs to be used within a
goroutine.

There is some placeholder code in the frontend that will be updated in
future commits. Similarly, there is some debug code in the backend
remote.go file.

* feat: create frontend for user input requests

This is part of a change to allow the backend to request user input from
the frontend. This adds a component specifically for handling this
logic. It is only a starting point, and does not work perfectly yet.

* refactor: update user input backend/interface

This updates the user input backend to fix a few potential bugs. It also
refactors the user input request and response types to better handle
markdown and errors while making it more convenient to work with.

A couple frontend changes were made to keep everything compatible.

* fix: add props to user input request modal

There was a second place that the modals were created that I previously
missed. This fixes that second casel

* feat: complete user input modal

This rounds out the most immediate concerns for the new user input
modal. The frontend now includes a timer to show how much time is left
and will close itself once it reaches zero. Css
formatting has been cleaned up to be more reasonable.

There is still some test code present on the back end. This will be
removed once actuall examples of the new modal are in place.

* feat: create first pass known_hosts detection

Manually integrating with golang's ssh library means that the code must
authenticate known_hosts on its own. This is a first pass at creating a
system that parses the known hosts files and denys a connection if there
is a mismatch. This needs to be updated with a means to add keys to the
known-hosts file if the user requests it.

* feat: allow writing to known_hosts first pass

As a follow-up to the previous change, we now allow the user to respond
to interactive queries in order to determine if an unknown known hosts
key can be added to a known_hosts file if it is missing. This needs to
be refined further, but it gets the basic functionality there.

* feat: add user input for kbd-interactive auth

This adds a modal so the user can respond to prompts provided using the
keyboard interactive authentication method.

* feat: add interactive password authentication

This makes the ssh password authentication interactive with its own user
input modal. Unfortunately, this method does not allow trying a default
first. This will need to be expanded in the future to accomodate that.

* fix: allow automatic and interactive auth together

Previously, it was impossible to use to separate methods of the same
type to try ssh authentication. This made it impossible to make an auto
attempt before a manual one. This change restricts that by combining
them into one method where the auto attempt is tried once first and
cannot be tried again. Following that, interactive authentication can be
tried separately.

It also lowers the time limit on kbd interactive authentication to 15
seconds due to limitations on the library we are using.

* fix: set number of retries to one in ssh

Number of retries means number of attempts after the fact, not number of
total attempts. It has been adjusted from 2 to 1 to reflect this.

* refactor: change argument order in GetUserInput

This is a simple change to move the context to the first argument of
GetUserInput to match the convention used elsewhere in the code.

* fix: set number of retries to two again

I was wrong in my previous analysis. The number given is the total
number of tries. This is confusing when keyboard authentication and
password authentication are both available which usually doesn't happen.

* feat: create naive ui for ssh key passphrases

This isn't quite as reactive as the other methods, but it does attempt
to use publickey without a passphrase, then attempt to use the password
as the passphrase, and finally prompting the user for a passphrase. The
problem with this approach is that if multiple keys are used and they
all have passphrases, they need to all be checked up front. In practice,
this will not happen often, but it is something to be aware of.

* fix: add the userinput.tsx changes

These were missed in the previous commit. Adding them now.
2024-02-09 00:16:56 -03:00
41 changed files with 2141 additions and 1103 deletions
+1
View File
@@ -8,6 +8,7 @@ export const SESSION_SETTINGS = "sessionSettings";
export const LINE_SETTINGS = "lineSettings";
export const CLIENT_SETTINGS = "clientSettings";
export const TAB_SWITCHER = "tabSwitcher";
export const USER_INPUT = "userInput";
export const LineContainer_Main = "main";
export const LineContainer_History = "history";
+1
View File
@@ -5,6 +5,7 @@
margin-bottom: 10px;
font-family: @markdown-font;
font-size: 14px;
overflow-wrap: break-word;
code {
background-color: @markdown-highlight;
+7 -1
View File
@@ -60,7 +60,13 @@ class PasswordField extends TextField {
};
return (
<div className={cn(`wave-textfield wave-password ${className || ""}`, { focused: focused, error: error })}>
<div
className={cn(`wave-textfield wave-password ${className || ""}`, {
focused: focused,
error: error,
"no-label": !label,
})}
>
{decoration?.startDecoration && <>{decoration.startDecoration}</>}
<div className="wave-textfield-inner">
<label
+1
View File
@@ -9,3 +9,4 @@ export { TabSwitcherModal } from "./tabswitcher";
export { SessionSettingsModal } from "./sessionsettings";
export { ScreenSettingsModal } from "./screensettings";
export { LineSettingsModal } from "./linesettings";
export { UserInputModal } from "./userinput";
+1 -1
View File
@@ -17,7 +17,7 @@ class ModalsProvider extends React.Component {
for (let i = 0; i < store.length; i++) {
let entry = store[i];
let Comp = entry.component;
rtn.push(<Comp key={entry.uniqueKey} />);
rtn.push(<Comp key={entry.uniqueKey} {...entry.props} />);
}
return <>{rtn}</>;
}
+12 -10
View File
@@ -12,19 +12,21 @@ import {
SessionSettingsModal,
ScreenSettingsModal,
LineSettingsModal,
UserInputModal,
} from "../modals";
import * as constants from "../../appconst";
const modalsRegistry: { [key: string]: () => React.ReactElement } = {
[constants.ABOUT]: () => <AboutModal />,
[constants.CREATE_REMOTE]: () => <CreateRemoteConnModal />,
[constants.VIEW_REMOTE]: () => <ViewRemoteConnDetailModal />,
[constants.EDIT_REMOTE]: () => <EditRemoteConnModal />,
[constants.ALERT]: () => <AlertModal />,
[constants.SCREEN_SETTINGS]: () => <ScreenSettingsModal />,
[constants.SESSION_SETTINGS]: () => <SessionSettingsModal />,
[constants.LINE_SETTINGS]: () => <LineSettingsModal />,
[constants.TAB_SWITCHER]: () => <TabSwitcherModal />,
const modalsRegistry: { [key: string]: React.ComponentType } = {
[constants.ABOUT]: AboutModal,
[constants.CREATE_REMOTE]: CreateRemoteConnModal,
[constants.VIEW_REMOTE]: ViewRemoteConnDetailModal,
[constants.EDIT_REMOTE]: EditRemoteConnModal,
[constants.ALERT]: AlertModal,
[constants.SCREEN_SETTINGS]: ScreenSettingsModal,
[constants.SESSION_SETTINGS]: SessionSettingsModal,
[constants.LINE_SETTINGS]: LineSettingsModal,
[constants.TAB_SWITCHER]: TabSwitcherModal,
[constants.USER_INPUT]: UserInputModal,
};
export { modalsRegistry };
+15
View File
@@ -0,0 +1,15 @@
@import "../../../app/common/themes/themes.less";
.userinput-modal {
width: 500px;
.wave-modal-content {
.wave-modal-body {
padding: 20px 20px;
.userinput-query {
margin-bottom: 10px;
}
}
}
}
+88
View File
@@ -0,0 +1,88 @@
import * as React from "react";
import { GlobalModel } from "../../../models";
import { Choose, When, If } from "tsx-control-statements/components";
import { Modal, PasswordField, Markdown } from "../elements";
import { UserInputRequest } from "../../../types/types";
import "./userinput.less";
export const UserInputModal = (userInputRequest: UserInputRequest) => {
const [responseText, setResponseText] = React.useState("");
const [countdown, setCountdown] = React.useState(Math.floor(userInputRequest.timeoutms / 1000));
const closeModal = React.useCallback(() => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
errormsg: "Canceled by the user",
});
GlobalModel.remotesModel.closeModal();
}, [responseText, userInputRequest]);
const handleSendText = React.useCallback(() => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
text: responseText,
});
GlobalModel.remotesModel.closeModal();
}, [responseText, userInputRequest]);
const handleSendConfirm = React.useCallback(
(response: boolean) => {
GlobalModel.sendUserInput({
type: "userinputresp",
requestid: userInputRequest.requestid,
confirm: response,
});
GlobalModel.remotesModel.closeModal();
},
[userInputRequest]
);
React.useEffect(() => {
let timeout: ReturnType<typeof setTimeout>;
if (countdown == 0) {
timeout = setTimeout(() => {
GlobalModel.remotesModel.closeModal();
}, 300);
} else {
timeout = setTimeout(() => {
setCountdown(countdown - 1);
}, 1000);
}
return () => clearTimeout(timeout);
}, [countdown]);
return (
<Modal className="userinput-modal">
<Modal.Header onClose={closeModal} title={userInputRequest.title + ` (${countdown})`} />
<div className="wave-modal-body">
<div className="userinput-query">
<If condition={userInputRequest.markdown}>
<Markdown text={userInputRequest.querytext} />
</If>
<If condition={!userInputRequest.markdown}>{userInputRequest.querytext}</If>
</div>
<Choose>
<When condition={userInputRequest.responsetype == "text"}>
<PasswordField onChange={setResponseText} value={responseText} maxLength={400} />
</When>
</Choose>
</div>
<Choose>
<When condition={userInputRequest.responsetype == "text"}>
<Modal.Footer onCancel={closeModal} onOk={handleSendText} okLabel="Continue" />
</When>
<When condition={userInputRequest.responsetype == "confirm"}>
<Modal.Footer
onCancel={() => handleSendConfirm(false)}
onOk={() => handleSendConfirm(true)}
okLabel="Yes"
cancelLabel="No"
/>
</When>
</Choose>
</Modal>
);
};
@@ -54,6 +54,8 @@
}
.remote-detail {
width: 100%;
.settings-field {
display: flex;
flex-direction: row;
@@ -91,8 +93,9 @@
}
.terminal-wrapper {
width: 100%;
margin-top: 5px;
overflow-x: auto;
overflow-y: hidden;
.terminal-connectelem {
height: 163px !important; // Needed to override plugin height
@@ -111,7 +114,6 @@
.xterm-screen {
padding: 10px;
width: 541px !important; // Needed to override plugin width
}
}
}
@@ -12,12 +12,10 @@ import * as T from "../../../types/types";
import { Modal, Tooltip, Button, Status } from "../elements";
import * as util from "../../../util/util";
import * as textmeasure from "../../../util/textmeasure";
import * as appconst from "../../appconst";
import "./viewremoteconndetail.less";
const RemotePtyRows = 9;
const RemotePtyCols = 80;
@mobxReact.observer
class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
termRef: React.RefObject<any> = React.createRef();
@@ -293,7 +291,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
let model = this.model;
let isTermFocused = this.model.remoteTermWrapFocus.get();
let termFontSize = GlobalModel.termFontSize.get();
let termWidth = textmeasure.termWidthFromCols(RemotePtyCols, termFontSize);
let termWidth = textmeasure.termWidthFromCols(appconst.RemotePtyCols, termFontSize);
let remoteAliasText = util.isBlank(remote.remotealias) ? "(none)" : remote.remotealias;
let selectedRemoteStatus = this.getSelectedRemote().status;
@@ -371,7 +369,7 @@ class ViewRemoteConnDetailModal extends React.Component<{}, {}> {
ref={this.termRef}
data-remoteid={remote.remoteid}
style={{
height: textmeasure.termHeightFromRows(RemotePtyRows, termFontSize),
height: textmeasure.termHeightFromRows(appconst.RemotePtyRows, termFontSize),
width: termWidth,
}}
></div>
+5 -5
View File
@@ -14,10 +14,10 @@
width: 16px;
height: 16px;
border-radius: 4px;
border: 1px solid #3B3F3A;
border: 1px solid #3b3f3a;
background: rgba(213, 254, 175, 0.03);
}
&.checkbox-icon {
width: 16px;
height: 16px;
@@ -30,7 +30,7 @@
height: 16px;
fill: rgba(213, 254, 175, 0.03);
stroke-width: 1px;
stroke: #3B3F3A;
stroke: #3b3f3a;
}
}
@@ -264,6 +264,7 @@
margin: 0px 10px 10px 10px;
table-layout: fixed;
border-top: 2px solid #ccc;
width: calc(100% - 20px);
tr.active-history-item {
td {
@@ -309,9 +310,8 @@
tr.history-item {
padding: 0 10px 0 10px;
display: flex;
border-bottom: 1px solid rgba(250, 250, 250, 0.10);
border-bottom: 1px solid rgba(250, 250, 250, 0.1);
align-items: center;
height: 40px;
color: @text-secondary;
&.is-selected {
+23 -17
View File
@@ -14,6 +14,7 @@ import { sprintf } from "sprintf-js";
import { v4 as uuidv4 } from "uuid";
import { checkKeyPressed, adaptFromElectronKeyEvent, setKeyUtilPlatform } from "../util/keyutil";
import { platform } from "os";
import type * as T from "../types/types";
const WaveAppPathVarName = "WAVETERM_APP_PATH";
const WaveDevVarName = "WAVETERM_DEV";
@@ -40,19 +41,21 @@ let unameArch: string = process.arch;
if (unameArch == "x64") {
unameArch = "amd64";
}
let logger;
let loggerTransports: winston.transport[] = [
new winston.transports.File({ filename: path.join(waveHome, "waveterm-app.log"), level: "info" }),
];
if (isDev) {
loggerTransports.push(new winston.transports.Console());
}
let loggerConfig = {
level: "info",
format: winston.format.combine(
winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
winston.format.printf((info) => `${info.timestamp} ${info.message}`)
),
transports: [new winston.transports.File({ filename: path.join(waveHome, "waveterm-app.log"), level: "info" })],
transports: loggerTransports,
};
if (isDev) {
loggerConfig.transports.push(new winston.transports.Console());
}
logger = winston.createLogger(loggerConfig);
let logger = winston.createLogger(loggerConfig);
function log(...msg) {
try {
logger.info(util.format(...msg));
@@ -75,7 +78,7 @@ if (isDev) {
}
let app = electron.app;
app.setName(isDev ? "Wave (Dev)" : "Wave");
let waveSrvProc = null;
let waveSrvProc: child_process.ChildProcessWithoutNullStreams | null = null;
let waveSrvShouldRestart = false;
electron.dialog.showErrorBox = (title, content) => {
@@ -101,8 +104,11 @@ function checkPromptMigrate() {
// don't migrate if we're running dev version or if wave home directory already exists
return;
}
let homeDir = process.env.HOME;
let promptHome = path.join(homeDir, "prompt");
if (process.env.HOME == null) {
return;
}
let homeDir: string = process.env.HOME;
let promptHome: string = path.join(homeDir, "prompt");
if (!fs.existsSync(promptHome) || !fs.existsSync(path.join(promptHome, "prompt.db"))) {
// make sure we have a valid prompt home directory (prompt.db must exist inside)
return;
@@ -170,7 +176,7 @@ function readAuthKey() {
return authKeyStr.trim();
}
let menuTemplate = [
let menuTemplate: Electron.MenuItemConstructorOptions[] = [
{
role: "appMenu",
submenu: [
@@ -222,7 +228,7 @@ function getMods(input: any) {
return { meta: input.meta, shift: input.shift, ctrl: input.control, alt: input.alt };
}
function shNavHandler(event: any, url: any) {
function shNavHandler(event: Electron.Event<Electron.WebContentsWillNavigateEventParams>, url: string) {
event.preventDefault();
if (url.startsWith("https://") || url.startsWith("http://") || url.startsWith("file://")) {
console.log("open external, shNav", url);
@@ -232,12 +238,13 @@ function shNavHandler(event: any, url: any) {
}
}
function shFrameNavHandler(event: any, url: any) {
function shFrameNavHandler(event: Electron.Event<Electron.WebContentsWillFrameNavigateEventParams>) {
if (!event.frame || event.frame.parent == null) {
// only use this handler to process iframe events (non-iframe events go to shNavHandler)
return;
}
event.preventDefault();
let url = event.url;
console.log(`frame-navigation url=${url} frame=${event.frame.name}`);
if (event.frame.name == "webview") {
// "webview" links always open in new window
@@ -250,7 +257,7 @@ function shFrameNavHandler(event: any, url: any) {
return;
}
function createMainWindow(clientData) {
function createMainWindow(clientData: T.ClientDataType | null) {
let bounds = calcBounds(clientData);
setKeyUtilPlatform(platform());
let win = new electron.BrowserWindow({
@@ -644,12 +651,11 @@ electron.ipcMain.on("context-editmenu", (event, { x, y }, opts) => {
}
console.log("context-editmenu");
let menu = new electron.Menu();
let menuItem = null;
if (opts.showCut) {
menuItem = new electron.MenuItem({ label: "Cut", role: "cut" });
let menuItem = new electron.MenuItem({ label: "Cut", role: "cut" });
menu.append(menuItem);
}
menuItem = new electron.MenuItem({ label: "Copy", role: "copy" });
let menuItem = new electron.MenuItem({ label: "Copy", role: "copy" });
menu.append(menuItem);
menuItem = new electron.MenuItem({ label: "Paste", role: "paste" });
menu.append(menuItem);
@@ -657,7 +663,7 @@ electron.ipcMain.on("context-editmenu", (event, { x, y }, opts) => {
});
async function createMainWindowWrap() {
let clientData = null;
let clientData: T.ClientDataType | null = null;
try {
clientData = await getClientDataPoll(1);
} catch (e) {
+1 -1
View File
@@ -8,7 +8,7 @@ import { GlobalModel } from "./global";
class CommandRunner {
private constructor() {}
static getInstance() {
static getInstance(): CommandRunner {
if (!(window as any).GlobalCommandRunner) {
(window as any).GlobalCommandRunner = new CommandRunner();
}
+2 -2
View File
@@ -1,6 +1,6 @@
import { Model } from "./model";
import { CommandRunner } from "./commandrunner";
const GlobalModel = Model.getInstance();
const GlobalCommandRunner = CommandRunner.getInstance();
const GlobalModel: Model = Model.getInstance();
const GlobalCommandRunner: CommandRunner = CommandRunner.getInstance();
export { GlobalModel, GlobalCommandRunner };
+10 -15
View File
@@ -13,10 +13,10 @@ import {
HistoryQueryOpts,
HistoryTypeStrs,
OpenAICmdInfoChatMessageType,
OV,
StrWithPos,
} from "../types/types";
import { StrWithPos } from "../types/types";
import * as appconst from "../app/appconst";
import { OV } from "../types/types";
import { Model } from "./model";
import { GlobalCommandRunner } from "./global";
@@ -207,7 +207,6 @@ class InputModel {
this.historyQueryOpts.set(opts);
let bestIndex = this.findBestNewIndex(oldItem);
setTimeout(() => this.setHistoryIndex(bestIndex, true), 10);
return;
})();
}
@@ -624,13 +623,17 @@ class InputModel {
}
openAIAssistantChat(): void {
this.aIChatShow.set(true);
this.setAIChatFocus();
mobx.action(() => {
this.aIChatShow.set(true);
this.setAIChatFocus();
})();
}
closeAIAssistantChat(): void {
this.aIChatShow.set(false);
this.giveFocus();
mobx.action(() => {
this.aIChatShow.set(false);
this.giveFocus();
})();
}
clearAIAssistantChat(): void {
@@ -721,14 +724,6 @@ class InputModel {
setCurLine(val: string): void {
let hidx = this.historyIndex.get();
mobx.action(() => {
// if (val == "\" ") {
// this.setInputMode("comment");
// val = "";
// }
// if (val == "//") {
// this.setInputMode("global");
// val = "";
// }
if (this.modHistory.length <= hidx) {
this.modHistory.length = hidx + 1;
}
+3 -3
View File
@@ -8,14 +8,14 @@ import { modalsRegistry } from "../app/common/modals/registry";
import { OArr } from "../types/types";
class ModalsModel {
store: OArr<ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store" });
store: OArr<ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store", deep: false });
pushModal(modalId: string) {
pushModal(modalId: string, props?: any) {
const modalFactory = modalsRegistry[modalId];
if (modalFactory && !this.store.some((modal) => modal.id === modalId)) {
mobx.action(() => {
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4() });
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4(), props });
})();
}
}
+300 -243
View File
File diff suppressed because it is too large Load Diff
@@ -51,6 +51,8 @@ import {
HistoryViewDataType,
AlertMessageType,
HistorySearchParams,
UserInputRequest,
UserInputResponsePacket,
FocusTypeStrs,
ScreenLinesType,
HistoryTypeStrs,
@@ -3376,14 +3378,14 @@ class RemotesModel {
}
class ModalsModel {
store: OArr<T.ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store" });
store: OArr<T.ModalStoreEntry> = mobx.observable.array([], { name: "ModalsModel-store", deep: false });
pushModal(modalId: string) {
pushModal(modalId: string, props?: any) {
const modalFactory = modalsRegistry[modalId];
if (modalFactory && !this.store.some((modal) => modal.id === modalId)) {
mobx.action(() => {
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4() });
this.store.push({ id: modalId, component: modalFactory, uniqueKey: uuidv4(), props: props });
})();
}
}
@@ -4184,6 +4186,10 @@ class Model {
this.getScreenById_single(snc.screenid)?.setNumRunningCmds(snc.num);
}
}
if ("userinputrequest" in update) {
let userInputRequest: UserInputRequest = update.userinputrequest;
this.modalsModel.pushModal(appconst.USER_INPUT, userInputRequest);
}
}
updateRemotes(remotes: RemoteType[]): void {
@@ -4591,6 +4597,10 @@ class Model {
this.ws.pushMessage(inputPacket);
}
sendUserInput(userInputResponsePacket: UserInputResponsePacket) {
this.ws.pushMessage(userInputResponsePacket);
}
sendCmdInputText(screenId: string, sp: T.StrWithPos) {
let pk: T.CmdInputTextPacketType = {
type: "cmdinputtext",
+3 -6
View File
@@ -12,9 +12,6 @@ import { GlobalCommandRunner } from "./global";
import { Model } from "./model";
import { getTermPtyData } from "../util/modelutil";
const RemotePtyRows = 8; // also in main.tsx
const RemotePtyCols = 80;
class RemotesModel {
globalModel: Model;
selectedRemoteId: OV<string> = mobx.observable.box(null, {
@@ -180,14 +177,14 @@ class RemotesModel {
return;
}
let termOpts = {
rows: RemotePtyRows,
cols: RemotePtyCols,
rows: appconst.RemotePtyRows,
cols: appconst.RemotePtyCols,
flexrows: false,
maxptysize: 64 * 1024,
};
let termWrap = new TermWrap(elem, {
termContext: { remoteId: remoteId },
usedRows: RemotePtyRows,
usedRows: appconst.RemotePtyRows,
termOpts: termOpts,
winSize: null,
keyHandler: (e, termWrap) => {
+1 -1
View File
@@ -139,7 +139,7 @@ class ScreenLines {
return;
}
let lineIdx = 0;
for (lineIdx = 0; lineIdx < lines.length; lineIdx++) {
for (lineIdx; lineIdx < lines.length; lineIdx++) {
let lineId = lines[lineIdx].lineid;
let curTs = lines[lineIdx].ts;
if (lineId == line.lineid) {

Some files were not shown because too many files have changed in this diff Show More