Commit Graph

1343 Commits

Author SHA1 Message Date
Evan Simkowitz
d3e821af1c
Remove different padding for first tab 2024-01-18 11:11:04 -08:00
sawka
467664af85 don't try to set readonly variables 2024-01-18 11:00:13 -08:00
Sylvia Crowe
0feaa57662 add two readonly variables to the ZshIgnoreVars
Readonly variables cannot be reset and attempting to do so causes errors
on my machine. The `keymaps` and `widgets` variables caused problems, so
they have been added to the list of variables to ignore.
2024-01-18 10:50:26 -08:00
sawka
6ea70ff788 build-universal updates to work with new aws s3 version of build-helper 2024-01-17 20:04:27 -08:00
sawka
f8e2aadf98 update build-helper (quotes) 2024-01-17 19:49:00 -08:00
sawka
f21a9e2aa1 update to build-helper (debug aws) 2024-01-17 18:32:17 -08:00
sawka
13d3d3a180 upload build-helper builds to aws s3 as github artifacts are painfully slow to download 2024-01-17 17:51:50 -08:00
Evan Simkowitz
5216f58e2f
Tweak the color of the output status indicator, adjust the placement of the tab end-icons a bit (#236)
* 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
2024-01-17 17:25:57 -08:00
Mike Sawka
7b9287316d
touchups to UI for AI chat feature (#237) 2024-01-17 15:39:24 -08:00
sawka
781ed2e57e updated build-helper.yml 2024-01-17 14:52:49 -08:00
Evan Simkowitz
4ac5d93ed2
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.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-01-17 10:07:01 -08:00
sawka
a7afefc340 update build-helper.yml (single artifact with all builds) 2024-01-16 22:35:17 -08:00
sawka
fc12dcac2f update build-helper.yml (use local scripthaus) 2024-01-16 22:05:45 -08:00
sawka
aeacfb094e update build-helper.yml (go workspace) 2024-01-16 22:02:20 -08:00
sawka
14da9b76e0 update build-helper.yml 2024-01-16 21:56:40 -08:00
sawka
2f32d89b85 update build-helper.yml 2024-01-16 21:47:05 -08:00
Evan Simkowitz
2e3e07d24b
Update to latest CodeQL workflow actions (#235) 2024-01-16 21:34:22 -08:00
sawka
e2d0664901 split workflow steps 2024-01-16 21:27:49 -08:00
sawka
5638e7857b add go mod download 2024-01-16 21:09:02 -08:00
sawka
6c9dbabd56 reorder job steps 2024-01-16 21:01:36 -08:00
sawka
13cd9dfe50 bump to version v0.6.0, testing linux in build workflow 2024-01-16 20:37:46 -08:00
Evan Simkowitz
6fa799daf5
Add ref to filter out downloads due to upgrade notification (#233) 2024-01-16 16:11:37 -08:00
Mike Sawka
422338c04b
zsh support (#227)
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
2024-01-16 16:11:04 -08:00
Red J Adaya
76988a5277
"Escape" should close/cancel most modals (#229)
* init

* client settings view

* close and escape support for connections view

* close and escape support for clientsettings view
2024-01-15 12:16:46 -08:00
Red J Adaya
da69c0411d
Move the Client Settings Modal into its own "main view" (#226)
* 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
2024-01-15 12:08:58 -08:00
Evan Simkowitz
ff65a3f042
Bump electron to version 28 (#225)
* Bump electron to version 28

* update electron-forge
2024-01-11 19:08:17 -08:00
Evan Simkowitz
d431ac1ecf
Upgrade to Typescript 5, along with a bunch of other minor bumps (#224)
* Bump electron and dependencies

* upgrade typescript and webpack

* upgrade remaining outdated

* bump node types
2024-01-11 18:57:15 -08:00
dependabot[bot]
f8024799ed
Bump follow-redirects from 1.15.3 to 1.15.4 (#222)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 18:31:07 -08:00
Evan Simkowitz
ebdf8b5aee
Remove unused and unmaintained react-json-view (#223) 2024-01-11 18:28:21 -08:00
Evan Simkowitz
ed2a345555
Add support for opening web links in the default browser (#221)
* Add support for opening web links in the default browser

* require modifier key to click

* undo emain change

* remove newline
2024-01-11 17:49:13 -08:00
Cole Lashley
ea3be8115a
Chat GPT Command Info Chat (#207)
* 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
2024-01-11 17:34:23 -08:00
Red J Adaya
077cb2be03
Split up modals.tsx file (#220)
* 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
2024-01-11 09:42:03 -08:00
Red J Adaya
8f39f0fc5e
Add a modal confirmation before installing WaveShell (#212)
* 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
2024-01-10 15:00:18 -08:00
Sylvie Crowe
00e709d515
reload ssh config files when importing them (#219)
The ssh_config library only loaded the config data the first time
certain functions are used. After that, cached values are used instead.
This library has been updated in a fork to add a method that allows the
configuration files to be reloaded. This update takes advantage of that
change so the config files can be updated without restarting waveterm.
2024-01-09 18:04:19 -08:00
Sylvie Crowe
c2a894b280
SSH Configuration Import Alert Modal (#218)
* 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
2024-01-09 16:13:23 -08:00
Mike Sawka
fad48b0d09
bind cmd-w to delete a screen (with a confirm message). also fix 'esc' so it closes the alert modal with a 'cancel' (#215) 2024-01-08 22:59:17 -08:00
Mike Sawka
8ac1943d56
Add Icon / HotKey to Delete Line (Cmd-D) (#214)
* 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)
2024-01-08 22:58:32 -08:00
Red J Adaya
f6a6068674
Connection Screen Terminal "Flash" Making it Impossible to Enter Manual Passwords (#217)
* fix flashing view modal

* cleanup

* fix name typo, also unset setRecentConnAdded once the modal is open
2024-01-08 22:56:49 -08:00
Sylvie Crowe
e1e5b67ff6
I18n fixes (#211)
* 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.
2024-01-08 18:31:17 -08:00
sawka
0bb80b6a74 run both mac builds 2024-01-08 00:35:38 -08:00
sawka
631a0867aa fix go cache dependency 2024-01-08 00:28:54 -08:00
sawka
5bd7f73746 updates to build workflow 2024-01-08 00:12:07 -08:00
sawka
ed1dff320d upload build artifact 2024-01-07 23:58:46 -08:00
Mike Sawka
7f91efc314
working on a macos x86 build workflow (#216)
must check in to main to test
2024-01-07 23:48:10 -08:00
sawka
f737c2af86 add autofocus prop to button 2024-01-07 00:30:25 -08:00
Sylvie Crowe
8cbee1e1c3
Allow dots in alias and add port to canonical name (#209)
* allow numerical start and allow dots in ssh alias

We previously restricted the ssh alias to start with an
alphabetic character and did not allow dots within it. This caused
problems with users wanting to use an ip address as an alias. This lifts
that restriction so both can freely be used.

Note that while it is common to use the hostname as the alias, hostnames
are not allowed to use the underscore character. However, we do allow
the alias to contain an underscore. I do not think we can remove this
from aliases now but it is something to watch out for in the future.

* allow backslash in username

This involved converting the regexp string into a raw string to able to
use the backslash character. this is important.

* Revert "allow backslash in username"

This reverts commit cafe281241. Upon
reflection, more time is needed to evaluate that this actually corrects
the issue. It will be performed with proper diligence at a later time.

* add port to end of canoncial names when not 22

The canonical name is the identifying key in the database, so it causes
problems if another remote entry has the same canonical name. By adding
the port number to the end of this, it is possible to differentiate the
two.

* add db migrations for adding port to canonicalname

The up migration adds the port to the existing canonical id if it exists
and is not 22. The down migration strips the port off the canonical name
and deletes extra remotes with the same canonical name. If all remotes
with that canonical name have been archived, it keeps the first one
added to the database. If any have not been archived, it keeps the first
added to the database from the non-archived group.

* remove ability to edit port number via ssh import

Previously, ssh imports could edit the port number since it was possible
to change them in the config file without changin the canonical name.
Now that the canonical name contains the port, a change in the port will
simply create a new database entry. For this reason, the ability to
modify the ssh port is dead code and has been removed.

* allow backslash in username

This involved converting the regexp string into a raw string to able to
use the backslash character. this is important.

* simplify up migration logic

The previous up migration was suboptimal because it was accounting for a
corner case not found in production. That case no longer needs to be
considered, so the procedure was simplified.
2024-01-04 10:16:26 -08:00
Red J Adaya
b2a1bb3818
When client is disconnected change log to show last 50 lines of wavesrv.log (#210)
* 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
2024-01-04 10:13:40 -08:00
Sylvie Crowe
d1319c0a2c
Fix Commands that Require Quoted Paths (#198)
* fix commands that require quoted paths

Several commands did not wrap the path in quotes which caused problems
when attempting to store the waveterm installation in a place that had a
space in the path. This corrects this in the particular case where the
username does not have spaces but the path to the executable does.

Note: the case of a user name having spaces has not been tested but
likely does not work.

* fix logging problem for wavesrv

A previous fix replaced the getWaveSrvCmd with getWaveSrvPath. This
needs to be getWaveSrvCmd to enable logging.

* fix variable name
2023-12-30 22:52:30 -08:00
Red J Adaya
2c9272e3a7
fix tabs scrollbar jump (#203) 2023-12-30 22:42:46 -08:00
Red J Adaya
452836bffc
Cmd-P feature -- Quick Tab Selector (#200)
* register cmd+p shortcut

* tab switcher modal

* initial implementation

* tab switcher modal content

* fix styles

* fix scroll bugs

* set selected index when clicking option

* hover effect for options

* switch when Enter key is pressed

* remove fuse.js

* only use switchscreen for switching sessions and tabs

* var naming changes

* fix multiple focused options on mouse hover

* fix duplicate focused options and scrollbar

* clean imports

* fix wrong function name

* merge color styles in app.less

* remove debugging code

* use For component when iterating thru options

* minor style fix

* remove mouse interaction, keep focusedIdx in bounds, increase max number of tabs shown, small layout adjustment for big tab names (and more space for icon)
2023-12-30 22:34:05 -08:00