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>
As connections can now be stored in the internal connection, a missing
or invalid ssh config should not cause the entire list of connections to
be empty. This change ignores the error from the ssh config and proceeds
to construct the list without it.
- Fixed an issue where `fullConfig` was not passed to `setTimeout` in
`getSpareTab`.
- Wrapped `ensureHotSpareTab` with an arrow function to ensure
`fullConfig` is properly passed.
**When I use wave as my terminal, sometimes the setting does not work. I
read the source code and found this issue**
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
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
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.
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.
This is annoyingly verbose, but will let us still get PRs for minor and
patch updates separately from major updates, so we can continue to
benefit from bugfixes without having to adopt breaking changes.
Also adds a jotai update group
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).
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.
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.
There's a potential DDoS vulnerability in the older version of the net
package that we were using. It likely isn't something that would impact
us, but we should still update for posterity.
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.
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.
Due to the way this command is run, the quotes are not being handled by
the shell. Removing them allows them to be interpreted correctly in most
cases. This resolves#1569