Commit Graph

802 Commits

Author SHA1 Message Date
Evan Simkowitz
edab90aa55
New colors for workspace switcher (#1443)
Also updates workspace switcher button and tab bg colors
2024-12-09 16:24:32 -08:00
systemshift
c071cc04c3
Perplexity api (#1432)
I have added Perplexity to the default AI models. I see Anthropic models
are becoming part of the default as well, so I thought I should add a
model that is specific for web search.

This pull request is a work in progress; reviews and edit
recommendations are welcome.

---------

Co-authored-by: sawka <mike@commandline.dev>
2024-12-09 15:48:33 -08:00
Sylvie Crowe
43c134ea9a
fix: don't show wsh error for a connection error (#1438) 2024-12-09 15:18:58 -08:00
Mike Sawka
878a7285ab
implement tab:preset, and increase active tab opacity (#1439) 2024-12-09 14:48:16 -08:00
Sylvie Crowe
f78067b62d
fix: smarter connection typeahead arrows (#1431)
This changes the order of typeahead options to be more user friendly.
Additionally, it moves the selected element to the top after a non-arrow
keypress.
2024-12-06 21:32:50 -08:00
Mike Sawka
ac8dc25ead
fix block controller status (add version) (#1430) 2024-12-06 19:39:58 -08:00
Evan Simkowitz
f858d3ba0f
Pass workspace id to contextmenu-show (#1429)
Sometimes, the context menu click handlers don't seem to get passed any
window object. Here, I'm sending over the workspace id with the
`contextmenu-show` event so that we can resolve our cached copy of the
object in case the value from the click handler is empty.
2024-12-06 19:10:34 -08:00
Evan Simkowitz
72ea58267d
Workspace app menu (#1423)
Adds a new app menu for creating a new workspace or switching to an
existing one. This required adding a new WPS event any time a workspace
gets updated, since the Electron app menus are static.

This also fixes a bug where closing a workspace could delete it if it
didn't have both a pinned and an unpinned tab.
2024-12-06 15:33:00 -08:00
Sylvie Crowe
66d1686e84
fix: changes for nowsh compatibility with wsl (#1422)
The wsl largely ignores most nowsh stuff, but there are some options
that can be specified for wsl. This ensures that it will still work
whether or not they are set.

Additionally if fixes the wsh not installed icon.
2024-12-06 14:19:19 -08:00
Evan Simkowitz
ab565409cb
Even simpler tab flicker fix (#1421) 2024-12-06 12:13:49 -08:00
Sylvie Crowe
6dfc85b324
Retry Without Wsh on Fail (#1406)
Adds the ability for connections to continue without wsh if they fail.
This involves creating a menu that warns the user that wsh could not be
used.
2024-12-06 10:11:38 -08:00
Mike Sawka
3b03a7ab3d
tab race condition fixes (#1407) 2024-12-06 00:10:17 -08:00
Mike Sawka
5744f4b06f
closeTab fix (#1403)
fixes bug with closeTab when the tab didn't exist in the waveWindow cache.  also adds Cmd-Shift-W to close a tab (doesn't work for pinned tabs).  and restores Cmd-W for killing blocks on pinned tabs
2024-12-05 18:26:20 -08:00
Evan Simkowitz
7a61f25331
Auditing async usage in frontend code (#1402)
I found a lot of places where asyncs weren't being properly wrapped or
awaited
2024-12-05 18:09:54 -08:00
Evan Simkowitz
5fbd72b590
Fix edge case when dragging pinnned tabs (#1399) 2024-12-05 14:58:04 -08:00
Evan Simkowitz
898d21d1b2
Small tweak to nohover to only start timeout on requestanimationframe (#1398) 2024-12-05 14:25:02 -08:00
Evan Simkowitz
cb50023d79
Fix issue where WaveAI text area would resize on launch (#1397) 2024-12-05 14:06:52 -08:00
Evan Simkowitz
b22dd07929
Fix null ref in getConnConfigKeyAtom (#1396) 2024-12-05 12:11:17 -08:00
Mike Sawka
7386fc19f7
activity update + dont allow empty workspace names (#1393) 2024-12-05 10:35:54 -08:00
Sylvie Crowe
b4b0222c9d
New Connections Configs (#1383)
This adds the following connections changes:
- connections can be hidden from the dropdown in our internal
connections.json config
- `wsh ssh` -i will write identity files to the internal
connections.json config for that connection
- the internal connections.json config will also be used to get identity
files when connecting
- the internal connections.json config allows setting theme, fontsize,
and font for specific connections
- successful connections (including those using wsh ssh) are saved to
the internal connections.json config
- the connections.json config will be used to help pre-populate the
dropdown list
- adds an item to the dropdown to edit the connections config in an
ephemeral block

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-05 10:02:07 -08:00
Evan Simkowitz
df2889f280
Fix zombie tab context menus (#1390)
The memoizing of the tabs was causing the callbacks for
handleContextMenu to become dead ends. This makes more of the callbacks
into memoized callbacks and makes the handleContextMenu function itself
a memoized callback to ensure it's properly updated when its upstream
callbacks change.
2024-12-04 17:30:28 -08:00
Evan Simkowitz
87aea21184
Better flicker prevention when switching tabs (#1389)
There was still some flicker when nohover took effect before the tab
view actually switched. Now, we override the active tab in the tabbar
when the app is switching tabs. We also override active tab behavior so
that the close button is always visible while nohover is in effect. This
effectively removes the flickering
2024-12-04 17:20:06 -08:00
Mike Sawka
72f36a9639
wsh run (#1376)
implements `wsh run` command.  lots of fixes (and new options) for command blocks.  cleans up the UX/UI for command blocks.  lots of bug fixes for blockcontrollers.  other minor bug fixes.

also makes editor:* vars into settings override atoms.
2024-12-04 14:16:50 -08:00
Evan Simkowitz
d8edea9fbc
Oops i actually made the tabs wrong (#1384)
forgot to update .editorconfig to include scss...
2024-12-04 13:49:14 -08:00
Evan Simkowitz
aa77b2c259
Pinned tabs (#1375)
![image](https://github.com/user-attachments/assets/a4072368-b204-4eed-bb65-8e3884687f9a)

This functions very similarly to VSCode's pinned tab feature. To pin a
tab, you can right-click on it and select "Pin tab" from the context
menu. Once pinned, a tab will be fixed to the left-most edge of the tab
bar, in order of pinning. Pinned tabs can be dragged around like any
others. If you drag an unpinned tab into the pinned tabs section (any
index less than the highest-index pinned tab), it will be pinned. If you
drag a pinned tab out of the pinned tab section, it will be unpinned.
Pinned tabs' close button is replaced with a persistent pin button,
which can be clicked to unpin them. This adds an extra barrier to
accidentally closing a pinned tab. They can still be closed from the
context menu.
2024-12-04 13:34:22 -08:00
Evan Simkowitz
0145e8fe99
Fix SCSS formatting after migration (#1382)
The migration tool we used didn't take into account our formatting
standards so I'm bulk-formatting the SCSS files to bring them back up to
our standards. Basically this just changes the tab size for all the
files.
2024-12-04 12:49:44 -08:00
Evan Simkowitz
60031ef8c0
Add Save and Cancel buttons to dir preview entry manager (#1381) 2024-12-04 11:48:26 -08:00
Evan Simkowitz
29e8929f91
Hack to prevent tabbar flicker when switching tabs (#1379) 2024-12-03 20:08:06 -08:00
Evan Simkowitz
2bd7579cd5
Fix missing field in global.ts (#1377) 2024-12-03 16:43:58 -08:00
Red J Adaya
42cbbcdc2a
tabs new design (#1352)
Co-authored-by: sawka <mike@commandline.dev>
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-03 13:53:27 -08:00
Evan Simkowitz
04c4f0a203
Create and rename files and dirs in dirpreview (#1156)
New context menu options are available in the directory preview to
create and rename files and directories

It's missing three pieces of functionality, none of which are a
regression:
- Editing or creating an entry does not update the focused index. Focus
index right now is pretty dumb, it doesn't factor in the column sorting
so if you change that, the selected item will change to whatever is now
at that index. We should update this so we use the actual file name to
determine which element to focus and let the table determine which index
to then highlight given the current sorting algo
- Open in native preview should not be an option on remote connections
with the exception of WSL, where it should resolve the file in the
Windows filesystem, rather than the WSL one
- We should catch CRUD errors in the dir preview and display a popup
2024-12-02 22:23:44 -08:00
Evan Simkowitz
82f53dc1fb
Workspaces are back! (#1282) 2024-12-02 10:56:56 -08:00
Sylvie Crowe
24103213aa
SSH without using WSH (#1355) 2024-11-27 16:52:00 -08:00
Mike Sawka
b6ce2cd022
misc v0.9.3 fixes -- numToString, block counts, fix docsite images/video (#1354) 2024-11-25 18:07:29 -08:00
Evan Simkowitz
2e91ee843c
Switch from Less to Scss (#1335)
Less hasn't received an update in over a year and the parser is missing
some modern syntax like relative colors so this switches us to scss
2024-11-21 16:05:04 -08:00
Mike Sawka
b2b9432a7a
fix terminal theming when applying global defaults #1287 (#1332) 2024-11-21 10:44:16 -08:00
Evan Simkowitz
11b257d7a3
Simplify app transparency and background color handling (#1331) 2024-11-21 10:30:02 -08:00
Mike Sawka
d41d96c621
docs updates (and other misc items) for v0.9.3 (#1330) 2024-11-20 22:17:57 -08:00
Mike Sawka
3136291140
temp oid in client (can use with wavefile) (#1329) 2024-11-20 18:48:46 -08:00
Mike Sawka
24807cfd34
add display resolutions to activity updates, update docs (#1323) 2024-11-19 19:41:53 -08:00
Mike Sawka
271d8e2e9c
wsh getva, setvar, and file commands (#1317) 2024-11-19 17:20:47 -08:00
Evan Simkowitz
7c6fa91016
Fix copyfiles for docsite (#1321) 2024-11-19 14:15:11 -08:00
Evan Simkowitz
416ba8d5da
Add settings to control the size of the magnified/ephemeral nodes and their blur (#1319) 2024-11-18 14:41:09 -08:00
Red J Adaya
55558d441e
fix buttons (#1308) 2024-11-15 21:26:48 -08:00
Red J Adaya
f64863c52a
notification (#1207) 2024-11-15 21:26:16 -08:00
Mike Sawka
1210313d2b
activity updates (#1302) 2024-11-15 16:09:26 -08:00
Evan Simkowitz
48e3003f98
Fix magnified node not showing on startup (#1305) 2024-11-15 15:56:11 -08:00
Mike Sawka
9c6eed1ab4
add globaleventtype to globalkeys (#1296) 2024-11-15 09:56:54 -08:00
Mike Sawka
c4d7779003
wsh ai file attachments -- renderer in waveai (#1281) 2024-11-14 16:20:33 -08:00
Evan Simkowitz
2dfdf66169
Opening HelpView pages in external browser uses the public docsite equivalent (#1289)
Before, when you clicked the "Open in External Browser" button from the
`HelpView`, the browser would attempt to open the embedded url, which
may or may not still exist, depending on whether the content was cached
from the last time the app was opened (since the embedded docsite uses a
random port). Now, we'll swap the embedded url for the public docsite
equivalent when you open in an external browser.
2024-11-14 11:03:10 -08:00
Evan Simkowitz
eb00716e00
Don't drag for ephemeral blocks (#1288) 2024-11-14 10:16:08 -08:00
Evan Simkowitz
255cb51944
Fix window opacity bug (#1283)
With the tab refactor, we introduced a regression that prevented window
transparency from working. Rather than applying overrides of the app
background color (where we record window opacity) to the body of the
document, we were applying it to the main div. This meant that while the
main div was transparent, the body was not (since the default background
color we set for the body is opaque). With this change, we update the
body background directly.
2024-11-13 20:48:02 -08:00
Evan Simkowitz
14249b33b2
Remove the debounce when setting the backdrop for the ephemeral nodes (#1280)
I added this debounce to delay the blurring of the background nodes when
a node was magnified to account for the animation, but it looks weird
for the ephemeral nodes since there's no animation when first showing
them. When we work on node creation animations maybe I'll add back this
delay
2024-11-13 18:49:03 -08:00
Red J Adaya
b429e967e6
use color var for connection status overlay (#1278) 2024-11-13 18:39:46 -08:00
Evan Simkowitz
db556f18b8
Cleanup unnecessary log and unused variable from last PR (#1279) 2024-11-13 18:37:43 -08:00
Evan Simkowitz
d38f889bd6
Add tooltip for clear chat history (#1276) 2024-11-13 18:02:47 -08:00
Evan Simkowitz
3fcf209b52
Add ephemeral block support (#1275)
Ephemeral blocks can now be added to the LayoutModel for a tab. Only one
ephemeral block can exist at a time. It is placed above all other
blocks, including the magnified blocks.

Updates how magnified and ephemeral blocks overlay the other blocks.
Now, there's a blurred backdrop behind them that will obscure the other
blocks. As a result of this, the overlayed blocks are now translucent.
2024-11-13 18:00:13 -08:00
Sylvie Crowe
31d0aa114d
AI Clear Button (#1274)
Adds a button and Cmd:l keybinding to clear the ai message history in
the current block
2024-11-13 15:00:33 -08:00
Sylvie Crowe
d96542f691
Rerun Command Button (#1265)
Adds a button in widgets with a "cmd" controller that allows the command
to be rerun without accessing a context menu.
2024-11-11 15:30:40 -08:00
Mike Sawka
3fc45c63f3
vdom terminal toolbar (#1263) 2024-11-11 13:11:09 -08:00
Mike Sawka
de902ec2b7
ai backend refactor + claude/anthropic API support (#1262) 2024-11-11 11:39:08 -08:00
Mike Sawka
045405aa5e
new wsh ai command (#1257) 2024-11-08 16:34:50 -08:00
Mike Sawka
58f2f4ae8e
fix display order sort (#1256) 2024-11-08 15:46:44 -08:00
Mike Sawka
c34a5912e7
return clientid in WaveInfoData, print for wsh version -v (#1252) 2024-11-08 14:19:56 -08:00
Evan Simkowitz
3216bc2389
Use one unified widgets.json file for managing widgets in the sidebar (#1250)
Renames defaultwidgets.json file in defaultconfig to widgets.json and
removes references to defaultwidgets in the codebase and documentation.

Going forward, users will see one unified list of widgets in the sidebar
with no separator between default and custom widgets. Users can manually
move any edits to their defaultwidgets.json file into their widgets.json
file to get back their overrides.
2024-11-08 14:14:59 -08:00
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
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
48001ee734
make sure the user affirmatively acknowledged window deletion before deleting, fix for #1167 (#1181) 2024-10-31 18:13:27 -07:00
Mike Sawka
473225d94b
issue squashing #1175 #1038 #1086 #1081 #1066 #1020 (#1177) 2024-10-31 12:34:30 -07:00
Evan Simkowitz
b3fdbbc331
Various updater fixes (#1170)
- Fixes updater status not showing on tabs that were previously
unloaded.
- Fixes updater status showing as error when not connected to the
internet
- Adds delay after setting installing status to avoid race condition
with any window close event handlers. This may fix #1167
2024-10-30 14:20:19 -07:00
Evan Simkowitz
96cc2adc91
Fix Wave AI styling again (#1164) 2024-10-28 16:46:00 -07:00
Sylvie Crowe
bf8cc732af
feat: add checkmark next to current connection (#1159)
The is specifically for the typeahead dropdown for connections.
2024-10-27 23:55:43 -07:00
Sylvie Crowe
58ff42d9fd
Sysinfo Plot Height (#1158)
This makes two small changes
- renames a class to resolve two css classes having the same name
- ensures sysinfo's outermost element follows the *-view pattern
2024-10-27 23:02:28 -07:00
Mike Sawka
b746a0bfb6
fix long tab names and syncing tab renaming (#1160) 2024-10-27 23:01:47 -07:00
Evan Simkowitz
be5d73af21
Fix wave ai styling (#1157) 2024-10-27 21:34:20 -07:00
Mike Sawka
d0d9095c92
call isDev() function to properly hide workspace switcher in prod (#1154) 2024-10-27 14:23:52 -07:00
Red J Adaya
55c8e5a213
workspace switcher + new elements (in storybook) (#1148) 2024-10-27 13:22:06 -07:00
Sylvie Crowe
cbb825982b
fix: add gaps in plots where no data exists (#1065)
Scans the window from the most recent timestamp to however many seconds
back are being stored. Then adds blank spaces (NaN values) in between
data items that are too far apart. Lastly, if the earliest item is
blank, there are probably fewer than the expected number of items. In
that case, it adjusts the first timestamp to keep plot width mostly
consistent.
2024-10-27 12:00:15 -07:00
Sylvie Crowe
bbd530c052
AI Sliding Window (#1151)
Only send the 30 most recent ai questions and responses to the model
when making requests. This prevents the amount of data being sent from
getting too big.
2024-10-27 11:49:34 -07:00
Mike Sawka
a782d83628
vdom 6 (#1145) 2024-10-25 18:36:09 -07:00
Mike Sawka
416c26c1cd
vdom 5 (#1143) 2024-10-25 13:45:00 -07:00
Evan Simkowitz
e9fcb9b145
Merge branch 'main' into dev-v0.9 2024-10-25 10:21:33 -07:00
Evan Simkowitz
34e4ffc429
Use FloatingPortal to position menu above all other contents (#1136) 2024-10-24 23:32:54 -07:00
Evan Simkowitz
20d333f724
Make menubutton text clip to avoid overflow (#1135) 2024-10-24 23:24:54 -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
1742c19e13
resize terminal on restoring state (#1100) (backport from dev0.9) (#1116) 2024-10-24 11:01:58 -07:00
Mike Sawka
d65eabe494
termfontsize override (#1118) 2024-10-24 11:01:39 -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
Evan Simkowitz
df25c54a31
Merge branch 'main' into dev-v0.9 2024-10-22 21:19:56 -07:00
Evan Simkowitz
ec70ce8c91
Display error message on failed WebView page load (#1072)
closes #1023
2024-10-22 18:17:42 -07:00
Mike Sawka
fa160313ea
resize terminal on restoring state (#1100) 2024-10-22 12:50:44 -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