mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
init
This commit is contained in:
parent
cf5d2ecddf
commit
550461167b
@ -9,7 +9,7 @@ import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import type { BookmarkType } from "../../types/types";
|
||||
import { GlobalModel } from "../../model/model";
|
||||
import { CmdStrCode, Markdown } from "../common/common";
|
||||
import { CmdStrCode, Markdown } from "../common/elements";
|
||||
|
||||
import { ReactComponent as XmarkIcon } from "../assets/icons/line/xmark.svg";
|
||||
import { ReactComponent as CopyIcon } from "../assets/icons/favourites/copy.svg";
|
||||
|
@ -7,7 +7,7 @@ import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner, MinFontSize, MaxFontSize, RemotesModel } from "../../model/model";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, Dropdown } from "../common/common";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, Dropdown } from "../common/elements";
|
||||
import { CommandRtnType, ClientDataType } from "../../types/types";
|
||||
import { commandRtnHandler, isBlank } from "../../util/util";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -6,8 +6,8 @@ import { boundMethod } from "autobind-decorator";
|
||||
import cn from "classnames";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
|
||||
import { ReactComponent as CheckIcon } from "../assets/icons/line/check.svg";
|
||||
import { ReactComponent as CopyIcon } from "../assets/icons/history/copy.svg";
|
||||
import { ReactComponent as CheckIcon } from "../../assets/icons/line/check.svg";
|
||||
import { ReactComponent as CopyIcon } from "../../assets/icons/history/copy.svg";
|
||||
|
||||
import "./cmdstrcode.less";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -3,15 +3,12 @@
|
||||
|
||||
import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import cn from "classnames";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
import "./common.less";
|
||||
|
||||
type OV<V> = mobx.IObservableValue<V>;
|
||||
import "./dropdown.less";
|
||||
|
||||
interface DropdownDecorationProps {
|
||||
startDecoration?: React.ReactNode;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,3 +1,22 @@
|
||||
export { Button } from "./button";
|
||||
export { Checkbox } from "./checkbox";
|
||||
export { CmdStrCode } from "./cmdstrcode";
|
||||
export { renderCmdText } from "./cmdtext";
|
||||
export { Dropdown } from "./dropdown";
|
||||
export { IconButton } from "./iconbutton";
|
||||
export { InfoMessage } from "./infomessage";
|
||||
export { InlineSettingsTextEdit } from "./inlinesettingstextedit";
|
||||
export { InputDecoration } from "./inputdecoration";
|
||||
export { LinkButton } from "./linkbutton";
|
||||
export { Markdown } from "./markdown";
|
||||
export { Modal } from "./modal";
|
||||
export { NumberField } from "./numberfield";
|
||||
export { PasswordField } from "./passwordfield";
|
||||
export { RemoteStatusLight } from "./remotestatuslight";
|
||||
export { ResizableSidebar } from "./resizablesidebar";
|
||||
export { SettingsError } from "./settingserror";
|
||||
export { ShowWaveShellInstallPrompt } from "./showwaveshellinstallprompt";
|
||||
export { Status } from "./status";
|
||||
export { TextField } from "./textfield";
|
||||
export { Toggle } from "./toggle";
|
||||
export { Tooltip } from "./tooltip";
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { ReactComponent as CircleInfoIcon } from "../assets/icons/circle_info.svg";
|
||||
import { ReactComponent as CircleInfoIcon } from "../../assets/icons/circle_info.svg";
|
||||
|
||||
import "./infomessage.less";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
@ -9,7 +9,7 @@ import cn from "classnames";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import { checkKeyPressed, adaptFromReactOrNativeKeyEvent } from "../../../util/keyutil";
|
||||
|
||||
import "./inlinetextedit.less";
|
||||
import "./inlinesettingstextedit.less";
|
||||
|
||||
type OV<V> = mobx.IObservableValue<V>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -8,7 +8,7 @@ import ReactDOM from "react-dom";
|
||||
import { Button } from "./button";
|
||||
import { IconButton } from "./iconbutton";
|
||||
|
||||
import "./common.less";
|
||||
import "./modal.less";
|
||||
|
||||
type OV<V> = mobx.IObservableValue<V>;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -2,9 +2,9 @@ import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { RemoteType } from "../../../types/types";
|
||||
|
||||
import { ReactComponent as CircleIcon } from "../assets/icons/circle.svg";
|
||||
import { ReactComponent as KeyIcon } from "../assets/icons/key.svg";
|
||||
import { ReactComponent as RotateIcon } from "../assets/icons/rotate_left.svg";
|
||||
import { ReactComponent as CircleIcon } from "../../assets/icons/circle.svg";
|
||||
import { ReactComponent as KeyIcon } from "../../assets/icons/key.svg";
|
||||
import { ReactComponent as RotateIcon } from "../../assets/icons/rotate_left.svg";
|
||||
|
||||
import "./remotestatuslight.less";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -9,7 +9,7 @@ import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../../model/model";
|
||||
import { MagicLayout } from "../../magiclayout";
|
||||
|
||||
import "./common.less";
|
||||
import "./resizablesidebar.less";
|
||||
|
||||
type OV<V> = mobx.IObservableValue<V>;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -4,8 +4,6 @@
|
||||
import { GlobalModel } from "../../../model/model";
|
||||
import * as appconst from "../../appconst";
|
||||
|
||||
import "./common.less";
|
||||
|
||||
function ShowWaveShellInstallPrompt(callbackFn: () => void) {
|
||||
let message: string = `
|
||||
In order to use Wave's advanced features like unified history and persistent sessions, Wave installs a small, open-source helper program called WaveShell on your remote machine. WaveShell does not open any external ports and only communicates with your *local* Wave terminal instance over ssh. For more information please see [the docs](https://docs.waveterm.dev/reference/waveshell).
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "../../app/common/themes/themes.less";
|
||||
@import "../../../app/common/themes/themes.less";
|
||||
|
||||
.info-message {
|
||||
position: relative;
|
||||
|
@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
|
||||
import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel } from "../../../model/model";
|
||||
import { Modal, LinkButton } from "../common";
|
||||
import { Modal, LinkButton } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
|
||||
import logo from "../../assets/waveterm-logo-with-bg.svg";
|
||||
|
@ -5,7 +5,7 @@ import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import { Markdown, Modal, Button, Checkbox } from "../common";
|
||||
import { Markdown, Modal, Button, Checkbox } from "../elements";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../../model/model";
|
||||
|
||||
import "./alert.less";
|
||||
|
@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import { GlobalModel } from "../../../model/model";
|
||||
import { Modal, Button } from "../common";
|
||||
import { Modal, Button } from "../elements";
|
||||
|
||||
import "./clientstop.less";
|
||||
|
||||
|
@ -8,7 +8,16 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { If } from "tsx-control-statements/components";
|
||||
import { GlobalModel, GlobalCommandRunner, RemotesModel } from "../../../model/model";
|
||||
import * as T from "../../../types/types";
|
||||
import { Modal, TextField, NumberField, InputDecoration, Dropdown, PasswordField, Tooltip, ShowWaveShellInstallPrompt } from "../common";
|
||||
import {
|
||||
Modal,
|
||||
TextField,
|
||||
NumberField,
|
||||
InputDecoration,
|
||||
Dropdown,
|
||||
PasswordField,
|
||||
Tooltip,
|
||||
ShowWaveShellInstallPrompt,
|
||||
} from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
import * as appconst from "../../appconst";
|
||||
|
||||
|
@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
|
||||
import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel } from "../../../model/model";
|
||||
import { Modal, Button } from "../common";
|
||||
import { Modal, Button } from "../elements";
|
||||
|
||||
import "./disconnected.less";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { If } from "tsx-control-statements/components";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel, GlobalCommandRunner, RemotesModel } from "../../../model/model";
|
||||
import * as T from "../../../types/types";
|
||||
import { Modal, TextField, InputDecoration, Dropdown, PasswordField, Tooltip } from "../common";
|
||||
import { Modal, TextField, InputDecoration, Dropdown, PasswordField, Tooltip } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
|
||||
import "./editremoteconn.less";
|
||||
|
@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
|
||||
import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../../model/model";
|
||||
import { SettingsError, Modal, Dropdown } from "../common";
|
||||
import { SettingsError, Modal, Dropdown } from "../elements";
|
||||
import { LineType, RendererPluginType } from "../../../types/types";
|
||||
import { PluginModel } from "../../../plugins/plugins";
|
||||
import { commandRtnHandler } from "../../../util/util";
|
||||
|
@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner, TabColors, TabIcons, Screen } from "../../../model/model";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, Modal, Dropdown, Tooltip } from "../common";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, Modal, Dropdown, Tooltip } from "../elements";
|
||||
import { RemoteType } from "../../../types/types";
|
||||
import * as util from "../../../util/util";
|
||||
import { commandRtnHandler } from "../../../util/util";
|
||||
|
@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
|
||||
import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel, GlobalCommandRunner, Session } from "../../../model/model";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, InfoMessage, Modal } from "../common";
|
||||
import { Toggle, InlineSettingsTextEdit, SettingsError, InfoMessage, Modal } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
import { commandRtnHandler } from "../../../util/util";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../../model/model";
|
||||
import { Modal, TextField, InputDecoration, Tooltip } from "../common";
|
||||
import { Modal, TextField, InputDecoration, Tooltip } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
import { Screen } from "../../../model/model";
|
||||
import { ReactComponent as SquareIcon } from "../../assets/icons/tab/square.svg";
|
||||
|
@ -5,7 +5,7 @@ import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../../model/model";
|
||||
import { Toggle, Modal, Button } from "../common";
|
||||
import { Toggle, Modal, Button } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
import { ClientDataType } from "../../../types/types";
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner, RemotesModel } from "../../../model/model";
|
||||
import * as T from "../../../types/types";
|
||||
import { Modal, Tooltip, Button, Status } from "../common";
|
||||
import { Modal, Tooltip, Button, Status } from "../elements";
|
||||
import * as util from "../../../util/util";
|
||||
import * as textmeasure from "../../../util/textmeasure";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, RemotesModel, GlobalCommandRunner } from "../../model/model";
|
||||
import { Button, IconButton, Status, ShowWaveShellInstallPrompt } from "../common/common";
|
||||
import { Button, Status, ShowWaveShellInstallPrompt } from "../common/elements";
|
||||
import * as T from "../../types/types";
|
||||
import * as util from "../../util/util";
|
||||
import * as appconst from "../appconst";
|
||||
|
1300
src/app/connections_deprecated/connections.tsx
Normal file
1300
src/app/connections_deprecated/connections.tsx
Normal file
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ import dayjs from "dayjs";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||
import { Line } from "../line/linecomps";
|
||||
import { CmdStrCode } from "../common/common";
|
||||
import { CmdStrCode } from "../common/elements";
|
||||
import { checkKeyPressed, adaptFromReactOrNativeKeyEvent } from "../../util/keyutil";
|
||||
|
||||
import { ReactComponent as FavoritesIcon } from "../assets/icons/favourites.svg";
|
||||
|
@ -23,7 +23,7 @@ import type {
|
||||
import cn from "classnames";
|
||||
|
||||
import type { LineContainerModel } from "../../model/model";
|
||||
import { renderCmdText } from "../common/common";
|
||||
import { renderCmdText } from "../common/elements";
|
||||
import { SimpleBlobRenderer } from "../../plugins/core/basicrenderer";
|
||||
import { IncrementalRenderer } from "../../plugins/core/incrementalrenderer";
|
||||
import { TerminalRenderer } from "../../plugins/terminal/terminal";
|
||||
|
@ -7,7 +7,7 @@ import * as mobx from "mobx";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { GlobalModel } from "../../model/model";
|
||||
import { PluginModel } from "../../plugins/plugins";
|
||||
import { Markdown } from "../common/common";
|
||||
import { Markdown } from "../common/elements";
|
||||
|
||||
import { ReactComponent as XmarkIcon } from "../assets/icons/line/xmark.svg";
|
||||
|
||||
@ -22,7 +22,7 @@ class PluginsView extends React.Component<{}, {}> {
|
||||
|
||||
renderPluginIcon(plugin): any {
|
||||
let Comp = plugin.iconComp;
|
||||
return <Comp/>;
|
||||
return <Comp />;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -19,7 +19,7 @@ import { ReactComponent as SettingsIcon } from "../assets/icons/settings.svg";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
import { GlobalModel, GlobalCommandRunner, Session, VERSION } from "../../model/model";
|
||||
import { isBlank, openLink } from "../../util/util";
|
||||
import { ResizableSidebar } from "../common/common";
|
||||
import { ResizableSidebar } from "../common/elements";
|
||||
import * as constants from "../appconst";
|
||||
|
||||
import "./sidebar.less";
|
||||
|
@ -12,7 +12,7 @@ import { Prompt } from "../../common/prompt/prompt";
|
||||
import { TextAreaInput } from "./textareainput";
|
||||
import { If, For } from "tsx-control-statements/components";
|
||||
import type { OpenAICmdInfoChatMessageType } from "../../../types/types";
|
||||
import { Markdown } from "../../common/common";
|
||||
import { Markdown } from "../../common/elements";
|
||||
import { checkKeyPressed, adaptFromReactOrNativeKeyEvent } from "../../../util/keyutil";
|
||||
|
||||
@mobxReact.observer
|
||||
|
@ -11,7 +11,7 @@ import dayjs from "dayjs";
|
||||
import type { RemoteType, RemoteInstanceType, RemotePtrType } from "../../../types/types";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
import { GlobalModel, GlobalCommandRunner, Screen } from "../../../model/model";
|
||||
import { renderCmdText } from "../../common/common";
|
||||
import { renderCmdText } from "../../common/elements";
|
||||
import { TextAreaInput } from "./textareainput";
|
||||
import { InfoMsg } from "./infomsg";
|
||||
import { HistoryInfo } from "./historyinfo";
|
||||
|
@ -10,16 +10,24 @@ import { If, For } from "tsx-control-statements/components";
|
||||
import cn from "classnames";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import dayjs from "dayjs";
|
||||
import { GlobalCommandRunner, TabColors, TabIcons, ForwardLineContainer, GlobalModel, ScreenLines, Screen, Session } from "../../../model/model";
|
||||
import {
|
||||
GlobalCommandRunner,
|
||||
TabColors,
|
||||
TabIcons,
|
||||
ForwardLineContainer,
|
||||
GlobalModel,
|
||||
ScreenLines,
|
||||
Screen,
|
||||
Session,
|
||||
} from "../../../model/model";
|
||||
import type { LineType, RenderModeType, LineFactoryProps } from "../../../types/types";
|
||||
import * as T from "../../../types/types";
|
||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||
import { Button } from "../../common/common";
|
||||
import { Button, TextField, Dropdown } from "../../common/elements";
|
||||
import { getRemoteStr } from "../../common/prompt/prompt";
|
||||
import { Line } from "../../line/linecomps";
|
||||
import { LinesView } from "../../line/linesview";
|
||||
import * as util from "../../../util/util";
|
||||
import { TextField, Dropdown } from "../../common/common";
|
||||
import { ReactComponent as EllipseIcon } from "../../assets/icons/ellipse.svg";
|
||||
import { ReactComponent as Check12Icon } from "../../assets/icons/check12.svg";
|
||||
import { ReactComponent as SquareIcon } from "../../assets/icons/tab/square.svg";
|
||||
|
@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
|
||||
import cn from "classnames";
|
||||
import { GlobalModel, GlobalCommandRunner, Screen } from "../../../model/model";
|
||||
import { ActionsIcon, StatusIndicator, CenteredIcon } from "../../common/icons/icons";
|
||||
import { renderCmdText } from "../../common/common";
|
||||
import { renderCmdText } from "../../common/elements";
|
||||
import { ReactComponent as SquareIcon } from "../../assets/icons/tab/square.svg";
|
||||
import * as constants from "../../appconst";
|
||||
import { Reorder } from "framer-motion";
|
||||
|
@ -5,7 +5,7 @@ import * as React from "react";
|
||||
import * as T from "../../types/types";
|
||||
import Editor, { Monaco } from "@monaco-editor/react";
|
||||
import type * as MonacoTypes from "monaco-editor/esm/vs/editor/editor.api";
|
||||
import { Markdown } from "../../app/common/common";
|
||||
import { Markdown } from "../../app/common/elements";
|
||||
import { GlobalModel, GlobalCommandRunner } from "../../model/model";
|
||||
import Split from "react-split-it";
|
||||
import loader from "@monaco-editor/loader";
|
||||
|
@ -6,7 +6,7 @@ import * as mobx from "mobx";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import * as T from "../../types/types";
|
||||
import { sprintf } from "sprintf-js";
|
||||
import { Markdown } from "../../app/common/common";
|
||||
import { Markdown } from "../../app/common/elements";
|
||||
|
||||
import "./markdown.less";
|
||||
|
||||
@ -17,7 +17,13 @@ const DefaultMaxMarkdownWidth = 1000;
|
||||
|
||||
@mobxReact.observer
|
||||
class SimpleMarkdownRenderer extends React.Component<
|
||||
{ data: T.ExtBlob; context: T.RendererContext; opts: T.RendererOpts; savedHeight: number, lineState: T.LineStateType },
|
||||
{
|
||||
data: T.ExtBlob;
|
||||
context: T.RendererContext;
|
||||
opts: T.RendererOpts;
|
||||
savedHeight: number;
|
||||
lineState: T.LineStateType;
|
||||
},
|
||||
{}
|
||||
> {
|
||||
markdownText: OV<string> = mobx.observable.box(null, { name: "markdownText" });
|
||||
@ -74,7 +80,10 @@ class SimpleMarkdownRenderer extends React.Component<
|
||||
maxHeight: opts.maxSize.height,
|
||||
}}
|
||||
>
|
||||
<Markdown text={this.markdownText.get()} style={{ maxHeight: opts.maxSize.height, maxWidth: DefaultMaxMarkdownWidth }} />
|
||||
<Markdown
|
||||
text={this.markdownText.get()}
|
||||
style={{ maxHeight: opts.maxSize.height, maxWidth: DefaultMaxMarkdownWidth }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ import * as T from "../../types/types";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { PacketDataBuffer } from "../core/ptydata";
|
||||
import { Markdown } from "../../app/common/common";
|
||||
import { Markdown } from "../../app/common/elements";
|
||||
|
||||
import "./openai.less";
|
||||
|
||||
@ -207,7 +207,7 @@ class OpenAIRenderer extends React.Component<{ model: OpenAIRendererModel }> {
|
||||
<div
|
||||
style={{
|
||||
maxHeight: opts.maxSize.height,
|
||||
paddingRight: 5
|
||||
paddingRight: 5,
|
||||
}}
|
||||
>
|
||||
<Markdown text={message} style={{ maxHeight: opts.maxSize.height }} />
|
||||
@ -236,18 +236,18 @@ class OpenAIRenderer extends React.Component<{ model: OpenAIRendererModel }> {
|
||||
let cmd = model.rawCmd;
|
||||
let styleVal: Record<string, any> = null;
|
||||
if (model.loading.get() && model.savedHeight >= 0 && model.isDone) {
|
||||
styleVal = {
|
||||
styleVal = {
|
||||
height: model.savedHeight,
|
||||
maxHeight: model.opts.maxSize.height
|
||||
maxHeight: model.opts.maxSize.height,
|
||||
};
|
||||
} else {
|
||||
let maxWidth = model.opts.maxSize.width
|
||||
if(maxWidth > 1000) {
|
||||
maxWidth = 1000
|
||||
let maxWidth = model.opts.maxSize.width;
|
||||
if (maxWidth > 1000) {
|
||||
maxWidth = 1000;
|
||||
}
|
||||
styleVal = {
|
||||
styleVal = {
|
||||
maxWidth: maxWidth,
|
||||
maxHeight: model.opts.maxSize.height
|
||||
maxHeight: model.opts.maxSize.height,
|
||||
};
|
||||
}
|
||||
let version = model.version.get();
|
||||
|
@ -11,6 +11,9 @@ type RemoteStatusTypeStrs = "connected" | "connecting" | "disconnected" | "error
|
||||
type LineContainerStrs = "main" | "sidebar" | "history";
|
||||
|
||||
type OV<V> = mobx.IObservableValue<V>;
|
||||
type OArr<V> = mobx.IObservableArray<V>;
|
||||
type OMap<K, V> = mobx.ObservableMap<K, V>;
|
||||
type CV<V> = mobx.IComputedValue<V>;
|
||||
|
||||
type SessionDataType = {
|
||||
sessionid: string;
|
||||
@ -811,6 +814,7 @@ export type {
|
||||
CmdInputTextPacketType,
|
||||
OpenAICmdInfoChatMessageType,
|
||||
ScreenStatusIndicatorUpdateType,
|
||||
OV,
|
||||
};
|
||||
|
||||
export { StatusIndicatorLevel };
|
||||
|
Loading…
Reference in New Issue
Block a user