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.
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.
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
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 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.
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.
<!-- 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 -->
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)
When clicking on one of the cards from the home page of the docsite and
when initially loading the home page of the docsite, the webviewTag was
emitting a `did-frame-navigate` event, which we weren't tracking. This
meant that we were not properly recording that a navigation had
occurred. This caused three separate issues:
- We were never setting the meta url for the block, which meant that
when you navigated to a different tab or reloaded the app, you'd lose
what page you were last on.
- The site would reload after we fixed a broken docsite url, but we
wouldn't remove the error text that blocks the broken site.
- Clicking on the "open in external browser" button wouldn't do
anything.
Navigation events are issued not just for main page navigations, but
also for iframes, among other things. With our old behavior, if an
iframe tries to load in a webpage, we would update the webview url and
make the iframe the primary page, which is wrong. Now, we only do this
for main frame navigations.
closes#1487
If a connection had not been previously initialized, selecting it in the
preview dropdown was bug-prone. This ensures the connection is complete
before checking the mimetype and selecting the type of preview.
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>
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>
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.
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.
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
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.
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.
* 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.
* get RefOperations and RefUpdates working.
* implement a <canvas> API that can be called using RefOperations
* prop to disable rehype/markdown (memory leak)