Files

818 B

AGENTS.md

Build & Run

  • Compile: npm run compile (or tsc -p ./)
  • Watch: npm run watch
  • Package extension: npm run build → produces .vsix file
  • Test: Press F5 to launch extension in debug mode

Project Structure

  • src/extension.ts - Extension entry point, registers aiCommitExt.generate command
  • src/opencodeService.ts - Spawns opencode run CLI, parses output for commit message
  • src/gitService.ts - Uses VS Code Git extension API to get diffs and repo root

Key Details

  • Output compiled to out/ directory
  • Extension activates only on command invocation (not on startup)
  • OpenCode CLI is required on PATH; checked via which opencode
  • Generated message written to SCM input box via repository.inputBox.value
  • Timeout: 120 seconds for OpenCode response