Fix/opencode known field editors (#2907)

* fix: add opencode model limit editor

* fix: add opencode headers editor

* style: refine opencode advanced field layout

* fix: preserve valid opencode headers

* fix: preserve opencode extra options and sync translations

---------

Co-authored-by: wzk <wx13571681304@outlook.com>
Co-authored-by: Jason Young <44939412+farion1231@users.noreply.github.com>
Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
v2v
2026-07-11 16:38:00 +08:00
committed by GitHub
parent 50270d5e42
commit 6245caa6c5
10 changed files with 781 additions and 71 deletions
@@ -51,6 +51,11 @@ export const OPENCODE_KNOWN_OPTION_KEYS = [
"headers",
] as const;
// Contains ":", which is not valid in an HTTP field name, so it cannot
// collide with a legitimate custom header from an existing configuration.
export const OPENCODE_HEADER_DRAFT_PREFIX = "draft-header:";
export const OPENCODE_EXTRA_OPTION_DRAFT_PREFIX = "draft-option:";
export const OPENCLAW_DEFAULT_CONFIG = JSON.stringify(
{
baseUrl: "",