anomalyco / anomalyco/opencode

TUI: option to configure input cursor style (line/beam instead of block)

Open
#39,338 2 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Jul 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The prompt textarea in the TUI always renders a blinking block cursor. There is no way to change it to a thin line (beam), underline, or the terminal default.

Current behavior

  • No cursor / cursorStyle option exists in the tui.json schema (checked https://opencode.ai/tui.json) or in opencode.json.
  • OpenTUI's EditBufferRenderable defaults to cursorStyle: { style: "block", blinking: true } and calls setCursorStyle on focus, so it overrides the terminal emulator's own cursor setting while the prompt is focused — configuring the terminal does not help.

Requested behavior

A tui.json option, e.g.:

{
  "cursor": { "style": "line", "blinking": true }
}

with values matching OpenTUI's existing CursorStyle type: "block" | "line" | "underline" | "default" (packages/core/src/types.ts in anomalyco/opentui). "default" would leave the terminal's cursor style untouched.

Notes

  • The rendering plumbing already exists: EditBufferRenderable accepts a cursorStyle option; opencode's packages/tui/src/component/prompt/index.tsx just never sets it and no config surface exposes it.
  • The web app already uses cursorStyle: "bar" for its xterm instances (packages/app/src/components/terminal.tsx), so the TUI is the outlier.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.