修改opencode 去掉了opencode Zen

This commit is contained in:
zhangxunhui 2026-03-16 15:14:04 +08:00
parent 8710ae02b1
commit d27e2ec628
3 changed files with 18 additions and 4 deletions

View File

@ -17,6 +17,8 @@ if not exist "%OPENCODE_DIR%" (
if exist "%SOURCE_CONFIG%" (
echo [2/2] Copying opencode.json to %OPENCODE_DIR%...
echo Source: %SOURCE_CONFIG%
echo Target: %OPENCODE_DIR%\opencode.json
copy /Y "%SOURCE_CONFIG%" "%OPENCODE_DIR%\opencode.json"
echo.
echo ========================================
@ -24,9 +26,12 @@ if exist "%SOURCE_CONFIG%" (
echo ========================================
echo.
echo Configuration copied successfully!
echo Note: Existing config file has been overwritten.
echo.
echo [Additional Setup] Setting environment for offline mode...
setx OPENCODE_OFFLINE 1 >nul
setx OPENCODE_DISABLE_MODELS_FETCH 1 >nul
set OPENCODE_OFFLINE=1
set OPENCODE_DISABLE_MODELS_FETCH=1
echo.
echo [Additional Setup] Adding opencode to PATH...
@ -37,8 +42,8 @@ echo ========================================
echo Offline Mode Enabled!
echo ========================================
echo.
echo Environment variable set: OPENCODE_DISABLE_MODELS_FETCH=1
echo This disables automatic model fetching for offline use.
echo Environment variable set: OPENCODE_OFFLINE=1
echo This hides OpenCode Zen models and uses local model only.
echo.
echo Your local model will be used automatically.
echo.

View File

@ -22,7 +22,16 @@ else
fi
echo ""
echo "Setting environment for offline mode..."
export OPENCODE_OFFLINE=1
echo "export OPENCODE_OFFLINE=1" >> ~/.bashrc
echo "Environment variable set: OPENCODE_OFFLINE=1"
echo ""
echo "========================================"
echo " Offline Mode Enabled!"
echo "========================================"
echo ""
echo "This hides OpenCode Zen models and uses local model only."
echo "OpenCode is ready to use with local model!"
echo ""
echo "Note: Make sure your local model service (e.g., Ollama/vLLM) is running."
echo ""
echo "Note: Make sure your local model service (e.g., vLLM) is running."