Move docsite to main repo (#1204)

## Summary

We are moving our docsite to this repo for better coordination.

## What's changed?

- The docsite codebase is now in docs/
- The docsite will replace storybook as the published GitHub Pages site
for this repo
- Storybook will now be hosted at https://docs.waveterm.dev/storybook
- A new CI workflow will validate any changes to Storybook or the
docsite
- A combined CD workflow will build and deploy Storybook and the docsite
as a single artifact
- The Build Helper workflow will now build an embedded version of the
docsite before building the app, ensuring the docsite version it has is
always the latest
This commit is contained in:
Evan Simkowitz 2024-11-06 10:45:21 -08:00 committed by GitHub
parent 42e85aea6f
commit edb3290349
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
55 changed files with 12607 additions and 1066 deletions

View File

@ -1,5 +1,24 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "npm"
directory: "docs/"
schedule:
interval: "weekly"
day: "friday"
time: "09:00"
timezone: "America/Los_Angeles"
groups:
docsite-dev-dependencies:
dependency-type: "development"
exclude-patterns:
- "*docusaurus*"
docsite-docusaurus:
patterns:
- "*docusaurus*"
docsite-prod-dependencies:
dependency-type: "production"
exclude-patterns:
- "*docusaurus*"
- package-ecosystem: "npm" - package-ecosystem: "npm"
directory: "/" directory: "/"
schedule: schedule:

View File

@ -14,9 +14,28 @@ env:
NODE_VERSION: "20" NODE_VERSION: "20"
STATIC_DOCSITE_PATH: docsite STATIC_DOCSITE_PATH: docsite
jobs: jobs:
runbuild: build-docsite:
permissions: runs-on: ubuntu-latest
contents: write steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
run: |
corepack enable
yarn install
working-directory: docs/
- name: Build embedded docsite
run: yarn build-embedded
working-directory: docs/
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: docsite
path: docs/build
build-app:
needs: build-docsite
outputs: outputs:
version: ${{ steps.set-version.outputs.WAVETERM_VERSION }} version: ${{ steps.set-version.outputs.WAVETERM_VERSION }}
strategy: strategy:
@ -109,13 +128,10 @@ jobs:
smctl windows certsync smctl windows certsync
shell: cmd shell: cmd
- name: Download waveterm-docs static site - name: Download embedded docsite
uses: dawidd6/action-download-artifact@v6 uses: actions/download-artifact@v4
with: with:
github_token: ${{secrets.GITHUB_TOKEN}} name: docsite
workflow: build-embedded.yml
repo: wavetermdev/waveterm-docs
name: static-site
path: ${{env.STATIC_DOCSITE_PATH}} path: ${{env.STATIC_DOCSITE_PATH}}
# Build and upload packages # Build and upload packages
@ -162,7 +178,7 @@ jobs:
path: make path: make
create-release: create-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: runbuild needs: build-app
permissions: permissions:
contents: write contents: write
if: ${{ github.event_name != 'workflow_dispatch' }} if: ${{ github.event_name != 'workflow_dispatch' }}

59
.github/workflows/deploy-docsite.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Deploy Docsite and Storybook
env:
NODE_VERSION: 20
on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:
jobs:
build:
name: Build Docsite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: |
corepack enable
yarn install
- name: Build docsite
run: yarn build
working-directory: docs/
- name: Build Storybook
run: yarn build-storybook
working-directory: storybook/
- name: Copy Storybook to docs
run: cp -r storybook-static docs/build/storybook
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build
deploy:
name: Deploy to GitHub Pages
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -1,42 +0,0 @@
# Workflow name
name: Build and Publish Storybook to GitHub Pages
on:
push:
branches:
- "main"
permissions:
contents: read
pages: write
id-token: write
env:
NODE_VERSION: "20"
# List of jobs
jobs:
deploy:
runs-on: ubuntu-latest
# Job steps
steps:
# Manual Checkout
- uses: actions/checkout@v4
# Set up Node
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: |
corepack enable
yarn install
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
with:
install_command: yarn # default: npm ci
build_command: yarn build-storybook # default: npm run build-storybook
path: storybook-static # default: dist/storybook
checkout: false # default: true

View File

@ -0,0 +1,36 @@
name: Test Docsite and Storybook Build
env:
NODE_VERSION: 20
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
paths:
- "docs/**"
- "storybook/**"
- "**/*.story.*"
- "**/*.stories.*"
jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: |
corepack enable
yarn install
- name: Test build website
run: yarn build
working-directory: docs/
- name: Test build storybook
run: yarn build-storybook

View File

@ -3,7 +3,7 @@ import { create } from "@storybook/theming";
export const light = create({ export const light = create({
base: "light", base: "light",
brandTitle: "Wave Terminal Storybook", brandTitle: "Wave Terminal Storybook",
brandUrl: "https://storybook.waveterm.dev", brandUrl: "https://docs.waveterm.dev/storybook/",
brandImage: "/assets/wave-light.png", brandImage: "/assets/wave-light.png",
brandTarget: "_self", brandTarget: "_self",
}); });
@ -11,7 +11,7 @@ export const light = create({
export const dark = create({ export const dark = create({
base: "dark", base: "dark",
brandTitle: "Wave Terminal Storybook", brandTitle: "Wave Terminal Storybook",
brandUrl: "https://storybook.waveterm.dev", brandUrl: "https://docs.waveterm.dev/storybook/",
brandImage: "/assets/wave-dark.png", brandImage: "/assets/wave-dark.png",
brandTarget: "_self", brandTarget: "_self",
}); });

2
CNAME
View File

@ -1 +1 @@
storybook.waveterm.dev docs.waveterm.dev

View File

@ -4,7 +4,7 @@ We welcome and value contributions to Wave Terminal! Wave is an open source proj
- Submit issues related to bugs or new feature requests - Submit issues related to bugs or new feature requests
- Fix outstanding [issues](https://github.com/wavetermdev/waveterm/issues) with the existing code - Fix outstanding [issues](https://github.com/wavetermdev/waveterm/issues) with the existing code
- Contribute to [documentation](https://github.com/wavetermdev/waveterm-docs) - Contribute to [documentation](./docs)
- Spread the word on social media (tag us on [LinkedIn](https://www.linkedin.com/company/wavetermdev), [Twitter/X](https://x.com/wavetermdev)) - Spread the word on social media (tag us on [LinkedIn](https://www.linkedin.com/company/wavetermdev), [Twitter/X](https://x.com/wavetermdev))
- Or simply ⭐️ the repository to show your appreciation - Or simply ⭐️ the repository to show your appreciation

View File

@ -70,7 +70,7 @@ Find more information in our [Contributions Guide](CONTRIBUTING.md), which inclu
- [Ways to contribute](CONTRIBUTING.md#contributing-to-wave-terminal) - [Ways to contribute](CONTRIBUTING.md#contributing-to-wave-terminal)
- [Contribution guidelines](CONTRIBUTING.md#before-you-start) - [Contribution guidelines](CONTRIBUTING.md#before-you-start)
- [Storybook](https://storybook.waveterm.dev) - [Storybook](https://docs.waveterm.dev/storybook)
### Activity ### Activity

13
docs/.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,jsx,ts,tsx,cjs,json,yml,yaml,css,less}]
charset = utf-8
indent_style = space
indent_size = 4
[CNAME]
insert_final_newline = false

22
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# Dependencies
/node_modules
/.yarn
# Production
/build
build.zip
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

6
docs/.prettierignore Normal file
View File

@ -0,0 +1,6 @@
build
.git
node_modules
*.min.*
*.mdx
CNAME

8
docs/.remarkrc Normal file
View File

@ -0,0 +1,8 @@
{
"plugins": [
"remark-preset-lint-consistent",
"remark-preset-lint-recommended",
"remark-mdx",
"remark-frontmatter"
]
}

1
docs/.yarnrc.yml Normal file
View File

@ -0,0 +1 @@
nodeLinker: node-modules

40
docs/README.md Normal file
View File

@ -0,0 +1,40 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./assets/wave-dark.png">
<source media="(prefers-color-scheme: light)" srcset="./assets/wave-light.png">
<img alt="Wave Terminal Logo" src="./assets/wave-light.png" width="240">
</picture>
<br/>
</p>
# Wave Terminal Documentation
This is the home for Wave Terminal's documentation site. This README is specifically about _building_ and contributing to the docs site. If you are looking for the actual hosted docs, go here -- https://docs.waveterm.dev
### Installation
Our docs are built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
```sh
yarn
```
### Local Development
```sh
yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```sh
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Deployments are handled automatically by the [Deploy action](.github/workflows/deploy.yml)

3
docs/babel.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};

150
docs/docs/config.mdx Normal file
View File

@ -0,0 +1,150 @@
---
sidebar_position: 3
id: "config"
title: "Configuration"
---
Wave's configuration files are located at `~/.config/waveterm/`.
The main configuration file is `settings.json` (`~/.config/waveterm/settings.json`).
The file is structured as a mostly flat JSON file. Instead of using sub-objects we prefer to
use ":" as level separators.
:::info
If you installed Wave pre-v0.9.0 your configuration file will be located at
`~/.waveterm/config/settings.json`. This includes all of the other configuration
files as well: `termthemes.json`, `presets.json`, and `widgets.json`.
:::
| Key Name | Type | Function |
|----------|------|----------|
| ai:preset | string | the default AI preset to use |
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
| ai:apitype | string | defaults to "open_ai", but can also set to "azure" for special Azure AI handling |
| ai:name | string | string to display in the Wave AI block header |
| ai:model | string | model name to pass to API |
| ai:apiversion | string | for Azure AI only (when apitype is "azure", this will default to "2023-05-15") |
| ai:orgid | string ||
| ai:maxtokens | int | max tokens to pass to API |
| ai:timeoutms | int | timeout (in milliseconds) for AI calls |
| conn:askbeforewshinstall | bool | set to false to disable popup asking if you want to install wsh extensions on new machines |
| term:fontsize | float | the fontsize for the terminal block |
| term:fontfamily | string | font family to use for terminal block |
| term:disablewebgl | bool | set to false to disable WebGL acceleration in terminal |
| term:localshellpath | string | set to override the default shell path for local terminals |
| term:localshellopts | string[] | set to pass additional parameters to the term:localshellpath |
| term:copyonselect | bool | set to false to disable terminal copy-on-select |
| editor:minimapenabled | bool | set to false to disable editor minimap |
| editor:stickscrollenabled | bool | |
| web:openlinksinternally | bool | set to false to open web links in external browser |
| web:defaulturl | string | default web page to open in the web widget when no url is provided (homepage) |
| web:defaultsearch | string | search template for web searches. e.g. `https://www.google.com/search?q={query}`. "\{query}" gets replaced by search term |
| blockheader:showblockids | bool | show first 8 chars of blockid in the header |
| autoupdate:enabled | bool | enable/disable checking for updates (requires app restart) |
| autoupdate:intervalms | float64 | time in milliseconds to wait between update checks (requires app restart) |
| autoupdate:installonquit | bool | whether to automatically install updates on quit (requires app restart) |
| autoupdate:channel | string | the auto update channel "latest" (stable builds), or "beta" (updated more frequently) (requires app restart) |
| widget:showhelp | bool | whether to show help/tips widgets in right sidebar |
| window:transparent | bool | set to true to enable window transparency (cannot be combined with `window:blur`) (macOS and Windows only, requires app restart, see [note on Windows compatibility](https://www.electronjs.org/docs/latest/tutorial/window-customization#limitations)) |
| window:blur | bool | set to enable window background blurring (cannot be combined with `window:transparent`) (macOS and Windows only, requires app restart, see [note on Windows compatibility](https://www.electronjs.org/docs/latest/tutorial/window-customization#limitations)) |
| window:opacity | float64 | 0-1, window opacity when `window:transparent` or `window:blur` are set |
| window:bgcolor | string | set the window background color (should be hex: #xxxxxx) |
| window:reducedmotion | bool | set to true to disable most animations |
| window:tilegapsize | int | set to change override default gap between blocks |
| window:showmenubar | bool | set to use the OS-native menu bar (Windows and Linux only, requires app restart) |
| window:nativetitlebar | bool | set to use the OS-native title bar, rather than the overlay (Windows and Linux only, requires app restart) |
| window:disablehardwareacceleration | bool | set to disable Chromium hardware acceleration to resolve graphical bugs (requires app restart) |
| telemetry:enabled | bool | set to enable/disable telemetry |
For reference this is the current default configuration (v0.8.8):
```json
{
"ai:preset": "ai@global",
"ai:model": "gpt-4o-mini",
"ai:maxtokens": 2048,
"ai:timeoutms": 60000,
"autoupdate:enabled": true,
"autoupdate:installonquit": true,
"autoupdate:intervalms": 3600000,
"conn:askbeforewshinstall": true,
"editor:minimapenabled": true,
"web:defaulturl": "https://github.com/wavetermdev/waveterm",
"web:defaultsearch": "https://www.google.com/search?q={query}",
"window:tilegapsize": 3,
"telemetry:enabled": true,
"term:copyonselect": true
}
```
### Terminal Theming
User-defined terminal themes are located in `~/.config/waveterm/termthemes.json`. This JSON file is structured as an object, with each sub-key defining a theme.
Themes are applied by right-clicking on the terminal's header bar and selecting an entry from the "Themes" sub-menu. Alternatively they can be applied to
the block's metadata key `term:theme`. This uses the JSON key value as the identifier. Note, for best consistency all colors should be of the format "#rrggbb" or "#rrggbbaa" (aa = alpha channel for transparency).
`wsh setmeta this term:theme="default-dark"`
Here is an example of defining a full terminal theme. All of the built-in themes are defined here: https://github.com/wavetermdev/waveterm/blob/main/pkg/wconfig/defaultconfig/termthemes.json (if you'd like to add a popular terminal theme, please submit a PR!)
```json
{
"default-dark": {
"display:name": "Default Dark",
"display:order": 1,
"black": "#757575",
"red": "#cc685c",
"green": "#76c266",
"yellow": "#cbca9b",
"blue": "#85aacb",
"magenta": "#cc72ca",
"cyan": "#74a7cb",
"white": "#c1c1c1",
"brightBlack": "#727272",
"brightRed": "#cc9d97",
"brightGreen": "#a3dd97",
"brightYellow": "#cbcaaa",
"brightBlue": "#9ab6cb",
"brightMagenta": "#cc8ecb",
"brightCyan": "#b7b8cb",
"brightWhite": "#f0f0f0",
"gray": "#8b918a",
"cmdtext": "#f0f0f0",
"foreground": "#c1c1c1",
"selectionBackground": "",
"background": "#00000077",
"cursorAccent": ""
}
}
```
| Key Name | Type | ANSI FG# | ANSI BG# | Function |
|----------|------|----------|----------|----------|
| display:name | string ||| the name as it will appear in the UI context menu |
| display:order | float ||| entries in the context menu are sorted by display:order |
| black | CSS color | 30 | 40 | color for black |
| red | CSS color | 31 | 41 | color for red |
| green | CSS color | 32 | 42 | color for green |
| yellow | CSS color | 33 | 43 | color for yellow |
| blue | CSS color | 34 | 44 | color for blue |
| magenta | CSS color | 35 | 45 | color for magenta |
| cyan | CSS color | 36 | 46 | color for cyan |
| white | CSS color | 37 | 47 | color for white |
| brightBlack | CSS color | 90 | 100 | color for bright black |
| brightRed | CSS color | 91 | 101 | color for bright red |
| brightGreen | CSS color | 92 | 102 | color for bright green |
| brightYellow | CSS color | 93 | 103 | color for bright yellow |
| brightBlue | CSS color | 94 | 104 | color for bright blue |
| brightMagenta | CSS color | 95 | 105 | color for bright magenta |
| brightCyan | CSS color | 96 | 106 | color for bright cyan |
| brightWhite | CSS color | 97 | 107 | color for bright white |
| gray | CSS color ||| currently unused |
| cmdtext | CSS color ||| currently unused |
| foreground | CSS color ||| foreground color (default when no color code is applied) |
| background | CSS color ||| background color (default when no color code is applied), must have alpha channel (#rrggbbaa) if you want the terminal to be transparent |
| cursorAccent | CSS color ||| color for cursor |
| selectionBackground | CSS color ||| background color for selected text |

52
docs/docs/connections.mdx Normal file
View File

@ -0,0 +1,52 @@
---
sidebar_position: 7
id: "connections"
title: "Connections"
---
# Connections
Wave allows users to connect to various machines and unify them together in a way that preserves the unique behavior of each. At the moment, this extends to SSH remote connections and local WSL connections.
## Access a Connection in a Block
The easiest way to access connections is to click the <i className="fa-sharp fa-laptop"/> icon. From there, you can either type `[user]@[host]` for a desired SSH remote or type `wsl://<distribution name>` for a desired WSL distribution. Alternatively, if the connection already exists in the dropdown list, you can either click it or navigate to it with arrow keys and press enter to connect.
## What are wsh Shell Extensions?
`wsh` is a small program that helps manage waveterm regardless of which machine you are currently connected to. In order to not interrupt the normal flow of the remote session, we install it on your remote machine at `~/.waveterm/bin/wsh`. Then, when wave connects to your connection (and only when wave connects to your connection), `~/.waveterm/bin` is added to your `PATH` for that individual session. For more info on what `wsh` is capable of, see [wsh command](/wsh). And if you wish to view the source code of `wsh`, you can find it [here](https://github.com/wavetermdev/waveterm/tree/main/cmd/wsh).
## Add a New Connection to the Dropdown
The SSH values that are loaded into the dropdown by default are obtained by parsing your `~/.ssh/config` and `/etc/ssh/ssh_config` files. Adding a new connection is as simple as adding a new `Host` to one of these files, typically the `~/.ssh/config` file.
WSL values are added by searching the installed WSL distributions as they appear in the Windows Registry.
## SSH Config Parsing
At the moment, we are capable of parsing any SSH config file that does not contain the `Match` keyword. This keyword is incompatible with a library we are using, but we are hoping to fix that soon. While all other valid keywords are parsed, we only support the functionality of a small subset of them at the moment:
| Keyword | Description |
|---------|-------------|
| Host | The pattern to match when attempting to connect via `[user]@[host]`. We list hosts that do not contain any wildcards characters (`*`, `?`, or `!`). Even if a host pattern contains wildcards, it will still be parsed when determining the values associated with the keys as usual.|
| User | The user of the SSH remote connection. This will default to the current user on the local machine if not specified.|
| Port | The port to connect to the remote on. `22` is the default if not specified.|
| IdentityFile | This can be specified more than once per host. It gives the path to a private identity file (id_rsa, id_ed25519, id_ecdsa, etc.) that is used to authenticate the connection. Each will be tried in order, and they can be encrypted with a passphrase if desired. If no value is set, the default is to try in order: ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519_sk, ~/.ssh/id_dsa.|
|BatchMode| If set to true, user interaction via password, challenge/response, and publickey passphrase authentication will be disabled. It is set to false by default.|
|PubkeyAuthentication| (partial) This is used to specify if pubkey authentication should be attempted. It is partially implementented as the `unbound` and `host-bound` values simply work the same as the `yes` value. The default is `yes`.|
|PasswordAuthentication| This is used to specify if password authentication should be attempted. The default is `yes`.|
|KbdInteractiveAuthentication| This is used to specify if keyboard-interactive authentication should be attempted. The default is `yes`.|
|PreferredAuthentications| (partial) Specifies the order the client should attempt to authenticate in. It is partially implemented as it does not support `gssapi-with-mic` or `hostbased` authentication. The default is `publickey,keyboard-interactive,password`|
|AddKeysToAgent| (partial) This option will automatically add keys and their corresponding passphrase to your running ssh agent if it is enabled. It is partially supported as it can only accept `yes` and `no` as valid inputs. Other inputs such as `confirm` or a time interval will behave the same as `no`. The default value is `no`.|
|ProxyJump| Specifies one or more jump proxies in a comma separated list. Each will be visited sequentially using TCP forwarding before connecting to the desired connection (also using TCP forwarding). It can be set to `none` to disable the feature.|
### Example SSH Config Host
For a quick example, a host in your config file may look like:
```
Host myhost
User username
HostName 203.0.113.254
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
```
You would then be able to access this connection with `myhost` or `username@myhost`. And if you wanted to manually specify a port such as port 2222, you could do that by either adding `Port 2222` to the config file or connecting to `username@myhost:2222`.
## Managing Connections with the CLI
The `wsh` command gives some commands specifically for interacting with the connections. You can view these [here](/wsh#conn).

108
docs/docs/customwidgets.mdx Normal file
View File

@ -0,0 +1,108 @@
---
sidebar_position: 6
id: "customwidgets"
title: "Custom Widgets"
---
# Custom Widgets
Wave allows users to create their own widgets to uniquely customize their experience for what works for them. While we plan on greatly expanding on this in the future, it is already possible to make terminal/cli widgets that you can access at the press of a button.
# Terminal and CLI Widgets
A terminal widget, or CLI widget, is a widget that simply opens a terminal and runs a CLI command.
These widgets are managed in the `~/.config/waveterm/widgets.json` file.
## Designing a Widget
Each widget is a key-value pair of a json object where the key is the name of the widget, and the value is an object responsible for configuring the widget. As a whole, it looks like:
```json
{
<... other widgets go here ...>,
"<widget name>": {
"icon": "<fontawesome icon name>",
"label": "<the text label of the widget>",
"color": "<the color of the label>",
"blockdef": {
"meta": {
"view": "term",
"controller": "cmd"
"cmd": "<the actual cli command>"
}
}
},
<... other widgets go here ...>
}
```
In essence, there are two places that require customization. The first is the outer `WidgetConfigType` which is directly in the object that corresponds with the widget name. In the example above, it contains `"icon"`, `"label"`, and `"color"`. Valid options for this type include:
| Key | Description |
|-----|-------------|
|"display:order"| (optional) Overrides the order of widgets with a number in case you want the widget to be different than the order provided in the `widgets.json` file. Defaults to 0. |
|"icon"| (optional) The name of a fontawesome icon. Defaults to `"browser"`.|
|"color"| (optional) A string representing a color as would be used in CSS. Hex codes and custom CSS properties are included. This defaults to `"var(--secondary-text-color)"` which is a color wave uses for text that should be differentiated from other text. Out of the box, it is `"#c3c8c2"`.|
|"label"| (optional) A string representing the label that appears underneath the widget. It will also act as a tooltip on hover if the `"description"` key isn't filled out. It is null by default.|
|"description"| (optional) A description of what the widget does. If it is specified, this serves as a tooltip on hover. It is null by default.|
|"blockdef"| This is where the the non-visual portion of the widget is defined. Note that all further definition takes place inside a meta object inside this one.|
The other part to configure is the `MetaTSType` associated with the widget. The topic of the `MetaTSType` is vast and deserves it's own documentation, but here is a subset that is relevant to creating terminal widgets.
| Key | Description |
|-----|-------------|
| "view" | A string that specifies the general type of widget. In the case of custom terminal widgets, this must be set to `"term"`.|
| "controller" | A string that specifies the type of command being used. For more persistent shell sessions, set it to "shell". For one off commands, set it to "cmd". Note that it is often possible to achieve the same result through each depending on the command being used.|
| "cmd" | (optional) When the `"controller"` is set to `"cmd"`, this option provides the actual command to be run. Note that because it is run as a command, there is no shell session unless you are launching a command that contains a shell session itself. Defaults to an empty string. |
| "cmd:interactive" | (optional) When the `"controller"` is set to `"term", this boolean adds the interactive flag to the launched terminal. Defaults to false.|
| "cmd:login" | (optional) When the `"controller"` is set to `"term"`, this boolean adds the login flag to the term command. Defaults to false.|
| "cmd:runonstart" | (optional) The command will rerun when the app is started. Without it, you must manually run the command. Defaults to true.|
| "cmd:clearonstart" | (optional) When the cmd starts, the contents of the block are cleared out. Defaults to false. |
| "cmd:clearonrestart" | (optional) When the app restarts, the contents of the block are cleared out. Defaults to false. |
| "cmd:env" | (optional) A key-value object represting environment variables to be run with the command. Currently only works locally. Defaults to an empty object. |
| "cmd:cwd" | (optional) A string representing the current working directory to be run with the command. Currently only works locally. Defaults to the home directory. |
| "cmd:nowsh" | (optional) A boolean that will turn off wsh integration for the command. Defaults to false. |
| "term:localshellpath" | (optional) Sets the shell used for running your widget command. Only works locally. If left blank, wave will determine your system default instead. |
| "term:localshellopts" | (optional) Sets the shell options meant to be used with `"term:localshellpath"`. This is useful if you are using a nonstandard shell and need to provide a specific option that we do not cover. Only works locally. Defaults to an empty string. |
## Example Widgets
Here are a few simple widgets to serve as examples.
Suppose I want a widget that will run speedtest-go when opened. Then, I can define a widget as
```json
{
<... other widgets go here ...>,
"speedtest" : {
"icon": "gauge-high",
"label": "speed",
"blockdef": {
"meta": {
"view": "term",
"controller": "cmd",
"cmd": "speedtest-go --unix",
"cmd:clearonstart"
}
}
},
<... other widgets go here ...>
}
```
Using `"cmd"` for the `"controller"` is the simplest way to accomplish this. `"cmd:clearonstart"` isn't necessary, but it makes it so every time the command is run (which can be done by right clicking the header and selecting `Force Controller Restart`), the previous contents are cleared out.
Now suppose I wanted to run a TUI app, for instance, `dua`. Well, it turns out that you can more or less do the same thing:
```json
<... other widgets go here ...>,
"dua" : {
"icon": "brands@linux",
"label": "dua",
"blockdef": {
"meta": {
"view": "term",
"controller": "cmd",
"cmd": "dua"
}
}
},
<... other widgets go here ...>
```
Because this is a TUI app that does not return anything when closed, the `"cmd:clearonstart"` option doesn't change the behavior, so it has been excluded.

62
docs/docs/faq.mdx Normal file
View File

@ -0,0 +1,62 @@
---
sidebar_position: 7
id: "faq"
title: "FAQ"
---
# FAQ
### How do I set up my own LLM?
You must manually edit the [config file](./config) located at `~/.config/waveterm/settings.json`.
| Key Name | Type | Function |
|----------|------|----------|
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
| ai:name | string | string to display in the Wave AI block header |
| ai:model | string | model name to pass to API |
| ai:maxtokens | int | max tokens to pass to API |
| ai:timeoutms | int | timeout (in milliseconds) for AI calls |
Here's an example of pointing it to a local Ollama instance. Note that to get the text in the header of the AI block
to update, you'll need to set the "ai:name" key. For ollama, you'll also need to provide something for the
apitoken (even though it is ignored).
Here are the ollma open AI compatibility docs: https://github.com/ollama/ollama/blob/main/docs/openai.md
```json
{
"ai:baseurl": "http://localhost:11434/v1",
"ai:name": "llama3.2",
"ai:model": "llama3.2",
"ai:apitoken": "ollama"
}
```
### How can I connect to Azure AI
You must manually edit the [config file](./config) located at `~/.config/waveterm/settings.json`.
You'll need to set your `ai:baseurl` to your Azure AI Base URL (do not include query parameters or `api-version`).
You'll also need to set `ai:apitype` to `azure`. You can then set the `ai:model`, and `ai:apitoken` appropriately
for your setup.
### How can I see the block numbers?
The block numbers will appear when you hold down Ctrl-Shift (and disappear once you release the key combo).
### How do I make a remote connection?
There is a button in the header. Click the <i className="fa-sharp fa-laptop"/> or <i className="fa-sharp fa-arrow-right-arrow-left"/>
and type the `[user]@[host]` that you wish to connect to.
### On Windows, how can I use Git Bash as my default shell?
In order to make Git Bash your default shell you'll need to set the configuration variable `term:localshellpath` to
the location of the Git Bash "bash.exe" binary. By default it is located at "C:\Program Files\Git\bin\bash.exe".
Just remember in JSON, backslashes need to be escaped. So add this to your [settings.json](./config) file:
```json
"term:localshellpath": "C:\\Program Files\\Git\\bin\\bash.exe"
```

View File

@ -0,0 +1,8 @@
{
"label": "Features",
"position": 2,
"link": {
"type": "generated-index",
"description": "Overview of Wave Terminal Features"
}
}

View File

@ -0,0 +1,3 @@
# Wave AI
TODO: Add content

View File

@ -0,0 +1,3 @@
# Inline Web Browser
TODO: Add content

View File

@ -0,0 +1,3 @@
# Data Visualization
TODO: Add content

View File

@ -0,0 +1,3 @@
# Preview
TODO: Add content

View File

@ -0,0 +1,3 @@
# Remote Connections
TODO: Add content

51
docs/docs/index.mdx Normal file
View File

@ -0,0 +1,51 @@
---
sidebar_position: 1
id: "index"
title: "Home"
hide_title: true
hide_table_of_contents: true
---
import {Card, CardGroup} from '@site/src/components/card.tsx';
# Welcome to Wave Terminal
Wave is an [open-source](https://github.com/wavetermdev/waveterm) terminal that adds the ability to launch graphical widgets, controlled and integrated directly with the CLI. We support MacOS, Linux, and Windows ([Downloads](https://waveterm.dev/download)).
**These docs are incomplete**, but we're working on them. If you have a question, please feel free to ask us in [Discord](https://discord.gg/XfvZ334gwU). If you'd like to file a bug/enchancement, please
use [Github Issues](https://github.com/wavetermdev/waveterm/issues). These docs are also open-source and we do accept PRs in our [docs repo](https://github.com/wavetermdev/waveterm-docs)
References:
* [Widgets](./widgets)
* [Configuration](./config)
* [Key Bindings](./keybindings)
* [wsh command](./wsh)
* [Connections](./connections)
* [Custom Widgets](./customwidgets)
* [Telemetry](./telemetry)
* [FAQ](./faq)
<!--
## Features
<CardGroup>
<Card href="features/preview" icon="fa-file-magnifying-glass" title="File Previews" description="Preview widgets let you view markdown, images, video, CSVs, and more inline." />
<Card href="features/remotes" icon="fa-server" title="Reliable Remote Connections" description="Automatic reconnection, remote file previews, and more." />
<Card href="features/ai" icon="fa-sparkles" title="Integrated AI" description="Inline AI Chat Windows hooked up to any LLM (local or remote)." />
<Card href="features/browser" icon="fa-globe" title="Inline Web Browser" description="Access online content without switching context." />
<Card href="features/charts" icon="fa-chart-simple" title="Data Visualization" description="Create graphs of system stats or custom data piped directly from CLI programs." />
</CardGroup>
-->
## Links
* Homepage -- https://waveterm.dev
* Download -- https://waveterm.dev/download
* Discord -- https://discord.gg/XfvZ334gwU
* Main Github (source code) -- https://github.com/wavetermdev/waveterm/
* Docs Github (powers this site) -- https://github.com/wavetermdev/waveterm-docs/
## Looking for WaveLegacy documentation?
WaveLegacy docs can be found at [legacydocs.waveterm.dev](https://legacydocs.waveterm.dev).

55
docs/docs/keybindings.mdx Normal file
View File

@ -0,0 +1,55 @@
---
sidebar_position: 2
id: "keybindings"
title: "Key Bindings"
---
Here's the set of default keybindings available in Wave. It is split into sections.
Some keybindings are always active. Others are only active for certain types of blocks.
Note that these are the MacOS keybindings (they use "Cmd"). For Windows and Linux
replace "Cmd" with "Alt" (note that "Ctrl" is "Ctrl" on both Mac, Windows, and Linux).
## Global Keybindings
| Key | Function |
|-----|----------|
| Cmd:t | Open a new tab |
| Cmd:n | Open a new terminal block (defaults to the same connection and working directory) |
| Cmd:w | Close the current block |
| Cmd:m | Magnify / Un-Magnify the current block |
| Cmd:g | Open the "connection" switcher |
| Cmd:i | Refocus the current block (useful if the block has lost input focus) |
| Ctrl:Shift | Show block numbers |
| Ctrl:Shift:[number] | Switch to block number |
| Ctrl:Shift:Arrows | Move left, right, up, down between blocks |
| Cmd:[number] | Switch to tab number |
| Cmd:[ | Switch tab left |
| Cmd:] | Siwtch tab right |
| Cmd:Shift:r | Refresh the UI |
## File Preview Keybindings
| Key | Function |
|-----|----------|
| [any character] | any regular character (e.g. "a", "b") will filter the file list |
| Escape | will clear the filter |
| Up/Down Arrow | change file selection up/down |
| Enter | Open the currently selected file/directory |
| Cmd:ArrowUp | move "up" a directory (parent directory) |
| Cmd:ArrowLeft | back, move to the previously selected file/directory |
| Cmd:ArrowRight | forward (opposite of back) |
| Cmd:o | Open a new file (accepts relative paths to the current directory) |
| Cmd:s | When file editor is open, save file |
| Cmd:e | For files that can be previewed or edited (markdown, CSVs), switches between preview and edit mode |
| Cmd:r | When file editor is open, revert changes |
## Web Keybindings
| Key | Function |
|-----|----------|
| Cmd:l | focus the URL input bar |
| Escape | when the URL input bar is focused, will focus the web content |
| Cmd:r | reload webpage |
| Cmd:ArrowLeft | back |
| Cmd:ArrowRight | forward |

176
docs/docs/releasenotes.mdx Normal file
View File

@ -0,0 +1,176 @@
---
id: "releasenotes"
title: "Release Notes"
sidebar_position: 8
---
# Release Notes
### v0.9.1 &mdash; Nov 1, 2024
Minor bug fix release to follow-up on the v0.9.0 build. Lots of issues fixed (especially for Windows).
* CLI applications that need microphone, camera, or location access will now work on MacOS. You'll see a security popup in Wave to allow/deny [#1086](https://github.com/wavetermdev/waveterm/issues/1086)
* Can now use `wsh version -v` to print out the new data/config directories
* Restores the old T1, T2, T3, ... tab naming logic
* Temporarily revert to using the "Title Bar" on windows to mitgate a bug where the window controls were overlaying on top of our tabs (working on a real fix for the next release)
* There is a new setting in the editor to enable/disable word wrapping [#1038](https://github.com/wavetermdev/waveterm/issues/1038)
* Ctrl-S will now save files in codeedit [#1081](https://github.com/wavetermdev/waveterm/issues/1081)
* [#1020](https://github.com/wavetermdev/waveterm/issues/1020) there is now a preset config option to change the active border color in tab themes
* [bugfix] Multiple fixes for [#1167](https://github.com/wavetermdev/waveterm/issues/1167) to try to address tab loss while updating
* [bugfix] Windows app crashed on opening View menu because of a bad accelerator key
* [bugfix] The auto-updater messages in the tab bar are now more consistent when switching tabs, and we don't show errors when the network is disconnected
* [bugfix] Full-screen mode now actually shows tabs in full screen
* [bugfix] [#1175](https://github.com/wavetermdev/waveterm/issues/1175) can now edit .awk files
* [bugfix] [#1066](https://github.com/wavetermdev/waveterm/issues/1066) applying a default theme now updates the background appropriately without a refresh
### v0.9.0 &mdash; Oct 28, 2024
New major Wave Terminal release! Wave tabs are now cached. Tab switching performance is
now much faster and webview state, editor state, and scroll positions are now persisted
across tab changes. We also have native WSL2 support. You can create native Wave connections
to your Windows WSL2 distributions using the connection button.
We've also laid the groundwork for some big features that will be released over the
next couple of weeks, including Workspaces, AI improvments, and custom widgets.
Lots of other smaller changes and bug fixes. See full list of PRs at https://github.com/wavetermdev/waveterm/releases/tag/v0.9.0
### v0.8.13 &mdash; Oct 24, 2024
* Wave is now available as a Snap for Linux users! You can find it [in the Snap Store](https://snapcraft.io/waveterm).
* Wave is now available via the Windows Package Manager! You can install it via `winget install CommandLine.Wave`
* can now use "term:fontsize" to override an individual terminal block's font size (also in context menu)
* we now allow mixed case hostnames for connections to be compatible with ssh config
* The Linux app icon is now updated to match the Windows icon
* [bugfix] fixed a bug that sometimes caused escape sequences to be printed when switching between tabs
* [bugfix] fixed an issue where the preview block was not cleaning up temp files (Windows only)
* [bugfix] fixed chrome sandbox permissions errors in linux
* [bugfix] fixed shutdown logic on MacOS/Linux which sometimes allowed orphaned processes to survive
### v0.8.12 &mdash; Oct 18, 2024
* Added support for multiple AI configurations! You can now run Open AI side-by-side with Ollama models. Can create AI presets in presets.json, and can easily switch between them using a new dropdown in the AI widget
* Fix WebSocket reconnection error. this sometimes caused the terminal to hang when waking up from sleep
* Added memory graphs, and per-CPU graphs to the sysinfo widget (and renamed it from cpuplot)
* Added a new huge red "Config Error" button when there are parse errors in the config JSON file
* Preview/CodeEdit widget now shows errors (squiggly lines) when JSON or YAML files fail to parse
* New app icon for Windows to better match Fluent UI standards
* Added copy-on-select to the terminal (on by default, can disable using "term:copyonselect")
* Added a button to mute audio in webviews
* Added a right-click "Open Clipboard URL" to easily open a webview from an URL stored in your system clipboard
* [bugfix] fixed blank "help" pages when waking from sleep or restarting the app
### v0.8.11 &mdash; Oct 10, 2024
Hotfix release to address a couple of bugs introduced in v0.8.10
* Fixes a regression in v0.8.10 which caused new tabs to sometimes come up blank and broken
* Layout fixes to the AI widget spacing
* Terminal scrollbar is now semi-transparent and overlays last column
* Fixes initial window size (on first startup) for both smaller and larger screens
* Added a "Don't Ask Again" checkbox for installing `wsh` on remote machines (sets a new config flag)
* Prevent the app from downgrading when you install a beta build. Installing a beta-build will now switch you to the beta-update channel.
### v0.8.10 &mdash; Oct 9, 2024
Minor big fix release (but there are some new features).
* added support for Azure AI [See FAQ](https://docs.waveterm.dev/faq#how-can-i-connect-to-azure-ai)
* AI errors now appear in the chat
* on MacOS, hitting "Space" in directorypreview will open selected file in Quick Look
* [bugfix] fixed transparency settings
* [bugfix] fixed issue with non-standard port numbers in connection dropdown
* [bugfix] fixed issue with embedded docsite (returned 404 after refresh)
### v0.8.9 &mdash; Oct 8, 2024
Lots of bug fixes and new features!
* New "help" view -- uses an embedded version of our doc site -- https://docs.waveterm.dev
* [breaking] wsh getmeta, wsh setmeta, and wsh deleteblock now take a blockid using a `-b` parameter instead of as a positional parameter
* allow metadata to override the block icon, header, and text (frame:title, frame:icon, and frame:text)
* home button on web widget to return to the homepage, option to set a homepage default for the whole app or just for the given block
* checkpoint the terminal less often to reduce frequency of output bug (still working on a full fix)
* new terminal themes -- Warm Yellow, and One Dark Pro
* we now support github flavored markdown alerts
* `wsh notify` command to send a desktop notification
* `wsh createblock` to create any block via the CLI
* right click to "Save Image" in webview
* `wsh edit` will now allow you to open new files (as long as the parent directly exists)
* added 8 new fun tab background presets (right click on any tab and select "Backgrounds" to try them out)
* [config] new config key "term:scrollback" to set the number of lines of scrollback for terminals. Use "-1" to set 0, max is 10000.
* [config] new config key "term:theme" to set the default terminal theme for all new terminals
* [config] new config key "preview:showhiddenfiles" to set the default "show hidden files" setting for preview
* [bugfix] fixed an formatting issue with `wsh getmeta`
* [bugfix] fix for startup issue on Linux when home directory is an NFS mount
* [bugfix] fix cursor color in terminal themes to work
* [bugfix] fix some double scrollbars when showing markdown content
* [bugfix] improved shutdown sequence to better capture wavesrv logs
* [bugfix] fix Alt+G keyboard accelerator for Linux/Windows
* other assorted bug fixes, cleanups, and security fixes
### v0.8.8 &mdash; Oct 1, 2024
Quick patch release to fix Windows/Linux "Alt" keybindings. Also brings a huge performance improvement to AI streaming speed.
### v0.8.7 &mdash; Sep 30, 2024
Quick patch release to fix bugs:
* Fixes windows SSH connections (invalid path while trying to install wsh tools)
* Fixes an issue resolving `~` in windows paths `~\` now works instead of just `~/`
* Tries to fix background color for webpages. Pulls meta tag for color-scheme, and sets a black background if dark detected (fixes issue rendering raw githubusercontent files)
* Fixed our useDimensions hook to fire correctly. Fixes some sizing issues including allowing error messages to show consistently when SSH connections fail.
* Allow "data:" urls in custom tab backgrounds
* All the alias "tab" for the current tab's UUID when using wsh
* [BUILD] conditional write generated files only if they are updated
### v0.8.6 &mdash; Sep 26, 2024
Another quick hotfix update. Fixes an issue where, if you deleted all of the tabs in a window, the window would be restored on next startup as completely blank.
Also, as a bonus, we added fish shell support!
### v0.8.5 &mdash; Sep 25, 2024
Hot fix, dowgrade `jotai` library. Upgrading caused a major regression in codeedit which did not allow
users to edit files.
### v0.8.4 &mdash; Sep 25, 2024
* Added a setting `window:disablehardwareacceleration` to disable native hardware acceleration
* New startup model for legacy users given them the option to download the WaveLegacy
* Use WAVETERM_HOME for the home directory consistently
### v0.8.3 &mdash; Sep 25, 2024
More hotfixes for Linux users. We now link against an older version of glibc and use
the zig compiler on linux (the newer version caused us not to run on older distros).
Also fixes a permissions issue when installing via .deb. There is also a new config value
`window:nativetitlebar` which restores the native titlebar on windows/linux.
### v0.8.2 &mdash; Sep 24, 2024
Hot fix, fixes a nasty crash on startup for Linux users (dynamic linking but with netcgo DNS library)
### v0.8.1 &mdash; Sep 23, 2024
Minor cleanup release.
* fix number parsing for certain config file values
* add link to docs site
* add new back button for directory view
* telemetry fixes
### v0.8.0 &mdash; Sep 20, 2024
**Major New Relase of Wave Terminal**
The new build is a fresh start, and a clean break from the current version. As such, your history, settings, and configuration will not be carried over. If you'd like to continue to run the legacy version, you will need to download it separately.
Release Artificats and source code diffs can be found on (Github)[https://github.com/wavetermdev/waveterm].

88
docs/docs/telemetry.mdx Normal file
View File

@ -0,0 +1,88 @@
---
sidebar_position: 3
id: "telemetry"
title: "Telemetry"
---
Wave Terminal collects telemetry data to help us track feature use, direct future product efforts, and generate aggregate metrics on Wave's popularity and usage. We do not collect or store any PII (personal identifiable information) and all metric data is only associated with and aggregated using your randomly generated _ClientId_. You may opt out of collection at any time.
If you would like to turn telemetry on or off, the first opportunity is a button on the initial welcome page. After this, it can be turned off by adding `"telemetry:enabled": false` to the `config/settings.json` file. It can alternatively be turned on by adding `"telemetry:enabled": true` to the `config/settings.json` file.
---
## Sending Telemetry
Provided that telemetry is enabled, it is sent 10 seconds after Waveterm is first booted and then again every 4 hours thereafter. It can also be sent in response to a few special cases listed below. When telemetry is sent, it is grouped into individual days as determined by your time zone. Any data from a previous day is marked as `Uploaded` so it will not need to be sent again.
### Sending Once Telemetry is Enabled
As soon as telemetry is enabled, a telemetry update is sent regardless of how long it has been since the last send. This does not reset the usual timer for telemetry sends.
### Notifying that Telemetry is Disabled
As soon as telemetry is disabled, Waveterm sends a special update that notifies us of this change. See [When Telemetry is Turned Off](#when-telemetry-is-turned-off) for more info. The timer still runs in the background but no data is sent.
### When Waveterm is Closed
Provided that telemetry is enabled, it will be sent when Waveterm is closed.
---
## Telemetry Data
When telemetry is active, we collect the following data. It is stored in the `telemetry.TelemetryData` type in the source code.
| Name | Description |
|------|-------------|
| ActiveMinutes | The number of minutes that the user has actively used Waveterm on a given day. This requires the terminal window to be in focus while the user is actively interacting with it. |
| FgMinutes | The number of minutes that Waveterm has been in the foreground on a given day. This requires the terminal window to be in focus regardless of user interaction.|
| OpenMinutes |The number of minutes that Waveterm has been open on a given day. This only requires that the terminal is open, even if the window is out of focus.|
| NumTabs | The number of existing tabs open on a given day. |
| NewTab | The number of new tabs opened on a given day. |
| NumStartup | The number of times waveterm has been started on a given day. |
| NumShutdown | The number of times waveterm has been shut down on a given day. |
| Renderers | The number of new block views of each type are open on a given day. |
## Associated Data
In addition to the telemetry data collected, the following is also reported. It is stored in the `telemetry.ActivityType` type in the source code.
| Name | Description |
|------|-------------|
| Day | The date the telemetry is associated with. It does not include the time. |
| Uploaded | A boolean that indicates if the telemetry for this day is finalized. It is false during the day the telemetry is associated with, but gets set true at the first telemetry upload after that. Once it is true, the data for that particular day will not be sent up with the telemetry any more. |
| TzName | The code for the timezone the user's OS is reporting (e.g. PST, GMT, JST) |
| TzOffset | The offset for the timezone the user's OS is reporting (e.g. -08:00, +00:00, +09:00) |
| ClientVersion | Which version of Waveterm is installed. |
| ClientArch | This includes the user's operating system (e.g. linux or darwin) and architecture (e.g. x86_64 or arm64). It does not include data for any Connections at this time. |
| BuildTime | This serves as a more accurate version number that keeps track of when we built the version. It has no bearing on when that version was installed by you.|
| OSRelease | This lists the version of the operating system the user has installed. |
## Telemetry Metadata
Lastly, some data is sent along with the telemetry that describes how to classify it. It is stored in the `wcloud.TelemetryInputType` in the source code.
| Name | Description |
|------|-------------|
| UserId | Currently Unused. This is an anonymous UUID intended for use in future features. |
| ClientId | This is an anonymous UUID created when Waveterm is first launched. It is used for telemetry and sending prompts to Open AI.
| AppType | This is used to differentiate the current version of waveterm from the legacy app. |
| AutoUpdateEnabled | Whether or not auto update is turned on. |
| AutoUpdateChannel | The type of auto update in use. This specifically refers to whether a latest or beta channel is selected. |
| CurDay | The current day (in your time zone) when telemetry is sent. It does not include the time of day.
---
## When Telemetry is Turned Off
When a user disables telemetry, Waveterm sends a notification that their anonymous _ClientId_ has had its telemetry disabled. This is done with the `wcloud.NoTelemetryInputType` type in the source code. Beyond that, no further information is sent unless telemetry is turned on again. If it is turned on again, the previous 30 days of telemetry will be sent.
---
## A Note on IP Addresses
Telemetry is uploaded via https, which means your IP address is known to the telemetry server. We **do not** store your IP address in our telemetry table and **do not** associate it with your _ClientId_.
---
## Previously Collected Telemetry Data
While we believe the data we collect with telemetry is fairly minimal, we cannot make that decision for every user. If you ever change your mind about what has been collected previously, you may request that your data be deleted by emailing us at [support@waveterm.dev](mailto:support@waveterm.dev). If you do, we will need your _ClientId_ to remove it.
---
## Privacy Policy
For a summary of the above, you can take a look at our [Privacy Policy](https://www.waveterm.dev/privacy).

98
docs/docs/widgets.mdx Normal file
View File

@ -0,0 +1,98 @@
---
sidebar_position: 5
id: "widgets"
title: "Widgets"
---
# Widgets
Every individual Component is contained in its own widget. These can be added, removed, moved and resized. Each widget has its own header which can be right clicked to reveal more operations you can do with that widget.
### How to Add a Widget
Adding a widget can be done using the widget bar on the right hand side of the window. This will add a widget of the selected type to the current tab.
### How to Close a Widget
Widgets can be closed by clicking the **<code><i className="fa-solid fa-sharp fa-xmark"/></code>** button on the right side of the header. Alternatively, the currently focused widget can be closed by pressing **`Cmd + w`**.
### How to Navigate Widgets
At most, it is possible to have one widget be focused. Depending on the type of widget, this allows you to directly interact with the content in that widget. A focused widget is always outlined with a distinct border. A widget may be focused by clicking on it. Alternatively, you can change the focused widget by pressing **<code>Ctrl + Shift + <i className="fa-regular fa-sharp fa-arrow-up"/></code>**, **<code>Ctrl + Shift + <i className="fa-regular fa-sharp fa-arrow-down"/></code>**, **<code>Ctrl + Shift + <i className="fa-regular fa-sharp fa-arrow-left"/></code>**, or **<code>Ctrl + Shift + <i className="fa-regular fa-sharp fa-arrow-right"/></code>** to navigate relative to the currently selected widget.
### How to Magnify Widgets
Magnifying a widget will pop the widget out in front of everything else. You can magnify using the header icon, or with **`Cmd + m`**.
### How to Reorganize Widgets
By dragging and dropping their headers, widgets can be moved to different locations in the layout. This effectively allows you to reorganize your screen however you see fit. When dragging, you will see a preview of the widget that is being dragged. When the widget is over a valid drop point, the area where it would be moved to will turn green. Releasing the click will place the widget there and reflow the other widgets around it. If you see a green box cover half of two different widgets, the drop will place the widget between the two. If you see the green box cover half of one widget at the edge of the screen, the widget will be placed between that widget and the edge of the screen. If you see the green box cover one widget entirely, the two widgets will swap locations.
### How to Resize Widgets
Hovering the mouse between two widgets changes your cursor to <i className="fa-sharp fa-arrows-left-right"/> or <i className="fa-sharp fa-arrows-up-down"/>; and reveals a green line dividing the widgets. By dragging and dropping this green line, you are able to resize the widgets adjacent to it.
## Types of Widgets
### Term
The usual terminal you know and love. We add a few plugins via the `wsh` command that you can read more about further below.
### Preview
Preview is the generic type of widget used for viewing files. This can take many different forms based on the type of file being viewed.
You can use \`wsh view [path]\` from any Wave terminal window to open a preview widget with the contents of the specified path (e.g. `wsh view .` or `wsh view ~/myimage.jpg`).
#### Directory
When looking at a directory, preview will show a file viewer much like MacOS' *Finder* application or Windows' *File Explorer* application. This variant is slightly more geared toward software development with the focus on seeing what is shown by the `ls -alh` command.
##### View a New File
The simplest way to view a new file is to double click its row in the file viewer. Alternatively, while the widget is focused, you can use the **<code><i className="fa-regular fa-sharp fa-arrow-up"/></code>** and **<code><i className="fa-regular fa-sharp fa-arrow-down"/></code>** arrow keys to select a row and press enter to preview the associated file.
##### View the Parent Directory
In the directory view, this is as simple as opening the `..` file as if it were a regular file. This can be done with the method above. You can also use the keyboard shortcut **<code>Cmd + <i className="fa-regular fa-sharp fa-arrow-up"/></code>**.
##### Navigate Back and Forward
When looking at a file, you can navigate back by clicking the back button in the widget header or the keyboard shortcut **<code>Cmd + <i className="fa-regular fa-sharp fa-arrow-left"/></code>**. You can always navigate back and forward using **<code>Cmd + <i className="fa-regular fa-sharp fa-arrow-left"/></code>** and **<code>Cmd + <i className="fa-regular fa-sharp fa-arrow-right"/></code>**.
##### Filter the List of Files
While the widget is focused, you can filter by filename by typing a substring of the filename you're working for. To clear the filter, you can click the **<code><i className="fa-solid fa-sharp fa-xmark"/></code>** on the filter dropdown or press **`Esc`**.
##### Sort by a File Column
To sort a file by a specific column, click on the header for that column. If you click the header again, it will reverse the sort order.
##### Hide and Show Hidden Files
At the right of the widget header, there is an **<code><i className="fa fa-sharp fa-solid fa-eye"/></code>** button. Clicking this button hides and shows hidden files.
##### Refresh the Directory
At the right of the widget header, there is a refresh button **<code><i className="fa fa-sharp fa-solid fa-arrows-rotate" /></code>**. Clicking this button refreshes the directory contents.
##### Navigate to Common Directories
At the left of the widget header, there is a file icon **<code><i className="fa fa-sharp fa-solid fa-folder-open"/></code>**. Clicking and holding on this icon opens a menu where you can select a common folder to navigate to. The available options are *Home*, *Desktop*, *Downloads*, and *Root*.
##### Open a New Terminal in the Current Directory
If you right click the header of the widget (alternatively, click the gear icon **<code><i className="fa fa-sharp fa-solid fa-cog"/></code>**), one of the menu items listed is **Open Terminal in New Widget**. This will create a new terminal widget at your current directory.
##### Open a New Terminal in a Child Directory
If you want to open a terminal for a child directory instead, you can right click on that file's row to get the **Open Terminal in New Widget** option. Clicking this will open a terminal at that directory. Note that this option is only available for children that are directories.
##### Open a New Preview for a Child
To open a new Preview Widget for a Child, you can right click on that file's row and select the **Open Preview in New Widget** option.
##### Quick Look (MacOS only)
On a MacOS host, it is possible to use the Quick Look feature from the directory preview. To do this, select the file you wish to view and press **`Space`**. This will open a preview of your file in a separate window. This preview can then be closed by pressing **`Space`** again. This currently supports the filetypes that can be accessed by the `qlmanage` command.
#### Markdown
Opening a markdown file will bring up a view of the rendered markdown. These files cannot be edited in the preview at this time.
#### Images/Media
Opening a picture will bring up the image of that picture. Opening a video will bring up a player that lets you watch the video.
### Codeedit
Opening most text files will open Codeedit to either view or edit the file. It is technically part of the Preview widget, but it is important enough to be singled out.
After opening a codeedit widget, it is often useful to magnify it (**`Cmd + m`**) to get a larger view. You can then
use the hotkeys below to switch to edit mode, make your edits, save, and then use **`Cmd + w`** to close the widget (all without using the mouse!).
#### Switch to Edit Mode
To switch to edit mode, click the edit button to the right of the header. This lets you edit the file contents with a regular monaco editor.
You can also switch to edit mode by pressing **`Cmd + e`**.
#### Save an Edit
Once an edit has been made in **edit mode**, click the save button to the right of the header to save the contents.
You can also save by pressing **`Cmd + s`**.
#### Exit Edit Mode Without Saving
To exit **edit mode** without saving, click the cancel button to the right of the header.
You can also exit without saving by pressing **`Cmd + r`**.

194
docs/docs/wsh.mdx Normal file
View File

@ -0,0 +1,194 @@
---
sidebar_position: 4
id: "wsh"
title: "wsh command"
---
# wsh command
The `wsh` command is always available from Wave blocks. It is a powerful tool for interacting with Wave blocks and can bridge data between your CLI and the widget GUIs.
---
## view
You can open a preview block with the contents of any file or directory by running:
```
wsh view [path]
```
You can use this command to easily preview images, markdown files, and directories. For code/text files this will open
a codeedit block which you can use to quickly edit the file using Wave's embedded graphical editor.
---
## edit
```
wsh edit [path]
```
This will open up codeedit for the specified file. This is useful for quickly editing files on a local or remote machine in our graphical editor. This command will wait until the file is closed before exiting (unlike \`view\`) so you can set your \`$EDITOR\` to \`wsh editor\` for a seamless experience. You can combine this with a \`-m\` flag to open the editor in magnified mode.
---
## getmeta
You can view the metadata of any block by running:
```
wsh getmeta -b [blockid]
```
This is especially useful for preview and web blocks as you can see the file or url that they are pointing to and use that in your CLI scripts.
blockid format:
* this -- the current block (this is also the default)
* tab -- the id of the current tab
* d6ff4966-231a-4074-b78a-20acc7226b41 -- a full blockid is a UUID
* a67f55a3 -- blockids may be truncated to the first 8 characters
* 5 -- if a number less than 100 is given, it is a block number. blocks are numbered sequentially in the current tab from the top-left to bottom-right. holding Ctrl:Shift will show a block number overlay.
---
## setmeta
You can update any metadata key value pair for blocks (and tabs) by using the setmeta command:
```
wsh setmeta -b [blockid] [key]=[value]
wsh setmeta -b [blockid] file=~/myfile.txt
wsh setmeta -b [blockid] url=https://waveterm.dev/
```
You can get block and tab ids by right clicking on the appropriate block and selecting "Copy BlockId" (or use the block number via Ctrl:Shift). When you
update the metadata for a preview or web block you'll see the changes reflected instantly in the block.
Other useful metadata values to override block titles, icons, colors, themes, etc.
---
## deleteblock
```
wsh deleteblock -b [blockid]
```
This will delete the block with the specified id.
---
## ssh
```
wsh ssh [user@host]
```
This will use Wave's internal ssh implementation to connect to the specified remote machine.
---
## wsl
```
wsh wsl [-d <distribution name>]
```
This will connect to a WSL distribution on the local machine. It will use the default if no distribution is provided.
---
## web
You can search for a given url using:
```
wsh web <url>
```
Alternatively, you can search with the configured search engine using:
```
wsh web <search query>
```
Both of these commands will open a new web block with the desired page.
---
## conn
This has several subcommands which all perform various features related to connections.
### status
```
wsh conn status
```
This command gives the status of all connections made since waveterm started.
### reinstall
For ssh connections,
```
wsh conn reinstall [user@host]
```
For wsl connections,
```
wsh conn reinstall [wsl://<distribution name>]
```
This command reinstalls the Wave Shell Extensions on the specified connection.
### disconnect
For ssh connections,
```
wsh conn disconnect [user@host]
```
For wsl connections,
```
wsh conn disconnect [wsl://<distribution name>]
```
This command completely disconnects the specified connection. This will apply to all blocks where the connection is being used
### connect
For ssh connections,
```
wsh conn connect [user@host]
```
For wsl connections,
```
wsh conn connect [wsl://<distribution name>]
```
This command connects to the specified connection but does not create a block for it.
### ensure
For ssh connections,
```
wsh conn ensure [user@host]
```
For wsl connections,
```
wsh conn ensure [wsl://<distribution name>]
```
This command connects to the specified connection if it isn't already connected.
---
### setconfig
```
wsh setconfig [config name]=[config value]
```
This allows setting various options in the `config/settings.json` file. It will check to be sure a valid config option was provided.

180
docs/docusaurus.config.ts Normal file
View File

@ -0,0 +1,180 @@
import type { Config } from "@docusaurus/types";
import { docOgRenderer } from "./src/renderer/image-renderers";
const baseUrl = process.env.EMBEDDED ? "/docsite/" : "/";
const config: Config = {
title: "Wave Terminal Documentation",
tagline: "Level Up Your Terminal With Graphical Widgets",
favicon: "img/logo/wave-logo_appicon.svg",
// Set the production url of your site here
url: "https://docs.waveterm.dev/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "wavetermdev", // Usually your GitHub org/user name.
projectName: "waveterm-docs", // Usually your repo name.
deploymentBranch: "main",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},
plugins: [
[
"content-docs",
{
path: "docs",
routeBasePath: "/",
exclude: ["features/**"],
editUrl: !process.env.EMBEDDED ? "https://github.com/wavetermdev/waveterm-docs/edit/main/" : undefined,
} as import("@docusaurus/plugin-content-docs").Options,
],
"ideal-image",
[
"@docusaurus/plugin-sitemap",
{
changefreq: "daily",
filename: "sitemap.xml",
},
],
!process.env.EMBEDDED && [
"@waveterm/docusaurus-og",
{
path: "./preview-images", // relative to the build directory
imageRenderers: {
"docusaurus-plugin-content-docs": docOgRenderer,
},
},
],
].filter((v) => v),
themes: [
["classic", { customCss: "src/css/custom.css" }],
!process.env.EMBEDDED && "@docusaurus/theme-search-algolia",
].filter((v) => v),
themeConfig: {
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
},
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
logo: {
src: "img/logo/wave-light.png",
srcDark: "img/logo/wave-dark.png",
href: "https://www.waveterm.dev/",
},
hideOnScroll: true,
items: [
{
type: "doc",
position: "left",
docId: "index",
label: "Docs",
},
!process.env.EMBEDDED
? [
{
position: "left",
href: "https://docs.waveterm.dev/storybook/",
label: "Storybook",
},
{
href: "https://discord.gg/zUeP2aAjaP",
position: "right",
className: "header-link-custom custom-icon-discord",
"aria-label": "Discord invite",
},
{
href: "https://github.com/wavetermdev/waveterm",
position: "right",
className: "header-link-custom custom-icon-github",
"aria-label": "GitHub repository",
},
]
: [],
].flat(),
},
metadata: [
{
name: "keywords",
content:
"terminal, developer, development, command, line, wave, linux, macos, windows, connection, ssh, cli, waveterm, documentation, docs, ai, graphical, widgets, remote, open, source, open-source, go, golang, react, typescript, javascript",
},
{
name: "og:type",
content: "website",
},
{
name: "og:site_name",
content: "Wave Terminal Documentation",
},
{
name: "application-name",
content: "Wave Terminal Documentation",
},
{
name: "apple-mobile-web-app-title",
content: "Wave Terminal Documentation",
},
],
footer: {
copyright: `Copyright © ${new Date().getFullYear()} Command Line Inc. Built with Docusaurus.`,
},
algolia: {
appId: "B6A8512SN4",
apiKey: "e879cd8663f109b2822cd004d9cd468c",
indexName: "waveterm",
},
},
headTags: [
{
tagName: "link",
attributes: {
rel: "preload",
as: "font",
type: "font/woff2",
"data-next-font": "size-adjust",
href: `${baseUrl}fontawesome/webfonts/fa-sharp-regular-400.woff2`,
},
},
{
tagName: "link",
attributes: {
rel: "sitemap",
type: "application/xml",
title: "Sitemap",
href: `${baseUrl}sitemap.xml`,
},
},
!process.env.EMBEDDED && {
tagName: "script",
attributes: {
defer: "true",
"data-domain": "docs.waveterm.dev",
src: "https://plausible.io/js/script.file-downloads.outbound-links.tagged-events.js",
},
},
].filter((v) => v),
stylesheets: [`${baseUrl}fontawesome/css/fontawesome.min.css`, `${baseUrl}fontawesome/css/sharp-regular.min.css`],
staticDirectories: ["static"],
};
export default config;

27
docs/eslint.config.js Normal file
View File

@ -0,0 +1,27 @@
// @ts-check
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import * as mdx from "eslint-plugin-mdx";
import tseslint from "typescript-eslint";
const baseConfig = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
mdx.flat,
mdx.flatCodeBlocks
);
const customConfig = {
...baseConfig,
overrides: [
{
files: ["emain/emain.ts", "electron.vite.config.ts"],
env: {
node: true,
},
},
],
};
export default [customConfig, eslintConfigPrettier];

76
docs/package.json Normal file
View File

@ -0,0 +1,76 @@
{
"name": "waveterm-docs",
"version": "0.0.0",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "USE_SIMPLE_CSS_MINIFIER=true docusaurus build",
"build-embedded": "EMBEDDED=true run build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^3.6.0",
"@docusaurus/plugin-content-docs": "^3.6.0",
"@docusaurus/plugin-debug": "^3.6.0",
"@docusaurus/plugin-ideal-image": "^3.6.0",
"@docusaurus/plugin-sitemap": "^3.5.2",
"@docusaurus/theme-classic": "^3.5.2",
"@docusaurus/theme-search-algolia": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"@waveterm/docusaurus-og": "https://github.com/wavetermdev/docusaurus-og",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"remark-gfm": "^4.0.0",
"remark-typescript-code-import": "^1.0.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@docusaurus/types": "3.5.2",
"@eslint/js": "^9.13.0",
"@mdx-js/typescript-plugin": "^0.0.6",
"@types/eslint": "^9.6.1",
"@types/eslint-config-prettier": "^6.11.3",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mdx": "^3.1.5",
"prettier": "^3.3.3",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-organize-imports": "^4.1.0",
"remark-cli": "^12.0.1",
"remark-frontmatter": "^5.0.0",
"remark-mdx": "^3.1.0",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0"
},
"resolutions": {
"path-to-regexp@npm:2.2.1": "^3",
"cookie@0.6.0": "^0.7.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
},
"packageManager": "yarn@4.4.1"
}

12
docs/prettier.config.cjs Normal file
View File

@ -0,0 +1,12 @@
/** @type {import("prettier").Config} */
module.exports = {
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120,
trailingComma: "es5",
useTabs: false,
singleQuote: false,
jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true,
jsdocSeparateTagGroups: true,
jsdocPreferCodeFences: true,
};

48
docs/sidebars.ts Normal file
View File

@ -0,0 +1,48 @@
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
const sidebars: SidebarsConfig = {
mainSidebar: [
{
type: "doc",
id: "index",
label: "Home",
},
{
type: "doc",
id: "keybindings",
label: "Keybindings",
},
{
type: "doc",
id: "config",
label: "Configuration",
},
{
type: "doc",
id: "customwidgets",
label: "Custom Widgets",
},
{
type: "doc",
id: "telemetry",
label: "Telemetry",
},
{
type: "doc",
id: "wsh",
label: "Wsh",
},
{
type: "doc",
id: "widgets",
label: "Widgets",
},
{
type: "doc",
id: "faq",
label: "FAQ",
},
],
};
export default sidebars;

View File

@ -0,0 +1,58 @@
.card-group {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto;
gap: 1rem;
}
@media (max-width: 650px) {
.card-group {
grid-template-columns: 1fr;
}
}
@media (996px < width <= 1170px) {
.card-group {
grid-template-columns: repeat(2, 1fr);
}
}
.card {
display: grid;
grid-template-columns: 1.5rem 1rem 1fr;
grid-template-rows: subgrid;
grid-column: span 1;
grid-row: span 2;
padding: 1rem;
.icon {
grid-column: 1;
grid-row: 1;
font-size: 1.5rem;
line-height: 1.5rem;
}
.title {
grid-column: 3;
grid-row: 1;
font-weight: bold;
font-size: 1.2rem;
line-height: 1.5rem;
}
.description {
color: var(--ifm-font-color-base);
grid-column: span 3;
grid-row: 2;
}
border: 2px solid var(--ifm-color-primary-lightest);
transition: transform 0.1s ease;
transform-origin: 50% 50%;
}
.card:hover {
text-decoration: none;
transform: translateZ(0) scale(1.024);
-webkit-transform: translateZ(0) scale(1.024);
}

View File

@ -0,0 +1,23 @@
import clsx from "clsx";
import "./card.css";
interface CardProps {
icon: string;
title: string;
description: string;
href: string;
}
export function Card({ icon, title, description, href }: CardProps) {
return (
<a className="card" href={href}>
<div className={clsx("icon", "fa-sharp fa-regular", icon)} />
<div className="title">{title}</div>
<div className="description">{description}</div>
</a>
);
}
export function CardGroup({ children }) {
return <div className="card-group">{children}</div>;
}

62
docs/src/css/custom.css Normal file
View File

@ -0,0 +1,62 @@
:root {
--ifm-background-color: #ffffff;
--ifm-color-primary: #1a660b;
--ifm-color-primary-dark: #175c0a;
--ifm-color-primary-darker: #165709;
--ifm-color-primary-darkest: #124708;
--ifm-color-primary-light: #1d700c;
--ifm-color-primary-lighter: #1e750d;
--ifm-color-primary-lightest: #22850e;
}
[data-theme="dark"] {
--ifm-background-color: #1b1b1d;
--ifm-color-primary: #58c142;
--ifm-color-primary-dark: #4eb03a;
--ifm-color-primary-darker: #4aa636;
--ifm-color-primary-darkest: #429431;
--ifm-color-primary-light: #69c756;
--ifm-color-primary-lighter: #72cb5f;
--ifm-color-primary-lightest: #8cd47d;
}
.docs-doc-id-index article nav {
display: none;
}
body .markdown h1:first-child {
--ifm-h1-font-size: 2rem;
}
body .markdown h2 {
--ifm-h2-font-size: 1.75rem;
}
/* Adds extra margin between last navbar item and the dark mode toggle. */
.navbar__items--right .navbar__item:last-of-type {
margin-right: 4px;
}
.header-link-custom:before {
display: block;
height: 24px;
width: 24px;
background-color: var(--ifm-navbar-link-color);
transition: background-color 0.15s linear;
}
.header-link-custom:hover:before {
background-color: var(--ifm-navbar-link-hover-color);
}
.custom-icon-github:before {
content: "";
mask: url(/img/github.svg) no-repeat center / contain;
-webkit-mask: url(/img/github.svg) no-repeat center / contain;
}
.custom-icon-discord:before {
content: "";
mask: url(/img/discord.svg) no-repeat center / contain;
-webkit-mask: url(/img/discord.svg) no-repeat center / contain;
}

View File

@ -0,0 +1,130 @@
import type { DocsPageData, ImageGeneratorOptions, ImageRenderer } from "@waveterm/docusaurus-og";
import { readFileSync } from "fs";
import { join } from "path";
import React, { ReactNode } from "react";
const waveLogo = join(__dirname, "../../static/img/logo/wave-dark.png");
const waveLogoBase64 = `data:image/png;base64,${readFileSync(waveLogo).toString("base64")}`;
const titleElement = ({ children }) =>
React.createElement(
"label",
{
style: {
fontSize: 72,
fontWeight: 800,
letterSpacing: 1,
margin: "25px 225px 10px 0px",
color: "#e3e3e3",
wordBreak: "break-word",
},
},
children
);
const waveLogoElement = React.createElement("img", {
src: waveLogoBase64,
style: {
width: 300,
},
});
const headerElement = (header: string, svg: ReactNode) =>
React.createElement(
"div",
{
style: {
display: "flex",
alignItems: "center",
marginTop: "50px",
},
},
svg,
React.createElement(
"label",
{
style: {
fontSize: 30,
fontWeight: 600,
letterSpacing: 1,
color: "#58c142",
},
},
header
)
);
const rootDivStyle: React.CSSProperties = {
display: "flex",
flexDirection: "column",
height: "100%",
width: "100%",
padding: "50px 50px",
justifyContent: "center",
fontFamily: "Roboto",
fontSize: 32,
fontWeight: 400,
backgroundColor: "#1b1b1d",
color: "#e3e3e3",
borderBottom: "2rem solid #58c142",
zIndex: "2 !important",
};
export const docOgRenderer: ImageRenderer<DocsPageData> = async (data, context) => {
const element = React.createElement(
"div",
{ style: rootDivStyle },
waveLogoElement,
headerElement("Documentation", null),
React.createElement(titleElement, null, data.metadata.title),
React.createElement("div", null, data.metadata.description.replace("&mdash;", "-"))
);
return [element, await imageGeneratorOptions()];
};
const imageGeneratorOptions = async (): Promise<ImageGeneratorOptions> => {
return {
width: 1200,
height: 600,
fonts: [
{
name: "Roboto",
data: await getTtfFont("Roboto", ["ital", "wght"], [0, 400]),
weight: 400,
style: "normal",
},
],
};
};
function docSectionPath(slug: string, title: string) {
let section = slug.split("/")[1].toString();
// Override some sections by slug
switch (section) {
case "api":
section = "REST APIs";
break;
}
section = section.charAt(0).toUpperCase() + section.slice(1);
return `${title} / ${section}`;
}
async function getTtfFont(family: string, axes: string[], value: number[]): Promise<ArrayBuffer> {
const familyParam = axes.join(",") + "@" + value.join(",");
// Get css style sheet with user agent Mozilla/5.0 Firefox/1.0 to ensure TTF is returned
const cssCall = await fetch(`https://fonts.googleapis.com/css2?family=${family}:${familyParam}&display=swap`, {
headers: {
"User-Agent": "Mozilla/5.0 Firefox/1.0",
},
});
const css = await cssCall.text();
const ttfUrl = css.match(/url\(([^)]+)\)/)?.[1];
return await fetch(ttfUrl).then((res) => res.arrayBuffer());
}

0
docs/static/.nojekyll vendored Normal file
View File

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
/*!
* Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
* Copyright 2023 Fonticons, Inc.
*/
:host,:root{--fa-style-family-sharp:"Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp"}@font-face{font-family:"Font Awesome 6 Sharp";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-sharp-regular-400.woff2) format("woff2"),url(../webfonts/fa-sharp-regular-400.ttf) format("truetype")}.fa-regular,.fasr{font-weight:400}

Binary file not shown.

1
docs/static/img/discord.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M524.5 69.8a1.5 1.5 0 0 0 -.8-.7A485.1 485.1 0 0 0 404.1 32a1.8 1.8 0 0 0 -1.9 .9 337.5 337.5 0 0 0 -14.9 30.6 447.8 447.8 0 0 0 -134.4 0 309.5 309.5 0 0 0 -15.1-30.6 1.9 1.9 0 0 0 -1.9-.9A483.7 483.7 0 0 0 116.1 69.1a1.7 1.7 0 0 0 -.8 .7C39.1 183.7 18.2 294.7 28.4 404.4a2 2 0 0 0 .8 1.4A487.7 487.7 0 0 0 176 479.9a1.9 1.9 0 0 0 2.1-.7A348.2 348.2 0 0 0 208.1 430.4a1.9 1.9 0 0 0 -1-2.6 321.2 321.2 0 0 1 -45.9-21.9 1.9 1.9 0 0 1 -.2-3.1c3.1-2.3 6.2-4.7 9.1-7.1a1.8 1.8 0 0 1 1.9-.3c96.2 43.9 200.4 43.9 295.5 0a1.8 1.8 0 0 1 1.9 .2c2.9 2.4 6 4.9 9.1 7.2a1.9 1.9 0 0 1 -.2 3.1 301.4 301.4 0 0 1 -45.9 21.8 1.9 1.9 0 0 0 -1 2.6 391.1 391.1 0 0 0 30 48.8 1.9 1.9 0 0 0 2.1 .7A486 486 0 0 0 610.7 405.7a1.9 1.9 0 0 0 .8-1.4C623.7 277.6 590.9 167.5 524.5 69.8zM222.5 337.6c-29 0-52.8-26.6-52.8-59.2S193.1 219.1 222.5 219.1c29.7 0 53.3 26.8 52.8 59.2C275.3 311 251.9 337.6 222.5 337.6zm195.4 0c-29 0-52.8-26.6-52.8-59.2S388.4 219.1 417.9 219.1c29.7 0 53.3 26.8 52.8 59.2C470.7 311 447.5 337.6 417.9 337.6z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
docs/static/img/github.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
docs/static/img/logo/wave-dark.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/static/img/logo/wave-light.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_00000075150658188964823570000013118982920252363443_);}
.st2{fill:#FFFFFF;}
.st3{fill:#58C142;}
.st4{fill:url(#SVGID_00000112594339711612990680000002624432530892021946_);}
.st5{fill:url(#SVGID_00000140719531123372030610000008195484546976963487_);}
.st6{fill:url(#SVGID_00000178921119776480960350000009431495353979092624_);}
.st7{fill:url(#SVGID_00000016768039583747816600000018263155026811122865_);}
.st8{fill:url(#SVGID_00000044885518158126509950000016130982060394487440_);}
.st9{fill:url(#SVGID_00000106129665382546024650000004877767554412198583_);}
.st10{fill:url(#SVGID_00000083802268480699847100000012000850824661000362_);}
.st11{fill:url(#SVGID_00000008837751933091038900000017899611971679674516_);}
.st12{fill:url(#SVGID_00000108294032626366517620000010242680764503622051_);}
.st13{fill:url(#SVGID_00000141443312969477751860000005551731547830776740_);}
</style>
<rect x="-11.5" y="-11.5" width="1047.1" height="1047.1"/>
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="143.9875" y1="428.1396" x2="833.9507" y2="428.1396">
<stop offset="0.1418" style="stop-color:#1F4D22"/>
<stop offset="0.8656" style="stop-color:#418D31"/>
</linearGradient>
<path class="st0" d="M374,492.4c-36.2,0-56.1,23.5-67,76.1l-163-23.6c19.9-172,86.9-255.3,219.1-255.3
c97.8,0,193.8,74.3,240.9,74.3c36.2,0,56.1-25.4,67-76.1l163,23.5c-18.1,172-86.9,255.4-219.1,255.4
C515.2,566.7,422.9,492.4,374,492.4z"/>
</g>
<g>
<linearGradient id="SVGID_00000066484680017610105720000010460662955817103787_" gradientUnits="userSpaceOnUse" x1="190.0493" y1="595.8604" x2="880.0125" y2="595.8604">
<stop offset="0.2223" style="stop-color:#418D31"/>
<stop offset="0.7733" style="stop-color:#58C142"/>
</linearGradient>
<path style="fill:url(#SVGID_00000066484680017610105720000010460662955817103787_);" d="M420,660.1c-36.2,0-56.1,23.5-67,76.1
l-163-23.6c19.9-172,86.9-255.3,219.1-255.3c97.8,0,193.8,74.3,240.9,74.3c36.2,0,56.1-25.4,67-76.1L880,479
c-18.1,172-86.9,255.4-219.1,255.4C561.3,734.4,468.9,660.1,420,660.1z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1000 175" style="enable-background:new 0 0 1000 175;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_00000091720229019135579030000007505974356775393451_);}
.st2{fill:#FFFFFF;}
.st3{fill:#58C142;}
.st4{fill:url(#SVGID_00000057844994756141690520000013392915125647203757_);}
.st5{fill:url(#SVGID_00000122684313424325124480000003010239515924857535_);}
.st6{fill:url(#SVGID_00000075883355893983351890000012882526639983753630_);}
.st7{fill:url(#SVGID_00000000207897583077398290000006853703841187474602_);}
.st8{fill:url(#SVGID_00000008108614519912429220000010116473681835506344_);}
.st9{fill:url(#SVGID_00000132058454267173112380000008245439973034275726_);}
.st10{fill:url(#SVGID_00000034804588790703597750000013460998990473107363_);}
.st11{fill:url(#SVGID_00000131349218605867433520000014539481291819864990_);}
.st12{fill:url(#SVGID_00000003071904852992499350000013371332860686737080_);}
.st13{fill:url(#SVGID_00000072278415138862792700000002042113538205077667_);}
</style>
<g>
<path class="st3" d="M339.7,20.6h26.5l30.9,100.8l33.5-100.8h22l33.5,100.8l31.2-100.8h26.5L497.9,156h-23.8L441.9,55.4L409.1,156
h-23.8L339.7,20.6z"/>
<path class="st3" d="M693.8,20.6V156h-25.9V133c-10.5,16.2-27.2,26.2-47.9,26.2c-35.9,0-62.3-29.3-62.3-71
c0-41.4,26.5-70.7,62.3-70.7c20.7,0,37.5,10,47.9,26.2v-23H693.8z M667.9,88.2c0-28.3-17.3-48.2-41.9-48.2
c-24.6,0-42.2,19.9-42.2,48.2c0,28.3,17.6,48.5,42.2,48.5C650.6,136.6,667.9,116.5,667.9,88.2z"/>
<path class="st3" d="M713.8,20.6h27.8l42.2,105.3l41.4-105.3h28L796,156h-24.4L713.8,20.6z"/>
<path class="st3" d="M970.7,122.2l15.2,16c-11.8,12.8-35.6,21-54.7,21c-37.5,0-69.9-29.6-69.9-71.2c0-40.6,30.6-70.5,68.1-70.5
c41.4,0,65.5,30.9,65.5,79.1H886.6c3.1,23.8,19.9,41.1,44,41.1C945.3,137.7,962.3,131.1,970.7,122.2z M886.9,77.5h82.8
c-2.6-21.7-16.2-38.5-39.8-38.5C908.1,38.9,890.8,54.1,886.9,77.5z"/>
</g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5.2128" y1="58.9088" x2="240.4477" y2="58.9088">
<stop offset="0.1418" style="stop-color:#1F4D22"/>
<stop offset="0.8656" style="stop-color:#418D31"/>
</linearGradient>
<path class="st0" d="M83.6,80.8c-12.3,0-19.1,8-22.8,25.9l-55.6-8C12,40.1,34.8,11.7,79.9,11.7C113.3,11.7,146,37,162,37
c12.4,0,19.1-8.6,22.8-25.9l55.6,8c-6.2,58.7-29.6,87.1-74.7,87.1C131.8,106.1,100.3,80.8,83.6,80.8z"/>
</g>
<g>
<linearGradient id="SVGID_00000145018229965941010500000002424778669397199792_" gradientUnits="userSpaceOnUse" x1="20.9171" y1="116.0912" x2="256.1519" y2="116.0912">
<stop offset="0.2223" style="stop-color:#418D31"/>
<stop offset="0.7733" style="stop-color:#58C142"/>
</linearGradient>
<path style="fill:url(#SVGID_00000145018229965941010500000002424778669397199792_);" d="M99.3,138c-12.3,0-19.1,8-22.8,25.9
l-55.6-8c6.8-58.6,29.6-87.1,74.7-87.1c33.3,0,66.1,25.3,82.1,25.3c12.4,0,19.1-8.6,22.8-25.9l55.6,8
c-6.2,58.7-29.6,87.1-74.7,87.1C147.5,163.3,116,138,99.3,138z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1000 175" style="enable-background:new 0 0 1000 175;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_00000097467401116752621440000013265923851559160252_);}
.st2{fill:#FFFFFF;}
.st3{fill:#58C142;}
.st4{fill:url(#SVGID_00000026844058065691411450000001084298207851076753_);}
.st5{fill:url(#SVGID_00000140695609015829564530000017877493759276215708_);}
.st6{fill:url(#SVGID_00000172429467579424709090000016892278147863045285_);}
.st7{fill:url(#SVGID_00000111161844774090145740000012271107721736914070_);}
.st8{fill:url(#SVGID_00000159463458951391818050000007934417898368699555_);}
.st9{fill:url(#SVGID_00000114048161574266679140000001630328408055608234_);}
.st10{fill:url(#SVGID_00000181790832707237646570000012870231436607310721_);}
.st11{fill:url(#SVGID_00000182504551275047381220000018143622223532349093_);}
.st12{fill:url(#SVGID_00000182503296231706301150000015159284117431565225_);}
.st13{fill:url(#SVGID_00000157991892590648824540000004483708798912232327_);}
</style>
<g>
<path d="M339.7,20.6h26.5l30.9,100.8l33.5-100.8h22l33.5,100.8l31.2-100.8h26.5L497.9,156h-23.8L441.9,55.4L409.1,156h-23.8
L339.7,20.6z"/>
<path d="M693.8,20.6V156h-25.9V133c-10.5,16.2-27.2,26.2-47.9,26.2c-35.9,0-62.3-29.3-62.3-71c0-41.4,26.5-70.7,62.3-70.7
c20.7,0,37.5,10,47.9,26.2v-23H693.8z M667.9,88.2c0-28.3-17.3-48.2-41.9-48.2c-24.6,0-42.2,19.9-42.2,48.2
c0,28.3,17.6,48.5,42.2,48.5C650.6,136.6,667.9,116.5,667.9,88.2z"/>
<path d="M713.8,20.6h27.8l42.2,105.3l41.4-105.3h28L796,156h-24.4L713.8,20.6z"/>
<path d="M970.7,122.2l15.2,16c-11.8,12.8-35.6,21-54.7,21c-37.5,0-69.9-29.6-69.9-71.2c0-40.6,30.6-70.5,68.1-70.5
c41.4,0,65.5,30.9,65.5,79.1H886.6c3.1,23.8,19.9,41.1,44,41.1C945.3,137.7,962.3,131.1,970.7,122.2z M886.9,77.5h82.8
c-2.6-21.7-16.2-38.5-39.8-38.5C908.1,38.9,890.8,54.1,886.9,77.5z"/>
</g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5.2128" y1="58.9088" x2="240.4477" y2="58.9088">
<stop offset="0.1418" style="stop-color:#1F4D22"/>
<stop offset="0.8656" style="stop-color:#418D31"/>
</linearGradient>
<path class="st0" d="M83.6,80.8c-12.3,0-19.1,8-22.8,25.9l-55.6-8C12,40.1,34.8,11.7,79.9,11.7C113.3,11.7,146,37,162,37
c12.4,0,19.1-8.6,22.8-25.9l55.6,8c-6.2,58.7-29.6,87.1-74.7,87.1C131.8,106.1,100.3,80.8,83.6,80.8z"/>
</g>
<g>
<linearGradient id="SVGID_00000055697211621202625680000016003686276294146176_" gradientUnits="userSpaceOnUse" x1="20.9171" y1="116.0912" x2="256.1519" y2="116.0912">
<stop offset="0.2223" style="stop-color:#418D31"/>
<stop offset="0.7733" style="stop-color:#58C142"/>
</linearGradient>
<path style="fill:url(#SVGID_00000055697211621202625680000016003686276294146176_);" d="M99.3,138c-12.3,0-19.1,8-22.8,25.9
l-55.6-8c6.8-58.6,29.6-87.1,74.7-87.1c33.3,0,66.1,25.3,82.1,25.3c12.4,0,19.1-8.6,22.8-25.9l55.6,8
c-6.2,58.7-29.6,87.1-74.7,87.1C147.5,163.3,116,138,99.3,138z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

16
docs/tsconfig.json Normal file
View File

@ -0,0 +1,16 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"plugins": [
{
"name": "@mdx-js/typescript-plugin"
}
]
},
"mdx": {
// Enable strict type checking in MDX files.
"checkMdx": true
}
}

View File

@ -146,5 +146,8 @@
"send@npm:0.18.0": "0.19.0", "send@npm:0.18.0": "0.19.0",
"cookie@0.6.0": "^0.7.0" "cookie@0.6.0": "^0.7.0"
}, },
"packageManager": "yarn@4.4.1" "packageManager": "yarn@4.4.1",
"workspaces": [
"docs"
]
} }

11524
yarn.lock

File diff suppressed because it is too large Load Diff