AGENTS.md

Repository Guidelines

Project Structure & Module Organization

The core plugin code lives in src/:

  • index.ts defines the LM Studio entry point.
  • generator.ts adapts LM Studio chat streams to OpenAI-compatible APIs.
  • config.ts holds plugin config schematics and defaults.
  • constants.ts stores shared model lists/constants.

Repository metadata and build config are in manifest.json, package.json, and tsconfig.json. TypeScript build output is written to dist/ (generated).

Build, Test, and Development Commands

  • npm install installs dependencies.
  • npm run dev runs lms dev for local plugin development in LM Studio.
  • npm run push runs lms push to publish the plugin.
  • npx tsc -p tsconfig.json compiles TypeScript to dist/ (not wired as a script).

There is no test script configured yet.

Coding Style & Naming Conventions

  • TypeScript targeting CommonJS (see tsconfig.json).
  • Use 2-space indentation and semicolons, matching existing files.
  • Prefer camelCase for variables/functions, PascalCase for types, and UPPER_SNAKE for constants (e.g., MAX_REQUESTS).
  • Keep imports relative within src/ and preserve the existing module structure.

Testing Guidelines

No test framework or coverage targets are defined. If you add tests, place them under src/__tests__/ (or similar) and add a test script to package.json.

Commit & Pull Request Guidelines

This workspace does not include a .git history, so no existing commit convention can be inferred. Use short, imperative subjects (e.g., Add model selection fallback).

For PRs, include:

  • A brief summary of changes
  • How you tested (or state “not tested”)
  • Any config or API behavior changes

Security & Configuration Tips

Do not hardcode API keys. Use LM Studio global config fields (apiKey, baseUrl), which are marked protected. If defaults change, update config.ts placeholders and call it out in the PR description.