Commit graph

8 commits

Author SHA1 Message Date
Jeremy McSpadden
02e3c441cc feat(vscode): enhance chat participant UX
- Auto-start agent when not connected instead of showing error
- Remove noisy tool-completion markdown spam (was printing *Tool X completed* for every call)
- Inject #file references from chat into the prompt automatically
- Add clickable file anchors for files written/edited during the session
- Add follow-up suggestions: /gsd status, /gsd auto, /gsd capture
- Improve tool progress labels (WebSearch, WebFetch, cleaner paths)
- Better error message when agent fails to start
2026-03-16 19:22:15 -05:00
Jeremy McSpadden
8db680c405 feat(vscode): set logo.jpg as extension marketplace icon 2026-03-16 19:16:29 -05:00
Jeremy McSpadden
c465bf7d18 fix(vscode): set publisher to FluxLabs to match marketplace account 2026-03-16 19:14:36 -05:00
Jeremy McSpadden
3f88619fac refactor(vscode): rename extension to GSD-2 2026-03-16 19:12:13 -05:00
Jeremy McSpadden
2df27c5179 feat(vscode): add marketplace-ready files for VS Code extension publishing
Adds everything needed to publish the extension to the VS Code Marketplace:

- README.md — full feature documentation with commands table, keyboard
  shortcuts, configuration reference, quick start guide, and @gsd chat
  participant usage
- CHANGELOG.md — initial 0.1.0 release notes
- .vscodeignore — excludes src/, tsconfig, maps from the .vsix package
- .gitignore — excludes dist/ and *.vsix from version control
- LICENSE — MIT license copied from repo root
- package.json — adds repository, homepage, bugs, keywords, galleryBanner
  fields required by the marketplace; adds @vscode/vsce to devDependencies;
  adds publish script

Verified: `npm run package` produces a clean 30KB .vsix with no warnings.
Run `npm run publish` with a VSCE_PAT token to publish.
2026-03-16 19:09:28 -05:00
Jeremy McSpadden
add9e8cf3c fix: address PR review — CSP nonce, dead branch, restart cooldown
1. Webview CSP nonce (security): Added Content-Security-Policy meta tag
   with nonce-based script-src to sidebar.ts. Replaced all inline
   onclick handlers with data-command attributes and a single delegated
   event listener, which CSP requires over inline handlers.

2. Dead branch in chat-participant.ts: Removed the isSlashCommand
   conditional that ran identical code for both paths — slash commands
   and regular messages both call sendPrompt() the same way.

3. Restart loop cooldown in gsd-client.ts: Added a 60-second sliding
   window that tracks crash timestamps. If the process crashes more
   than 3 times within 60 seconds, auto-restart is disabled and an
   error is surfaced to the user via the onError event emitter.
2026-03-16 17:28:32 -05:00
Jeremy McSpadden
d5e664c580 feat: fully flesh out VS Code extension with all RPC features
GsdClient — expose all 25 RPC commands:
- Prompting: steer, followUp
- Thinking: setThinkingLevel, cycleThinkingLevel
- Compaction: compact, setAutoCompaction
- Retry: setAutoRetry, abortRetry
- Bash: runBash, abortBash
- Session: getSessionStats, exportHtml, switchSession, setSessionName,
  getMessages, getLastAssistantText, getCommands
- Model: cycleModel

Extension — register 15 commands with full UI:
- switchModel (QuickPick with context windows)
- setThinking (QuickPick off/low/medium/high)
- sessionStats (formatted token/cost display)
- exportHtml (save dialog)
- steer/runBash (input boxes)
- listCommands (QuickPick, select to execute)
- Keybindings: ctrl+shift+g chords for new session, cycle model, cycle thinking
- Config: gsd.autoStart, gsd.autoCompaction

Sidebar — full dashboard:
- Thinking level badge and toggle
- Token usage (input/output) and cost from session stats
- Streaming spinner indicator
- Model selector and quick action buttons (compact, export, abort)
- Auto-compaction toggle
- 10s periodic refresh for live stats

Chat participant — enhanced event handling:
- Tool-specific details (file paths, bash commands, grep patterns)
- Thinking block display
- Token usage summary at end of each response
2026-03-16 16:46:21 -05:00
Jeremy McSpadden
48feced87d feat: add VS Code extension scaffold and MCP server compiled module
- Add vscode-extension/ with full MVP scaffold:
  - GsdClient: spawns gsd --mode rpc, JSON line communication
  - @gsd Chat participant: forward messages to agent, stream responses
  - Sidebar panel: connection status, model info, start/stop controls
  - Command palette: gsd.start, gsd.stop, gsd.newSession, gsd.sendMessage
  - Extension config: gsd.binaryPath setting
- Add compiled MCP server module at src/mcp-server.ts for tsc output
- Add MCP server tests verifying module import and instantiation
2026-03-16 16:46:20 -05:00