Commit Graph

1466 Commits

Author SHA1 Message Date
Mike Sawka
a639d72e30
Packetparser Ignore Spurious Invalid Input at Beginning of Stream (#140)
* take a stab at fixing #99. ignore invalid output before we see a real packet.  the complication here was ensuring we always output a real packet in every flow so we don't actually lose valid errors.

* add ping packets to prime the parser (when in ignoreUntilValid mode)
2023-12-18 12:42:40 -08:00
sawka
ce252d479b fix id issue -- must use a unique id for tabs so we don't get collisions on real elements in the CSS 2023-12-18 00:16:57 -08:00
sawka
d8d19ea035 bump to version v0.5.2 2023-12-17 23:58:09 -08:00
Mike Sawka
21ab82e2e2
Implement a Sidebar for Tabs (#157)
* work on basic sidebar layout

* fix more golang warnings

* sidebar open/close

* add ability to set width of split

* sidebar add and remove, set width, etc.

* almost working sidebar implementation -- still needs height/width, input control, and bug with initial add, but getting there

* add isSidebarOpen() method

* fix resize jump -- must set width in error handler as well (before window is loaded)

* sidebar UI touchups and help

* more sidebar progress, render more like regular lines, just in the right column

* merge

* move migration to 26

* simplify sidebar types

* checkpoint

* proxy things through parent screen object for sidebar

* checkpoint, add/remove from sidebar

* work on add/remove icons for sidebar

* fix height calculation, remove close button

* bring back close button when no line is selected

* add sidebar flag to run command to run new command output in sidebar

* implement 'sidebar' kwarg in eval.  this lets sidebar work for slashcommands as well that produce lines (codeedit, mdview, etc.)

* prettier

* minor fixes

* working on resizing.  must exclude sidebar entries and send separate resize events based on size of sidebar (implement exclude / include for resize)

* fix sidebar terminal command resizing

* add sidebar header (toggles for half/partial width and close).  add hotkey to open/close sidebar (Cmd-Ctrl-S).  more robust calculation for sidebar width. add width validation.  minimum sidebar width is 200px.  other fixes, etc.
2023-12-17 23:46:53 -08:00
sawka
781ebe8154 add checking for latestversion (avoid potential error in semver.compareLoose) 2023-12-16 11:36:38 -08:00
sawka
ad225ed28a fix some ts errors in emain.ts 2023-12-16 10:59:30 -08:00
Mike Sawka
633cb8fbd0
fix openai packets to be PacketType. better compatibility with backend (#154)
also pass clientid to openapi cloud service
2023-12-15 22:43:59 -08:00
Cole Lashley
4ccd62f12a
Add support for proxying open AI chat completion through cloud (#148)
* wrote client code for communicating with lambda cloud

* Added timeout functionality, added check for telemetry enabled for clouod completion, added capability to unset token, other small fixes

* removed stale prints and comments, readded non stream completion for now

* changed json encode to json marshal, also testing my new commit author

* added no telemetry error message and removed check for model in cloud completion

* added defer conn.close() to doOpenAIStreamCompletion, so websocket is always closed

* made a constant for the long telemetry error message

* added endpoint getter, made errors better

* updated scripthaus file to include dev ws endpoint

* added error check for open ai errors

* changed bool condition for better readability

* update some error messages (use error message from server if returned)

* dont blow up the whole response if the server times out.  just write a timeout message

* render streaming errors with a new prompt in openai.tsx (show content and error).  render cmd status 'error' with red x as well.  show exitcode in tooltip of 'x'

* set hadError for errors.  update timeout error to work with new frontend code

* bump client timeout to 5 minutes (longer than server timeout)

---------

Co-authored-by: sawka
2023-12-15 22:20:03 -08:00
Evan Simkowitz
b733724c7d
Add sidebar banner when new release is available (#147)
* Server impl

* add update check setting

* add commands

* fix capitalization of commands

* apply suggestions

* add migration and fix backend bugs

* Add sidebar banner

* remove installedversion, add 5s timeout

* add icon, capture and log errors from release check

* missing return nil

* remove highlight

* remove commented less

* do not fail releasecheckoncommand if release check operation fails

* remove debug condition

* fix update on auto check, move banner display logic into frontend

* remove unnecessary import

* simplify null check

* clean up the invoking of the releasechecker
2023-12-15 17:43:54 -08:00
Red J Adaya
4ff5dcf1e0
fix mouse scroll (#151) 2023-12-15 16:15:45 -08:00
Red J Adaya
f9d0e63d0c
delete screen immediately when there are no lines in it (#152) 2023-12-15 15:40:34 -08:00
Red J Adaya
ea9cb37de1
drag and drop support for tabs (#146)
* back-end implementation. initial ui implementation

* rough implementation of drag and drop

* wrap with AnimatePresence

* persist screen order

* cleanup

* return all screens when updating indices

* remove y axis anitation

* remove debugging code

* chain filtering and sorting logic

* remove unused var

* fix issue where tabs shift to left on hover

* fix tabElem scroll into view regression

* clear scrollIntoViewTimeout when component unmounts

* remove borken style prop

* completely remove animation related props

* scroll into view only when there's a new tab

* minor comment fix

* resolvePosInt() to resolve index

* move tab width const to magiclayout.ts

* move back scroll into view code as it was before

* clear timout

* refactor setTimeout

* remov debugging codes

* format cmdrunner.go

* move clearTimeout

* remove wheel event listener
2023-12-14 21:50:47 -08:00
Mike Sawka
8200a312b9
On MacOS allow UserShell to override /bin/bash (#137)
* switch emain to using the bash from PATH, not defaulting to /bin/bash.  not convinced this fixes #132 yet because the PATH set for MacOS applications is not set from .bash_profile or .zprofile.  those seem to be set with launchctl setenv.

* move MacUserShell() func to shexec.  use dscl UserShell output as bash path on MacOS when present.  fixes #132
2023-12-14 21:45:27 -08:00
Evan Simkowitz
3b65e9941a
Clean up potentially unsafe external links (#139)
* Clean up potentially unsafe external links

* fix broken imports

* fix error in conditional

* fix one more typo
2023-12-13 17:43:30 -08:00
Cole Lashley
535fd0d7d9
added openaibaseurl parameter to client:set (#141) 2023-12-13 14:03:22 -08:00
Evan Simkowitz
96980b2f83
Merge pull request #138 from wavetermdev/evan/codescan-fixes
Fix potential overflow in promptenc arithmetic
2023-12-12 21:01:09 -08:00
sawka
b6c880c6ff add 'cmd' parameter to /api/run-command for debugging purposes (easier filtering and visual inspection of run-command calls) 2023-12-12 20:37:00 -08:00
Evan Simkowitz
1feffc8a11
address comment, clean up tests 2023-12-12 20:36:16 -08:00
sawka
f442236679 fix performance issue where cmdinput was causing additional loading of screenlines 2023-12-12 20:36:11 -08:00
Evan Simkowitz
414937911e
remove nolint 2023-12-12 17:40:05 -08:00
Evan Simkowitz
5d39815dea
refactor a bit 2023-12-12 17:39:19 -08:00
Evan Simkowitz
96f636c2da
Fix potential overflow in promptenc arithmetic 2023-12-12 16:51:19 -08:00
Evan Simkowitz
112d002c2a
Merge pull request #136 from wavetermdev/esimkowitz/codeql
Configuring CodeQL scanning workflow
2023-12-12 15:53:24 -08:00
Mike Sawka
4adcf6d92e
pass flexrows through to packet.TermOpts so it gets back to the FE correctly. this fixes wterm overrides and github issue #116 (#134) 2023-12-12 14:24:09 -08:00
Sylvie Crowe
e79dcaf910
fix ability to log into ssh with key and password (#130)
* fix ability to log into ssh with key and password

A previous refactor to the ssh password system broke the ability to use
key+password to log in. This change handles key+password as a special
case allowing it to be handled separately.

* clean up unnecessary print

My last change left in a debug print that wasn't necessary in the code.
This has been removed.
2023-12-12 14:17:53 -08:00
Evan Simkowitz
e6186cd694
Fixing linting errors in unused keygen function (#135)
* Fixing missing parameter error in unused keygen function

* applying error formatting linter suggestions

* fixing more linting suggestions
2023-12-12 14:17:03 -08:00
Evan Simkowitz
58551d6a2a
Configuring CodeQL scanning workflow
Configuring the default CodeQL scanning workflow. This will automatically scan our code for known vulnerabilities.
2023-12-12 10:17:55 -08:00
Mike Sawka
2b8adfe40e
add homebrew instructions to readme 2023-12-10 13:33:06 -08:00
sawka
ce4b6d413c fix remaining warnings in workspace 2023-12-08 13:39:13 -08:00
Red J Adaya
8a938744f7
migrate modals to new modals system (#124)
* migrate screen settings modal to new modals system

* use screen member var in the methods

* migrate session settings modal to new modal system

* use Modal component in session settings modal

* migrate line settings modal to new modals system

* use Modal component in line settings modal

* migrate client settings modal to new modals framework

* set alert modal width to 500px

* remove screen settings modal after deletion

* use Dropdown component for connnections dropdown

* use Dropdown component for connections dropdown in new tab flow

* replace InfoMessage with Tooltip

* use Dropdown for fontsize dropdown

* use Dropdown for renderer dropdown

* fix dropdown width issue on new tab container

* fix class names concatenation

* fix dropdown width issue in screen settings modal
2023-12-07 22:51:46 -08:00
Sylvie Crowe
87bf3f7a65
allow @ symbol in user for ssh connections (#129)
* allow @ symbol in user for ssh connections

Previously, the @ symbol was only used as a way to either:
- separate the user from the host
- separate "sudo" from the user

This change expands this to allow the username part of
sudo@username@host or username@host to contain any number of @ symbols
in addition to the ones previously allowed. Host is not allowed to
contain an @ symbol as per the usual definition.

* clean up regex changes

Moved the dash in the regex pattern to the end to make it explicitly
clear that it isn't part of a range.

Removed the hostNameRe regex as it is unused.
2023-12-07 18:33:16 -08:00
sawka
800fda2e14 we use yarn, so remove package-lock.json 2023-12-05 20:54:12 -08:00
sawka
3c30eb4e08 upgrade some outdated packages 2023-12-05 17:44:44 -08:00
sawka
32a825aea1 move force install to main connection screen, remove edit/delete from edit screen 2023-12-05 17:42:43 -08:00
sawka
0ece51e690 remove more go warnings 2023-12-05 10:49:30 -08:00
sawka
724a68393a fix some go errors/warnings 2023-12-05 10:43:57 -08:00
Sylvie Crowe
6791d874e3
Add Waveterm Icon to Linux (#120)
* add icon for Linux

The app icon previously did not show up in Linux. This change fixes that
by providing the wave-logo-dark.png to the electron Browser Window.

* set the icon to only use the direct path on linux

The previous change was only required on linux and not on mac. This
ensures the old behavior will continue to be done on mac while using the
new behavior on linux.
2023-12-04 22:47:01 -08:00
Alan Hanafy
a3187a1235
Fix typo in command history button label (#115) 2023-12-04 18:40:20 -08:00
Red J Adaya
9ebd5bda8f
TOS Modal (#123)
* register tos modal and fix its styles

* hard-code render TOS modal in ModalsProvider

* cleanup

* remove tos const
2023-12-04 18:29:21 -08:00
sawka
c8485ad80c upload dark background logo, bump version in build-universal to v0.5.1 2023-12-04 10:27:08 -08:00
sawka
dbde4b58df bump package.json to v0.5.1 2023-12-04 10:09:47 -08:00
sawka
7280bbf9d9 update outdated packages 2023-12-04 10:04:48 -08:00
Mike Sawka
08762fdfc3
Merge pull request #119 from wavetermdev/dev-0.5.1
pull dev-0.5.1 branch to main
2023-12-04 09:55:11 -08:00
Red J Adaya
0c756838e0
Tab Settings (#117)
* use Modal component

* icons selector

* do not limit icons in the backend
2023-12-04 09:52:59 -08:00
Sylvie Crowe
7310481383
Add a button to filter out non-running commands (#113)
* add filter button to the command input box

This will become a button that temporarily filters out the non-running
commands from your screen. At the moment it is only a placeholder design
that will likely change with more feedback. It does not have any
functionality at the moment.

* add view indication of active filter

This will become a clickable notification to let users know that a
filter is being applied. It displays the number of lines that are being
filtered. The plan is for it to be clickable to remove the filter. The
current version is a placeholder that is likely to change. It has no
functionality at the moment.

* add basic state to the filtering buttons

The filtering buttons up until this point haven't done anything. Now
they can be clicked and unclick causing them to render differently
depending on if they're selected. They still have no functionality
outside of their own appearance.

* add filtering functionality to filter button

The filter button now hides all non-running commands. And pressing it
again or pressing the other filter button will bring
back the hidden commands.

There are currently some formatting issues with the second button as it
jumps to the top of the screen if the filter is on and no running
commands are present.

An additional change was made to remove a variable accidentally
introduced in the last commit.

* add count for number of lines filtered out

The secondary filter button now lists the number of non-running commands
that have been filtered out. This count is added to the screen model in
case it is needed elsewhere.

* fix the style on the secondary buttons

This fixes the margin an the button to bring it in line with the line
items. It also fixes empty window screen to use a different css class.
Previously, the window-view class being used would cover the button. It
is now using the window-empty class instead.

* change formatting for secondary filter button

The button is now yellow with a border style instead of red with a solid
style. The border-radius has been changed to give the button a pill
shape.

Additionally, a style tab has been added to the button component to
provide it with custom styling. It should be changed to a custom class
design in the future.

* update style on primary filter button

This is being changed to simpler hover text in line with other text in
the cmd box.

* add number display as text for first filter button

The main filter button originally displayed a somewhat vague message.
Now it displays the number of running tasks with the rotating arrow
symbol.

* remove numLinesHidden count from model

This numLineHidden count is no longer needed with the new button design.
Furthermore, it created several warnings in react due to its
implementation. For both of these reasons, it has been removed.

* update filter functionality to better utilize mobx

This consisted of a few changes. The first was to move the filter state
from the GlobalModel to ScreenLines in order to track state separately
for each screen. Then several of the functions had to be rewritten to
wrap setting variables in the mobx.action wrapper.

As is, there are still a few issues with this design:
- the filter is not remembered when switching tabs
- if all running tasks expire, the second filter button is still present

* move filtering observable to Screen model

The previous observable did not persist when changing tabs because
ScreenLines did not persist. By moving it to Screen, the ovservable now
persists after changing tabs.
2023-12-01 20:54:49 -08:00
Red J Adaya
23b6bb29e7
modals system (#106)
* init

* connections table

* view styles

* new components. header and status.

* action buttons

* use Button component in other modals

* hook add connection button

* RemoteConnDetailModal component

* refactor remotes model. read connection modal.

* remote conn detail modal layout and styles

* fix xterm styles

* use correct status message in xterm

* tone down color of settings input

* clean up

* edit remote conn modal

* fix buttons gap

* change button label

* archive and force install features

* use classnames

* add some class names and also set some widths / maxwidth for the table.  too hard to read on large screens.

* small style updates

* fix some typescript errors, other small fixups

* fix type error

* move add button to the bottom of the table

* more improvements

* adjust layout, behavior, and style accrdg to mike's feedback

* set table max-width in css

* open detail modal after creation of new remote

* new modal component. migrate about modal to new modal component.

* migrate create remote conn modal to modal component

* working modals stack

* update some working (remote -> connection).  fix typescript error in connections.  remove some console.logs

* fix a couple of mobx warnings (need to wrap in action)

* register create conn modal

* follow model naming convention

* register edit remote conn modal

* reset

* reset

* reset

* reset

* use remotes model methods and wrap pushModal calls in mobx action

* only close connect modal after update for remotes returns

* register alert modal

* fix type error in app.tsx

* migrate remote detail and alert modal to base modal component

* Revert "fix conflicts"

This reverts commit 962da77918, reversing
changes made to 34cbe34ba5.

* only wrapper ModalProvider with mobx provider

* change archive label to delete

* fix error where isOpen method does not exist

* remove registry modal

* rename ModalStoreModel to ModalsModal

* fix issue where edit remote conn modal doesn't show

* simplify modal component

* grab remoteModel from within the remote modals

* fix edit modal

* minor change

* cleanup

* more cleanup

* change confirm wording to 'delete' instead of 'archive'.  remove or-equals since isBlank is designed to check for exactly that.

* undo some of the strict typescript fixes

* undo more typescript fixes

* cleanup

* fix import

* revert build.md change
2023-12-01 20:04:59 -08:00
sawka
fc79da776c merge main into dev-0.5.1 2023-12-01 19:58:59 -08:00
sawka
24499cb0b5 change pterm variable name to wterm 2023-12-01 15:21:24 -08:00
sawka
b9e12b2623 bump version to v0.5.1 2023-11-30 10:06:06 -08:00
Sylvie Crowe
86a86bc756
Update clear so it no longer archives Running Commands (#110)
* fix clear so it doesn't archive running commands

Clear previously archived every command that existed in the current tab.
This change alters this behavior so the commands with a status of running
or detached are not archived by clear.  As things currently stand,
detached is not used so the only immediate effect will be with running
commands. As before, the clear command only affects the current tab.

* remove unnecessary print

A print statement for debug still existed in the ArchiveScreenLines
function. It has been removed.

* remove isWebShare from ArchiveScreenLines

The isWebShare feature is currently unused and there is not a plan to
add it back soon. For this reason, it has been removed from the
ArchiveScreenLines function.

* clean up query formatting
2023-11-29 18:29:44 -08:00