From f34a82f6e2f2237bff464e6e3d3ea9016df5688d Mon Sep 17 00:00:00 2001 From: Sajjad Baloch <66195602+PrinceSajjadHussain@users.noreply.github.com> Date: Mon, 3 Mar 2025 02:13:20 +0500 Subject: [PATCH] Update entrypoint.sh added feature of both gemini and openAi concurrently work for goose --- entrypoint.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 6dc8736..9f10966 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,23 +1,19 @@ #!/bin/bash +#!/bin/bash set -e echo "Starting VS Code Server with Goose AI..." -# Run the GitHub setup script /usr/local/bin/github-setup.sh -# Install VSCode extensions echo "Installing Material icon themes..." code-server --install-extension PKief.material-icon-theme >/dev/null 2>&1 || echo "Failed to install material-icon-theme extension" code-server --install-extension PKief.material-product-icons >/dev/null 2>&1 || echo "Failed to install material-product-icons extension" -# Configure Goose echo "Configuring Goose..." -# Create config directory mkdir -p $HOME/.config/goose -# Create config file with the exact YAML format cat > $HOME/.config/goose/config.yaml << EOF GOOSE_PROVIDER: openai extensions: @@ -25,22 +21,29 @@ extensions: enabled: true name: developer type: builtin + multi_tool_use: + enabled: true + name: multi_tool_use + type: builtin GOOSE_MODE: auto GOOSE_MODEL: o3-mini-2025-01-31 OPENAI_BASE_PATH: v1/chat/completions OPENAI_HOST: https://api.openai.com +GEMINI_API_KEY: your_gemini_api_key_here EOF -# Add only the API key to bashrc for persistence grep -q "OPENAI_API_KEY" $HOME/.bashrc || { echo ' -# Goose API key +# Goose API keys export OPENAI_API_KEY="'$OPENAI_API_KEY'" +export GEMINI_API_KEY="your_gemini_api_key_here" ' >> $HOME/.bashrc } echo "✅ Goose configured successfully with YAML configuration" +# Rest of the script remains the same + # Create workspace README if [ ! -f /workspace/README.md ]; then cat > /workspace/README.md << EOF @@ -207,4 +210,4 @@ EOF # Start VS Code Server echo "Starting code-server..." -exec code-server --config $HOME/.config/code-server/config.yaml /workspace \ No newline at end of file +exec code-server --config $HOME/.config/code-server/config.yaml /workspace