Commit graph

162 commits

Author SHA1 Message Date
Copilot
7f5487d9ac
Remove mock-heavy OSC52 Vitest coverage (#2975)
The issue called out that the OSC52 unit tests were mostly validating
mock setup rather than meaningful behavior. This PR trims that
low-signal coverage by removing the Vitest suite for OSC52.

- **Scope**
  - Deleted `frontend/app/view/term/osc-handlers.test.ts`.
  - No production/runtime code changes.

- **Rationale reflected in changes**
- Removes brittle, mock-dominant tests for logic considered too simple
for this unit-test shape.
  - Keeps the codebase focused on higher-value test coverage.

```diff
- frontend/app/view/term/osc-handlers.test.ts
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-04 16:24:42 -08:00
Copilot
4ec09cb611
Centralize proxy HTTP client creation in aiutil and remove redundant backend tests (#2961)
`makeHTTPClient(proxyURL)` had been duplicated across AI backends with
equivalent behavior. This change consolidates the logic into a single
helper in `aiutil` and updates backends to consume it, then removes
backend-local tests that only re-verified that shared utility behavior.

- **Shared client construction**
- Added `aiutil.MakeHTTPClient(proxyURL string) (*http.Client, error)`
in `pkg/aiusechat/aiutil/aiutil.go`.
- Standardizes proxy parsing and `http.Transport.Proxy` setup in one
place.
- Keeps streaming-safe client semantics (`Timeout: 0`) and existing
invalid proxy URL error behavior.

- **Backend refactor**
  - Removed duplicated client/proxy setup blocks from:
    - `pkg/aiusechat/openaichat/openaichat-backend.go`
    - `pkg/aiusechat/gemini/gemini-backend.go`
    - `pkg/aiusechat/openai/openai-backend.go`
    - `pkg/aiusechat/anthropic/anthropic-backend.go`
  - Replaced with direct calls to the shared helper.

- **Test cleanup**
- Deleted backend tests that only covered basic proxy client creation
and no backend-specific behavior:
    - `pkg/aiusechat/openaichat/openaichat-backend_test.go`
    - `pkg/aiusechat/gemini/gemini-backend_test.go`

```go
httpClient, err := aiutil.MakeHTTPClient(chatOpts.Config.ProxyURL)
if err != nil {
    return nil, nil, nil, err
}
resp, err := httpClient.Do(req)
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-02 11:16:50 -08:00
Mike Sawka
cff84773a6
minor changes (#2962) 2026-02-28 15:48:52 -08:00
Copilot
4956c92c55
Make Wave home config writes atomic and serialized to avoid watcher partial reads (#2945)
`WriteWaveHomeConfigFile()` previously used direct `os.WriteFile`, which
can expose truncation/partial-write states to the JSON file watcher.
This change switches config persistence to temp-file + rename semantics
and serializes writes through a single process-wide lock for config file
writes.

- **Atomic file write helper**
  - Added `AtomicWriteFile()` in `pkg/util/fileutil/fileutil.go`.
- Writes to `<filename>.tmp` in the same directory, then renames to the
target path.
  - Performs temp-file cleanup on error paths.
- Introduced a shared suffix constant (`TempFileSuffix`) used by
implementation/tests.

- **Config write path update**
- Updated `WriteWaveHomeConfigFile()` in `pkg/wconfig/settingsconfig.go`
to:
- Use a package-level mutex (`configWriteLock`) so only one config write
runs at a time (across all config files).
- Call `fileutil.AtomicWriteFile(...)` instead of direct
`os.WriteFile(...)`.

- **Focused coverage for atomic behavior**
  - Added `pkg/util/fileutil/fileutil_test.go` with tests for:
- Successful atomic write (target file contains expected payload and no
leftover `.tmp` file).
    - Rename-failure path cleanup (temp file is removed).

```go
func WriteWaveHomeConfigFile(fileName string, m waveobj.MetaMapType) error {
    configWriteLock.Lock()
    defer configWriteLock.Unlock()

    fullFileName := filepath.Join(wavebase.GetWaveConfigDir(), fileName)
    barr, err := jsonMarshalConfigInOrder(m)
    if err != nil {
        return err
    }
    return fileutil.AtomicWriteFile(fullFileName, barr, 0644)
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-02-27 15:43:37 -08:00
Copilot
f1e06c7ef9
Add groq AI mode provider defaults and docs (#2942)
This change adds first-class `groq` provider support to Wave AI mode
resolution and documents it in the Wave AI modes guide. Users can now
configure Groq modes via `ai:provider` with provider defaults applied
automatically.

- **Provider support in backend config resolution**
  - Added `groq` as a recognized AI provider constant.
  - Added Groq provider defaults in mode resolution:
    - `ai:apitype`: `openai-chat`
    - `ai:endpoint`: `https://api.groq.com/openai/v1/chat/completions`
    - `ai:apitokensecretname`: `GROQ_KEY`

- **Schema/config surface update**
- Extended `AIModeConfigType` provider enum to include `groq`, so
`ai:provider: "groq"` is valid in Wave AI config.

- **Documentation updates (`waveai-modes.mdx`)**
  - Added `groq` to supported providers.
- Added a Groq-specific configuration example and default behavior
notes.
  - Updated provider reference and capability guidance to include Groq.

- **Focused coverage**
- Added a targeted unit test for Groq provider default application in
`applyProviderDefaults`.

```json
{
  "groq-kimi-k2": {
    "display:name": "Groq - Kimi K2",
    "ai:provider": "groq",
    "ai:model": "moonshotai/kimi-k2-instruct"
  }
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-02-26 09:50:05 -08:00
Copilot
624476fa33
Add terminal cursor style/blink config with block-level overrides (#2933)
Adds support for configuring terminal cursor style and blink behavior in
terminal blocks, with hierarchical resolution (block metadata →
connection overrides → global settings). New keys are `term:cursor`
(`block`/`underline`/`bar`, default `block`) and `term:cursorblink`
(`bool`, default `false`).

- **Config surface: new terminal keys**
  - Added to global settings schema/types:
    - `pkg/wconfig/settingsconfig.go`
  - Added to block metadata typing:
    - `pkg/waveobj/wtypemeta.go`
  - Added default values:
    - `pkg/wconfig/defaultconfig/settings.json`
      - `"term:cursor": "block"`
      - `"term:cursorblink": false`

- **Frontend terminal behavior (xterm options)**
  - `frontend/app/view/term/termwrap.ts`
- Added `setCursorStyle()` with value normalization (`underline`/`bar`
else fallback `block`)
    - Added `setCursorBlink()`
- Applies both options on terminal construction via
`getOverrideConfigAtom(...)`
  - `frontend/app/view/term/term-model.ts`
    - Subscribes to `term:cursor` and `term:cursorblink` override atoms
- Propagates live updates to `term.options.cursorStyle` /
`term.options.cursorBlink`
    - Cleans up subscriptions in `dispose()`

- **Generated artifacts**
  - Regenerated config/type outputs after Go type additions:
    - `schema/settings.json`
    - `pkg/wconfig/metaconsts.go`
    - `pkg/waveobj/metaconsts.go`
    - `frontend/types/gotypes.d.ts`

- **Docs**
  - Updated config reference and default config example:
    - `docs/docs/config.mdx`

```ts
// termwrap.ts
this.setCursorStyle(globalStore.get(getOverrideConfigAtom(this.blockId, "term:cursor")));
this.setCursorBlink(globalStore.get(getOverrideConfigAtom(this.blockId, "term:cursorblink")) ?? false);

// term-model.ts (live updates)
const termCursorAtom = getOverrideConfigAtom(blockId, "term:cursor");
this.termCursorUnsubFn = globalStore.sub(termCursorAtom, () => {
    this.termRef.current?.setCursorStyle(globalStore.get(termCursorAtom));
});
```

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-02-25 12:40:20 -08:00
Copilot
195277de45
Generate WaveEvent as a typed discriminated union with explicit null payloads for no-data events (#2899)
This updates WaveEvent typing to be event-aware instead of `data?: any`,
while keeping safe fallback behavior for unmapped events. It also
codifies known no-payload events as `null` payloads and documents event
payload expectations alongside the Go event constants.

- **Event registry + payload documentation (Go)**
- Added `AllEvents` in `pkg/wps/wpstypes.go` as the canonical list of
Wave event names.
  - Added/updated inline payload annotations on `Event_*` constants.
- Marked confirmed no-payload events with `// type: none` (e.g.
`route:up`, `route:down`, `workspace:update`, `waveapp:appgoupdated`).

- **Dedicated WaveEvent TS generation path**
- Added `pkg/tsgen/tsgenevent.go` with `event -> reflect.Type` metadata
(`WaveEventDataTypes`).
  - Supports three cases:
    - mapped concrete type → strong TS payload type
    - mapped `nil` → `data?: null` (explicit no-data contract)
    - unmapped event → `data?: any` (non-breaking fallback)

- **Custom WaveEvent output and default suppression**
- Suppressed default struct-based `WaveEvent` emission in
`gotypes.d.ts`.
  - Added generated `frontend/types/waveevent.d.ts` containing:
    - `WaveEventName` string-literal union from `AllEvents`
    - discriminated `WaveEvent` union keyed by `event`.

- **Generator wiring + focused coverage**
- Hooked custom event generation into
`cmd/generatets/main-generatets.go`.
  - Added `pkg/tsgen/tsgenevent_test.go` assertions for:
    - typed mapped events
    - explicit `null` for known no-data events
    - `any` fallback for unmapped events.

```ts
type WaveEvent = {
  event: WaveEventName;
  scopes?: string[];
  sender?: string;
  persist?: number;
  data?: any;
} & (
  { event: "block:jobstatus"; data?: BlockJobStatusData } |
  { event: "route:up"; data?: null } |
  { event: "workspace:update"; data?: null } |
  { event: "some:future:event"; data?: any } // fallback if unmapped
);
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-02-20 17:04:03 -08:00
John Feustel
b9067fb60b
Add app:focusfollowscursor setting (off/on/term) for hover-based block focus (#2908)
This PR adds a new app setting to control whether block focus follows
cursor movement:

  - `app:focusfollowscursor: "off" | "on" | "term"`
  - Default is `"off"` (no behavior change unless enabled)

  ## What changed

  - Added hover-focus behavior on block pointer enter.
  - Added guardrails so hover focus does not trigger when:
  - touch input is used
  - pointer buttons are pressed (drag/select scenarios)
  - modal is open
  - pointer events are disabled
  - block is resizing
  - Added config key plumbing across settings types and schema:
  - `pkg/wconfig/settingsconfig.go`
  - `pkg/wconfig/metaconsts.go`
  - `schema/settings.json`
- `pkg/wconfig/defaultconfig/settings.json` ->
`"app:focusfollowscursor": "off"`
  - Added docs for the new key and default example:
  - `docs/docs/config.mdx`

  ## Behavior

  - `"off"`: do not focus on cursor movement
  - `"on"`: focus follows cursor for all block types
  - `"term"`: focus follows cursor only for terminal blocks
2026-02-20 14:47:26 -08:00
Copilot
e8d4cddb5a
Add optional per-workspace widget visibility via workspaces in widgets.json (#2898)
This change adds an optional `workspaces` field to widget config entries
so widgets can be scoped to specific workspace UUIDs. Widgets with no
`workspaces` field (or an empty array) continue to render globally,
preserving current `widgets.json` behavior.

- **Config model updates**
- Added `workspaces []string` to `wconfig.WidgetConfigType` with
`json:"workspaces,omitempty"`.
- Updated frontend generated type `WidgetConfigType` with `workspaces?:
string[]`.

- **Sidebar widget filtering**
- `frontend/app/workspace/widgets.tsx` now applies workspace-aware
filtering when building the sidebar widget list:
    - include if `workspaces` is missing or empty
    - include if current `workspace.oid` is present in `workspaces`
    - otherwise exclude
  - Existing `defwidget@ai` filtering logic remains intact.

- **Isolated filtering logic + coverage**
  - Added `frontend/app/workspace/widgetfilter.ts` with:
    - `shouldIncludeWidgetForWorkspace(widget, workspaceId)`
- Added focused tests in `frontend/app/workspace/widgetfilter.test.ts`
for:
    - missing/empty `workspaces`
    - matching/non-matching workspace IDs
    - missing active workspace ID

```ts
function shouldIncludeWidgetForWorkspace(widget: WidgetConfigType, workspaceId?: string): boolean {
  const workspaces = widget.workspaces;
  return !Array.isArray(workspaces) || workspaces.length === 0 || (workspaceId != null && workspaces.includes(workspaceId));
}
```

- **Screenshot**
-
<screenshot>https://github.com/user-attachments/assets/b1727003-793b-4eff-8fc1-00eac9c50b83</screenshot>

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-02-19 16:14:22 -08:00
Mike Sawka
65fce27f00
feat: add tab:confirmclose setting to prompt before closing tabs (#2893)
- Add tab:confirmclose boolean config option to SettingsType (Go),
schema/settings.json, and gotypes.d.ts
- Update close-tab IPC handler to use ipcMain.handle (async) and accept
confirmClose param
- Show a native confirmation dialog via dialog.showMessageBoxSync when
confirmClose is true
- Update preload.ts to use ipcRenderer.invoke for close-tab, returning
Promise<boolean>
- Update closeTab type signature in custom.d.ts to return
Promise<boolean>
- Update tabbar.tsx and keymodel.ts to await closeTab result and only
delete layout model on confirmed close
- Document tab:confirmclose in docs/docs/config.mdx

---------

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-02-19 12:49:16 -08:00
0xGingi
69435aedbb
feat: add NanoGPT as AI provider (#2746)
adds https://nano-gpt.com as a provider
2026-02-19 12:13:35 -08:00
Mike Sawka
0c5a820797
new config: app:hideaibutton, app:disablectrlshiftarrows, app:disablectrlshiftdisplay (#2850)
| app:hideaibutton <VersionBadge version="v0.14" /> | bool | Set to true
to hide the AI button in the tab bar (defaults to false) |
| app:disablectrlshiftarrows <VersionBadge version="v0.14" /> | bool |
Set to true to disable Ctrl+Shift+Arrow keybindings for block navigation
(defaults to false) |
| app:disablectrlshiftdisplay <VersionBadge version="v0.14" /> | bool |
Set to true to disable the Ctrl+Shift visual indicator display (defaults
to false) |
2026-02-10 09:41:49 -08:00
Mike Sawka
16877fe433
Working on Test Harness for Remote Connections (#2829)
This pull request introduces a new `test-conn` command-line tool for
testing SSH connection flows and user input handling, along with
improvements to user input provider extensibility and several
configuration and validation enhancements.

* New `test-conn` CLI Tool
* User Input Provider Abstraction
* Refactored user input handling to use a pluggable `UserInputProvider`
interface, with a default `FrontendProvider` and the ability to set a
custom provider
* AI Configuration and Verbosity updates
* Enforced that a `SwapToken` must be present in `CommandOptsType` when
starting a remote shell with wsh, improving validation and error
handling. (`pkg/shellexec/shellexec.go`)
* Improved config directory watcher logic to log the config directory
path and avoid logging errors for non-existent subdirectories
2026-02-09 21:50:34 -08:00
Mike Sawka
0fb25daf24
Durable Session PR #5 (Icon Flyover, More Bug Fixes, Corner Cases) (#2825)
* Track wave version when job was created (for future backward compat)
* New Flyover Menu off of "shell durability" icon.  Help + Actions + UX
* Bug with conn typeahead not closing when clicking disconnect
* Auto-reconnect jobs that have been disconnected (check for "gone"
state)
* Disable tab indicator stuff (only indicates tab not block)
* Fix bug with dev logging path on connserver
* Fix bugs with restarting blockcontrollers on startup
* Fix bugs with getting HasExited status from job manager
* Fix startup files, quoting, tilde, etc in start job flow
* ...
2026-02-05 10:15:22 -08:00
Geoff Hudik
78ab9e0b94
Add configurable verbosity for OpenAI Responses API (#2776)
# Add configurable verbosity for OpenAI Responses API

Fixes #2775

## Problem

Models like `gpt-5.2-codex` and other newer OpenAI models only support
`medium` reasoning and verbosity levels, but the codebase was using
`low` by default. This caused 400 Bad Request errors:

```
Failed to stream openai-responses chat: openai 400 Bad Request:
Unsupported value: 'low' is not supported with the 'gpt-5.2-codex' model.
Supported values are: 'medium'.
```


## Solution

This PR implements a scalable, user-configurable approach instead of
hardcoding model-specific constraints:

1. **Changed default verbosity** from `"low"` to `"medium"` - more
widely supported across OpenAI models
2. **Added `ai:verbosity` config option** - allows users to configure
verbosity per model in `waveai.json`
3. **Changed rate limit fallback** from `low` to `medium` thinking level
for better compatibility
4. **Removed hardcoded model checks** - solution is scalable for future
models

## Changes

### Backend Changes
- `pkg/aiusechat/openai/openai-convertmessage.go` - Use configurable
verbosity with safe defaults
- `pkg/aiusechat/uctypes/uctypes.go` - Add `Verbosity` field to
`AIOptsType`
- `pkg/aiusechat/usechat.go` - Pass verbosity from config to options
- `pkg/wconfig/settingsconfig.go` - Add `Verbosity` to
`AIModeConfigType`

### Schema Changes
- `schema/waveai.json` - Add `ai:verbosity` with enum values
(low/medium/high)
- `frontend/types/gotypes.d.ts` - Auto-generated TypeScript types

### Configuration Example

Users can now configure both thinking level and verbosity per model:

```json
{
  "openai-gpt52-codex": {
    "display:name": "GPT-5.2 Codex",
    "ai:provider": "openai",
    "ai:model": "gpt-5.2-codex",
    "ai:thinkinglevel": "medium",
    "ai:verbosity": "medium"
  }
}
```
2026-02-04 18:31:57 -08:00
Mike Sawka
ff9923f486
Session Durability Checkpoint (#2821)
Working on bug fixes and UX. Streams restarting, fixed lots of bugs,
timing issues, concurrency bugs. Get status shipped to the FE to drive
"shield" state display. Deal with stale streams.

Also big UX changes to the block headers. Specialize the terminal
headers to prioritize the connection (sense of place), remove old
terminal icon and word "Terminal" from the header. Also drop "Web" and
"Preview" labels on web/preview blocks.

Added `wsh focusblock` command.
2026-02-03 11:49:52 -08:00
Mike Sawka
73bb5beb3b
Tab Indicators, Confirm on Quit, etc (#2811)
* Adds a Confirm on Quit dialog (and new config to disable it)
* New MacOS keybinding for Cmd:ArrowLeft/Cmd:ArrowRight to send Ctrl-A
and Ctrl-E respectively
* Fix Ctrl-V regression on windows to allow config setting to override
* Remove questionnaire in bug template
* Full featured tab indicators -- icon, color, priority, clear features.
Can be manipulated by new `wsh tabindicator` command
* Hook up BEL to new tab indicator system. BEL can now play a sound
and/or set an indicator (controlled by two new config options)
2026-01-29 17:04:29 -08:00
Mike Sawka
fbb0c4d052
windows, have a new "local" conn option for Git Bash if installed (#2666) 2025-12-12 14:05:48 -08:00
Mike Sawka
c9c6192fc9
minor v0.13 fixes (#2649) 2025-12-08 21:58:54 -08:00
Mike Sawka
ea68aec9f4
v0.13 Release Notes, Docs Updates, Onboarding Updates (#2642) 2025-12-08 16:29:19 -08:00
Mike Sawka
f6bd5930ad
AI model compatibility, other misc fixes for release (#2641) 2025-12-05 16:23:54 -08:00
Mike Sawka
0c60f2c8a7
set Ctrl+V as a paste accelerator by default on windows (#2640) 2025-12-05 16:00:14 -08:00
Copilot
4449895424
Add Google Gemini backend for AI chat (#2602)
- [x] Add new API type constant for Google Gemini in uctypes.go
- [x] Create gemini directory under pkg/aiusechat/
- [x] Implement gemini-backend.go with streaming chat support
- [x] Implement gemini-convertmessage.go for message conversion
- [x] Implement gemini-types.go for Google-specific types
- [x] Add gemini backend to usechat-backend.go
- [x] Support tool calling with structured arguments
- [x] Support image upload (base64 inline data)
- [x] Support PDF upload (base64 inline data)
- [x] Support file upload (text files, directory listings)
- [x] Build verification passed
- [x] Add documentation for Gemini backend usage
- [x] Security scan passed (CodeQL found 0 issues)
- [x] Code review passed with no comments
- [x] Revert tsunami demo go.mod/go.sum files (per feedback - twice)
- [x] Add `--gemini` flag to main-testai.go for testing
- [x] Fix schema validation for tool calling (clean unsupported fields)
- [x] Preserve non-map property values in schema cleaning

## Summary

Successfully implemented a complete Google Gemini backend for WaveTerm's
AI chat system. The implementation:

- **Follows existing patterns**: Matches the structure of OpenAI and
Anthropic backends
- **Fully featured**: Supports all required capabilities including tool
calling, images, PDFs, and files
- **Properly tested**: Builds successfully with no errors or warnings
- **Secure**: Passed CodeQL security scanning with 0 issues
- **Well documented**: Includes comprehensive package documentation with
usage examples
- **Minimal changes**: Only affects backend code under pkg/aiusechat
(tsunami demo files reverted twice)
- **Testable**: Added `--gemini` flag to main-testai.go for easy testing
with SSE output
- **Schema compatible**: Cleans JSON schemas to remove fields
unsupported by Gemini API while preserving valid structure

## Testing

To test the Gemini backend using main-testai.go:
```bash
export GOOGLE_APIKEY="your-api-key"
cd cmd/testai
go run main-testai.go --gemini 'What is 2+2?'
go run main-testai.go --gemini --model gemini-1.5-pro 'Explain quantum computing'
go run main-testai.go --gemini --tools 'Help me configure GitHub Actions monitoring'
```


Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2025-12-05 12:43:42 -08:00
Mike Sawka
2f92e23ece
more config updates (secrets, waveai, ai:provider) (#2631) 2025-12-05 10:10:43 -08:00
Mike Sawka
d1ebcc9d07
new waveconfig widget, consolidate config/help in widget sidebar (#2604) 2025-11-28 11:56:59 -08:00
Mike Sawka
73e56193e7
implement openai chat completions api -- enables local model support (#2600) 2025-11-26 11:43:19 -08:00
Mike Sawka
cc51509fe7
add new setting term:macoptionismeta (#2589) 2025-11-21 10:54:58 -08:00
Mike Sawka
3b97084471
fix tsunami scaffold in build (#2564) 2025-11-14 16:35:37 -08:00
Mike Sawka
e9bc34a03a
more work on tsunami builder (#2534) 2025-11-07 18:19:52 -08:00
Mike Sawka
49c9d70601
various fixes and enhancements for v0.12.2 (#2508) 2025-11-03 12:31:18 -08:00
Mostafa Khairy
bb12ed6ac0
feat: Add fullscreen launch setting (#1933) (#2490)
New UI Setting: Launch On Fullscreen

A new option has been added to the view menu allowing users to
enable fullscreen mode automatically when Wave launches. This setting is
persistent and can be toggled on a per-user basis.
2025-10-31 16:34:32 -07:00
Mike Sawka
a19cb6f300
Add Write File Tools to WaveAI (#2492)
also updates ROADMAP.md, and fixes a node pruning bug on the FE, and
adds a new diff viewer that we can view the write_text_file and
edit_text_file diffs in. adds a backup file system that can be used to restore AI edited files back to their original states.
2025-10-31 14:40:03 -07:00
Mike Sawka
38163e7633
exclude autoupdate channel in custom settings (#2438) 2025-10-15 21:20:58 -07:00
Mike Sawka
5c28874f34
switch to using gpt-5-mini for free proxy (#2297) 2025-08-28 14:28:49 -07:00
Mike Sawka
07bd6c5766
implement $ENV:[env-var]:[fallback] config replacements (#2293) 2025-08-26 16:56:05 -07:00
Mike Sawka
b81b824b7d
fix some telemetry events (#2289) 2025-08-26 16:08:39 -07:00
Mike Sawka
d47b9f2ba8
add config setting to disable overlay blocknums from showing when holding ctrl:shift (#2288) 2025-08-25 21:47:35 -07:00
Mike Sawka
66164ac15e
term shiftenternewline config for claude code Shift+Enter support (#2285) 2025-08-22 14:08:48 -07:00
Mike Sawka
6845cd5a72
standalone fixes, linting errors, speedups, QOL changes ported from wave-12 branch (#2271) 2025-08-20 18:07:11 -07:00
Mike Sawka
c66e79bc26
implement ai:proxyurl for proxy url access to different models (#2263) 2025-08-19 10:19:27 -07:00
Sylvie Crowe
3062286cd0
fix: decouple AiSettingsType from SettingsType (#1961)
While there is significant overlap between SettingsType and
AiSettingsType, they are distinct entities and should be treated as such
until more changes have been made.
2025-02-14 00:30:46 -08:00
Mike Sawka
539559c603
launcher block (#1948) 2025-02-11 21:58:03 -08:00
Mike Sawka
a73381296d
web bookmarks (#1930) 2025-02-07 16:11:40 -08:00
Sylvie Crowe
134a1f1ab8
Embedded Structs in Code Generation (#1909)
This allows code generation to properly embed structs when embedded in
the original types. It affects the generation of `gotypes.d.ts` and
`metaconsts.go`.

Additionally, the `AiSettingsType` has been split off and embedded into
the original `SettingsType` to make schema generation easier.
2025-02-07 13:13:47 -08:00
Myles J.
cca18eefa4
Proposal: Add ability to hide widgets via config (#1864)
👋 Hello, I'm not sure if this warranted an Issue first but it seemed
small enough to just raise a PR. I'm happy to add something to the
documentation as well if you agree with the proposal.

There are some widgets that I'd rather not be displayed in the sidebar -
at the moment these are default widgets for which I cannot see any
existing means of omitting them via configuration. I'm proposing a
`display:hidden` field on the widget settings such that I can configure
the following:

```json
{
    "defwidget@ai": {
        "display:hidden": true
    }
}
```

I'm considering this option to be distinct from any means of outright
"disabling" the widget - that is to say that I've not chosen to filter
the widgets from the configuration because I'm not fully aware of the
project goals. Where for example I imagine that it might be useful to be
able to interact with a widget or it's config via the CLI or shortcut
regardless of visibility?

<img width="1421" alt="example"
src="https://github.com/user-attachments/assets/7cafa942-727d-4140-8940-38b4022f2ef0"
/>
2025-02-03 14:50:18 -08:00
Sylvie Crowe
b9f703f2b5
refactor: remove ConnOverrideConfig (#1842)
The behavior that ConnOverrideConfig controlled became default behavior,
so it can be removed.
2025-01-24 14:35:11 -08:00
Mike Sawka
1913cc5c99
initscript -- support for local files, and overrides in connections.json (#1818) 2025-01-23 15:41:13 -08:00
Evan Simkowitz
11fec5695c
wsh file overhaul without cross-remote copy and S3 (#1790) 2025-01-22 14:50:09 -08:00
Mike Sawka
ba5f929b3f
conn updates 3 (#1711)
lots of misc connection refactoring / fixes:

* adds blocklogger as a way to writing logging information from the backend directly to the a terminal block
* use blocklogger in conncontroller
* use blocklogger in sshclient
* fix remote name in password prompt
* use sh -c to get around shell weirdness
* remove cmd.exe special cases
* use GetWatcher().GetFullConfig() rather than re-reading the config file
* change order of things we do when establishing a connection.  ask for wsh up front.  then do domain socket, then connserver
* reduce number of sessions required in the common case when wsh is already installed.  running the connserver is now a "multi-command" which checks if it is installed, then asks for the version
* send jwt token over stdin instead of in initial command string
* fix focus bug for frontend conn modal
* track more information in connstatus
* simplify wshinstall function
* add nowshreason
* other misc cleanup
2025-01-10 14:09:32 -08:00
Sylvie Crowe
a3cbcc5a77
Widget Config Magnify (#1689)
Introduces a configuration option to widgets to allow them to magnify on
startup.
2025-01-08 15:02:55 -08:00