diff --git a/README.md b/README.md index 30a3529..b84a31b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This repository provides a collection of [dev container Features](https://contai | Feature | Description | Documentation | |---------|-------------|---------------| | `opencode` | AI coding agent CLI | [src/opencode/README.md](src/opencode/README.md) | -| `agency-agents` | AI agent set for Cursor/Copilot | [src/agency-agents/README.md](src/agency-agents/README.md) | +| `agency-agents` | AI agent set for a complete AI agency at your fingertips | [src/agency-agents/README.md](src/agency-agents/README.md) | --- diff --git a/src/opencode/devcontainer-feature.json b/src/opencode/devcontainer-feature.json index 286c4f2..fbc5386 100644 --- a/src/opencode/devcontainer-feature.json +++ b/src/opencode/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "opencode CLI", "id": "opencode", - "version": "0.2.4", + "version": "0.2.5", "description": "Installs the opencode AI coding agent CLI and ensures volume-mounted data directories are owned by the correct user.", "documentationURL": "https://opencode.ai", "options": { @@ -10,17 +10,19 @@ "default": "", "description": "Username to install opencode for. Defaults to _REMOTE_USER (the container's remote user)." }, - "installVscodePlugin": { - "type": "boolean", - "default": true, - "description": "Install the opencode VS Code extension." - }, "version": { "type": "string", "default": "", "description": "Version to install (e.g. 1.3.17). Empty = latest." } }, + "customizations": { + "vscode": { + "extensions": [ + "sst-dev.opencode" + ] + } + }, "postStartCommand": "bash /usr/local/bin/opencode-fix-permissions", "installsAfter": ["ghcr.io/devcontainers/features/common-utils"] } diff --git a/src/opencode/install.sh b/src/opencode/install.sh index 3b4012d..f91c05c 100644 --- a/src/opencode/install.sh +++ b/src/opencode/install.sh @@ -73,30 +73,6 @@ ensure_prerequisites() { [ -f /etc/ssl/certs/ca-certificates.crt ] || fail "Falha na instalação de dependências: certificados CA ainda estão ausentes" } -install_vscode_extension() { - local user="$1" - local vscode_cmd="" - - if command -v code >/dev/null 2>&1; then - vscode_cmd="code" - elif [ -x "/usr/bin/code" ]; then - vscode_cmd="/usr/bin/code" - fi - - if [ -z "$vscode_cmd" ]; then - log "VS Code não encontrado. Pulando instalação da extensão." - return 0 - fi - - log "Instalando extensão VS Code opencode..." - - if su "$user" -c "$vscode_cmd --install-extension sst-dev.opencode --force" 2>/dev/null; then - log "Extensão VS Code instalada com sucesso." - else - log "Falha ao instalar extensão VS Code." - fi -} - USERNAME="${USERNAME:-"${_REMOTE_USER:-vscode}"}" USER_HOME="${_REMOTE_USER_HOME:-"/home/${USERNAME}"}" VERSION="${VERSION:-}" @@ -138,10 +114,6 @@ su "$USERNAME" -c "curl -fsSL https://opencode.ai/install | bash -s -- --no-modi ln -s "${USER_HOME}/.opencode/bin/opencode" /usr/local/bin/opencode -if [ "${INSTALLVSCODEPLUGIN:-true}" = "true" ]; then - install_vscode_extension "$USERNAME" -fi - log "Criando diretórios para volumes persistentes..." mkdir -p "${USER_HOME}/.config/opencode"