Repository navigation
Add Vue LSP and enable eslint for .vue files. - #1952
Merged
Merged
Conversation
Rwanbt
pushed a commit
to Rwanbt/unifia
that referenced
this pull request
May 5, 2026
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
meSingh
pushed a commit
to meSingh/opencode
that referenced
this pull request
Sep 6, 2026
brentyates-swx
added a commit
to swxtchio/swx-opencode-archive
that referenced
this pull request
Oct 23, 2026
* docs(core): plan V2 config env sources for swxtch-egress (anomalyco#1952) Plan for swxtchio/swx-abbe#1952. Root cause: the V2 Config layer (packages/core/src/config.ts) reads only the global config directory and discovered project files. It ignores OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT. The jail supplies its whole config through those two variables (Dockerfile.jail sets OPENCODE_CONFIG, opencode_server.py renders OPENCODE_CONFIG_CONTENT), so the V2 catalog never sees the swxtch-egress provider or a configured default model. V1 (packages/opencode/src/config/config.ts) reads both, which is why V1 turns run on the egress provider. Change: - Config takes explicit file and content sources, defaulting to Flag.OPENCODE_CONFIG and Flag.OPENCODE_CONFIG_CONTENT, with a layerWith seam for tests (mirrors Global.layerWith and upstream's Config.Options file/content from 43c0838). - Precedence matches V1 and upstream: global directory, then the OPENCODE_CONFIG file, then project files, then project .opencode directories, then OPENCODE_CONFIG_CONTENT last. - V1-format sources migrate through the existing loader path. Tests: - Config loader orders explicit file and content entries. - A jail-shaped V1 config supplied as content reaches the catalog and SessionRunnerModel resolves the named swxtch-egress model to an OpenAI-compatible route at the proxy URL. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * fix(core): load env-supplied config in V2 config The V2 Config layer read only the global config directory and discovered project files, ignoring OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT. The OpenCode jail supplies its whole config through those variables, so the V2 runner's catalog never held the swxtch-egress provider or the configured default model: a named egress model failed with ModelUnavailableError and an unnamed one fell to another provider (swxtchio/swx-abbe#1952). Config now takes explicit file and content sources, defaulting to the two flags, and orders them as V1 does: global directory, explicit file, project files, .opencode directories, then inline content. V1-format sources migrate through the existing loader path. Config.nodeWith names the sources directly for tests. Tests drive the real loader: precedence of every source, and the jail's V1 config (placeholder file plus rendered content) through the config provider plugin and catalog to SessionRunnerModel, for a named model and for the configured default against a competing provider. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * fix(core): default V2 sessions to config-declared providers Review round 1: with the env-config fix alone, a location-only V2 session in the jail (create_session_v2 names no model, and the jail config sets none) still resolved a credential-free catalog model such as opencode/hy3-free ahead of the config-declared swxtch-egress model, so egress turns still failed. V1's Provider.defaultModel takes its default from the config-declared providers when no model is configured. The V2 catalog now does the same: the config provider plugin records the declared providers in config order, and Catalog.model.default picks the newest available model of the first one that has any, before its newest-available fallback. An explicit session model or configured `model` still wins. The preference registers on the internal catalog under the plugin's scope, because the public plugin catalog API has no such hook. Tests: the jail path through the production location runtime (every internal plugin, the recorded models.dev corpus, the jail config via OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT) resolves a location-only session to the egress model; and the preference skips an unavailable declared provider and beats a newer undeclared model. Both are red without the preference. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp
brentyates-swx
added a commit
to swxtchio/swx-opencode-archive
that referenced
this pull request
Oct 23, 2026
* docs(core): plan V2 config env sources for swxtch-egress (anomalyco#1952) Plan for swxtchio/swx-abbe#1952. Root cause: the V2 Config layer (packages/core/src/config.ts) reads only the global config directory and discovered project files. It ignores OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT. The jail supplies its whole config through those two variables (Dockerfile.jail sets OPENCODE_CONFIG, opencode_server.py renders OPENCODE_CONFIG_CONTENT), so the V2 catalog never sees the swxtch-egress provider or a configured default model. V1 (packages/opencode/src/config/config.ts) reads both, which is why V1 turns run on the egress provider. Change: - Config takes explicit file and content sources, defaulting to Flag.OPENCODE_CONFIG and Flag.OPENCODE_CONFIG_CONTENT, with a layerWith seam for tests (mirrors Global.layerWith and upstream's Config.Options file/content from 43c0838). - Precedence matches V1 and upstream: global directory, then the OPENCODE_CONFIG file, then project files, then project .opencode directories, then OPENCODE_CONFIG_CONTENT last. - V1-format sources migrate through the existing loader path. Tests: - Config loader orders explicit file and content entries. - A jail-shaped V1 config supplied as content reaches the catalog and SessionRunnerModel resolves the named swxtch-egress model to an OpenAI-compatible route at the proxy URL. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * fix(core): load env-supplied config in V2 config The V2 Config layer read only the global config directory and discovered project files, ignoring OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT. The OpenCode jail supplies its whole config through those variables, so the V2 runner's catalog never held the swxtch-egress provider or the configured default model: a named egress model failed with ModelUnavailableError and an unnamed one fell to another provider (swxtchio/swx-abbe#1952). Config now takes explicit file and content sources, defaulting to the two flags, and orders them as V1 does: global directory, explicit file, project files, .opencode directories, then inline content. V1-format sources migrate through the existing loader path. Config.nodeWith names the sources directly for tests. Tests drive the real loader: precedence of every source, and the jail's V1 config (placeholder file plus rendered content) through the config provider plugin and catalog to SessionRunnerModel, for a named model and for the configured default against a competing provider. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * fix(core): default V2 sessions to config-declared providers Review round 1: with the env-config fix alone, a location-only V2 session in the jail (create_session_v2 names no model, and the jail config sets none) still resolved a credential-free catalog model such as opencode/hy3-free ahead of the config-declared swxtch-egress model, so egress turns still failed. V1's Provider.defaultModel takes its default from the config-declared providers when no model is configured. The V2 catalog now does the same: the config provider plugin records the declared providers in config order, and Catalog.model.default picks the newest available model of the first one that has any, before its newest-available fallback. An explicit session model or configured `model` still wins. The preference registers on the internal catalog under the plugin's scope, because the public plugin catalog API has no such hook. Tests: the jail path through the production location runtime (every internal plugin, the recorded models.dev corpus, the jail config via OPENCODE_CONFIG and OPENCODE_CONFIG_CONTENT) resolves a location-only session to the egress model; and the preference skips an unavailable declared provider and beats a newer undeclared model. Both are red without the preference. Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * fix(core): run V2 turns only after the location's plugins boot A Location boots its internal plugins in a forked fiber, and nothing on the turn path waited for it. The jail's adapter creates a session and prompts it at once, so the drain that boots the Location starts its first turn while the catalog is still empty or only partly built. On the jail image running v1.18.32-swxtch.774d90c7 the first turn failed with ModelNotSelectedError (or ModelUnavailableError when the egress model is named), or was sent to a bundled model such as nano-gpt/..., and the egress provider received nothing. The internal plugin layer now exposes a readiness signal that completes when its boot ends, whether it loaded every plugin or failed, and every runner turn waits on it before it selects the agent, model, tools and guidance. Refs swxtchio/swx-abbe#1952 Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp * docs: record #350 in CHANGESET Claude-Session: https://claude.ai/code/session_01HGGfNzV3BHB7W49PTT9MVp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for
.vuefiles using@vue/language-serverand enable Eslint LSP for.vuefiles.