waveterm/schema/settings.json
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

327 lines
No EOL
7.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/wavetermdev/waveterm/pkg/wconfig/settings-type",
"$ref": "#/$defs/SettingsType",
"$defs": {
"SettingsType": {
"properties": {
"app:*": {
"type": "boolean"
},
"app:globalhotkey": {
"type": "string"
},
"app:dismissarchitecturewarning": {
"type": "boolean"
},
"app:defaultnewblock": {
"type": "string"
},
"app:showoverlayblocknums": {
"type": "boolean"
},
"app:ctrlvpaste": {
"type": "boolean"
},
"app:confirmquit": {
"type": "boolean"
},
"app:hideaibutton": {
"type": "boolean"
},
"app:disablectrlshiftarrows": {
"type": "boolean"
},
"app:disablectrlshiftdisplay": {
"type": "boolean"
},
"app:focusfollowscursor": {
"type": "string",
"enum": [
"off",
"on",
"term"
]
},
"feature:waveappbuilder": {
"type": "boolean"
},
"ai:*": {
"type": "boolean"
},
"ai:preset": {
"type": "string"
},
"ai:apitype": {
"type": "string"
},
"ai:baseurl": {
"type": "string"
},
"ai:apitoken": {
"type": "string"
},
"ai:name": {
"type": "string"
},
"ai:model": {
"type": "string"
},
"ai:orgid": {
"type": "string"
},
"ai:apiversion": {
"type": "string"
},
"ai:maxtokens": {
"type": "number"
},
"ai:timeoutms": {
"type": "number"
},
"ai:proxyurl": {
"type": "string"
},
"ai:fontsize": {
"type": "number"
},
"ai:fixedfontsize": {
"type": "number"
},
"waveai:showcloudmodes": {
"type": "boolean"
},
"waveai:defaultmode": {
"type": "string"
},
"term:*": {
"type": "boolean"
},
"term:fontsize": {
"type": "number"
},
"term:fontfamily": {
"type": "string"
},
"term:theme": {
"type": "string"
},
"term:disablewebgl": {
"type": "boolean"
},
"term:localshellpath": {
"type": "string"
},
"term:localshellopts": {
"items": {
"type": "string"
},
"type": "array"
},
"term:gitbashpath": {
"type": "string"
},
"term:scrollback": {
"type": "integer"
},
"term:copyonselect": {
"type": "boolean"
},
"term:transparency": {
"type": "number"
},
"term:allowbracketedpaste": {
"type": "boolean"
},
"term:shiftenternewline": {
"type": "boolean"
},
"term:macoptionismeta": {
"type": "boolean"
},
"term:cursor": {
"type": "string"
},
"term:cursorblink": {
"type": "boolean"
},
"term:bellsound": {
"type": "boolean"
},
"term:bellindicator": {
"type": "boolean"
},
"term:durable": {
"type": "boolean"
},
"editor:minimapenabled": {
"type": "boolean"
},
"editor:stickyscrollenabled": {
"type": "boolean"
},
"editor:wordwrap": {
"type": "boolean"
},
"editor:fontsize": {
"type": "number"
},
"editor:inlinediff": {
"type": "boolean"
},
"web:*": {
"type": "boolean"
},
"web:openlinksinternally": {
"type": "boolean"
},
"web:defaulturl": {
"type": "string"
},
"web:defaultsearch": {
"type": "string"
},
"autoupdate:*": {
"type": "boolean"
},
"autoupdate:enabled": {
"type": "boolean"
},
"autoupdate:intervalms": {
"type": "number"
},
"autoupdate:installonquit": {
"type": "boolean"
},
"autoupdate:channel": {
"type": "string"
},
"markdown:fontsize": {
"type": "number"
},
"markdown:fixedfontsize": {
"type": "number"
},
"preview:showhiddenfiles": {
"type": "boolean"
},
"tab:preset": {
"type": "string"
},
"tab:confirmclose": {
"type": "boolean"
},
"widget:*": {
"type": "boolean"
},
"widget:showhelp": {
"type": "boolean"
},
"window:*": {
"type": "boolean"
},
"window:fullscreenonlaunch": {
"type": "boolean"
},
"window:transparent": {
"type": "boolean"
},
"window:blur": {
"type": "boolean"
},
"window:opacity": {
"type": "number"
},
"window:bgcolor": {
"type": "string"
},
"window:reducedmotion": {
"type": "boolean"
},
"window:tilegapsize": {
"type": "integer"
},
"window:showmenubar": {
"type": "boolean"
},
"window:nativetitlebar": {
"type": "boolean"
},
"window:disablehardwareacceleration": {
"type": "boolean"
},
"window:maxtabcachesize": {
"type": "integer"
},
"window:magnifiedblockopacity": {
"type": "number"
},
"window:magnifiedblocksize": {
"type": "number"
},
"window:magnifiedblockblurprimarypx": {
"type": "integer"
},
"window:magnifiedblockblursecondarypx": {
"type": "integer"
},
"window:confirmclose": {
"type": "boolean"
},
"window:savelastwindow": {
"type": "boolean"
},
"window:dimensions": {
"type": "string"
},
"window:zoom": {
"type": "number"
},
"telemetry:*": {
"type": "boolean"
},
"telemetry:enabled": {
"type": "boolean"
},
"conn:*": {
"type": "boolean"
},
"conn:askbeforewshinstall": {
"type": "boolean"
},
"conn:wshenabled": {
"type": "boolean"
},
"conn:localhostdisplayname": {
"type": "string"
},
"debug:*": {
"type": "boolean"
},
"debug:pprofport": {
"type": "integer"
},
"debug:pprofmemprofilerate": {
"type": "integer"
},
"tsunami:*": {
"type": "boolean"
},
"tsunami:scaffoldpath": {
"type": "string"
},
"tsunami:sdkreplacepath": {
"type": "string"
},
"tsunami:sdkversion": {
"type": "string"
},
"tsunami:gopath": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
}
}
}