Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
56a81bf
chore: add Cursor dev environment setup (.cursor/environment.json + i…
cursoragent Sep 11, 2026
6c4750b
chore(env): restore opencode credentials from OPENCODE_AUTH_JSON secret
cursoragent Sep 11, 2026
37e6f42
chore: remove repo-level opencode config (.opencode/ and opencode.json)
cursoragent Sep 11, 2026
b4d5dbf
feat: migrate to opencode SDK v2 (bump @opencode-ai/sdk to 1.18.30)
cursoragent Sep 11, 2026
105441f
feat(webview): add model picker to the chat input
cursoragent Sep 11, 2026
2a36593
feat(webview): open model dropdown below and right-aligned when input…
cursoragent Sep 11, 2026
98d3db9
refactor(webview): derive message text from parts (remove Message.text)
cursoragent Sep 11, 2026
9743407
refactor(webview): extract shared deriveFileChanges/deriveContextInfo…
cursoragent Sep 11, 2026
3a17d48
refactor(webview): unify prompt-send paths and simplify in-flight state
cursoragent Sep 11, 2026
c2227e9
refactor(webview): unify agent/model selection via createSessionPrefe…
cursoragent Sep 11, 2026
5b7f438
perf(webview): scope session-switch bootstrap to session data
cursoragent Sep 11, 2026
4a61064
fix(webview): clear thinking state when the assistant message completes
cursoragent Sep 11, 2026
c141770
fix(webview): don't double newlines in submitted prompts
cursoragent Sep 17, 2026
48a197c
fix(webview): keep tool results collapsed by default
cursoragent Sep 17, 2026
69d23de
fix(webview): render apply_patch with a 'Patched <file>' header
cursoragent Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"install": "bash .cursor/install.sh"
}
58 changes: 58 additions & 0 deletions .cursor/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Development environment setup for the OpenCode VSCode extension.
# Installs Node dependencies, builds the extension + webview, and (best-effort)
# provisions the OpenCode CLI and VS Code so the extension can be run manually.
set -euo pipefail

cd "$(dirname "$0")/.."

echo "==> Installing Node dependencies (pnpm)"
corepack enable >/dev/null 2>&1 || true
pnpm install

echo "==> Building extension + webview"
pnpm build

echo "==> Installing OpenCode CLI (required prerequisite)"
if ! command -v opencode >/dev/null 2>&1 && [ ! -x "$HOME/.opencode/bin/opencode" ]; then
curl -fsSL https://opencode.ai/install | bash || echo "WARN: OpenCode CLI install failed; install manually from https://opencode.ai/install"
fi
if ! grep -q 'opencode/bin' "$HOME/.bashrc" 2>/dev/null; then
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> "$HOME/.bashrc"
fi
if ! grep -q 'opencode/bin' "$HOME/.profile" 2>/dev/null; then
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> "$HOME/.profile"
fi

echo "==> Restoring OpenCode credentials (if OPENCODE_AUTH_JSON secret is set)"
# Cloud agent VMs are ephemeral, so opencode's OAuth credentials
# (~/.local/share/opencode/auth.json) are restored from a Cursor secret.
# Add the secret named OPENCODE_AUTH_JSON with the contents of that file.
if [ -n "${OPENCODE_AUTH_JSON:-}" ]; then
mkdir -p "$HOME/.local/share/opencode"
printf '%s' "$OPENCODE_AUTH_JSON" > "$HOME/.local/share/opencode/auth.json"
chmod 600 "$HOME/.local/share/opencode/auth.json"
echo "Restored ~/.local/share/opencode/auth.json from OPENCODE_AUTH_JSON"
else
echo "OPENCODE_AUTH_JSON not set; skipping. Run 'opencode auth login' or add the secret to persist credentials."
fi

echo "==> Installing VS Code (best-effort, requires apt + sudo)"
if ! command -v code >/dev/null 2>&1; then
if command -v sudo >/dev/null 2>&1 && command -v apt-get >/dev/null 2>&1; then
{
sudo apt-get update -qq
sudo apt-get install -y wget gpg apt-transport-https
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg
sudo install -D -o root -g root -m 644 /tmp/packages.microsoft.gpg /usr/share/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list >/dev/null
rm -f /tmp/packages.microsoft.gpg
sudo apt-get update -qq
sudo apt-get install -y code
} || echo "WARN: VS Code install failed; the extension can still be run via 'pnpm dev' (downloads VS Code test build)."
else
echo "WARN: apt/sudo unavailable; skipping VS Code install."
fi
fi

echo "==> Setup complete"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ OpenCode.log
# Playwright test artifacts
test-results/
playwright-report/
*.tsbuildinfo
159 changes: 0 additions & 159 deletions .opencode/agent/codebase_search.md

This file was deleted.

Loading
Loading