Commit Graph

331 Commits

Author SHA1 Message Date
Mike Sawka
f50ce9565c
VDom 11 (#1224)
* Fix VDom url caching -- use regular requests 
* new boilerplate to make writing apps easier
* render-blocking global styles (to prevent render flash)
* bug fixes and new functionality etc.
2024-11-07 00:07:23 -08:00
Mike Sawka
42e85aea6f
VDom 10 (#1206)
* get RefOperations and RefUpdates working. 
* implement a <canvas> API that can be called using RefOperations
* prop to disable rehype/markdown (memory leak)
2024-11-05 23:07:45 -08:00
Mike Sawka
61d6b4d8eb
VDom 9 (#1205)
Lots of quality of life improvements (and bug fixes):
* Class(), ClassIf(), ClassIfElse() methods
* <wave:style> that can use a file vdom:/// url
* UseStateWithFn() to allow for functional setters
* If, IfElse, and ForEach for vdom construction
* batched updates for large updates -- streaming -- to get around packet size issues
* more flexible file sending code, for []byte, io.Reader, fs.File, and a fileName (with optional MimeType)
* fix the vdom:// protocol handler to work with fetch
* updated wshcmd-html for new best practices
2024-11-05 15:52:59 -08:00
Mike Sawka
91c293e4be
VDom 8 (#1202)
* new vdomevents to support click, change, keydown, etc. easier type
signature
* can now pass a prop type instead of always converting to
map[string]any
* implement DefineComponent to allow easier vdom creation using a
component function directly
* separate vdomclient Make from Connect
* lots of bug fixes to get everything working again
* PStyle and special "style" attribute handling
2024-11-04 12:52:36 -08:00
Mike Sawka
eeda49bbde
vdom 7 (#1180) 2024-11-02 10:58:13 -07:00
Evan Simkowitz
4a09c06021
Use native title bar for all platforms while we fix Window Controls Overlay (#1193) 2024-11-01 12:19:49 -07:00
Mike Sawka
8893a42cd6
wsh version -v (to print config/data dirs and updater-channel) (#1190) 2024-11-01 10:20:15 -07:00
Mike Sawka
b945a8d039
restore old tab naming logic (#1186)
fixes the tab naming confusion going on in #1167
2024-11-01 09:41:23 -07:00
Mike Sawka
473225d94b
issue squashing #1175 #1038 #1086 #1081 #1066 #1020 (#1177) 2024-10-31 12:34:30 -07:00
Evan Simkowitz
502f9515d8
Two extremely low-hanging fruit tests generated by GitHub Workspace (#1172) 2024-10-30 20:19:22 -07:00
Sylvie Crowe
94eb165346
fix: ignore the match statement in ssh config (#1155)
This change will skip over match statements in the ssh config without
panicking. Note that this change still does not add match statement
parsing--it merely makes it possible to continue parsing if the match
keyword is present.
2024-10-27 20:35:19 -07:00
Mike Sawka
7e6f96348f
fix for waveterm environment variables leaking from prod to dev (#1153) 2024-10-27 13:12:41 -07:00
Mike Sawka
416c26c1cd
vdom 5 (#1143) 2024-10-25 13:45:00 -07:00
Sylvie Crowe
ac6f9a05d4
ProxyJump Support (#1107)
This adds basic ProxyJump support for handling ssh connections.
2024-10-25 12:14:40 -07:00
Mike Sawka
369fababa6
tab updates (#1134) 2024-10-24 23:16:44 -07:00
sawka
e1d538ed8b merge v0.8.13 changes 2024-10-24 17:02:35 -07:00
Mike Sawka
7a90754377
fix shutdown logic for macos/linux (#1128) 2024-10-24 16:07:18 -07:00
Mike Sawka
1742c19e13
resize terminal on restoring state (#1100) (backport from dev0.9) (#1116) 2024-10-24 11:01:58 -07:00
Sylvie Crowe
bf5bf6f00c
fix: allow capital letters on host match (#1117)
While matching [user@]host[:port], we previously did not allow capital
letters in host.

While this makes sense for a hostname, it does not make sense to make
that restriction for a host. Since this can match on both, we must widen
it to accept characters allowed in host.
2024-10-24 10:58:31 -07:00
Mike Sawka
7afd19f000
on windows, must close the new temp file before removing it (#1115)
Closes #1114
2024-10-24 09:46:52 -07:00
Mike Sawka
701d93884d
vdom 4 (#1110) 2024-10-23 22:47:29 -07:00
Sylvie Crowe
8248637e00
WSL Integration (#1031)
Adds support for connecting to local WSL installations on Windows.

(also adds wshrpcmmultiproxy / connserver router)
2024-10-23 22:43:17 -07:00
Mike Sawka
fa160313ea
resize terminal on restoring state (#1100) 2024-10-22 12:50:44 -07:00
Mike Sawka
bba49fb6db
remove global variables from wconfig so we don't call wavebase (#1098) 2024-10-22 10:02:15 -07:00
sawka
cf1b082c10 Merge remote-tracking branch 'origin/main' into dev-v0.9 2024-10-22 09:59:15 -07:00
Evan Simkowitz
33f05c6e0c
Update data and config paths to match platform defaults (#1047)
Going forward for new installations, config and data files will be
stored at the platform default paths, as defined by
[env-paths](https://www.npmjs.com/package/env-paths).

For backwards compatibility, if the `~/.waveterm` or `WAVETERM_HOME`
directory exists and contains valid data, it will be used. If this check
fails, then `WAVETERM_DATA_HOME` and `WAVETERM_CONFIG_HOME` will be
used. If these are not defined, then `XDG_DATA_HOME` and
`XDG_CONFIG_HOME` will be used. Finally, if none of these are defined,
the [env-paths](https://www.npmjs.com/package/env-paths) defaults will
be used.

As with the existing app, dev instances will write to `waveterm-dev`
directories, while all others will write to `waveterm`.
2024-10-22 09:26:58 -07:00
Evan Simkowitz
39fff9ecfd
Allow separate directories for each config part, add dropdown for editing AI presets (#1074)
Adds new functionality on the backend that will merge any file from the
config directory that matches `<partName>.json` or `<partName>/*.json`
into the corresponding config part (presets, termthemes, etc.). This
lets us separate the AI presets into `presets/ai.json` so that we can
add a dropdown in the AI preset selector that will directly open the
file so a user can edit it more easily. Right now, this will create a
preview block in the layout, but in the future we can look into making
this block disconnected from the layout.

If you put AI presets in the regular presets.json file, it will still
work, since all the presets get merged. Same for any other config part.
2024-10-21 16:51:18 -07:00
Evan Simkowitz
1fc6dd7c1a
Fix code scanning alert no. 50: Size computation for allocation may overflow (#1088)
Fixes
[https://github.com/wavetermdev/waveterm/security/code-scanning/50](https://github.com/wavetermdev/waveterm/security/code-scanning/50)

To fix the problem, we need to ensure that the size computation for the
allocation does not overflow. This can be achieved by validating the
length of `barr` before performing the arithmetic operation. We will set
a maximum allowable size for `barr` to ensure that the sum of
`oscPrefixLen(oscNum)` and `len(barr)` does not exceed the maximum value
for an `int`.

1. Define a maximum allowable size for `barr` (e.g., 64 MB).
2. Check the length of `barr` against this maximum size before
performing the allocation.
3. If `barr` exceeds the maximum size, return an error.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-21 14:05:52 -07:00
Evan Simkowitz
4f035e1e8a
Merge branch 'main' into dev-v0.9 2024-10-18 14:39:48 -07:00
Evan Simkowitz
ab16baed3e
Fix edge case with Wave Proxy AI preset (#1073)
If a user has changed the global AI settings and added a different base
url, the Wave Proxy preset would not work because it doesn't unset all
the AI settings.
2024-10-18 14:27:48 -07:00
Evan Simkowitz
de004a3cdf
Remove ollama AI preset (#1068)
I added this as an example, but it fails if the user doesn't have ollama
and/or llama:3.1 so I'm removing it
2024-10-18 12:33:08 -07:00
Mike Sawka
62a1149a8d
fix websocket reconnect error (#1064) 2024-10-18 12:05:20 -07:00
sawka
0590ba2509 merge main to dev 0.9 2024-10-18 09:29:39 -07:00
Mike Sawka
dc70ab4014
ws reconnection bug + clean up logging (#1058) 2024-10-17 23:42:55 -07:00
Sylvie Crowe
a5999aa02a
Plot Sysinfo (#1054)
Expands the cpuplot with memory plots and individual cpu plots. Also
improves the styling and handling of multiple plots.
2024-10-17 15:19:13 -07:00
Mike Sawka
46783ba315
vdom 3 (#1033) 2024-10-17 14:50:36 -07:00
Mike Sawka
c1c90bb4f8
browser view (#1005) 2024-10-17 14:34:02 -07:00
Mike Sawka
a629b28194
implement a config error button + message modal that shows the errors (#1030) 2024-10-14 14:57:12 -07:00
Mike Sawka
a15b339f39
implement copy on select for terminal (#1029) 2024-10-14 10:05:38 -07:00
Evan Simkowitz
0b88fa590d
Move AI model configs to presets and add a dropdown to swap between configs (#1024) 2024-10-12 18:40:14 -04:00
Sylvie Crowe
1354c34921
fix: add conn prefix to askbeforewshinstall flag (#1013) 2024-10-10 17:23:27 -07:00
Mike Sawka
3d2d68bc73
fix initial size of windows (#1011) 2024-10-10 16:12:56 -07:00
Sylvie Crowe
f3e0ba8148
Add Don't Ask Again Checkbox for Wsh Install (#1010)
This provides a checkbox when installing wsh that will prevent the
message from popping up in the future. It can also be disabled by adding
`"askbeforewshinstall": false` to the config file.
2024-10-10 15:50:46 -07:00
Evan Simkowitz
64084d3e27
Remove global.ts dependency from emain (#1003)
Removes global atoms dependency from emain by moving WOS to grab the
globalAtoms from window, if present. Also removes interdependency
between wshrpcutil and wps

Also adds showmenubar setting for Windows and Linux
2024-10-10 10:12:42 -07:00
Mike Sawka
4f00595311
allow ai defaults to be overridden by block meta (#1000) 2024-10-09 15:16:35 -07:00
Sylvie Crowe
9dd4188810
fix: add error messages to ai chat (#999)
This will print error messages to the chat when there is an error
getting an ai response. The actual content of the responses are not
forwarded to the models in future requests.

<img width="389" alt="Screenshot 2024-10-09 at 2 36 13 PM"
src="https://github.com/user-attachments/assets/e6c6b1c1-fa19-4456-be3b-596feaeaafed">
2024-10-09 14:50:56 -07:00
Mike Sawka
f33028af1d
azure ai support (#997) 2024-10-09 13:36:02 -07:00
Evan Simkowitz
b81ab63ddc
Fix 404 for docsite subpages when hard reloading app (#995)
This adds a custom resolver to the docsite server to fall back to .html
addresses when it gets a not found for a given path. This fixes an issue
where subpages would return a 404 after a hard reload of the frontend. I
also added an effect that will run on startup to resolve the latest
docsite url and set it in the metadata, since the backend port changes
on every run of the app. I also made it so that setting the default
homepage in the webview widget will also unset any block-specific
homepage.
2024-10-09 12:42:33 -07:00
Sylvie Crowe
9f57d2d46b
fix: do not canonicalize hostname in list (#994)
This removes the brackets for connections with non-standard ports in the
dropdown list.
2024-10-09 11:08:07 -07:00
Sylvie Crowe
c5527dd87b
Add a Notification Subcommand to Wsh (#985)
This allows users to use the `wsh notify` command to make a popup
notification, even from a remote connection.
2024-10-08 10:22:17 -07:00