[Sync] opencode 2.x

This commit is contained in:
Coja
2026-09-17 21:25:54 +02:00
parent d8f6b30e2c
commit 4f5054ed0d
9 changed files with 161 additions and 163 deletions
+11 -4
View File
@@ -5,10 +5,17 @@ set -gx EDITOR nvim
set -gx PAGER less
set -gx QT_FONT_DPI 96
set -gx PI_SKIP_VERSION_CHECK 1
# opencode GPT/Codex OAuth overlay — only where `opencode auth login` stored an OpenAI credential,
# so hosts without the login don't get an unusable provider in the model picker.
if test -r ~/.local/share/opencode/auth.json; and grep -q '"openai"' ~/.local/share/opencode/auth.json
set -gx OPENCODE_CONFIG "$HOME/.config/opencode/openai-gpt.jsonc"
# opencode GPT/Codex OAuth overlay (~/.config/opencode/openai-gpt.jsonc). opencode 2.x ignores
# OPENCODE_CONFIG / OPENCODE_CONFIG_CONTENT, but it merges a second global file, opencode.jsonc.
# Link the overlay under that name only where `opencode auth login` stored an OpenAI credential,
# so other hosts don't get an unusable provider; drop our link again if the login goes away.
# (Alternative: ship the link from the host's dots overlay instead of this startup check.)
set -l _oc_auth ~/.local/share/opencode/auth.json
set -l _oc_link ~/.config/opencode/opencode.jsonc
if test -r $_oc_auth; and grep -q '"openai"' $_oc_auth
test -e $_oc_link; or ln -s openai-gpt.jsonc $_oc_link
else if test -L $_oc_link; and test (readlink $_oc_link) = openai-gpt.jsonc
rm $_oc_link
end
set -gx MANPAGER "nvim +Man!"
# fzf's built-in walker is the one search tool that ignores .ignore files, so point it at