pnpm install- Install dependenciespnpm run build- Build extension (output: OpenCode.novaextension/Scripts/)pnpm run build:watch- Build with file watchingpnpm run build:install- Build extension and install
- TypeScript strict mode with
noUncheckedIndexedAccess - Tabs for indentation, no semicolons, double quotes
- Use
import typefor type-only imports - Prefer named functions over arrow functions
- Private class fields use
#prefix (e.g.,#client) - Services: singleton pattern (
export const fooService = new FooService()) - Naming: PascalCase for classes/types, camelCase for functions/variables
- Console logs prefixed with
[OpenCode] - Error handling: try/catch, show user notifications via
NotificationRequest - Prefer discriminated unions for variant types (e.g.,
{ type: "FILE" } | { type: "FOLDER" })