Compare commits

...

252 Commits

Author SHA1 Message Date
Evan Simkowitz e4d3bfd90a save work 2024-04-25 14:48:30 -07:00
Evan Simkowitz 9073b9b31e add utils to assist in fs lookups 2024-04-25 14:47:44 -07:00
Evan Simkowitz cf28bb53ca fix path recommendations 2024-04-25 14:47:18 -07:00
Evan Simkowitz e59f70d26b fix option suggestions not showing if there's a complete match for one option and a partial for others 2024-04-25 11:01:37 -07:00
Evan Simkowitz deb9e23d53 Add ability to enabling autocomplete logging in clientsettings 2024-04-24 17:17:50 -07:00
Evan Simkowitz 3a9aa5813f fix file completion display 2024-04-24 16:41:37 -07:00
Evan Simkowitz c3aa027cc8 fix cwd resolution 2024-04-24 15:41:19 -07:00
Evan Simkowitz 7bdf332ce0 fix insertValue calculation 2024-04-24 15:22:39 -07:00
Evan Simkowitz 9483b43afa add default icon case, though it should never be hit 2024-04-23 18:22:16 -07:00
Evan Simkowitz 3fc4eb40cc remove unused log utils 2024-04-23 18:19:48 -07:00
Evan Simkowitz b142940a4c update import 2024-04-23 18:14:36 -07:00
Evan Simkowitz 3e4a22e7b8 handle -- argument properly 2024-04-23 18:08:01 -07:00
Evan Simkowitz b4928780d2 Merge branch 'main' into evan/inshellisense-newton-merge 2024-04-23 17:50:04 -07:00
Evan Simkowitz a5e092e6c5 move pos to {cursor} if present 2024-04-23 17:45:25 -07:00
Mike Sawka 8f93b3e263 activity updates for v0.7.3 (#600)
* adding more activity updates, tabs, workspaces, startup/shutdown

* name change, allow activity updates from FE.  aichat + history opens

* activity updates for non-standard renderers
2024-04-23 17:40:14 -07:00
Evan Simkowitz 6a7ee12c10 Pull in loadSpec functions from evan/inshellisense branch 2024-04-23 17:32:45 -07:00
Evan Simkowitz f5af7ad283 Merge branch 'main' into evan/inshellisense-newton-merge 2024-04-23 17:05:45 -07:00
Evan Simkowitz eadfb92f94 Fix regression in the order of messages in the AI chat auxview (#597) 2024-04-23 16:35:33 -07:00
Evan Simkowitz a50db14b3e Fix improper formatting when AuxiliaryCmdView titlebar is missing (#596)
* Fix improper formatting when AuxiliaryCmdView titlebar is missing

* fix bad save
2024-04-23 16:16:41 -07:00
Evan Simkowitz 6308c6c4b0 Simplify scrollHistoryItemIntoView method (#595)
* Simplify scrollHistoryItemIntoView

* remove unnecessary block argument

* actually the block nearest is necessary, otherwise the scroll will jump even if the item is already in view
2024-04-23 15:38:02 -07:00
Red J Adaya cdfc446763 Improved tab settings pull down (#592)
* add label to tab settings terminal theme dropdown

* add connection label. add New Conection item

* fix wrong prop

* simplify logic

* fix conflicts
2024-04-23 13:14:56 -07:00
Cole Lashley b08aaa03fb Remove log for duplicate key register (#540)
* removed log for duplicate keybindings

* changed dumplogs to GlobalModel.isDev, and re added back log

* added back dumplogs

* one last dump logs
2024-04-23 12:30:03 -07:00
Cole Lashley 64244626a1 auxview focus + keybindings (#575)
* first draft of figuring out auxviews and focus

* added more focus logic

* fixed aichat focus issue

* fixed artifacts

* removed command

* addressed review comments
2024-04-23 11:47:55 -07:00
Cole Lashley c683d10008 Keybinding fixes (#591)
* keybinding fixes

* changed screen and session commands to functions rather than slash commands to avoid printing errors

* added a static wait for console commands

* added sleep hardcode

* add an isArray check for commandStr
2024-04-23 11:18:39 -07:00
Evan Simkowitz b115d04876 Merge branch 'main' into evan/inshellisense-newton-merge 2024-04-23 11:08:39 -07:00
Evan Simkowitz 265cc30347 Update electron-rebuild reference to @electron/rebuild as recommended by Yarn (#593) 2024-04-23 11:07:52 -07:00
Evan Simkowitz 5f755e6574 Merge branch 'main' into evan/inshellisense-newton-merge 2024-04-23 10:51:25 -07:00
Evan Simkowitz e04c5af41d Make the AuxiliaryCmdView title bar optional and more flexible (#588)
* Make the auxView tilebar optional and make sure it flows as part of the flexbox

* simplify condition

* fix ai chat scroll direction

* remove unnecessary change

* remove unused class
2024-04-23 10:50:56 -07:00
Yiheng Li 2b0b206614 fix: inline text edit button use onMouseDown (#579) 2024-04-23 10:44:15 -07:00
Mikael Eklund 7c63e24525 Issue #584 fix in package.json (#589) 2024-04-22 23:12:24 -07:00
Evan Simkowitz 0b74f4afcf bad merge 2024-04-22 19:48:02 -07:00
Evan Simkowitz 77706bf21e Merge branch 'evan/auxview-fix' into evan/inshellisense-newton-merge 2024-04-22 19:45:47 -07:00
Evan Simkowitz 6bd5931056 remove unused class 2024-04-22 19:40:48 -07:00
Evan Simkowitz e5ee4e4069 remove unnecessary change 2024-04-22 19:38:44 -07:00
Evan Simkowitz f05cb30dca fix ai chat scroll direction 2024-04-22 19:35:59 -07:00
Evan Simkowitz 260b29167d simplify condition 2024-04-22 19:32:44 -07:00
Evan Simkowitz e543538bae Make the auxView tilebar optional and make sure it flows as part of the flexbox 2024-04-22 19:30:30 -07:00
Evan Simkowitz bd7a83ba0e making auxview more flexible 2024-04-22 19:21:57 -07:00
Evan Simkowitz 5d1c92d643 prefix is pushing through well for option args with separators 2024-04-22 17:57:13 -07:00
Evan Simkowitz c6f187d65d support arg separators 2024-04-22 17:14:33 -07:00
Evan Simkowitz b476ab31c6 fixing more display issues 2024-04-22 15:46:40 -07:00
Evan Simkowitz 20b25a9272 Merge branch 'evan/inshellisense' into evan/inshellisense-newton-merge 2024-04-22 13:54:53 -07:00
Evan Simkowitz 35cf4b6a3b Merge branch 'main' into evan/inshellisense 2024-04-22 13:54:42 -07:00
Evan Simkowitz ff50e89156 save 2024-04-22 13:53:07 -07:00
Evan Simkowitz 024f46bf7b save work 2024-04-22 13:44:40 -07:00
Evan Simkowitz 73164e0152 almost there, just need to fix icon displays and reimplement the cached imports 2024-04-22 12:58:42 -07:00
Evan Simkowitz 0d40d6fff3 looking good 2024-04-22 12:15:47 -07:00
Evan Simkowitz 86cbba1f79 Got the results up to parity, next step is to work on performance 2024-04-19 19:01:11 -07:00
Sylvie Crowe 8fdcf10cae fix: ignore computer sleep for telemetry clock (#577)
* fix: ignore computer sleep for telemetry clock

This uses unix time with regular integer comparisons to prevent the
telemetry clock from needing to wait for 8 hours of the program running.
Now, it only needs to wait 8 real-time hours instead.

* drop telemetry time to 4 hours, tick every 10 minutes
2024-04-19 18:26:31 -07:00
Mike Sawka 6336f87cf2 tab context menu (w/ close tab option) (#583)
* create tab context menu (for close tab)

* small update to ctx menu, also make all tab deletes (including keybinding) not popup confirm modal if less than 10 blocks
2024-04-19 18:25:26 -07:00
Evan Simkowitz bdf17f0133 move Newton parser to its own file 2024-04-19 16:27:19 -07:00
Evan Simkowitz f5f0791b32 Merge branch 'evan/inshellisense' into evan/inshellisense-newton 2024-04-19 15:08:40 -07:00
Evan Simkowitz 899347e90f Merge branch 'main' into evan/inshellisense 2024-04-19 15:08:27 -07:00
Evan Simkowitz fbc5e1606b added suggestions for options 2024-04-19 15:06:26 -07:00
Sylvie Crowe 39ee41921f fix: add a new line when writing to knownhosts (#582)
This fixes issue #476 by ensuring that when waveterm writes to a
knownhosts file, a newline character is appended at the end.
2024-04-18 14:51:11 -07:00
Evan Simkowitz fde2ce97d2 save work 2024-04-17 10:29:32 -07:00
Evan Simkowitz 93845c405d Got mostly to parity with suggestions in the parser! 2024-04-16 18:01:18 -07:00
Sylvie Crowe 2913babea7 Sudo Caching (#573)
* feat: share sudo between pty sessions

This is a first pass at a feature to cache the sudo password and share
it between different pty sessions. This makes it possible to not require
manual password entry every time sudo is used.

* feat: allow error handling and canceling sudo cmds

This adds the missing functionality that prevented failed sudo commands
from automatically closing.

* feat: restrict sudo caching to dev mode for now

* modify fullCmdStr not pk.Command

* refactor: condense ecdh encryptor creation

This refactors the common pieces needed to create an encryptor from an
ecdh key pair into a common function.

* refactor: rename promptenc to waveenc

* feat: add command to clear sudo password

We currently do not provide use of the sudo -k and sudo -K commands to
clear the sudo password. This adds a /sudo:clear command to handle it in
the meantime.

* feat: add kwarg to force sudo

In cases where parsing for sudo doesn't work, this provides an alternate
wave kwarg to use instead. It can be used with [sudo=1] at the beginning
of a command.

* refactor: simplify sudoArg parsing

* feat: allow user to clear all sudo passwords

This introduces the "all" kwarg for the sudo:clear command in order to
clear all sudo passwords.

* fix: handle deadline with real time

Golang's time module uses monatomic time by default, but that is not
desired for the password timeout since we want the timer to continue
even if the computer is asleep. We now avoid this by directly comparing
the unix timestamps.

* fix: remove sudo restriction to dev mode

This allows it to be used in regular builds as well.

* fix: switch to password timeout without wait group

This removes an unnecessary waiting period for sudo password entry.

* fix: update deadline in sudo:clear

This allows sudo:clear to cancel the goroutine for watching the password
timer.

* fix: pluralize sudo:clear message when all=1

This changes the output message for /sudo:clear to indicate multiple
passwords cleared if the all=1 kwarg is used.

* fix: use GetRemoteMap for getting remotes in clear

The sudo:clear command was directly looping over the GlobalStore.Map
which is not thread safe. Switched to GetRemoteMap which uses a lock
internally.

* fix: allow sudo metacmd to set sudo false

This fixes the logic for resolving if a command is a sudo command. This
change makes it possible for the sudo metacmd kwarg to force sudo to be
false.
2024-04-16 16:58:17 -07:00
Mike Sawka a787a1a934 add k8s context/namespace to prompt (#576)
* k8s in prompt

* test/fix formatting
2024-04-16 13:22:58 -07:00
Cole Lashley bf447c60ce Custom keybind commands (#574)
* added custom keybindings

* removed logs
2024-04-16 12:46:27 -07:00
Evan Simkowitz f2b322c7d7 working to merge my parser into the inshellisense model 2024-04-15 20:22:47 -07:00
Evan Simkowitz c1bd5f5765 fix command execution 2024-04-15 17:22:25 -07:00
Evan Simkowitz b97c7e186d remove unnecessary debugs 2024-04-12 16:07:49 -07:00
Evan Simkowitz 0442fc84d4 update debugs to be more helpful 2024-04-12 16:04:05 -07:00
Evan Simkowitz 27efae3ad5 make the logic less gross 2024-04-12 16:03:27 -07:00
Evan Simkowitz 4d8c2cd242 remove unused import 2024-04-12 15:57:17 -07:00
Evan Simkowitz a560499b58 return filepaths when in doubt 2024-04-12 15:53:54 -07:00
Evan Simkowitz e8b489bcd9 add history and root spec 2024-04-12 15:35:45 -07:00
Evan Simkowitz 31c12c4705 remove and modify debugs 2024-04-11 18:25:35 -07:00
Evan Simkowitz 787bcbc9d8 replace logs with debugs 2024-04-11 18:23:34 -07:00
Evan Simkowitz 985304c9aa demote dotfiles and dotdirs 2024-04-11 18:19:00 -07:00
Evan Simkowitz 13cbfdeb6e fix isEnabled 2024-04-11 18:16:28 -07:00
Evan Simkowitz 53290b47e1 fix bad merge 2024-04-11 18:14:05 -07:00
Evan Simkowitz 4bdd092d33 remove lastCurLine from textareainput 2024-04-11 18:09:28 -07:00
Evan Simkowitz fb2b3dfc6a move import 2024-04-11 18:07:56 -07:00
Evan Simkowitz fa27964d49 move import 2024-04-11 18:06:58 -07:00
Evan Simkowitz 95132011e4 remove import 2024-04-11 18:06:43 -07:00
Evan Simkowitz dae4210b72 rename stuff and add comments 2024-04-11 18:03:04 -07:00
Evan Simkowitz e394ba70a6 move keybinding 2024-04-11 17:55:28 -07:00
Evan Simkowitz 483b2eff6f add right arrow to apply suggestion 2024-04-11 17:54:54 -07:00
Evan Simkowitz 2f4a6fa6e2 Merge branch 'main' into evan/inshellisense 2024-04-11 17:45:24 -07:00
Evan Simkowitz 4af1b19ffd fix lastCurLine 2024-04-11 17:41:11 -07:00
Evan Simkowitz 8b1d930cd6 move import 2024-04-11 17:38:24 -07:00
Evan Simkowitz a4e8648968 add placeholder div if no suggestions 2024-04-11 17:37:50 -07:00
Evan Simkowitz 429ea37419 change onclose 2024-04-11 17:23:16 -07:00
Evan Simkowitz a8f3e356f6 add keybindings 2024-04-11 17:22:51 -07:00
Evan Simkowitz 85235aaad8 move autocomplete to its own model, add more styling to suggestion view 2024-04-11 17:16:22 -07:00
Evan Simkowitz 619cfe4931 rudimentary show all autocomplete 2024-04-11 16:00:52 -07:00
Evan Simkowitz 11f1c3bb70 remove finished todos 2024-04-11 15:50:46 -07:00
Evan Simkowitz 8d140c9920 Add file and folder completions 2024-04-11 15:49:46 -07:00
Mike Sawka d923de412a add submenu support, add signal submenu to line context menu (#572) 2024-04-11 10:57:14 -07:00
Mike Sawka 15485d7235 New Context Menu Model (and implement custom block context menu) (#569)
* starting work on new dynamic context menu system

* untested contextmenu model integrated with electron api

* implement custom line context menu, copy visible output + copy full output

* implement minimize/maximize, restart, and delete
2024-04-10 23:47:33 -07:00
dependabot[bot] 59aef86e77 Bump tar from 6.2.0 to 6.2.1 (#568)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:46:43 -07:00
Evan Simkowitz 205a9d1e2e Merge branch 'main' into evan/inshellisense 2024-04-10 23:11:14 -07:00
Mike Sawka 5353f40a20 new sidebar UI (#567) 2024-04-10 22:15:11 -07:00
Evan Simkowitz d3139d51cf add new license 2024-04-10 22:08:08 -07:00
Evan Simkowitz 5c931de40c fix caching 2024-04-10 21:48:23 -07:00
Evan Simkowitz 497a96bfc2 adds trigger and begins to add caching 2024-04-10 17:20:51 -07:00
Knox Lively f86f010a34 updated the OpenAICloudCompletionTelemetryOffErrorMsg to include instructions for enabling telemetry (#564) 2024-04-09 22:14:42 -06:00
Evan Simkowitz 427447c592 Merge branch 'main' into evan/inshellisense 2024-04-09 17:11:25 -07:00
Evan Simkowitz 1fe5d425da set non-transparent colors for light mode, fix fuzzy letters issue with ghost prompt 2024-04-09 17:07:15 -07:00
Evan Simkowitz a395043a1c enforce setting 2024-04-09 16:40:47 -07:00
Evan Simkowitz ff9f9b43b6 Add client setting for autocomplete 2024-04-09 16:29:59 -07:00
Evan Simkowitz 98ba0b46ac clear suggestions in more places 2024-04-09 12:33:16 -07:00
Evan Simkowitz fb3253d018 cache last command 2024-04-09 12:22:27 -07:00
Evan Simkowitz 8d91d156aa handle flicker when deleting chars 2024-04-09 12:09:42 -07:00
Evan Simkowitz b7eec15853 Adding ghost text 2024-04-09 11:57:07 -07:00
Mike Sawka 73e5515e17 when the window gets focus, if our mainview is session (and no modals are open), refocus either the cmdinput or the cmd (#562) 2024-04-09 11:48:34 -07:00
Mike Sawka 6919dbfb5f force our exit trap to always run (for rtnstate commands) (#556)
* add command validation to shellapi.  mock out bash/zsh versions

* implement validate command fn bash and zsh

* test validate command

* change rtnstate commands to always end with a builtin, so we always get our exit trap to run

* simplify the rtnstate modification, don't add the 'wait' (as this is a different problem/feature)

* update schema
2024-04-09 11:33:23 -07:00
Evan Simkowitz 38ff6183a2 get suggestions on typing 2024-04-08 18:47:35 -07:00
Evan Simkowitz 1b1e6edaee Merge branch 'main' into evan/inshellisense 2024-04-08 13:47:17 -07:00
Evan Simkowitz 1f5309e097 undo text cursor on prompt area (#559) 2024-04-08 13:47:03 -07:00
Evan Simkowitz f4aeb92d32 Merge branch 'main' into evan/inshellisense 2024-04-08 13:16:01 -07:00
Evan Simkowitz af7cc866d3 Make cmdinput prompt smaller, properly handle select events to take priority over onclick (#558) 2024-04-08 13:15:33 -07:00
Evan Simkowitz b780d5b244 Merge branch 'main' into evan/inshellisense 2024-04-08 11:19:25 -07:00
Evan Simkowitz 37e56acf63 Cleanup unused variables in workspaceview (#557) 2024-04-08 10:17:26 -07:00
Mike Sawka 70088afdb5 daystr custom func (#555)
* working on daystr funcs

* daystr custom function
2024-04-05 22:42:22 -07:00
Evan Simkowitz 455790416d Clean up the input model's auxiliary view logic (#553)
* Clean up the input model's auxiliary view logic

* fix

* save work

* rename appconst

* fix keybindings

* remove debugs

* Add comments

* fix focus order

* givefocus whenever focus var is updated, don't update if nothign changes

* remove debug statements

* one more debug

* revert unnecessary newline

* remove cmdinput placeholder to allow for better window resizing
2024-04-05 17:39:27 -07:00
Cole Lashley eed234a131 added codeedit keybinding fix (#554) 2024-04-05 13:01:51 -07:00
Red J Adaya 5a6575a393 Copy button (#550)
* cop button

* cleanup

* fix wrong type

* updates to try to set the cmdinput position (as well as text).  fix button alignment, change checkmark to green (and extend), and remove the transition from parent component and move to copy (sawka)
2024-04-05 12:06:04 -07:00
Sylvie Crowe 84cea373a8 SSH Bugfixes Early April 2024 (#551)
* fix: add vix for missing known_hosts file

In a recent cleanup, I accidentally deleted this fix from before. This
adds it back.

* chore: clarify that the ssh should use private key
2024-04-05 10:54:12 -07:00
Mike Sawka 181e14f55c try to detect and return mimetype with stream file info (#552) 2024-04-05 10:52:04 -07:00
Evan Simkowitz d81a6ed480 Merge branch 'main' into evan/inshellisense 2024-04-05 10:49:22 -07:00
Evan Simkowitz 1c23701181 Clean up styling and focus behavior for cmdinput (#546)
* Clean up cmdinput

* Remove unused css styles, clicking on textarea will focus back to textarea without closing history

* cleanup logic for activating textarea

* actions buttons should always show, should properly disable inactive views

* clicking actions toggles the view

* remove titlebar spacer, clean up padding

* Make AIChat and HistoryInfo share a common layout

* fix ai chat scroll

* clean up formatting

* fix chat textarea resizing

* align prompt and input

* update infomsg to use auxview

* update comments

* fix widths and key error

* add todo

* adjust padding for input, remove debug

* Don't capture clicks on the prompt area
2024-04-04 19:29:43 -07:00
Cole Lashley 0fe767cdf3 Bugfixes for ai chat code select (#537)
* added uuid to code select to fix some render related bugs

* added input popup type, and fixed aichat computed condition

* fixed stash artifacts
2024-04-04 16:58:26 -07:00
Mike Sawka 097623ab51 have initial run-command return faster to the frontend for quicker updating (#549)
* have initial run-command return faster to the frontend for quicker updating.  cuts time from 70-80ms down to 20ms for an average command

* remove wlogs

* more logging cleanup

* fix focus for when start cmd returns an error
2024-04-04 15:08:45 -07:00
Red J Adaya 9de25e4869 truncate labels (#544) 2024-04-03 09:55:36 -07:00
Evan Simkowitz d8393ae50b Merge branch 'main' into evan/inshellisense 2024-04-02 18:48:59 -07:00
Evan Simkowitz 79deb01ea4 save work 2024-04-02 18:48:38 -07:00
Evan Simkowitz a139633375 Send NumRunningCommands updates via the main bus, regardless of where other updates are being sent (#545) 2024-04-02 18:47:54 -07:00
Evan Simkowitz 12f9a50686 beginning to add autocomplete to textareainput 2024-04-02 18:35:12 -07:00
Evan Simkowitz 239933be3e Got autocomplete working! 2024-04-02 18:14:49 -07:00
Evan Simkowitz 4692cf698b hook up runtime 2024-04-02 17:13:54 -07:00
Evan Simkowitz 907e87c217 expand cwd 2024-04-02 17:05:14 -07:00
Evan Simkowitz f97bb699a1 plumb timeout to waveshell 2024-04-02 16:57:34 -07:00
Evan Simkowitz 077545ed93 bad merrge 2024-04-02 15:50:46 -07:00
Evan Simkowitz 60d0f0e976 Merge branch 'main' into evan/inshellisense 2024-04-02 15:49:32 -07:00
Evan Simkowitz ccc63937b6 Support running ephemeral commands (#543)
* initial

* save work, starting to add backend types

* save work

* save work

* Add EphemeralWriteCloser

* Command pipes thru, triggers infinite loop

* save debugging

* fix bad merge

* save debug statements

* fixing spaghetti

* clean up code

* got cwd override working

* Add separate paths for stdout and stderr writers

* fix stdout/stderr

* env vars are now working

* revert waveshell changes

* Making EphemeralWriteCloser into a more generic BufferedPipe

* formatting

* comment

* delete unused package

* more naming changes

* add package comment

* add UsePty to EphemeralRunOpts

* document UsePty

* ensure only one downstream writer can read from the buffer

* store pointer to syncs

* remove inshellisense stuff for now

* remove debugs

* revert yarn

* remove unnecessary debugs in main-server

* more debugging removed

* revert tsconfig
2024-04-02 15:46:32 -07:00
Evan Simkowitz cd4671e5bb store pointer to syncs 2024-04-02 14:58:39 -07:00
Evan Simkowitz d8a714dd4a ensure only one downstream writer can read from the buffer 2024-04-02 14:28:15 -07:00
Evan Simkowitz e0fa1b2560 document UsePty 2024-04-02 14:19:46 -07:00
Evan Simkowitz 2dffcc9237 add UsePty to EphemeralRunOpts 2024-04-02 14:17:12 -07:00
Evan Simkowitz 70090b8684 add package comment 2024-04-02 14:08:10 -07:00
Evan Simkowitz 3f8952caf4 more naming changes 2024-04-02 14:06:51 -07:00
Evan Simkowitz 15a2486e94 delete unused package 2024-04-02 14:01:57 -07:00
Evan Simkowitz 38aa7016b8 comment 2024-04-02 14:01:03 -07:00
Evan Simkowitz cff353ca94 formatting 2024-04-02 13:59:59 -07:00
Evan Simkowitz 5b440ace65 Making EphemeralWriteCloser into a more generic BufferedPipe 2024-04-02 13:58:56 -07:00
Evan Simkowitz dc7fc2c823 Pull in linting fixes from preact branch (#538)
* Pull in linting fixes from preact branch

* more consts

* one more const

* Revert PureComponent

* revert preact artifavt

* revert another change
2024-04-02 12:30:17 -07:00
Red J Adaya ca5117cda0 Terminal theming (#485)
* init

* use setStyleVar

* backend implementation. scrope level terminal theming.

* only invoke this.applyTermTheme for keys that are updated. command runner for global term theme

* invoke applyTermTheme for global terminal themes as well

* fix nil error

* fix issue were theme can't be found

* fix issue where selected termtheme is not set as default value

* term theme switcher for session

* do not force reload after setting css vars

* fix issues. screenview terminal theme switcher

* remove debugging code

* move getTermThemes to util

* fix global theme reset

* fix workspace theme reset

* fix screenview terminal theme reset issue

* cleanup

* do not apply theme if theme hasn't changed

* do not apply theme if theme hasn't changed in workspace view

* cleanup

* cleanup

* force reload terminal

* fix inconsistency

* fix reset issue

* add a mobx reaction so that theming working when switching sessions

* workig reset

* simplify and cleanup

* refactor

* working global and session terminal theming

* add check

* perf improvement

* more perf improvements

* put reaction componentDidUpdate to make sure ref is already associated to the element

* cleanup

* fix issue where session theme is overriden by global theme on reload

* reduce flickering on reload

* more on reducing flickering on reload

* cleanup

* more cleanup

* fix file not found when no global theme is set

* screen level terminal theming

* update comment

* re-render terminal in history view. cleanup.

* cleanup

* merge main
2024-04-01 23:41:24 -07:00
Evan Simkowitz 87de0dbc44 revert waveshell changes 2024-04-01 22:17:44 -07:00
Evan Simkowitz 74839b8e1b env vars are now working 2024-04-01 22:12:58 -07:00
Evan Simkowitz 8a24953a88 fix stdout/stderr 2024-04-01 20:55:23 -07:00
Evan Simkowitz a95854514a Add separate paths for stdout and stderr writers 2024-04-01 20:51:26 -07:00
Evan Simkowitz 229fcf8cd4 got cwd override working 2024-04-01 18:27:18 -07:00
Evan Simkowitz 83542ddab8 clean up code 2024-04-01 17:42:03 -07:00
Evan Simkowitz b520242f04 fixing spaghetti 2024-04-01 17:12:51 -07:00
Evan Simkowitz bc73ed1b6c save debug statements 2024-04-01 16:04:42 -07:00
Evan Simkowitz c4647945a4 fix bad merge 2024-04-01 14:22:23 -07:00
Evan Simkowitz 3db40b1c63 Merge branch 'main' into evan/inshellisense 2024-04-01 14:22:17 -07:00
Evan Simkowitz f6d7c37915 save debugging 2024-03-29 16:54:29 -07:00
Cole Lashley f41ac1d5e3 Added this.lastHistoryUpDown = false to cmdinput domain callback (#533)
* added more cmdinput-anykey behavior

* fixed lasthistoryupdown

* more bug fixes

* fixed history bugs hopefully fully fixed
2024-03-29 13:28:49 -07:00
Mike Sawka 0024f0f3e8 fix xterm.js versions and addon versions (#534)
* make xterm packages consistent

* add serializeAddon, fix varsUpdated
2024-03-29 10:52:18 -07:00
Mike Sawka 8a3d9628ba add addons-webgl, protected with clientsettings flag (#532) 2024-03-28 23:19:39 -07:00
Mike Sawka 7c2265f3e3 add debug command to see remote-instance state (#531) 2024-03-28 18:53:16 -07:00
Evan Simkowitz a41e866b1f Command pipes thru, triggers infinite loop 2024-03-28 18:44:37 -07:00
Evan Simkowitz a772715ae4 Add EphemeralWriteCloser 2024-03-28 18:02:27 -07:00
Cole Lashley 4f6c2ee39b Other key bind bug fixes (#529) 2024-03-28 17:53:03 -07:00
Mike Sawka a1e4e807cc update statediff algorithm for wavesrv / remote instances (#530)
* remote statemap from waveshell server (diff against initial state)

* move ShellStatePtr from sstore to packet so it can be passed over the wire

* add finalstatebaseptr to cmddone

* much improved diff computation code on wavesrv side

* fix displayname -- now using hash

* add comments, change a couple msh.WriteToPtyBuffer calls to log.Printfs
2024-03-28 16:56:39 -07:00
Evan Simkowitz d32e2aae05 Merge branch 'main' into evan/inshellisense 2024-03-28 16:24:27 -07:00
Cole Lashley 5c85b2b786 Cmdinput keybinding bug fixes (#524)
* added domain callback for every layer

* added domain callback for every layer

* switched dump logs to false

* dropdown fixes

* moved uuid back to constructor
2024-03-28 13:19:20 -07:00
Cole Lashley 4879e90e91 fixed 2 more switches for baseurl (#527) 2024-03-28 13:14:05 -07:00
Evan Simkowitz a61310afc3 Remove datepicker from history until we have a proper date range selection (#526) 2024-03-28 12:21:58 -07:00
Cole Lashley 80c781bf4c added check for no baseurl (#525) 2024-03-28 12:20:58 -07:00
Mike Sawka 33400e65ff restore delete screen button (#522) 2024-03-27 22:42:37 -07:00
Sylvie Crowe 7b58949027 fix: this prevents possible loops while connecting (#521)
A recent change made it possible to get stuck in a loop when connecting
to a remote. This reverts the part of it that caused this while
retaining the other behavior. This makes it possible to add to blank
known_host files again. It also adds a printout to display when a
connection is complete.
2024-03-27 21:19:35 -07:00
Cole Lashley 3be96c949d Debug pane and lookup key (#518)
* added new util functions for logging keyutils and added debug pane

* clean up the formatting
2024-03-27 18:33:29 -07:00
Evan Simkowitz 052645e0df Remove debug statement (#520) 2024-03-27 17:03:01 -07:00
Evan Simkowitz 3abc1ac3d7 Fix display of overflow dates in datepicker (#519)
* save work

* Fix overflow days
2024-03-27 16:59:45 -07:00
Evan Simkowitz e7ed962944 Remove unused button colors from light.css (#517) 2024-03-27 16:05:32 -07:00
Evan Simkowitz d99102b8e3 Make all modal keybindings off by default, fix contrast issues with inputs in light mode (#516)
* Make all modal keybindings opt in

* Fix some contrast issues with inputs in light Mode
2024-03-27 16:02:43 -07:00
Evan Simkowitz abe6d6a6ba Add esc keybinding to all modals, add update button in About modal (#514)
* Add esc keybinding to all modals, add update button in About modal

* move import
2024-03-27 15:35:14 -07:00
Mike Sawka 4eb215b99d disable right sidebar in production (#515) 2024-03-27 15:33:00 -07:00
Cole Lashley 404f7eaac0 Ensure config dir and keybindings.json file to remove 404 keybindings file not found console error (#513)
* added ensure dir to config dir

* removed extraneous slashes
2024-03-27 14:55:03 -07:00
Sylvie Crowe 28dd9410fe fix: properly handle missing knownhosts case (#510)
A bug prevented waveterm from being able to create missing knownhosts
files. This change corrects that.
2024-03-27 14:29:21 -07:00
Sylvie Crowe b308334038 fix: use flex for .wave-button instead of block (#511)
Previously, .wave-button had `display: block;` overwriting the expected
`display: flex;`. This resulted in buttons with an icon being aligned
vertically instead of horizontally. This change removes the undesired
`display: block;` so the buttons are formatted horizontally again.
2024-03-27 14:28:36 -07:00
Mike Sawka 964751aae1 bump version to v0.7.2, bump waveshell version to 0.6 (#512) 2024-03-27 14:27:55 -07:00
Mike Sawka d3c771efb1 fix codeedit (#509) 2024-03-27 14:08:31 -07:00
Cole Lashley aca197037d Up baseurl max length to 50 (#496)
* upped max length

* added client:get and client:info, upped max length of baseurl

* added openai prefix for consistency

* updated client:show command and removed client:get and client:info
2024-03-27 14:00:52 -07:00
Mike Sawka 5734a7bc7a add offsite icon to sidebar links that take you off the app (#508) 2024-03-27 13:17:56 -07:00
Mike Sawka bed191186c allow empty pvars (important to *unset* the git directory when you leave it) (#507) 2024-03-27 13:07:24 -07:00
Evan Simkowitz 9809ca634d Remove App item, remove bolding from active auxiliary views (#506) 2024-03-27 12:54:53 -07:00
Evan Simkowitz e867bcb398 Add overlay scrollbar for main sidebar, adjust active session display behavior (#505)
* Add overlay scrollbar to left sidebar

* Keep active session bolded when mainview is not session

* fix color of scrollbar

* swap expression args

* add active color for scrollbar

* add active/highlight to history, connections, and settings
2024-03-27 12:47:57 -07:00
Evan Simkowitz 3e4ba1bf72 Remove unnecessary debug statement (#504) 2024-03-27 11:30:34 -07:00
dependabot[bot] d21182f7e0 Bump express from 4.18.2 to 4.19.2 (#502)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 09:59:43 -07:00
Evan Simkowitz 49e1fc9133 Remove redundant default.css import (#503) 2024-03-27 09:53:08 -07:00
Mike Sawka 195ee98424 dependency updates (#501) 2024-03-27 09:44:28 -07:00
Mike Sawka 3c3eec73aa reinit updates (#500)
* working on re-init when you create a tab.  some refactoring of existing reinit to make the messaging clearer.  auto-connect, etc.

* working to remove the 'default' shell states out of MShellProc.  each tab should have its own state that gets set on open.

* refactor newtab settings into individual components (and move to a new file)

* more refactoring of tab settings -- use same control in settings and newtab

* have screensettings use the same newtab settings components

* use same conn dropdown, fix classes, update some of the confirm messages to be less confusing (replace screen with tab)

* force a cr on a new tab to initialize state in a new line.  poc right now, need to add to new workspace workflow as well

* small fixups

* remove nohist from GetRawStr, make const

* update hover behavior for tabs

* fix interaction between change remote dropdown, cmdinput, error handling, and selecting a remote

* only switch screen remote if the activemainview is session (new remote flow).  don't switch it if we're on the connections page which is confusing.  also make it interactive

* fix wording on tos modal

* allow empty workspaces. also allow the last workspace to be deleted.  (prep for new startup sequence where we initialize the first session after tos modal)

* add some dead code that might come in use later (when we change how we show connection in cmdinput)

* working a cople different angles.  new settings tab-pulldown (likely orphaned).  and then allowing null activeScreen and null activeSession in workspaceview (show appropriate messages, and give buttons to create new tabs/workspaces).  prep for new startup flow

* don't call initActiveShells anymore.  also call ensureWorkspace() on TOS close

* trying to use new pulldown screen settings

* experiment with an escape keybinding

* working on tab settings close triggers

* close tab settings on tab switch

* small updates to tos popup, reorder, update button text/size, small wording updates

* when deleting a screen, send SIGHUP to all running commands

* not sure how this happened, lineid should not be passed to setLineFocus

* remove context timeouts for ReInit (it is now interactive, so it gets canceled like a normal command -- via ^C, and should not timeout on its own)

* deal with screen/session tombstones updates (ignore to quite warning)

* remove defaultfestate from remote

* fix issue with removing default ris

* remove dead code

* open the settings pulldown for new screens

* update prompt to show when the shell is still initializing (or if it failed)

* switch buttons to use wave button class, update messages, and add warning for no shell state

* all an override of rptr for dyncmds.  needed for the 'connect' command (we need to set the rptr to the *new* connection rather than the old one)

* remove old commented out code
2024-03-27 00:22:57 -07:00
Evan Simkowitz 6065ee931f Support os-native theming (#495)
* save work

* Add native theme support

* update index

* update var name

* remove comment

* fix code setting

* bump render version on change

* remove themeutil
2024-03-26 19:14:03 -07:00
Evan Simkowitz 3f9d52a7e4 save work 2024-03-26 16:04:37 -07:00
Cole Lashley 69b9ce33b3 User input keybindings fix (#494)
* added user input fix and focusVal optoinal in footer

* small fixes and removed focusVal for now
2024-03-26 15:05:18 -07:00
Evan Simkowitz a239a8d70e Merge branch 'main' into evan/inshellisense 2024-03-26 13:00:21 -07:00
Evan Simkowitz a121bd4bb5 Move bookmarks, history, playbook, and telemetry code out of sstore (#493)
* break out telemetry and playbook

* break out bookmarks

* add license disclaimers
2024-03-25 20:20:52 -07:00
Evan Simkowitz a1bddd971f save work 2024-03-25 17:43:02 -07:00
Evan Simkowitz 722318f57d save work, starting to add backend types 2024-03-25 10:54:27 -07:00
dependabot[bot] dcc7b2943e Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#490)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 09:55:15 -07:00
Cole Lashley bfa549ef22 Term keybindings (#482)
* added term keybindings

* removed logs and added a dump logs flag in keyutil

* un capture keys that we aren't using

* moved keybindings to inside terminal
2024-03-22 17:59:29 -07:00
Cole Lashley 376e339dfe Keybind UI utils (#487)
* added utils to get all of the keybinds and pretty print them, for display purposes

* added info section

* clarifying meta and alt behavior

* changed keybinduidescription to keybind config
2024-03-22 17:58:06 -07:00
Cole Lashley 646e260488 Code edit keybindings (#483)
* added codeedit keybindings

* removed logs

* added computed property to codeedit
2024-03-22 17:55:45 -07:00
Cole Lashley d3c48e3a3e Control keybindings (#489)
* fixed inline settings textedit and added datepicker keybindings

* added dropdown keybindings

* added observable to make sure that keybindings aren't double registered

* added enter and escape keybindings for datepicker

* dropdown closure fix
2024-03-22 17:53:27 -07:00
Evan Simkowitz 3b633328a1 initial 2024-03-22 16:01:08 -07:00
Cole Lashley c0c53edb84 Modal keybindings (#484)
* first draft at modal keybindings

* added modal keybindings and inline settings text edit keybindings

* added switch for keybindings in modal footer

* removed logs

* remove another console.log

* fix userinput keybindings -- should be generic:cancel for 2nd one
2024-03-21 23:10:02 -07:00
Cole Lashley 923cf71e0a Ai chat keybindings (#481)
* added aichat keybindings

* remove console.log
2024-03-21 18:30:05 -07:00
Cole Lashley f705a4df0a Textarea keybindings (#470)
* first commit for textarea keybindings

* added empty onkeydown to get around default behavior for now

* added history keybindings

* removed tab special case

* fix two small issues with keybindings
2024-03-21 18:26:21 -07:00
Cole Lashley 75a82de5bf Adding engineered query to chat command (#488)
* added engineered query to chat command

* let ai know responses are rendered in markdown
2024-03-21 18:00:55 -07:00
Evan Simkowitz be37916ca6 Make a bunch of static elements unselectable (#486)
* Make a bunch of static elements unselectable

* remove unnecessary color
2024-03-21 10:19:29 -07:00
Mike Sawka 0781e6e821 more zsh reinitialization fixes (allow user input during initialization process) (#480)
* fix error logs in scws

* new RpcFollowUpPacketType

* make the rpc/followup handlers generic on the server side -- using new RpcHandlers map and RpcFollowUpPacketType

* rpcinputpacket for passing user input back through to reinit command

* add WAVETERM_DEV env var in dev mode

* remove unused code, ensure mshell and rcfile directory on startup (prevent root clobber with sudo)

* combine all feinput into one function msh.HandleFeInput, and add a new concept of input sinks for special cases (like reinit)

* allow reset to accept user input (to get around interactive initialization problems)

* tone down the selection background highlight color on dark mode.  easier to read selected text

* fix command focus and done focus issues with dynamic (non-run) commands

* add 'module' as a 'rtnstate' command (#478)

* reinitialize shells in parallel, fix timeouts, better error messages
2024-03-20 23:38:05 -07:00
Cole Lashley fb59e094e4 Added formatters for prints (#479) 2024-03-20 16:29:46 -07:00
Mike Sawka 5616c9abbb zsh reinit fixes (#477)
* reset command now initiates and completes async so there is feedback that something is happening when it takes a long time

* switch from standard rpc to rpciter

* checkpoint on reinit -- stream output, stats packet, logging to cmd pty, new endBytes for EOF

* make generic versions of endbytes scanner and channel output funcs

* update bash to use more modern state parsing (tricks learned from zsh)

* verbose mode, fix stats output message

* add a diff when verbose mode is on
2024-03-19 16:38:38 -07:00
Red J Adaya accb74ae0f Fix color regressions (#475)
* fix color regressions

* separate app status vars
2024-03-19 12:22:45 -07:00
Cole Lashley b24c81182b added client settings and removed open ai wording (#474) 2024-03-18 23:43:20 -07:00
Cole Lashley 23fa1c3823 Main View keybindings (#463)
* added all mainviews except session

* add session keybindings

* finished session keybindings

* organized by layer

* remove some webshare code and remove unused session cancel fn

* fixed checkkeypressed bug

* fixed kwargs, bug
2024-03-18 23:41:45 -07:00
Mike Sawka 901dcccaa5 zsh fixes (zmodload, k8s, new var type, track zsh prompt) (#473)
* checkpoint.  track zmodloads, get the expanded PS1 value, change how we store and deal with 'prompt vars', add commands to track k8s context

* fix some warnings, change IsPVar to IsExtVar, checkpoint

* parse zmodloads into state

* restore zmodloads, be more careful around readonly variable setting to avoid errors
2024-03-18 22:51:16 -07:00
Red J Adaya d2f5d87194 Finalize CSS vars (#472)
* remove unused vars

* replace remote status vars with --app-* vars

* replace status indicator vars with --app-* vars

* remove unused vars in default.css

* no need for bg color in view

* use --app* colors for view color

* remove --app-black var

* remove some unused css and divs
2024-03-18 22:00:13 -07:00
Red J Adaya a32bc10981 Datepicker with dark and light theme support (#397)
* datepicker. add electron-rebuild sa dev dependency

* comments

* use <If> component for conditional renders

* invoke callback on month change

* individual inputs for date parts

* keyboard support for input

* more on keyboard support

* dynamic setting of input width based on their text value

* remove error if fromts is out of range

* format is optional

* undo electron-rebuild
2024-03-18 21:44:11 -07:00
Mike Sawka 631b9b89b9 fix nil rct error (#471) 2024-03-18 21:29:39 -07:00
Cole Lashley 0a14a58663 List Config dir if directory is specified (#468)
* implemented list dir for config

* added file stat and path check

* addressed comments, added file not found error
2024-03-18 17:11:13 -07:00
Red J Adaya b656f4ce0f Replace old buttons with Button element (#466)
* init

* model

* pass model

* increase snap threshold

* move saving of state to model. backend implementation

* fix wrong clientdata prop

* right header space for right sidebar toggles

* button component refactor

* set default classname to primary

* remove debugging code

* hide trigger for now

* refactor Button. replace old buttons with Button element

* fix issue with closing alert modal

* make small button a little more round

* hide right sidebar toggle in prod
2024-03-18 16:14:21 -07:00
Red J Adaya 338b9c41c7 Fix wrong dragged tab background theme (#469) 2024-03-18 08:11:39 -07:00
Evan Simkowitz c7b77608a2 Small UI tweaks (#467)
* Extend bottom border for mainview underneath window controls

* Make sidebar button hover color an accent color

* revert 87 to 88

* make mint less bright on light mode

* revert modal border change
2024-03-15 09:54:39 -07:00
Evan Simkowitz 5f6b671ea8 Fix mainview header offset 2024-03-15 12:08:33 -04:00
Mike Sawka 318aae18d5 better exit code handling -- fix error highlights to not cover SIGINT or SIGPIPE (#465)
* fix exitcode return to handle signals correctly -- use bash convention of 128 + signum.  don't show red error mask for SIGINT or SIGPIPE

* dont show left border for errors unless selected
2024-03-14 23:58:09 -07:00
Mike Sawka 44535d2964 bump version to v0.7.1 (#464) 2024-03-14 23:04:19 -07:00
Sylvie Crowe 8851c8e2d6 Add Link to Telemetry Page in the Welcome Screen (#460)
* add link to telemetry page in the welcome screen

* fix: match link formatting to other links
2024-03-14 23:00:53 -07:00
Red J Adaya 07e0b53b17 Rght sidebar (#461)
* init

* model

* pass model

* increase snap threshold

* move saving of state to model. backend implementation

* fix wrong clientdata prop

* right header space for right sidebar toggles

* button component refactor

* set default classname to primary

* remove debugging code

* hide trigger for now

* disable right sidebar in production (only show on dev for now)
2024-03-14 22:59:55 -07:00
Cole Lashley 61c9d21014 Bookmarks mainview keybindings (#462)
* first keybind for bookmarks

* finished adding bookmark keybindings

* removing logs

* fix up/down directions
2024-03-14 22:44:17 -07:00
Sylvie Crowe bfafb9e490 Ssh Extra Fixes (#459) 2024-03-14 16:50:58 -07:00
Evan Simkowitz c546464751 Add scripthaus to path for Build Helper workflow (#458) 2024-03-14 12:23:35 -07:00
Evan Simkowitz 3f7c48a9ae Add blur for line actions (#455) 2024-03-14 12:19:21 -07:00
dependabot[bot] 21bf07bbf8 Bump follow-redirects from 1.15.4 to 1.15.6 (#457)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
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-03-14 12:18:11 -07:00
Evan Simkowitz fd05e11d3a Fix CodeQL checks for Go (#456)
* Fix CodeQL checks for Go

* add scripthaus checkout

* fix

* fix

* add scripthaus to path

* test go setup before init
2024-03-14 12:12:51 -07:00
Mike Sawka 8ac7d8c241 small cleanup of sizing for media plugin, null checks (#454)
* clean up media viewer size, null check, check for fileurl

* make video responsive to container
2024-03-14 10:32:37 -07:00
june 3f988c0e6b Add support for svg images to imageview command (#453) 2024-03-14 09:55:52 -07:00
Mike Sawka 0f2f6c9cc0 quick media viewer (using new hmac read-file urls) (#451) 2024-03-14 00:49:05 -07:00
Mike Sawka 697f7c0758 fix hmac implementation/typo. read WaveAuthKey and store in scbase instead of main-server (#450) 2024-03-14 00:22:59 -07:00
Mike Sawka 865658aa92 allow hmac authentication for read-file (#449) 2024-03-13 23:59:20 -07:00
Mike Sawka 4c68fc4ceb pdf viewer (#448)
* checkpoint on pdf viewer

* implement a pdf renderer (fix emain shFrameNavHandler to allow it)
2024-03-13 23:25:11 -07:00
Mike Sawka bff51c851a sync command to synchronize shell state with wave prompt (#444)
* remove two unused packet types, remove unused detatched command code

* CmdStart is invalid in this command loop

* slight refactor, remove closure funcs

* pass rct through to 'handle' funcs

* deal with rct (running command), update handler funcs accordingly

* update for runningcmdtype to be a pointer in the map (for updates)

* lots of changes related to ephemeral commands (for sync), checkpoint

* fix ephemeral setting

* sync shell state when you switch to a new tab
2024-03-13 18:52:41 -07:00
Sylvie Crowe 550d9c9716 fix: split the apple locale on the region for LANG (#447)
We use AppleLocale to get the desired language when running on macos.
Unfortunately, if a region is set, the locale is not equivalent to the
LANG environment variable. It appends an extra region field that we did
not previously filter out. This change ensures that it will be filtered
out when present.
2024-03-13 18:52:02 -07:00
Red J Adaya 9eb7461964 Close modals when pressing Escape (#433)
* remove clearmodals mothed as it's no longer needed

* close modals on ECS
2024-03-13 18:51:16 -07:00
Red J Adaya 0241e47f83 fix broken bookmarks view (#446) 2024-03-13 18:48:46 -07:00
Cole Lashley f87cc42ab9 Slash Commands for keybindings (#441)
* first pass of slash commands

* added mainview slashcommand

* added focus cmd input, added sleep

* addressed review comments

* addressed feedback

* demo idea of changing hide do cmd+m, can remove if we decide we don't like it

* added new keybinding for minimize

* addressed feedback

* added hide label

* fix hide (use app.hid(), not window.hide()

* fix history keybinding, make mainview command consistent
2024-03-13 18:47:16 -07:00
194 changed files with 16269 additions and 7414 deletions
+2 -1
View File
@@ -41,6 +41,7 @@ jobs:
cd scripthaus;
go get ./...;
CGO_ENABLED=1 go build -o scripthaus cmd/main.go
echo $PWD >> $GITHUB_PATH
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
@@ -53,7 +54,7 @@ jobs:
- name: Install Yarn Dependencies
run: yarn --frozen-lockfile
- name: Build ${{ matrix.platform }}/${{ matrix.arch }}
run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
run: scripthaus run ${{ matrix.scripthaus }}
env:
GOARCH: ${{ matrix.arch }}
CSC_LINK: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE}}
+32 -1
View File
@@ -47,6 +47,32 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout Scripthaus (Go only)
if: matrix.language == 'go'
uses: actions/checkout@v4
with:
repository: scripthaus-dev/scripthaus
path: scripthaus
- name: Setup Go (Go only)
uses: actions/setup-go@v5
if: matrix.language == 'go'
with:
go-version: stable
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
scripthaus/go.sum
- name: Install Scripthaus (Go only)
if: matrix.language == 'go'
run: |
go work use ./scripthaus;
cd scripthaus;
go get ./...;
CGO_ENABLED=1 go build -o scripthaus cmd/main.go
echo $PWD >> $GITHUB_PATH
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
@@ -61,9 +87,14 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- name: Autobuild (not Go)
if: matrix.language != 'go'
uses: github/codeql-action/autobuild@v3
- name: Build (Go only)
if: matrix.language == 'go'
run: scripthaus run build-backend
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+78 -8
View File
@@ -1,7 +1,12 @@
[
{
"command": "system:toggleDeveloperTools",
"keys": ["Cmd:Option:i"]
"keys": ["Cmd:Option:i"],
"info": "Opens the chrome developer tool menu"
},
{
"command": "system:hideWindow",
"keys": ["Cmd:m"]
},
{
"command": "generic:cancel",
@@ -11,10 +16,62 @@
"command": "generic:confirm",
"keys": ["Enter"]
},
{
"command": "generic:expandTextInput",
"keys": ["Shift:Enter", "Ctrl:Enter"]
},
{
"command": "generic:deleteItem",
"keys": ["Backspace", "Delete"]
},
{
"command": "generic:space",
"keys": ["Space"]
},
{
"command": "generic:tab",
"keys": ["Tab"]
},
{
"command": "generic:numpad-0",
"keys": ["0"]
},
{
"command": "generic:numpad-1",
"keys": ["1"]
},
{
"command": "generic:numpad-2",
"keys": ["2"]
},
{
"command": "generic:numpad-3",
"keys": ["3"]
},
{
"command": "generic:numpad-4",
"keys": ["4"]
},
{
"command": "generic:numpad-5",
"keys": ["5"]
},
{
"command": "generic:numpad-6",
"keys": ["6"]
},
{
"command": "generic:numpad-7",
"keys": ["7"]
},
{
"command": "generic:numpad-8",
"keys": ["8"]
},
{
"command": "generic:numpad-9",
"keys": ["9"]
},
{
"command": "generic:selectAbove",
"keys": ["ArrowUp"]
@@ -23,6 +80,14 @@
"command": "generic:selectBelow",
"keys": ["ArrowDown"]
},
{
"command": "generic:selectLeft",
"keys": ["ArrowLeft"]
},
{
"command": "generic:selectRight",
"keys": ["ArrowRight"]
},
{
"command": "generic:selectPageAbove",
"keys": ["PageUp"]
@@ -32,7 +97,7 @@
"keys": ["PageDown"]
},
{
"command": "app:openHistory",
"command": "app:openHistoryView",
"keys": ["Cmd:h"]
},
{
@@ -41,11 +106,13 @@
},
{
"command": "app:openConnectionsView",
"keys": []
"keys": [],
"commandStr": ["/mainview connections"]
},
{
"command": "app:openSettingsView",
"keys": []
"keys": [],
"commandStr": ["/mainview clientsettings"]
},
{
"command": "app:newTab",
@@ -61,7 +128,8 @@
},
{
"command": "app:restartCommand",
"keys": ["Cmd:r"]
"keys": ["Cmd:r"],
"info": "Restarts the command running in the current selected line"
},
{
"command": "app:restartLastCommand",
@@ -168,8 +236,9 @@
"keys": ["Cmd:d"]
},
{
"command": "app:bookmarkActiveLine",
"keys": ["Cmd:b"]
"command": "app:openBookmarksView",
"keys": ["Cmd:b"],
"commandStr": ["/bookmarks:show"]
},
{
"command": "bookmarks:edit",
@@ -213,7 +282,8 @@
},
{
"command": "cmdinput:openHistory",
"keys": ["Ctrl:r"]
"keys": ["Ctrl:r"],
"commandStr": ["/history"]
},
{
"command": "cmdinput:openAIChat",
+22 -11
View File
@@ -6,7 +6,7 @@
},
"productName": "Wave",
"description": "An Open-Source, AI-Native, Terminal Built for Seamless Workflows",
"version": "0.7.0",
"version": "0.7.2",
"main": "dist/emain.js",
"license": "Apache-2.0",
"repository": {
@@ -18,12 +18,13 @@
"appId": "dev.commandline.waveterm"
},
"dependencies": {
"@lexical/react": "^0.14.3",
"@monaco-editor/react": "^4.5.1",
"@table-nav/core": "^0.0.7",
"@table-nav/react": "^0.0.7",
"@tanstack/match-sorter-utils": "^8.8.4",
"@tanstack/react-table": "^8.10.3",
"@types/semver": "^7.5.6",
"@withfig/autocomplete": "^2.652.3",
"autobind-decorator": "^2.4.0",
"base64-js": "^1.5.1",
"classnames": "^2.3.1",
@@ -32,24 +33,30 @@
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "^6.1.8",
"framer-motion": "^10.16.16",
"lexical": "^0.14.3",
"mobx": "6.12",
"mobx-react": "^7.5.0",
"monaco-editor": "^0.44.0",
"mustache": "^4.2.0",
"node-fetch": "^3.2.10",
"overlayscrollbars": "^2.6.1",
"overlayscrollbars-react": "^0.5.5",
"papaparse": "^5.4.1",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-markdown": "^9.0.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.0",
"shell-quote": "^1.8.1",
"sprintf-js": "^1.1.2",
"throttle-debounce": "^5.0.0",
"tsx-control-statements": "^4.1.1",
"tsx-control-statements": "^5.1.1",
"uuid": "^9.0.0",
"winston": "^3.8.2",
"xterm": "^5.0.0",
"xterm-addon-web-links": "^0.9.0"
"xterm": "^5.3.0",
"xterm-addon-serialize": "^0.11.0",
"xterm-addon-web-links": "^0.9.0",
"xterm-addon-webgl": "^0.16.0"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
@@ -63,27 +70,31 @@
"@babel/preset-env": "^7.18.2",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.17.12",
"@electron/rebuild": "^3.6.0",
"@svgr/webpack": "^8.1.0",
"@types/classnames": "^2.3.1",
"@types/electron": "^1.6.10",
"@types/node": "20.11.0",
"@types/node": "^20.11.0",
"@types/papaparse": "^5.3.10",
"@types/react": "^18.0.12",
"@types/semver": "^7.5.6",
"@types/shell-quote": "^1.7.5",
"@types/sprintf-js": "^1.1.3",
"@types/throttle-debounce": "^5.0.1",
"@types/uuid": "9.0.7",
"@types/uuid": "^9.0.7",
"@types/webpack-env": "^1.18.3",
"@withfig/autocomplete-types": "^1.30.0",
"babel-loader": "^9.1.3",
"babel-plugin-jsx-control-statements": "^4.1.2",
"copy-webpack-plugin": "^11.0.0",
"copy-webpack-plugin": "^12.0.0",
"css-loader": "^6.7.1",
"electron": "29.0.1",
"electron": "^29.0.1",
"electron-builder": "^24.13.3",
"electron-builder-squirrel-windows": "^24.13.3",
"file-loader": "^6.2.0",
"http-server": "^14.1.1",
"less": "^4.1.2",
"less-loader": "^11.0.0",
"less-loader": "^12.0.0",
"lodash-webpack-plugin": "^0.11.6",
"mini-css-extract-plugin": "^2.6.0",
"prettier": "^2.8.8",
@@ -94,7 +105,7 @@
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.9.1",
"webpack-dev-server": "^5.0.4",
"webpack-merge": "^5.8.0",
"yaml": "^2.4.0"
},
+6 -6
View File
@@ -5,14 +5,14 @@
<base href="../" />
<script charset="UTF-8" src="dist-dev/waveterm.js"></script>
<link rel="stylesheet" href="public/bulma-0.9.4.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="public/fontawesome/css/brands.min.css">
<link rel="stylesheet" href="public/fontawesome/css/solid.min.css">
<link rel="stylesheet" href="public/fontawesome/css/sharp-solid.min.css">
<link rel="stylesheet" href="public/fontawesome/css/sharp-regular.min.css">
<link rel="stylesheet" href="public/fontawesome/css/fontawesome.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/brands.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-regular.min.css" />
<link rel="stylesheet" href="dist-dev/waveterm.css" />
<link rel="stylesheet" id="theme-stylesheet" href="public/themes/default.css">
<link rel="stylesheet" id="theme-stylesheet" href="public/themes/themequery.css" />
</head>
<body>
<div id="measure"></div>
+6 -6
View File
@@ -5,14 +5,14 @@
<base href="../" />
<script charset="UTF-8" src="dist/waveterm.js"></script>
<link rel="stylesheet" href="public/bulma-0.9.4.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="public/fontawesome/css/brands.min.css">
<link rel="stylesheet" href="public/fontawesome/css/solid.min.css">
<link rel="stylesheet" href="public/fontawesome/css/sharp-solid.min.css">
<link rel="stylesheet" href="public/fontawesome/css/sharp-regular.min.css">
<link rel="stylesheet" href="public/fontawesome/css/fontawesome.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/brands.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-regular.min.css" />
<link rel="stylesheet" href="dist/waveterm.css" />
<link rel="stylesheet" id="theme-stylesheet" href="public/themes/default.css" />
<link rel="stylesheet" id="theme-stylesheet" href="public/themes/themequery.css" />
</head>
<body>
<div id="measure"></div>
+49 -72
View File
@@ -7,16 +7,6 @@
:root {
--fa-style-family: "Font Awesome 6 Sharp";
/* these variables are overridden by user settings */
/*
--termfontfamily: "Hack";
--termfontsize: 13px;
--termlineheight: 15px;
--termpad: 7px;
--termfontsize-sm: 11px;
--termlineheight-sm: 13px;
*/
/* base fonts */
--base-font: normal 15px / normal "Lato", sans-serif;
@@ -44,37 +34,43 @@
--floating-logo-width: 40px;
--floating-logo-height: var(--screentabs-height);
/* right sidebar triggers */
--floating-right-sidebar-triggers-width-darwin: 50px;
--floating-right-sidebar-triggers-width: 40px;
/* global colors */
--app-bg-color: black;
--app-accent-color: rgb(88, 193, 66);
--app-accent-bg-color: rgba(88, 193, 66, 0.2);
--app-error-color: rgb(229, 77, 46);
--app-warning-color: rgb(224, 185, 86);
--app-success-color: rgb(78, 154, 6);
--app-accent-bg-color: rgba(88, 193, 66, 0.25);
--app-accent-bg-darker-color: rgba(88, 193, 66, 0.5);
--app-text-color: rgb(211, 215, 207);
--app-text-primary-color: rgb(255, 255, 255);
--app-text-secondary-color: rgb(195, 200, 194);
--app-text-disabled-color: rgb(173, 173, 173);
--app-text-bg-color: rgb(23, 23, 23);
--app-text-bg-disabled-color: rgb(51, 51, 51);
--app-border-color: rgb(51, 51, 51);
--app-maincontent-bg-color: #333;
--app-maincontent-bg-color: rgb(51, 51, 51);
--app-panel-bg-color: rgba(21, 23, 21, 1);
--app-panel-bg-color-dev: rgb(21, 23, 48);
--app-icon-color: rgb(139, 145, 138);
--app-icon-hover-color: #fff;
--app-icon-hover-color: rgb(255, 255, 255);
--app-selected-mask-color: rgba(255, 255, 255, 0.06);
/* icon colors */
/* global status colors */
--app-error-color: rgb(229, 77, 46);
--app-warning-color: rgb(224, 185, 86);
--app-success-color: rgb(78, 154, 6);
--app-idle-color: var(--app-text-secondary-color);
/* just for macos */
--app-border-radius-darwin: 10px;
/* global generic colors */
--app-black: rgb(0, 0, 0);
/* scrollbar colors */
/* --scrollbar-background-color: rgba(21, 23, 21, 1); */
--scrollbar-background-color: var(--app-bg-color);
--scrollbar-thumb-color: rgba(255, 255, 255, 0.3);
--scrollbar-thumb-hover-color: rgba(255, 255, 255, 0.5);
--scrollbar-thumb-active-color: rgba(255, 255, 255, 0.6);
/* code color */
--pre-bg-color: rgb(0, 0, 0);
@@ -94,6 +90,7 @@
--form-element-border-color: rgba(241, 246, 243, 0.15);
--form-element-bg-color: var(--app-bg-color);
--form-element-text-color: var(--app-text-primary-color);
--form-element-primary-text-color: var(--app-text-primary-color);
--form-element-label-color: var(--app-text-secondary-color);
--form-element-primary-color: var(--app-accent-color);
--form-element-secondary-color: rgba(255, 255, 255, 0.2);
@@ -112,34 +109,15 @@
--markdown-bg-color: rgb(35, 35, 35);
--markdown-outline-color: var(--form-element-primary-color);
/* status(remote) colors */
/* todo: all status colors must be unified */
--status-connected-color: var(--app-success-color);
--status-connecting-color: var(--app-warning-color);
--status-error-color: var(--app-error-color);
--status-disconnected-color: var(--app-text-secondary-color);
/* status indicator colors */
/* todo: all status colors must be unified */
--status-indicator-color: var(--app-text-color);
--status-indicator-error: var(--status-error-color);
--status-indicator-success: var(--status-connected-color);
/* status(version) colors */
/* todo: all status colors must be unified */
--status-outdated-color: var(--status-connecting-color);
--status-updated-color: var(--status-connected-color);
/* term status colors */
/* todo: all status colors must be unified */
--term-error-color: var(--status-error-color);
--term-warning-color: var(--status-connecting-color);
--term-error-color: var(--app-error-color);
--term-warning-color: var(--app-warning-color);
/* hotkey colors */
--hotkey-text-color: var(--app-text-secondary-color);
/* sidebar colors */
--sidebar-highlight-color: rgba(241, 246, 243, 0.08);
--sidebar-highlight-color: var(--app-accent-bg-color);
--sidebar-font-size: 15px;
--sidebar-line-height: 1.5;
--sidebar-font-weight: normal;
@@ -147,19 +125,18 @@
/* line colors */
--line-sidebar-message-color: rgb(196, 160, 0);
--line-background: rgba(21, 23, 21, 1);
--line-avatar-color: #eceeec;
--line-background: var(--app-panel-bg-color);
--line-avatar-color: rgb(236, 238, 236);
--line-text-color: rgb(211, 215, 207);
--line-svg-fill-color: rgb(150, 152, 150);
--line-svg-hover-fill-color: #eceeec;
--line-selected-border-color: rgb(193, 195, 193);
--line-svg-hover-fill-color: rgb(236, 238, 236);
--line-separator-color: rgb(126, 126, 126);
--line-error-color: var(--app-error-color);
--line-warning-color: var(--app-warning-color);
--line-base-soft-blue-color: #729fcf;
--line-base-soft-blue-color: rgb(114, 159, 207);
--line-active-border-color: var(--app-accent-color);
--line-selected-bg-color: rgba(255, 255, 255, 0.05);
--line-selected-border-left-color: #777777;
--line-selected-border-left-color: rgb(119, 119, 119);
--line-selected-error-border-color: rgba(204, 0, 0, 0.8);
--line-selected-error-bg-color: rgb(19, 4, 3);
--line-error-bg-color: rgba(200, 0, 0, 0.1);
@@ -175,39 +152,24 @@
--line-actions-active-color: rgba(255, 255, 255, 1);
--line-actions-bg-color: rgba(255, 255, 255, 0.15);
/* view colors */
/* todo: bookmarks is a view, colors must be unified with --view* colors */
--bookmarks-text-color: rgb(211, 215, 207);
--bookmarks-textarea-bg-color: rgb(0, 0, 0);
--bookmarks-disabled-text-color: rgb(173, 173, 173);
--bookmarks-control-hover-color: rgb(255, 255, 255);
/* view colors */
--view-error-color: var(--app-error-color);
--view-text-color: var(--app-text-color);
/* table colors */
--table-border-color: rgba(241, 246, 243, 0.15);
--table-thead-border-top-color: rgba(250, 250, 250, 0.1);
--table-thead-bright-border-color: #ccc;
--table-thead-bright-border-color: rgb(204, 204, 204);
--table-thead-bg-color: rgba(250, 250, 250, 0.02);
--table-tr-border-bottom-color: rgba(241, 246, 243, 0.15);
--table-tr-hover-bg-color: rgba(255, 255, 255, 0.06);
--table-tr-selected-bg-color: #222;
--table-tr-selected-hover-bg-color: #333;
/* session colors */
--session-bg-color: rgba(13, 13, 13, 0.85);
--table-tr-selected-bg-color: rgb(34, 34, 34);
--table-tr-selected-hover-bg-color: var(--app-maincontent-bg-color);
/* cmdinput colors */
--cmdinput-textarea-bg-color: #171717;
--cmdinput-bg-color: var(--app-text-bg-color);
--cmdinput-text-error-color: var(--term-red);
--cmdinput-history-item-error-color: var(--term-bright-red);
--cmdinput-history-item-selected-error-color: var(--term-bright-red);
--cmdinput-button-bg-color: rgb(88, 193, 66);
--cmdinput-comment-button-bg-color: rgb(57, 113, 255);
--cmdinput-disabled-icon-color: rgb(76, 81, 75, 1);
--cmdinput-history-bg-color: rgb(21, 23, 21, 1);
--cmdinput-button-bg-color: var(--tab-green);
--cmdinput-disabled-bg-color: var(--app-text-bg-disabled-color);
--cmdinput-history-bg-color: var(--app-bg-color);
/* screen view color */
--screen-view-text-caption-color: rgb(139, 145, 138);
@@ -219,5 +181,20 @@
--modal-bg-color: var(--app-bg-color);
--modal-header-bottom-border-color: rgba(241, 246, 243, 0.15);
--logo-button-hover-bg-color: #1e1e1e;
--logo-button-hover-bg-color: var(--app-accent-bg-color);
--xterm-viewport-border-color: rgba(241, 246, 243, 0.15);
--datepicker-cell-hover-bg-color: rgba(255, 255, 255, 0.06);
--datepicker-cell-other-text-color: rgba(255, 255, 255, 0.3);
--datepicker-header-fade-color: rgba(255, 255, 255, 0.4);
--datepicker-year-header-bg-color: rgba(255, 255, 255, 0.2); /* Light grey background */
--datepicker-year-header-border-color: rgba(241, 246, 243, 0.15); /* Light grey border */
/* OverlayScrollbars styling */
.os-scrollbar {
--os-handle-bg: var(--scrollbar-thumb-color);
--os-handle-bg-hover: var(--scrollbar-thumb-hover-color);
--os-handle-bg-active: var(--scrollbar-thumb-active-color);
}
}
+29 -29
View File
@@ -1,36 +1,28 @@
/* Copyright 2024, Command Line Inc.
SPDX-License-Identifier: Apache-2.0 */
@import "./default.css";
@import "./term-default.css";
@import "./term-light.css";
@import url("./term-default.css");
@import url("./term-light.css");
:root {
--app-bg-color: #fefefe;
--app-bg-color: rgb(254, 254, 254);
--app-accent-color: rgb(75, 166, 57);
--app-accent-bg-color: rgba(75, 166, 57, 0.2);
--app-text-color: #000;
--app-text-primary-color: rgb(0, 0, 0, 0.9);
--app-text-secondary-color: rgb(0, 0, 0, 0.7);
--app-text-color: rgb(0, 0, 0);
--app-text-primary-color: rgb(23, 23, 23);
--app-text-secondary-color: rgb(76, 76, 76);
--app-border-color: rgb(139 145 138);
--app-panel-bg-color: #e0e0e0;
--app-panel-bg-color-dev: #e0e0e0;
--app-icon-color: rgb(80, 80, 80);
--app-icon-hover-color: rgb(100, 100, 100);
--app-panel-bg-color: rgb(224, 224, 224);
--app-panel-bg-color-dev: rgb(224, 224, 224);
--app-icon-color: rgb(110, 110, 110);
--app-icon-hover-color: rgb(80, 80, 80);
--app-selected-mask-color: rgba(0, 0, 0, 0.06);
--input-bg-color: #eeeeee;
--input-bg-color: rgb(238, 238, 238);
/* tab color */
--tab-white: rgb(0, 0, 0, 0.6);
/* button colors */
--button-text-color: rgb(50, 50, 50); /* Dark gray for light theme */
--button-primary-color: #fefefe;
--button-secondary-bg-color: rgba(200, 200, 200, 0.3); /* Semi-transparent light gray */
/* view colors */
--view-text-color: var(--app-text-color);
--tab-mint: rgb(70, 235, 156);
/* table colors */
--table-thead-border-top-color: rgba(0, 0, 0, 0.2);
@@ -38,18 +30,19 @@
--table-thead-bg-color: rgba(250, 250, 250, 0.15);
--table-tr-border-bottom-color: rgba(0, 0, 0, 0.15);
--table-tr-hover-bg-color: rgba(0, 0, 0, 0.15);
--table-tr-selected-bg-color: #dddddd;
--table-tr-selected-hover-bg-color: #cccccc;
--table-tr-selected-bg-color: rgb(221, 221, 221);
--table-tr-selected-hover-bg-color: rgb(204, 204, 204);
/* form colors */
--form-element-border-color: rgba(0, 0, 0, 0.3);
--form-element-bg-color: var(--app-bg-color);
--form-element-text-color: var(--app-text-color);
--form-element-text-color: var(--app-text-primary-color);
--form-element-primary-text-color: var(--app-text-primary-color);
--form-element-label-color: rgba(0, 0, 0, 0.6);
--form-element-secondary-color: rgba(0, 0, 0, 0.09);
--form-element-icon-color: rgb(0, 0, 0, 0.6);
--form-element-disabled-text-color: #b7b7b7;
--form-element-placeholder-color: #b7b7b7;
--form-element-disabled-text-color: rgb(183, 183, 183);
--form-element-placeholder-color: rgb(183, 183, 183);
--markdown-bg-color: rgb(0, 0, 0, 0.1);
@@ -57,21 +50,28 @@
--modal-header-bottom-border-color: rgba(0, 0, 0, 0.3);
/* cmd input */
--cmdinput-textarea-bg-color: rgba(0, 0, 0, 0.1);
--cmdinput-textarea-border-color: var(--form-element-border-color);
/* scroll colors */
--scrollbar-background-color: var(--app-bg-color);
--scrollbar-thumb-color: rgba(0, 0, 0, 0.2);
--scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.4);
--scrollbar-thumb-active-color: rgba(0, 0, 0, 0.5);
/* line color */
--line-actions-bg-color: rgba(0, 0, 0, 0.1);
--line-actions-inactive-color: rgba(0, 0, 0, 0.3);
--line-actions-active-color: rgba(0, 0, 0, 1);
--logo-button-hover-bg-color: rgb(240, 240, 240);
--xterm-viewport-border-color: rgba(0, 0, 0, 0.3);
--datepicker-cell-hover-bg-color: rgb(240, 240, 240);
--datepicker-cell-other-text-color: rgba(0, 0, 0, 0.3);
--datepicker-header-fade-color: rgba(0, 0, 0, 0.4);
--datepicker-year-header-bg-color: rgb(245, 245, 245);
--datepicker-year-header-border-color: rgb(220, 220, 220);
/* toggle colors */
--toggle-thumb-color: var(--app-bg-color);
--logo-button-hover-bg-color: #f0f0f0;
}
+1 -1
View File
@@ -27,6 +27,6 @@
--term-cmdtext: #ffffff;
--term-foreground: #d3d7cf;
--term-background: #000000;
--term-selection-background: #ffffff90;
--term-selection-background: #ffffff60;
--term-cursor-accent: #000000;
}
+3
View File
@@ -0,0 +1,3 @@
@import url("./default.css") screen;
@import url("./light.css") screen and (prefers-color-scheme: light);
+3 -3
View File
@@ -44,7 +44,7 @@ rm -rf bin/
rm -rf build/
node_modules/.bin/webpack --env prod
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
WAVESHELL_VERSION=v0.5
WAVESHELL_VERSION=v0.6
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
function buildWaveShell {
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
@@ -69,7 +69,7 @@ rm -rf bin/
rm -rf build/
node_modules/.bin/webpack --env prod
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
WAVESHELL_VERSION=v0.5
WAVESHELL_VERSION=v0.6
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
function buildWaveShell {
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
@@ -96,7 +96,7 @@ CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflag
```bash
# @scripthaus command fullbuild-waveshell
set -e
WAVESHELL_VERSION=v0.5
WAVESHELL_VERSION=v0.6
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
function buildWaveShell {
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
+102 -41
View File
@@ -101,6 +101,7 @@ body input.input {
font-size: 10px;
font-weight: 300;
line-height: 14px;
user-select: none;
}
.text-s1.icon {
@@ -250,6 +251,13 @@ input[type="checkbox"] {
justify-content: center;
}
.flex-centered-column {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
a.a-block {
display: block;
}
@@ -302,6 +310,25 @@ a.a-block {
}
}
.right-sidebar-triggers {
position: absolute;
z-index: 25;
right: 0px;
display: flex;
flex-direction: row;
align-items: center;
pointer-events: none;
height: 38px;
padding: 0 5px;
.right-sidebar-trigger {
cursor: pointer;
user-select: none;
-webkit-app-region: no-drag;
pointer-events: all;
}
}
.copied-indicator {
position: absolute;
top: 0;
@@ -716,28 +743,28 @@ a.a-block {
.status-icon.status-connected {
path,
circle {
fill: var(--status-connected-color);
fill: var(--app-success-color);
}
}
.status-icon.status-connecting {
path,
circle {
fill: var(--status-connecting-color);
fill: var(--app-warning-color);
}
}
.status-icon.status-disconnected {
path,
circle {
fill: var(--status-disconnected-color);
fill: var(--app-idle-color);
}
}
.status-icon.status-error {
path,
circle {
fill: var(--status-error-color);
fill: var(--app-error-color);
}
}
@@ -766,6 +793,75 @@ a.a-block {
margin-top: 6px;
}
.conn-dropdown {
width: 412px;
.lefticon {
position: absolute;
top: 50%;
left: 16px;
transform: translateY(-50%);
.globe-icon {
width: 16px;
height: 16px;
flex-shrink: 0;
fill: var(--app-text-secondary-color);
}
.status-icon {
position: absolute;
left: 7px;
top: 8px;
circle {
stroke: var(--app-bg-color);
}
}
}
.wave-dropdown-display {
bottom: 7px;
}
}
.tab-colors,
.tab-icons {
display: flex;
flex-direction: row;
align-items: center;
.tab-color-sep,
.tab-icon-sep {
padding-left: 10px;
padding-right: 10px;
font-weight: bold;
user-select: none;
}
.tab-color-icon,
.tab-icon-icon {
width: 1.1em;
vertical-align: middle;
}
.tab-color-name,
.tab-icon-name {
display: inline-block;
margin-left: 1em;
min-width: 70px;
user-select: none;
}
.tab-color-select,
.tab-icon-select {
cursor: pointer;
margin: 3px;
&:hover {
outline: 2px solid white;
}
}
}
.settings-field {
display: flex;
flex-direction: row;
@@ -800,6 +896,7 @@ a.a-block {
display: flex;
flex-direction: row;
align-items: center;
user-select: none;
.info-message {
margin-left: 5px;
}
@@ -826,7 +923,7 @@ a.a-block {
}
}
input {
input:not(.wave-input) {
padding: 4px;
border-radius: 3px;
}
@@ -837,42 +934,6 @@ a.a-block {
}
}
.tab-colors,
.tab-icons {
display: flex;
flex-direction: row;
align-items: center;
.tab-color-sep,
.tab-icon-sep {
padding-left: 10px;
padding-right: 10px;
font-weight: bold;
}
.tab-color-icon,
.tab-icon-icon {
width: 1.1em;
vertical-align: middle;
}
.tab-color-name,
.tab-icon-name {
display: inline-block;
margin-left: 1em;
min-width: 70px;
}
.tab-color-select,
.tab-icon-select {
cursor: pointer;
margin: 3px;
&:hover {
outline: 2px solid white;
}
}
}
.action-text {
margin-left: 20px;
+39 -15
View File
@@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
import { If } from "tsx-control-statements/components";
import dayjs from "dayjs";
import localizedFormat from "dayjs/plugin/localizedFormat";
import { GlobalCommandRunner, GlobalModel } from "@/models";
import { GlobalModel } from "@/models";
import { isBlank } from "@/util/util";
import { WorkspaceView } from "./workspace/workspaceview";
import { PluginsView } from "./pluginsview/pluginsview";
@@ -16,10 +16,12 @@ import { BookmarksView } from "./bookmarks/bookmarks";
import { HistoryView } from "./history/history";
import { ConnectionsView } from "./connections/connections";
import { ClientSettingsView } from "./clientsettings/clientsettings";
import { MainSideBar } from "./sidebar/sidebar";
import { DisconnectedModal, ClientStopModal } from "./common/modals";
import { ModalsProvider } from "./common/modals/provider";
import { ErrorBoundary } from "./common/error/errorboundary";
import { MainSideBar } from "./sidebar/main";
import { RightSideBar } from "./sidebar/right";
import { DisconnectedModal, ClientStopModal } from "@/modals";
import { ModalsProvider } from "@/modals/provider";
import { Button } from "@/elements";
import { ErrorBoundary } from "@/common/error/errorboundary";
import cn from "classnames";
import "./app.less";
@@ -65,9 +67,17 @@ class App extends React.Component<{}, {}> {
}
@boundMethod
openSidebar() {
const width = GlobalModel.mainSidebarModel.getWidth(true);
GlobalCommandRunner.clientSetSidebar(width, false);
openMainSidebar() {
const mainSidebarModel = GlobalModel.mainSidebarModel;
const width = mainSidebarModel.getWidth(true);
mainSidebarModel.saveState(width, false);
}
@boundMethod
openRightSidebar() {
const rightSidebarModel = GlobalModel.rightSidebarModel;
const width = rightSidebarModel.getWidth(true);
rightSidebarModel.saveState(width, false);
}
render() {
@@ -91,7 +101,7 @@ class App extends React.Component<{}, {}> {
return (
<div id="main" className={"platform-" + platform} onContextMenu={this.handleContextMenu}>
<div ref={this.mainContentRef} className="main-content">
<MainSideBar parentRef={this.mainContentRef} clientData={clientData} />
<MainSideBar parentRef={this.mainContentRef} />
<div className="session-view" />
</div>
<If condition={dcWait}>
@@ -110,25 +120,38 @@ class App extends React.Component<{}, {}> {
}
// used to force a full reload of the application
const renderVersion = GlobalModel.renderVersion.get();
const sidebarCollapsed = GlobalModel.mainSidebarModel.getCollapsed();
const lightDarkClass = GlobalModel.isThemeDark() ? "is-dark" : "is-light";
const mainSidebarCollapsed = GlobalModel.mainSidebarModel.getCollapsed();
const rightSidebarCollapsed = GlobalModel.rightSidebarModel.getCollapsed();
const activeMainView = GlobalModel.activeMainView.get();
const lightDarkClass = GlobalModel.isDarkTheme.get() ? "is-dark" : "is-light";
return (
<div
key={"version-" + renderVersion}
id="main"
className={cn("platform-" + platform, { "sidebar-collapsed": sidebarCollapsed }, lightDarkClass)}
className={cn(
"platform-" + platform,
{ "mainsidebar-collapsed": mainSidebarCollapsed, "rightsidebar-collapsed": rightSidebarCollapsed },
lightDarkClass
)}
onContextMenu={this.handleContextMenu}
>
<If condition={sidebarCollapsed}>
<If condition={mainSidebarCollapsed}>
<div key="logo-button" className="logo-button-container">
<div className="logo-button-spacer" />
<div className="logo-button" onClick={this.openSidebar}>
<div className="logo-button" onClick={this.openMainSidebar}>
<img src="public/logos/wave-logo.png" alt="logo" />
</div>
</div>
</If>
<If condition={GlobalModel.isDev && rightSidebarCollapsed && activeMainView == "session"}>
<div className="right-sidebar-triggers">
<Button className="secondary ghost right-sidebar-trigger" onClick={this.openRightSidebar}>
<i className="fa-sharp fa-solid fa-sidebar-flip"></i>
</Button>
</div>
</If>
<div ref={this.mainContentRef} className="main-content">
<MainSideBar parentRef={this.mainContentRef} clientData={clientData} />
<MainSideBar parentRef={this.mainContentRef} />
<ErrorBoundary>
<PluginsView />
<WorkspaceView />
@@ -137,6 +160,7 @@ class App extends React.Component<{}, {}> {
<ConnectionsView model={remotesModel} />
<ClientSettingsView model={remotesModel} />
</ErrorBoundary>
<RightSideBar parentRef={this.mainContentRef} />
</div>
<ModalsProvider />
</div>
+5
View File
@@ -64,3 +64,8 @@ export enum StatusIndicatorLevel {
// matches packet.go
export const ErrorCode_InvalidCwd = "ERRCWD";
export const InputAuxView_History = "history";
export const InputAuxView_Info = "info";
export const InputAuxView_AIChat = "aichat";
export const InputAuxView_Suggestions = "suggestions";
+7 -11
View File
@@ -6,11 +6,11 @@
}
.bookmarks-list {
color: var(--bookmarks-text-color);
color: var(--app-text-color);
margin: 4px 10px 5px 5px;
.no-bookmarks {
color: var(--bookmarks-text-color);
color: var(--app-text-color);
padding: 30px 10px 35px 10px;
border-bottom: 1px solid white;
}
@@ -46,21 +46,21 @@
}
label {
color: var(--bookmarks-text-color);
color: var(--app-text-color);
margin-bottom: 4px;
}
textarea {
width: 80%;
min-width: 50%;
color: var(--bookmarks-text-color);
background-color: var(--bookmarks-textarea-bg-color);
color: var(--app-text-color);
background-color: var(--form-element-bg-color);
}
.bookmark-id-div {
display: none;
position: absolute;
color: var(--bookmarks-disabled-text-color);
color: var(--app-text-disabled-color);
right: 5px;
bottom: 2px;
font-size: 0.8em;
@@ -75,7 +75,7 @@
flex-direction: row;
visibility: hidden;
color: var(--bookmarks-text-color);
color: var(--app-text-color);
.bookmark-control:first-child {
margin-left: 0;
@@ -85,10 +85,6 @@
margin-left: 10px;
cursor: pointer;
padding: 2px;
&:hover {
color: var(--bookmarks-control-hover-color);
}
}
}
+57 -1
View File
@@ -22,6 +22,59 @@ type BookmarkProps = {
bookmark: BookmarkType;
};
class BookmarkKeybindings extends React.Component<{}, {}> {
@boundMethod
componentDidMount(): void {
let keybindManager = GlobalModel.keybindManager;
let bookmarksModel = GlobalModel.bookmarksModel;
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:cancel", (waveEvent) => {
bookmarksModel.handleUserClose();
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:deleteItem", (waveEvent) => {
bookmarksModel.handleUserDelete();
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:selectAbove", (waveEvent) => {
bookmarksModel.handleUserNavigate(-1);
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:selectBelow", (waveEvent) => {
bookmarksModel.handleUserNavigate(1);
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:selectPageAbove", (waveEvent) => {
bookmarksModel.handleUserNavigate(-10);
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:selectPageBelow", (waveEvent) => {
bookmarksModel.handleUserNavigate(10);
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "generic:confirm", (waveEvent) => {
bookmarksModel.handleUserConfirm();
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "bookmarks:edit", (waveEvent) => {
bookmarksModel.handleUserEdit();
return true;
});
keybindManager.registerKeybinding("mainview", "bookmarks", "bookmarks:copy", (waveEvent) => {
bookmarksModel.handleUserCopy();
return true;
});
}
@boundMethod
componentWillUnmount() {
GlobalModel.keybindManager.unregisterDomain("bookmarks");
}
render() {
return null;
}
}
@mobxReact.observer
class Bookmark extends React.Component<BookmarkProps, {}> {
@boundMethod
@@ -193,7 +246,10 @@ class BookmarksView extends React.Component<{}, {}> {
let bookmarks = GlobalModel.bookmarksModel.bookmarks;
let bookmark: BookmarkType = null;
return (
<MainView viewName="bookmarks" title="Bookmarks" onClose={this.handleClose}>
<MainView className="bookmarks-view" title="Bookmarks" onClose={this.handleClose}>
<If condition={!isHidden}>
<BookmarkKeybindings></BookmarkKeybindings>
</If>
<div className="bookmarks-list">
<For index="idx" each="bookmark" of={bookmarks}>
<Bookmark key={bookmark.bookmarkid} bookmark={bookmark} />
+121 -17
View File
@@ -5,13 +5,34 @@ import * as React from "react";
import * as mobxReact from "mobx-react";
import * as mobx from "mobx";
import { boundMethod } from "autobind-decorator";
import { GlobalModel, GlobalCommandRunner, RemotesModel, getApi } from "@/models";
import { If } from "tsx-control-statements/components";
import { GlobalModel, GlobalCommandRunner, RemotesModel } from "@/models";
import { Toggle, InlineSettingsTextEdit, SettingsError, Dropdown } from "@/common/elements";
import { commandRtnHandler, isBlank } from "@/util/util";
import { getTermThemes } from "@/util/themeutil";
import * as appconst from "@/app/appconst";
import { MainView } from "@/common/elements/mainview";
import "./clientsettings.less";
import { MainView } from "../common/elements/mainview";
class ClientSettingsKeybindings extends React.Component<{}, {}> {
componentDidMount() {
let clientSettingsViewModel = GlobalModel.clientSettingsViewModel;
let keybindManager = GlobalModel.keybindManager;
keybindManager.registerKeybinding("mainview", "clientsettings", "generic:cancel", (waveEvent) => {
clientSettingsViewModel.closeView();
return true;
});
}
componentWillUnmount() {
GlobalModel.keybindManager.unregisterDomain("clientsettings");
}
render() {
return null;
}
}
@mobxReact.observer
class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hoveredItemId: string }> {
@@ -44,11 +65,25 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
}
@boundMethod
handleChangeTheme(theme: string): void {
if (GlobalModel.getTheme() == theme) {
handleChangeThemeSource(themeSource: NativeThemeSource): void {
if (GlobalModel.getThemeSource() == themeSource) {
return;
}
const prtn = GlobalCommandRunner.setTheme(theme, false);
const prtn = GlobalCommandRunner.setTheme(themeSource, false);
GlobalModel.getElectronApi().setNativeThemeSource(themeSource);
commandRtnHandler(prtn, this.errorMessage);
}
@boundMethod
handleChangeTermTheme(theme: string): void {
// For global terminal theme, the key is global, otherwise it's either
// sessionId or screenId.
const currTheme = GlobalModel.getTermTheme()["global"];
if (currTheme == theme) {
return;
}
const prtn = GlobalCommandRunner.setGlobalTermTheme(theme, false);
commandRtnHandler(prtn, this.errorMessage);
}
@@ -72,7 +107,20 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
prtn = GlobalCommandRunner.releaseCheckAutoOff(false);
}
commandRtnHandler(prtn, this.errorMessage);
getApi().changeAutoUpdate(val);
GlobalModel.getElectronApi().changeAutoUpdate(val);
}
@boundMethod
handleChangeAutocompleteEnabled(val: boolean): void {
const prtn: Promise<CommandRtnType> = GlobalCommandRunner.setAutocompleteEnabled(val);
commandRtnHandler(prtn, this.errorMessage);
}
@boundMethod
handleChangeAutocompleteDebuggingEnabled(val: boolean): void {
mobx.action(() => {
GlobalModel.autocompleteModel.loggingEnabled = val;
})();
}
getFontSizes(): DropdownItem[] {
@@ -91,11 +139,12 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
return availableFontFamilies;
}
getThemes(): DropdownItem[] {
const themes: DropdownItem[] = [];
themes.push({ label: "Dark", value: "dark" });
themes.push({ label: "Light", value: "light" });
return themes;
getThemeSources(): DropdownItem[] {
const themeSources: DropdownItem[] = [];
themeSources.push({ label: "Dark", value: "dark" });
themeSources.push({ label: "Light", value: "light" });
themeSources.push({ label: "System", value: "system" });
return themeSources;
}
@boundMethod
@@ -116,6 +165,12 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
commandRtnHandler(prtn, this.errorMessage);
}
@boundMethod
inlineUpdateOpenAIBaseURL(newBaseURL: string): void {
const prtn = GlobalCommandRunner.setClientOpenAISettings({ baseurl: newBaseURL });
commandRtnHandler(prtn, this.errorMessage);
}
@boundMethod
setErrorMessage(msg: string): void {
mobx.action(() => {
@@ -164,10 +219,15 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
);
const curFontSize = GlobalModel.getTermFontSize();
const curFontFamily = GlobalModel.getTermFontFamily();
const curTheme = GlobalModel.getTheme();
const curTheme = GlobalModel.getThemeSource();
const termThemes = getTermThemes(GlobalModel.termThemes, "Wave Default");
const currTermTheme = GlobalModel.getTermTheme()["global"] ?? termThemes[0].label;
return (
<MainView className="clientsettings-view" title="Client Settings" onClose={this.handleClose}>
<If condition={!isHidden}>
<ClientSettingsKeybindings></ClientSettingsKeybindings>
</If>
<div className="content">
<div className="settings-field">
<div className="settings-label">Term Font Size</div>
@@ -196,12 +256,25 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
<div className="settings-input">
<Dropdown
className="theme-dropdown"
options={this.getThemes()}
options={this.getThemeSources()}
defaultValue={curTheme}
onChange={this.handleChangeTheme}
onChange={this.handleChangeThemeSource}
/>
</div>
</div>
<If condition={termThemes.length > 0}>
<div className="settings-field">
<div className="settings-label">Terminal Theme</div>
<div className="settings-input">
<Dropdown
className="terminal-theme-dropdown"
options={termThemes}
defaultValue={currTermTheme}
onChange={this.handleChangeTermTheme}
/>
</div>
</div>
</If>
<div className="settings-field">
<div className="settings-label">Client ID</div>
<div className="settings-input">{cdata.clientid}</div>
@@ -232,7 +305,7 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
</div>
</div>
<div className="settings-field">
<div className="settings-label">OpenAI Token</div>
<div className="settings-label">AI Token</div>
<div className="settings-input">
<InlineSettingsTextEdit
placeholder=""
@@ -245,7 +318,20 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
</div>
</div>
<div className="settings-field">
<div className="settings-label">OpenAI Model</div>
<div className="settings-label">AI Base URL</div>
<div className="settings-input">
<InlineSettingsTextEdit
placeholder=""
text={isBlank(openAIOpts.baseurl) ? "openai default" : openAIOpts.baseurl}
value={openAIOpts.baseurl ?? ""}
onChange={this.inlineUpdateOpenAIBaseURL}
maxLength={200}
showIcon={true}
/>
</div>
</div>
<div className="settings-field">
<div className="settings-label">AI Model</div>
<div className="settings-input">
<InlineSettingsTextEdit
placeholder="gpt-3.5-turbo"
@@ -258,7 +344,7 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
</div>
</div>
<div className="settings-field">
<div className="settings-label">OpenAI MaxTokens</div>
<div className="settings-label">AI MaxTokens</div>
<div className="settings-input">
<InlineSettingsTextEdit
placeholder=""
@@ -281,6 +367,24 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
/>
</div>
</div>
<div className="settings-field">
<div className="settings-label">Command Autocomplete</div>
<div className="settings-input">
<Toggle
checked={cdata.clientopts.autocompleteenabled ?? false}
onChange={this.handleChangeAutocompleteEnabled}
/>
</div>
</div>
<div className="settings-field">
<div className="settings-label">Command Autocomplete Debugging</div>
<div className="settings-input">
<Toggle
checked={GlobalModel.autocompleteModel.loggingEnabled}
onChange={this.handleChangeAutocompleteDebuggingEnabled}
/>
</div>
</div>
<SettingsError errorMessage={this.errorMessage} />
</div>
</MainView>
+80 -29
View File
@@ -1,11 +1,8 @@
.wave-button {
background: none;
color: inherit;
border: none;
font: inherit;
cursor: pointer;
outline: inherit;
display: flex;
padding: 6px 16px;
align-items: center;
@@ -13,57 +10,111 @@
border-radius: 6px;
height: auto;
line-height: 1.5;
white-space: nowrap;
user-select: none;
color: var(--form-element-text-color);
background: var(--form-element-primary-color);
i {
fill: var(--form-element-text-color);
}
&.primary {
color: var(--form-element-primary-text-color);
background: var(--form-element-primary-color);
i {
fill: var(--form-element-text-color);
}
}
&.primary.danger {
background: var(--app-error-color);
}
&.primary.outlined {
background: none;
border: 1px solid var(--form-element-primary-color);
i {
fill: var(--form-element-primary-color);
}
}
&.solid {
color: var(--form-element-text-color);
background: var(--form-element-primary-color);
&.primary.greyoutlined {
background: none;
border: 1px solid var(--app-text-secondary-color);
i {
fill: var(--form-element-text-color);
}
i {
fill: var(--app-text-secondary-color);
}
}
&.outlined {
border: 1px solid var(--form-element-primary-color);
&.primary.outlined,
&.primary.greyoutlined {
&.hover-danger:hover {
color: var(--form-element-primary-text-color);
border: 1px solid var(--app-error-color);
background: var(--app-error-color);
}
}
&.ghost {
// Styles for .ghost are already defined above
&.primary.outlined.danger {
background: none;
border: 1px solid var(--app-error-color);
i {
fill: var(--app-error-color);
}
}
&:hover {
color: var(--form-element-text-color);
&.greytext {
color: var(--app-text-secondary-color);
}
&.primary.ghost {
background: none;
i {
fill: var(--form-element-primary-color);
}
}
&.primary.ghost.danger {
background: none;
i {
fill: var(--app-error-color);
}
}
&.secondary {
color: var(--form-element-text-color);
background: var(--form-element-secondary-color);
i {
fill: var(--form-element-text-color);
}
}
&.secondary.outlined {
background: none;
border: 1px solid var(--form-element-text-color);
}
&.solid {
color: var(--form-element-text-color);
background: var(--form-element-secondary-color);
box-shadow: none;
}
&.secondary.outlined.danger {
background: none;
border: 1px solid var(--app-error-color);
}
&.outlined {
border: 1px solid var(--form-element-secondary-color);
}
&.secondary.ghost {
background: none;
}
&.ghost {
padding: 6px 10px;
&.secondary.danger {
color: var(--app-error-color);
}
i {
fill: var(--form-element-primary-color);
}
}
&.small {
padding: 4px 8px;
font-size: 12px;
border-radius: 3.6px;
}
&.term-inline {
+8 -37
View File
@@ -1,75 +1,46 @@
// Copyright 2023, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import { boundMethod } from "autobind-decorator";
import cn from "classnames";
import "./button.less";
type ButtonVariantType = "outlined" | "solid" | "ghost";
type ButtonThemeType = "primary" | "secondary";
interface ButtonProps {
theme?: ButtonThemeType;
children: React.ReactNode;
onClick?: () => void;
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
disabled?: boolean;
variant?: ButtonVariantType;
leftIcon?: React.ReactNode;
rightIcon?: React.ReactNode;
color?: string;
style?: React.CSSProperties;
autoFocus?: boolean;
className?: string;
termInline?: boolean;
title?: string;
}
class Button extends React.Component<ButtonProps> {
static defaultProps = {
theme: "primary",
variant: "solid",
color: "",
style: {},
className: "primary",
};
@boundMethod
handleClick() {
handleClick(e) {
if (this.props.onClick && !this.props.disabled) {
this.props.onClick();
this.props.onClick(e);
}
}
render() {
const {
leftIcon,
rightIcon,
theme,
children,
disabled,
variant,
color,
style,
autoFocus,
termInline,
className,
} = this.props;
const { leftIcon, rightIcon, children, disabled, style, autoFocus, termInline, className, title } = this.props;
return (
<button
className={cn(
"wave-button",
theme,
variant,
color,
{ disabled: disabled },
{ "term-inline": termInline },
className
)}
className={cn("wave-button", { disabled }, { "term-inline": termInline }, className)}
onClick={this.handleClick}
disabled={disabled}
style={style}
autoFocus={autoFocus}
title={title}
>
{leftIcon && <span className="icon-left">{leftIcon}</span>}
{children}
+7
View File
@@ -0,0 +1,7 @@
.copy-button {
padding: 5px 5px;
.fa-check {
color: var(--app-success-color);
}
}

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