Skip to content

feat(ui): add OpenCode config editor - #191

Merged
ymkiux merged 16 commits into
mainfrom
fix/android-webview-safe-area-layout
Jun 7, 2026
Merged

ymkiux merged 16 commits into
mainfrom
fix/android-webview-safe-area-layout

Conversation

@awsldev

@awsldev awsldev commented Jun 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add a Web UI OpenCode config panel for viewing and editing the local OpenCode config
  • support provider/model/agent selection plus optional API key, maxTokens, reasoningEffort, autoCompact, and core-agent sync
  • support importing/parsing an existing OpenCode config file before saving
  • add guarded backend actions for reading, saving, and applying OpenCode provider/model selection

Validation

  • git diff --check
  • node --check cli.js
  • node --check web-ui/modules/app.methods.opencode-config.mjs
  • npm run test:unit — All 627 tests passed
  • npm run lint — Lint passed for 323 file(s)
  • npm run test:e2e — exit 0
  • local Web UI screenshot captured from http://127.0.0.1:3737

Notes

  • This force-push replaces the earlier Android WebView safe-area direction; this PR now focuses on OpenCode config support.
  • Web UI writes remain gated by the per-tab OpenCode write permission switch.

Summary by CodeRabbit

  • New Features

    • OpenCode config UI panel: provider/model/agent selection, import/edit JSON/JSONC editor, save/apply flows, API key show/hide, token/reasoning controls, auto-compact, disable provider, core-agent sync.
  • Backend/API

    • Server APIs to load/save OpenCode config, apply/update selections, model catalog, persistent provider store with secure storage and active-provider projection that preserves user/native entries.
  • Permissions

    • Write-permission toggle for OpenCode with UI gating and persisted state.
  • Internationalization

    • OpenCode translations added (en, ja, vi, zh).
  • Tests

    • New and updated tests for UI, parsing/import, permissions, provider-store and projection behavior.
  • Style

    • Added editor textarea and error hint styles.
  • Docs / Chore

    • README updated for OpenCode; package version bumped.

Linked issues

Closes #190

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

是否可以增加对opencode的支持?

2 participants