Commit Graph

1673 Commits

Author SHA1 Message Date
Red Adaya
dbc91d8a4e use OverlayScrollbarsComponent 2024-05-01 07:17:32 +08:00
Red Adaya
de81464082 save work 2024-04-30 23:25:53 +08:00
Red Adaya
5e6cbf30e7 fix pre not wrapping text 2024-04-30 10:11:45 +08:00
Red Adaya
75ae8807eb always render keybindings 2024-04-30 07:20:33 +08:00
Red Adaya
84227a7128 Merge branch 'main' of github.com:wavetermdev/waveterm into red/aichat-sidebar 2024-04-30 07:03:58 +08:00
Cole Lashley
ac91fa8596
fixed ai timeout bug (#617) 2024-04-29 15:56:20 -07:00
Evan Simkowitz
50662c2152
Fixes a regression that would unfocus from the history input (#615)
* Fixes a regression that would unfocus from the history input

* remove debug statements

* Update historyinfo.tsx

* fix scrolling the right way
2024-04-29 15:08:11 -07:00
Cole Lashley
4296856cc1
Fixed separator code in config path (#616)
* un quoted separator in config

* addressed review comments
2024-04-29 12:40:36 -07:00
Red Adaya
498f91d7fe remove username in chat items 2024-04-29 15:19:43 +08:00
Red Adaya
4d05ef9998 conditionally render keybindings 2024-04-29 15:09:33 +08:00
Red Adaya
1eb7ff512e cleanup 2024-04-29 15:03:28 +08:00
Red Adaya
ba5a089382 fix issue where scrollbar alway shows regardless of the height 2024-04-29 13:59:18 +08:00
Red Adaya
e40f93b858 fix layout 2024-04-29 13:34:02 +08:00
Red Adaya
30b9453bcd save work 2024-04-29 13:16:01 +08:00
Red Adaya
2a79057314 merge main 2024-04-29 07:24:11 +08:00
Evan Simkowitz
d0867477ff
add path separator for config dir handler (#613) 2024-04-26 12:08:10 -07:00
Evan Simkowitz
25b77c7fee
Attempt 2 to resolve security warning (#612)
* replace path with filepath

* remove configPath from error

* remove unnecessary printf

* replace more paths with filepath

* remove unnecessary abs path call

* bad commit
2024-04-26 12:00:11 -07:00
Evan Simkowitz
db557e0b69
Validate config dir path to resolve security warning (#611)
* Attempt to validate config path to resolve security warning

* move above fullpath

* make sure path does not reference parent dir
2024-04-26 11:23:09 -07:00
Ian Jennings
22c5d224bd
TestDriver: Update to 2.9.4 (#607)
* update to 2.9.4

* move prerun to action file

* update v

* migrate prompt

* bunk update to trigger re-run
2024-04-26 11:11:30 -07:00
Cole Lashley
4f32c459a6
Small aux view fixes that make cmdinput focus work a bit better (#594)
* added some more fixes for aichat and cmdinput

* removed comments and fixed up merge conflicts

* small fix

* fixed bug
2024-04-26 11:11:03 -07:00
Red Adaya
268bfabec2 Merge branch 'main' of github.com:wavetermdev/waveterm into red/aichat-sidebar 2024-04-26 09:56:50 +08:00
Sylvie Crowe
a449cec33a
Sudo Config Gui (#603)
* feat: add gui elements to configure ssh pw cache

This adds a dropdown for on/off/notimeout, a number entry box for a
timeout value, and a toggle for clearing when the computer sleeps.

* fix: improve password timeout entry

This makes the password timeout more consistent by  using an inline
settings element. It also creates the inline settings element to parse
the input.

* feat: turn sudo password caching on and off

* feat: use configurable sudo timeout

This makes it possible to control how long waveterm stores your sudo
password. Note that if it changes, it immediately clears the cached
passwords.

* fix: clear existing sudo passwords if switched off

When the sudo password store state is changed to "off", all existing
passwords must immediately be cleared automatically.

* feat: allow clearing sudo passwords on suspend

This option makes it so the sudo passwords will be cleared when the
computer falls asleep.  It will never be used in the case where the
password is set to never time out.

* feat: allow notimeout to prevent sudo pw clear

This option allows the sudo timeout to be ignored while it is selected.

* feat: adjust current deadline based on user config

This allows the deadline to update as changes to the config are
happening.

* fix: reject a sudopwtimeout of 0 on the backend

* fix: use the default sudoPwTimeout for empty input

* fix: specify the timeout length is minutes

* fix: store sudopwtimeout in ms instead of minutes

* fix: formatting the default sudo timeout

By changing the order of operations, this no longer shows up as NaN if
the default is used.

* refactor: consolidate inlinesettingstextedit

This removes the number variant and combines them into the same class
with an option to switch between the two behaviors.

* refactor: consolidate textfield and numberfield

This removes the number variant of textfield. The textfield component
can now act as a numberfield when  the optional isNumber prop is true.
2024-04-25 18:19:43 -07:00
Cole Lashley
5e3243564b
Open AI Timeout setting and aliases for AI settings (#590)
* added ai timeout setting

* addressed review comments

* fixed baseurl gating for telemetry

* updated copy

* addressed review comments

* removed prefix for client:show and added units to timeout

* changed timeout to use ms precision
2024-04-25 16:14:37 -07:00
Mike Sawka
fcf8e4ed44
ignore ptmx error (#608) 2024-04-25 15:35:48 -07:00
Mike Sawka
21d0dd076b
increase max websocket read limit. protect frontend from exceeding the read limit. limit input size to 10k characters. (#606) 2024-04-25 15:07:41 -07:00
Mike Sawka
6e28151dad
update dependencies (including electron v30) (#605)
* remove console.logs

* update dependencies
2024-04-25 14:03:38 -07:00
Red J Adaya
12e267ad81
Truncate dropdown value (#602)
* truncate dropdown value

* more defensive programming for width
2024-04-25 13:36:11 -07:00
Red J Adaya
35037ac1f1
add padding around remote status warning (#598) 2024-04-25 13:29:24 -07:00
Mike Sawka
0649a73d84
bump wave version to v0.7.3, bump waveshell version to v0.7 (#604) 2024-04-25 11:17:52 -07:00
Red J Adaya
50203a6934
Simplified terminal theming (#570)
* save work

* reusable StyleBlock component

* StyleBlock in elements dir

* root level

* ability to inherit root styles

* change prop from classname to selector

* selector should always be :root

* remove selector prop from StyleBlock

* working

* cleanup

* loadThemeStyles doesn't have to be async

* revert changes in tabs2.less

* remove old implementation

* cleanup

* remove file from another branch

* fix issue where line in history view doesn't reflect the terminal theme

* add key and value validation

* add label to tab settings terminal theme dropdown

* save work

* save work

* save work

* working

* trigger componentDidUpdate when switching tabs and sessions

* cleanup

* save work

* save work

* use UpdatePacket for theme changes as well

* make methods cohesive

* use themes coming from backend

* reload terminal when styel block is unmounted and mounted

* fix validation

* re-render terminal when theme is updated

* remove test styles

* cleanup

* more cleanup

* revert unneeded change

* more cleanup

* fix type

* more cleanup

* render style blocks in the header instead of body using portal

* add ability to reuse and dispose TermThemes instance and file watcher

* remove comment

* minor change

* separate filewatcher as singleton

* do not render app when term theme style blocks aren't rendered first

* only render main when termstyles have been rendered already

* add comment

* use DoUpdate to send themes to front-end

* support to watch subdirectories

* added support for watch subdirectories

* make watcher more flexible so it can be closed anywhere

* cleanup

* undo the app/main split

* use TermThemesType in creating initial value for Themes field

* simplify code

* fix issue where dropdown label doesn't float when the theme selected is Inherit

* remove unsed var

* start watcher in main, merge themes (don't overwrite) on event.

* ensure terminal-themes directory is created on startup

* ah, wait for termThemes to be set (the connect packet needs to have been processed to proceed with rendering)
2024-04-23 23:22:35 -07:00
Red Adaya
30d1e4dfad Merge branch 'main' of github.com:wavetermdev/waveterm into red/aichat-sidebar 2024-04-24 12:42:07 +08:00
Red Adaya
c522d55a23 save work 2024-04-24 12:38:01 +08: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
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
265cc30347
Update electron-rebuild reference to @electron/rebuild as recommended by Yarn (#593) 2024-04-23 11:07:52 -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
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
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
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