Commit Graph

833 Commits

Author SHA1 Message Date
Mike Sawka
9dc9066a81
conn updates 5 (#1755)
* token swap
* setting environment variables for different local/remote shells
* bug fixes for init scripts
* more logging
* update connserver startup flow
2025-01-16 11:17:29 -08:00
Evan Simkowitz
56b8e98b5b
Honor SSH IdentitiesOnly config (#1742)
Skip SSH Agent client initialization if the IdentitiesOnly config is set
for a given host

For now, we only need to support this for the SSH Agent, but if we ever
add support for PKCS11Provider or SecurityKeyProvider, we'll need to
update this check to also ignore those.

See https://man.openbsd.org/ssh_config#IdentitiesOnly
2025-01-15 20:47:15 -08:00
Sylvie Crowe
e555eaa765
Limit User Input Modal to One Window (#1730)
When a connection request is made from a block, only ask for user input
in the window that made the request.
2025-01-15 18:55:12 -08:00
Sylvie Crowe
309571e288
fix: yvalMeta .name null check (#1740)
While it is rare, we have had users report an error where the access of
`.name` in SingleLinePlot causes a bug. The only time this could happen
would be a null `yvalMeta`. This makes it so the .name check is skipped
if yvalMeta is null. Addresses #1724.
2025-01-15 18:54:15 -08:00
Evan Simkowitz
8cf0b31858
Fix dir preview table header width so it still expands to fill whole view (#1737)
My last fix to set `width: fit-content` for the dir preview table header
ended up meaning that if the widget is wider than the table, the header
wouldn't extend to the full width of the widget. Now it will.
2025-01-14 22:52:57 -08:00
Mike Sawka
a24fe750c5
conn updates 4 (#1726) 2025-01-14 14:09:26 -08:00
Sylvie Crowe
a44a1a4b4b
Remove Old Prototype Plot (#1721)
Removes obsolete plot widget from a prototype version of the app.
2025-01-13 11:55:04 -08:00
Sylvie Crowe
99e122d724
RcFileInstall RPC Command (#1720)
Creates an RPC command for installing shell rcfiles instead of relying
on a separate installation session.
2025-01-12 16:31:00 -08:00
Sylvie Crowe
0174e7cd07
RemoteInfo Rpc (#1719)
Adds an Rpc Command for getting RemoteInfo. This is used to replace the
session that was used to determine the shell on remote machines.
2025-01-12 15:22:07 -08:00
Sylvie Crowe
5a7771bf40
Update Wsh Command (#1715)
This adds an RPC command for updating wsh on a remote machine without
starting a new session. It is not being used yet, but will be used for
connections using a single server in the future.
2025-01-10 21:29:06 -08:00
Mike Sawka
ba5f929b3f
conn updates 3 (#1711)
lots of misc connection refactoring / fixes:

* adds blocklogger as a way to writing logging information from the backend directly to the a terminal block
* use blocklogger in conncontroller
* use blocklogger in sshclient
* fix remote name in password prompt
* use sh -c to get around shell weirdness
* remove cmd.exe special cases
* use GetWatcher().GetFullConfig() rather than re-reading the config file
* change order of things we do when establishing a connection.  ask for wsh up front.  then do domain socket, then connserver
* reduce number of sessions required in the common case when wsh is already installed.  running the connserver is now a "multi-command" which checks if it is installed, then asks for the version
* send jwt token over stdin instead of in initial command string
* fix focus bug for frontend conn modal
* track more information in connstatus
* simplify wshinstall function
* add nowshreason
* other misc cleanup
2025-01-10 14:09:32 -08:00
Sylvie Crowe
a3cbcc5a77
Widget Config Magnify (#1689)
Introduces a configuration option to widgets to allow them to magnify on
startup.
2025-01-08 15:02:55 -08:00
Evan Simkowitz
5c3eba2644
Fix directory preview head width (#1691)
The head was set to `100%`, which meant that it only was as wide as the
viewport, rather than its contents, which can overflow. Now, the width
is `fit-content`, which allows it to overflow with its contents so that
the background and border extend the full width.
2025-01-07 17:17:28 -08:00
Mike Sawka
55f03730bc
add term:allowbracketedpaste, default false (#1688) 2025-01-07 10:55:26 -08:00
Evan Simkowitz
b51ff834b2
Happy new year! (#1684)
Update all 2024 references to 2025
2025-01-04 20:56:57 -08:00
Evan Simkowitz
a219ea5c9b
Fix keybindings not working for ephemeral nodes (#1678) 2025-01-03 09:02:19 -08:00
Mike Sawka
4fd6d36d8e
conn updates 2 (#1660)
* use pwsh over powershell if installed (on windows) for default shell
* refactor blockcontroller.DoRunShellCommand into a "setup" and "manage" phase
* fix wshcmd-conn to also disconnect wsl connections
* new genconn interfaces to make a standardized environment to run SSH/WSL commands via `sh -c`.  also create better quoting functions that are composable
* replace html/template with text/template for shell command templating (avoids special chars getting turned into HTML entities, breaking the commands)
* do not reinstall wsh if the installed version has a higher version (prevents flip-flopping on shared systems)
* simplify clientOs/clientArch detection.  use `uname -sm`.  also validate the os/arch combo as compatible with our builds.
* replace CpHostToRemote with CpWshToRemote. hard codes wsh paths inside of the function instead of having them passed in (quoting restrictions)
* new SyncBuffer class to use with commands that properly synchronizes Writes/String output
* fix setTermSize to actually update DB with terminal size
2025-01-02 14:15:32 -08:00
Mike Sawka
3fc400960b
terminal multi-input for tab (#1643) 2025-01-02 10:06:47 -08:00
Evan Simkowitz
a2974a3e6d
Fix escape getting eaten by global event handler (#1668)
The terminal keydown handler was set to filter out all key bindings that
have a registered global handler, regardless of whether they actually
propagated or not. This allowed the global handlers to still work
despite the terminal input having precedence, but it also meant that
global key bindings that were invalid for the current context would
still get eaten and not sent to stdin.

Now, the terminal keydown handler will directly call the global handlers
so we can actually see whether or not the global key binding is valid.
If the global handler is valid, it'll be processed immediately and stdin
won't receive the input. If it's not handled, we'll let xterm pass it to
stdin. Because anything xterm doesn't handle gets sent to the
globally-registered version of the handler, we need to make sure we
don't do extra work to process an input we've already checked. We'll
store the last-handled keydown event as a static variable so we can
dedupe later calls for the same event to prevent doing double work.
2025-01-02 08:38:07 -08:00
Evan Simkowitz
035e0b9840
Fix the progressbar component (#1661)
The progress bar styling was broken and was showing as zero-height
2025-01-01 11:27:46 -08:00
Evan Simkowitz
da2291f889
Terminal search (#1654)
This adds support for searching the terminal buffer using the
`@xterm/addon-search` library. It also adds three options for searching:
regex, case-sensitive, and whole-word. These can be included or excluded
from the search options for `useSearch` depending on whether the search
backend supports it.


![image](https://github.com/user-attachments/assets/e0b7e2ed-641b-463f-94a2-f24969fb3b06)

I didn't like any of the Font Awesome icons for these toggles so until
we have time to make some of our own icons that better match the Font
Awesome style, I've appropriated VSCode's icons from their [codicons
font](https://github.com/microsoft/vscode-codicons).

To implement the toggle-able buttons for these options, I've introduced
a new HeaderElem component, `ToggleIconButton`. This is styled similarly
to `IconButton`, but when you hover over it, it also shows a highlighted
background and when active, it shows as fully-opaque and with an
accented border.

Also removes the `useDismiss` behavior for the search box to better
match behavior in other apps.

Also fixes the scrollbar observer from my previous PR so it's wider.
2025-01-01 10:43:02 -08:00
Mike Sawka
91a54442b7
implement web:hidenav (#1639), and file:/// urls (#1638) (#1645) 2024-12-30 16:51:00 -08:00
Mohammed Zaid R Nadaf
a1f26ba455
window-dimensions and zoom crash fixed (#1652)
fixed issue #1613 partially, 

added window:dimensions as a setting which gives the user to define
dimensions.

fixed the zoom in and out logic to prevent the app from crashing.

Had issues with getting setting zoomfactor in emain-tabview.ts. will fix
it
2024-12-30 07:57:59 -08:00
Yacoub
0890475a60
Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623)
I did not mean to close the previous pr, anyway i tried to implement
what you suggested, the backend now does most of it
and DeleteWorkspace will return an unclaimed id and avoid closing the
window.

```go 
        const moveToNewWorkspace = await WorkspaceService.DeleteWorkspace(workspaceId) 
        console.log("delete-workspace done", workspaceId, ww?.waveWindowId);
        if (ww?.workspaceId == workspaceId){
            if ( workspaceList?.length > 1 ) {
                   await ww.switchWorkspace(moveToNewWorkspace)
            } else {
                    console.log("delete-workspace closing window", workspaceId, ww?.waveWindowId);
                    ww.destroy();
            }
        }
    });
```


![unknown_2024 12 26-17
05](https://github.com/user-attachments/assets/9c8455e5-b71c-479d-a15c-ee5c99c7a909)
![unknown_2024 12 26-17
06](https://github.com/user-attachments/assets/5dbf63bc-1ffd-4088-abc0-7c02fac9af94)

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-29 09:58:29 -08:00
Evan Simkowitz
477052e8fc
Web Search (#1631)
Adds support for Cmd:f, Ctrl:f, and Alt:f to activate search in the Web
and Help widgets
2024-12-29 09:58:11 -08:00
Evan Simkowitz
93b9432f99
Add support for Google AI models (#1612) 2024-12-27 14:52:38 -05:00
Red J Adaya
45d6f5b969
progressbar component (#1556) 2024-12-27 09:48:53 -08:00
Mike Sawka
73561dc12d
new utility fn, deepCompareReturnPrev. use for settings prefix atom to do a deep equal (#1630) 2024-12-26 11:09:48 -08:00
Evan Simkowitz
b7a5dea0a0
Fix Term Widget not registering pointer events (#1614)
This is a bit janky. The problem is that we were placing the
`xterm-viewport` div, which contains the scroll observer for the xterm
contents, at a higher z-index than the xterm contents, meaning that the
contents couldn't register any pointer events. If we don't put a
z-index, though, the scroll bar can't accept pointer events. To get
around this, I've added two observer divs, which control whether the
contents or the viewport have pointer event priority. The first div, the
`term-scrollbar-show-observer`, sits above where the scrollbar will be
rendered. When the user hovers over it, it will cause the viewport div
to move to a z-index above the contents. It will also enable a second
div, the `term-scrollbar-hide-observer`, which sits above the viewport
and the term contents, but not blocking the scrollbar. When the user
hovers over this div (indicating their mouse has left the scrollbar),
the viewport div is moved back to its original z-index and the hide
observer is set to `display: none`. This gives pointer event priority
back to the contents div.

This resolves an issue where the user could not click links in the
terminal output.

Resolves #1357
2024-12-23 23:35:51 -05:00
Sylvie Crowe
b778417b9b
Entirely Internal Connection (#1610)
This change allows the user to specify all connection details in an
internal connection rather than forcing them to rely on the ssh config
for certain keywords.
2024-12-23 15:12:14 -08:00
Evan Simkowitz
dbacae8a99
Rename outdated WaveAI types (#1609)
A bunch of the Wave AI types still mentioned OpenAI. Now that most of
them are being used for multiple AI backends, we need to update the
names to be more generic.
2024-12-23 10:55:04 -08:00
Evan Simkowitz
62dcf1326d
Allow users to close windows without confirming, delete last window (#1598)
Adds `window:savelastwindow` and `window:confirmclose` settings, which
can be used to alter the default window close behavior. Both of these
default to `true` to maintain the existing default behavior.

If `window:savelastwindow` is unset, the same logic will be used as if
the user had more than one window remaining (see below).

If `window:confirmonclose` is unset, the user will no longer be prompted
to confirm if they are closing a window whose workspace has unsaved
changes (the workspace is not named and it has more than one tab).
2024-12-20 14:02:08 -08:00
Evan Simkowitz
4280a0981f
Fix more WaveAI scroll issues (#1597)
This adds a split atom for the messages so that the WaveAI component and
the ChatWindow component don't actually need to watch changes to all of
the messages. This makes the repaining a lot less expensive and makes it
easier to scroll while new messages come in.

I also increased the tolerance on the `determineUnsetScroll` callback so
that the bottom message won't get unattached as easily.
2024-12-20 14:01:19 -08:00
Evan Simkowitz
e0c875afeb
Remove WaveAI dynamic height adjustment, use pure CSS, also fix scrolling (#1594)
This makes the chat window flex-grow so we no longer need to manually
fix its height. It also cleans up some other styling.

It also fixes the scroll handlers so we detect when the user is at the
bottom of the chat window so we can follow the latest message. It also
fixes some circular references in the callbacks that were causing React
to bug out.
2024-12-20 11:49:29 -08:00
Evan Simkowitz
cf578b1d89
Allow empty workspace name while editing workspace (#1592)
Fixes a bug where if you deleted all but one character in the workspace
name, you couldn't delete the final character. To fix this, I have made
the workspace editor save a separate entry from the backend. The backend
will also only update its DB value and notify the frontend if something
was actually edited. If you delete all the characters in the name and
don't put anything new in, though, the name will be whatever the last
character you had was, since the name of a saved workspace cannot be
empty.
2024-12-20 08:55:28 -08:00
Sylvie Crowe
9f9190b93c
fix: dynamically determine the chat window height (#1588)
The AI chat window was not allowing the user to resize it due to an
interacting scss class being removed. This replaces the max-height from
the removed class with a dynamic calculation to resize properly.
2024-12-20 03:18:44 -08:00
Sylvie Crowe
2c5aae1a98
fix: bound code editor font size (#1581) 2024-12-19 14:10:19 -08:00
Evan Simkowitz
009bd39cb0
Search box component (#1579) 2024-12-19 13:49:48 -08:00
Sylvie Crowe
0f15e4ff56
fix: bound custom fontsizes between 6 and 64 (#1577)
Adds bounding for markdown (and AI) fontsize and fixedfontsize.
2024-12-19 13:01:12 -08:00
Mike Sawka
8a22149f2f
fix markdown last margin (#1575) 2024-12-19 12:41:03 -08:00
Evan Simkowitz
12d58c90a7
Make TOS modal buttons larger (#1573) 2024-12-19 12:16:03 -08:00
Mike Sawka
eff12635d7
transparent terminal themes (#1561) 2024-12-19 10:41:28 -08:00
Evan Simkowitz
0925af5300
Add warning when user is running in ARM translation mode (#1560)
Adds warning and docs to let users know when they're running in ARM
translation mode. Also lets them configure to always dismiss if they
don't care.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added a configuration option to dismiss architecture warnings during
application startup.
- Introduced new FAQs addressing ARM64 translation warnings and
instructions for joining beta builds.
- Added platform-specific requirements for macOS, Windows, and Linux in
the getting started documentation.

- **Bug Fixes**
- Enhanced build command flexibility by allowing dynamic command-line
arguments during the build process.

- **Documentation**
- Updated configuration documentation to include the new dismiss
architecture warning key.
- Minor formatting adjustments in FAQs and getting started
documentation.
	- Clarified platform compatibility details in the README.

- **Chores**
- Added a new constant for the dismiss architecture warning
configuration key.
- Introduced a new field for managing architecture warning settings in
the application configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-18 19:44:50 -08:00
Sylvie Crowe
dbc2be1c1e
Global Hotkey Docs (#1548)
Adds the following changes:
- renames "key:globalhotkey" to "app:globalhotkey"
- adds globalhostkey documentation (especially in regard to what keys are allowed)
- improves the algorithm that converts electron keybindings from wave keybindings
- fixes some regexp problems
2024-12-17 15:25:34 -08:00
Evan Simkowitz
0a3dadb628
Add wsh wavepath command for getting Wave paths (#1545) 2024-12-17 14:11:40 -08:00
Mike Sawka
95b1767c45
fix terminal escape sequence printing bug (#1544)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved handling of terminal data processing by ensuring it only
occurs when the terminal is fully initialized.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-17 11:55:34 -08:00
Evan Simkowitz
78f3cd0472
Synchronize workspace edits across windows, close window when workspace is deleted (#1540) 2024-12-16 21:54:13 -08:00
Evan Simkowitz
1ba370e4dd
Fix iconbutton styling (#1538) 2024-12-16 18:31:01 -08:00
Sylvie Crowe
71961b373f
Extra Font Size Controls (#1537)
This adds:
- "editor:fontsize" to modify the code editor's font size
- "ai:fontsize" to modify the ai widget's font size (for general text)
- "ai:fixedfontsize" to modify the ai widget's fixed font size (for code
fragments)
2024-12-16 18:23:42 -08:00
Evan Simkowitz
8a5ef4cb3e
Update button class name so it doesn't conflict with Monaco (#1536)
Avoids this: 

![image](https://github.com/user-attachments/assets/49b214e4-7dde-4c3a-be5d-0de7afe30dcc)
2024-12-16 18:10:06 -08:00