* font updates, settings modals, tabs, change base font.
* aichat responses
* fix updatemodel errors/warnings. more font inconsistencies
* history fixes
* more fixups, fix some warnings, text/font updates for various subsystems
* Add delimiters to screen tab, make active gradient a translucent mask
* make delimiter slightly shorter
* move end icon a bit to provide more separation
* fix zindex for tab contents
* fix magic layout
* make the tabs closer to the width they used to be
* termfontsize-sm (for meta1). add some small margin. remove rootIndicator. switch cwd/remote to red if root
* break LineHeader out into its own react component
* actual set our --term colors as the *theme* for xtermjs
* move line-actions into its own div (absolute position). hover/background colors
* add duration, format renderer, spacing, remove meta-wrap
* simplify cmdtext output. simpler multi-line rendering.
* adjust position/height of line actions for better interaction with long lines
* fix horiz scrolling
* remove unused
* quick fix for text lines
* remove [local] from prompt, remove prompt icons, restore --term vars (remove --prompt vars)
* working on prompt colors, cmdtext
* more generous padding around commands (and cmdinput)
* fix cmdinput background color
* fixes for cmdinput info box
* Fix logo not being visible in auxiliary views when sidebar is collapsed
* Refactor auxiliary views into MainView component
* fix contents formatting
* Need a better-centered version of the logo for the sidebar
* Add logo back to the sidebar
* revert root.less change
* Fix regressions from last pr
* zero out subtractor if sidebar is collapsed
* remove unnecessary var
* clean up emain
* add restart on disable auto update
* save work
* add zip
* save
* fix zip command
* make build-universal more generic
* clean up script
* fix autoupdate config
* update feed
* fix update feed path
* switch to custom update flow
* show notification
* remove enum
* test change
* debug sidebar
* save work
* remove weird import
* remove listeners if present
* save debug
* fixed banner
* fix sending of appupdatestatus, add comments
* Change to primary feed
* more comments, less debugs
* rename to app update
* code cleanup, add fireAndForget
* update paths for objects
* MonoFontSize type, add label font, theme vars for sidebar
* fix line-height for tabs
* experiment with variable label font
* lato font, fix open ai fonts, fix cmdinput font
* updates for historyinfo
* cmdinput history fixups, scrollbars
* work with scrollbars
* create another drag region at the end of the tabs bar
* updates for header -- change title drag area, fix corner rounding, tabs spacing, etc.
* css variables for sidebar
* type
* line css vars
* lines css vars
* bookmarks css vars
* clientsettings css vars
* button.less css vars
* checkbox.less css vars
* cmdstrcode.less css vars
* dropdown.less css vars
* markdown css vars
* status css vars
* convert all hex colors to rgb color
* textfield css vars
* toggle css vars
* tooltip css vars
* statusindicator css vars
* about modal css vars
* disconnected modal css vars
* editremoteconn modal css vars
* linesettings modal css vars
* tos modal css vars
* viewremoteconndetail modal css vars
* prompt css vars
* connections view css vars
* add colors comments
* history view css vars
* cmdinput css vars
* cmdinput css vars
* screenview css vars
* convert less vars to css vars
* undo awkward backgrounds, transparencies, etc. hope to sharpen up the active blocks and the grey/transparent backgrounds were getting in the way
* block UI and cmdinput UI overhaul
* updates for cmdinput spacing, input-sep fonts
* remove nth-child special case, fix sidebar margins
* sidebar styles
* bring back selected line
* codeedit fixes for layout / colors
* reorganize line styles, split lines.less into lines.less and line.less
* switch everyone to use termFontSize getter (easier to find usages)
* better font-family font-size update logic
* update line styles, clean up more
* replace icons, fix line heights
* make paddings/margins more consistent
* fix more margins, make command completions use termfontfamily
* updates for cmdinput margins, font sizes, etc.
* fix more font sizes and margins (mostly command input)
* add comment
* testing hack font
* updates to allow font to be variable
* allow setting of font-family. get initial font family from electron (needed for loading)
* add termfontfamily
* update wave logos for README
* hook up fontfamily setting, remove old dropdown active var
* get app to reload on font change. reload fonts
* on termfontsize change, bump render version as well
* font loading fix#302
* fix inconsistent paddings. issue was that the first '[' feels indented (because of the fixed with font). applying a negative 2px margin fixes it and allows us to remove the paddings on the other elements.
* Break update code out of sstore
* add license disclaimers
* missed one
* add another
* fix regression in openai updates, remove unnecessary functions
* another copyright
* update casts
* fix issue with variadic updates
* remove logs
* remove log
* remove unnecessary log
* save work
* moved a bunch of stuff to scbus
* make modelupdate an object
* fix new screen not updating active screen
* add comment
* make updates into packet types
* different cast
* update comments, remove unused methods
* add one more comment
* add an IsEmpty() on model updates to prevent sending empty updates to client
* feat: parse multiple identity files in ssh
While this does not make it possible to discover multiple identity files
in every case, it does make it possible to parse them individually and
check for user input if it's required for each one.
* chore: remove unnecessary print in updatebus.go
* chore: remove unnecessary print in sshclient.go
* chore: remove old publicKey auth check
With the new callback in place, we no longer need this, so it has been
removed.
* refactor: move logic for wave and config options
The logic for making decisions between details made available from wave
and details made available from ssh_config was spread out. This change
condenses it into one function for gathering those details and one for
picking between them.
It also adds a few new keywords but the logic for those hasn't been
implemented yet.
* feat: allow attempting auth methods in any order
While waveterm does not provide the control over which order to attempt
yet, it is possible to provide that information in the ssh_config. This
change allows that order to take precedence in a case where it is set.
* feat: add batch mode support
BatchMode turns off user input to enter passwords for ssh. Because we
save passwords, we can still attempt these methods but we disable the
user interactive prompts in this case.
* fix: fix auth ordering and identity files
The last few commits introduced a few bugs that are fixed here. The
first is that the auth ordering is parsed as a single string and not a
list. This is fixed by manually splitting the string into a list. The
second is that the copy of identity files was not long enough to copy
the contents of the original. This is now updated to use the length of
the original in its construction.
* deactivate timer while connecting to new ssh
The new ssh setup handles timers differently from the old one due to the
possibility of asking for user input multiple times. This limited the
user input to entirely be done within 15 seconds. This removes that
restriction which will allow those timers to increase. It does not
impact the legacy ssh systems or the local connections on the new
system.
* merge branch 'main' into 'ssh--auth-control'
This was mostly straightforward, but it appears that a previous commit
to main broke the user input modals by deleting a function. This adds
that back in addition to the merge.
* fix: allow 60 second timeouts for ssh inputs
With the previous change, it is now possible to extend the timeout for
manual inputs. 60 seconds should be a reasonable starting point.
* fix: change size of dummy key to 2048
This fixes the CodeQL scan issue for using a weak key.
* working on easy global shortcut for wave
* globalshortcut setting working
* cmd for macos, alt for others
* re-remove types.ts (was added back during merge)
* rename DDItem to DropdownItem, put into custom.d.ts
* make some consts
* declare types as global
* remove mobx types aliases
* put back model_old.ts
* remove types.ts
* add main screens to Cmd-P search
* make viewData optional
* minor hint fix
* address improvements suggested by evan
* more on let to const
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.
* 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.
* split settings modals
* init
* init
* remove styles not related to checkbox
* remove styles not related to CmdStrCode
* renderCmdText doesn't need styles
* remove styles not related to dropdown
* IconButton doesn't need styles because it extends Button
* remove old connections
* InfoMessage conmponent no longer needed
* fix import error
* remove styles not related to InlineSettingsTextEdit
* remove styles not related to InputDecoration
* LinkButton doesn't need styles cos it's extends Button component
* remove styles not related to markdown
* remove styles not related to modal
* NumberField doesn't need styles cos it extends TextField
* remove styles not related to PasswordField
* RemoteStatusLight no longer used. It's replaced by Status component.
* remove styles not related to ResizableSidebar
* SettingsError doesn't need styles cos it uses classnames in app.less
* remove styles not related to Status
* remove styles not related to TextField
* remove styles not related to Toggle
* remove styles not related to Tooltip
* init
* cleanup bookmarks model
* cleanup clientsettingsview model
* cleanup cmd model
* remove dayjs import from bookmarks model
* cleanup commandrunner model
* cleanup historyview model
* cleanup input model
* cleanup linecontainer model
* cleanup mainsidebar model
* cleanup main model
* cleanup plugins model
* cleanup remote model
* cleanup screen model
* cleanup screenlines model
* cleanup session model
* cleanup screenlinecontainer model
* cleanup connectionsview model
* add index.ts inside model dir
* replace /model_old imports with /model
* rename model to models
* move model_old to models
* fix ptyDataSource errors
* split models/model
* split settings modals
* init
* init
* remove styles not related to checkbox
* remove styles not related to CmdStrCode
* renderCmdText doesn't need styles
* remove styles not related to dropdown
* IconButton doesn't need styles because it extends Button
* remove old connections
* InfoMessage conmponent no longer needed
* fix import error
* remove styles not related to InlineSettingsTextEdit
* remove styles not related to InputDecoration
* LinkButton doesn't need styles cos it's extends Button component
* remove styles not related to markdown
* remove styles not related to modal
* NumberField doesn't need styles cos it extends TextField
* remove styles not related to PasswordField
* RemoteStatusLight no longer used. It's replaced by Status component.
* remove styles not related to ResizableSidebar
* SettingsError doesn't need styles cos it uses classnames in app.less
* remove styles not related to Status
* remove styles not related to TextField
* remove styles not related to Toggle
* remove styles not related to Tooltip
* wip
* integrate original sidebar content
* ResizableSidebar component
* trigger toggleCollapse
* remove debugging code
* minor refactor. disable text select on mousemove
* replace icons with fontawesome icons. fix alignment issues
* fix session view width when tabs overflow
* prevent index and icon from shifting when resizing
* snap effect
* minor refactor
* apply collapsed mode to sidebar contents
* change default width to 240px
* backend implementation
* fix wrong subcmd
* save collapsed state
* retore sidebar state on reload/launch
* use collapse data form db on first load. use previously saved width on expand.
* persist width as well collapse state
* various fixes and improvements
* bind methods
* refactor
* more refactor
* fix minor bug
* fix merge issues
* various fixes
* refactor
* fixes
* fix issues
* fix all issues
* resolve undefind tempWidth
* fix toggleCollapsed
* use Promise in stopResizing method
* use tempCollapsed to for real time toggling between logos
* minor method name change
* refactor
* remove debugging code
* fix conflict
* fix setting collapsed state via CLI
* minor refactor
* remove debugging code
* create setTempWidthAndTempCollapsed method
* handle invalid width set via cli
* refactor: setbycli not actually needed
* remove unused code
* add status-indicator-visible
* save
* save
* Prevent the status indicator flickering for quick returns
* flx regression
* reduce delay, reset spinnerVisible when there's no more running commands
* clean up code reuse
* move code around
* slight optimizations to prevent rendering before spinner is visible
* rename var
* revert shouldSync change as it broke the sync
* set animation startTime to sync spinners for status indicators
* catch animationstart (hover interaction) to restart startTime.
* use const
---------
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
* save
* not working yet but close
* logic is working, just need to do styling
* save work
* save
* save work
* ta da!
* fix line height
* format files
* remove running commands on hangup. also don't allow numrunning to be less than 0
* remove < 0 check (safer without for concurrency)
* working on cmd restart logic
* button to restart command
* bind Cmd-R to restart selected command, and Cmd-Shift-R to restart last command. Browser Refresh is now Option-R. also fix 'clear' command to not delete running commands (like archive). some small changes to keyboard utility code to always set 'alt' and 'meta' appropriately. use 'cmd' and 'option' for crossplatform bindings
* focus restarted line
* update termopts, use current winsize to set termopts for new command
* add cmd.restartts to track restart time
* display restarted time in line w/ tooltip with original time
* add restartts to line:show
* first pass of copy file
* first pass fixing up function
* first pass fixing key press
* fixed up key press parsing
* reverted cmdrunner.go
* fixed cmdrunner.go again :p
* fixed cmdrunner again lol
* Add job status indicators to tabs within a workspace (#232)
Adds job status indicators that will show any updates to running commands while you are focused away from a tab. These will show up as status icons in the tab view.
These indicators will reset for a given tab when you focus back to it.
I've updated the inner formatting of the tab to use flexboxes, allowing the title to display more text when there are no icons to display.
Also includes some miscellaneous for-loop pattern improvements in model.ts and removing of unused variables, etc.
* first pass fixing key press
* added key util check file
* addressed rebase artifacts
* fixed more rebase artifacts
* fixed keybindings
* removed log
* fixed a ton of rebase artifacts
* fixed a ton of rebase artifacts
* added cmd maps to altKey if not on macos
* fixed platform check code and fixed some small bugs
* save work
* refactor end-icon and actions-icon into separate components
* reverting change part 1
* fix
* separate out workspace and tab formatting more
* save work
* Got it working!
* fix scrollbar but hide it so that the formatting doesn't jump when hovering
* revert some changes, replace some svgs with fontawesome
* remove listitem
* remove log
* Tweak the color of the output status indicator, adjust the placement of the tab end-icons a bit
* adjust the margins a bit more
* a few more slight adjustments to even out the spacing
* save work
* fix nullref, some smaller tweaks to the front icon
* made the tab slightly smaller so that the ratios made more sense
* remove unnecessary width
* format fix
Adds job status indicators that will show any updates to running commands while you are focused away from a tab. These will show up as status icons in the tab view.
These indicators will reset for a given tab when you focus back to it.
I've updated the inner formatting of the tab to use flexboxes, allowing the title to display more text when there are no icons to display.
Also includes some miscellaneous for-loop pattern improvements in model.ts and removing of unused variables, etc.
---------
Co-authored-by: sawka <mike.sawka@gmail.com>
adds zsh support to waveterm. big change, lots going on here. lots of other improvements and bug fixes added while debugging and building out the feature.
Commits:
* refactor shexec parser.go into new package shellenv. separate out bash specific parsing from generic functions
* checkpoint
* work on refactoring shexec. created two new packages shellapi (for bash/zsh specific stuff), and shellutil (shared between shellapi and shexec)
* more refactoring
* create shellapi interface to abstract bash specific functionality
* more refactoring, move bash shell state parsing to shellapi
* move makeRcFile to shellapi. remove all of the 'client' options CLI options from waveshell
* get shellType passed through to server/single paths for waveshell
* add a local shelltype detector
* mock out a zshapi
* move shelltype through more of the code
* get a command to run via zsh
* zsh can now switch directories. poc, needs cleanup
* working on ShellState encoding differences between zsh/bash. Working on parsing zsh decls. move utilfn package into waveshell (shouldn't have been in wavesrv)
* switch to use []byte for vardecl serialization + diffs
* progress on zsh environment. still have issues reconciling init environment with trap environment
* fix typeset argument parsing
* parse promptvars, more zsh specific ignores
* fix bug with promptvar not getting set (wrong check in FeState func)
* add sdk (issue #188) to list of rtnstate commands
* more zsh compatibility -- working with a larger ohmyzsh environment. ignore more variables, handle exit trap better. unique path/fpath. add a processtype variable to base.
* must return a value
* zsh alias parsing/restoring. diff changes (and rtnstate changes). introduces linediff v1.
* force zmodload of zsh/parameter
* starting work on zsh functions
* need a v1 of mapdiff as well (to handle null chars)
* pack/unpack of ints was wrong (one used int and one use uint). turned out we only ever encoded '0' so it worked. that also means it is safe to change unpack to unpackUInt
* reworking for binary encoding of aliases and functions (because of zsh allows any character, including nulls, in names and values)
* fixes, working on functions, issue with line endings
* zsh functions. lots of ugliness here around dealing with line dicipline and cooked stty. new runcommand function to grab output from a non-tty fd. note that we still to run the actual command in a stty to get the proper output.
* write uuid tempdir, cleanup with tmprcfilename code
* hack in some simple zsh function declaration finding code for rtnstate. create function diff for rtnstate that supports zsh
* make sure key order is constant so shell hashes are consistent
* fix problems with state diffs to support new zsh formats. add diff/apply code to shellapi (moved from shellenv), that is now specific to zsh or bash
* add log packet and new shellstate packets
* switch to shellstate map that's also keyed by shelltype
* add shelltype to remoteinstance
* remove shell argument from waveshell
* added new shelltype statemap to remote.go (msh), deal with fallout
* move shellstate out of init packet, and move to an explicit reinit call. try to initialize all of the active shell states
* change dont always store init state (only store on demand). initialize shell states on demand (if not already initialized). allow reset to change shells
* add shellpref field to remote table. use to drive the default shell choice for new tabs
* show shelltag on cmdinput, pass through ri and remote (defaultshellstate)
* bump mshell version to v0.4
* better version validation for shellstate. also relax compatibility requirements for diffing states (shelltype + major version need to match)
* better error handling, check shellstate compatibility during run (on waveshell server)
* add extra separator for bash shellstate processing to deal with spurious output from rc files
* special migration for v30 -- flag invalid bash shell states and show special button in UI to fix
* format
* remove zsh-decls (unused)
* remove test code
* remove debug print
* fix typo
* init
* client settings view
* add some extra padding and a border below the header
* move settings-field classes under the main class to prevent conflicts
* fix style overrides
* first draft at ui
* first draft connecting openai to cmd info ui
* added more updates and added prompt engineering
* focus textarea on mount
* fix aichat layout issue
* added focus back to input after closing cmd info chat
* added ability to clear chat history, closes on command enter, better initial greeting message, and small things like user can refocus the help textarea by pressing ctrl + space again
* added a bunch of small upgrades
* added context for chatgpt info command
* added context to chatgpt cmd info command
* added ability to use arrow keys to grab code markdown
* added error handling as well as fixed the text area outline bug
* slightly changed the ui for selecting
* revamped ui and added correct scroll behavior
* changed ui, fixed up code block selection, some other small changes
* deep copied cmd info chat when we return
* added error checking and removed logs
* made deep copy code more clear
* prettier with the right version
* more prettier changes
* removed extraneous comment
* init
* diconnected and clientstop modals
* alert and createremoteconn modals
* tabswitcher, view and edit remoteconn modals
* migrate clientstop modal to Modal
* LinkButton
* import styles for createremoteconn modal
* import tabswitcher modal styles
* disable buttons while status is 'connecting'
* minor refactor
* apply changes to viewremoteconn modal from main
* init
* integrate showShellPrompt flag
* renive debugging code
* remove debugging code
* run gofmt. add migration files.
* remove debugging code
* remove migrations and adjust code. show prompt on import ssh configs as well.
* fix show/hide logic
* reset mmap.go
* use resolveBool and utilfn.ContainsStr
* make AlertModal take a generic 'confirmkey' instead of hard coding hideShellPrompt
* rename confirmkey to confirmflag (to be consistent). move confirmflag checking into the alertmodal. short circuit with Promise.resolve(true) if noConfirm checked.
* disable buttons while status is 'connecting'
* minor refactor
* add an alert modal for the sshconfig import button
When the sshconfig import button is pressed, there currently is no
visual indicator of what changed. This adds an alert modal to pop up
only in the case where the gui button is used.
* improve alert modal for sshconfig imports
The previous message for SSH configuration imports was vague and did not
provide detailed information as what happened during the import. This
clarifies that by specifying which remotes were deleted, created, and
updated. Updates are only ran and recorded if they would actually change
something.
* fix port value limiting
The SSH config import port limiting was correct but set off a warning in
linters. It has been updated to do the same behavior in a different way.
Also, port limiting was never added to manually adding a new remote.
This change adds it there as well.
* change user-facing term to connection
Previously, the ssh configuration alert modal used to use the word
"remote" to describe connections. "Remote" is the internal name but it
isn't consistent with what is being displayed to users. So it has been
replaced with "Connection" instead to match.
* change remote to connection for ssh import buttons
Like the previous change, the word "remote" was used instead of
"connection." This was for the tooltips added to connections that had
been imported in the connections menu.
* update one more remote -> connection
* work on cmd-d to delete a selected line
* call stoppropagation when code.tsx captures keyboard input
* finish up with line delete. add a trash icon to line. prevent delete when cmd is running (show error msg)
* remove byte sanitization for user commands
When serializing jsonBytes in packet.go::MarshalPacket, a step existed
that attempted to manually sanitize the bytes before sending them. This
was initially done to avoid invalid characters in json; however, go
should handle this for us. But this sanitization broke
internationalization because it excluded characters required for unicode
in other languages. Because of that, it has been removed.
* properly decode non-ascii on frontend
The functions atob and btoa do not convert base 64 to strings in the
expected way. The base64ToArray function handles it properly but other
cases do not. These other cases have been replaced with a helper
function that makes use of the base64-js package. This package has
already been included as a dependency of another package we use, but it
was added to the package.json file to make the inclusion explicit.
* automatically set/share LANG var with waveshell
Waveterm previously did not set the LANG environment variable which
caused problems for international users. On Linux, this is done
automatically, but it needs to be done manually on macos.
Even on linux, the wavesrv LANG variable is shared with waveshell to
ensure the same one is used on remotes.
* only set the lang var if not previously set
In order to prevent waveterm from overriding the lang var entirely, this
ensures that it is only manually determined if it hasn't previously been
set.
* use envMap instead of os to determine var
This is slightly more performant and relies more directly on our code
instead of external code.
* improved disconnected modal
* wrap pre with div
* make number of a lines param a constant
* revert app.tsx
* use tail command and capture the output instead
* reset TabSwitcherModal