all
This commit is contained in:
51
AGENTS.md
Normal file
51
AGENTS.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
This repository is a Vite + Vue 3 + TypeScript frontend app.
|
||||
|
||||
- `src/`: application source code
|
||||
- `src/components/`: Vue UI components (for example, `MonacoEditor.vue`, `ThemeToggle.vue`)
|
||||
- `src/api/`: HTTP client logic (`completion.ts`)
|
||||
- `src/types/`: shared TypeScript interfaces for API payloads
|
||||
- `public/`: static assets served as-is
|
||||
- `dist/`: production build output (generated)
|
||||
- `backend/`: placeholder folder; no active backend code is currently committed
|
||||
|
||||
Use the `@` alias for imports from `src` (configured in `vite.config.ts` and `tsconfig.app.json`).
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
- `npm install`: install dependencies.
|
||||
- `npm run dev`: start local development server with HMR.
|
||||
- `npm run build`: run type checks (`vue-tsc -b`) and build production assets.
|
||||
- `npm run preview`: serve the built app locally for verification.
|
||||
|
||||
Current package scripts do not include linting or unit test commands.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
- Use Vue 3 Composition API with `<script setup lang="ts">`.
|
||||
- Use TypeScript strict mode patterns; avoid `any` unless justified.
|
||||
- Use 2-space indentation and single quotes, matching existing files.
|
||||
- Name components in PascalCase (e.g., `MonacoEditor.vue`).
|
||||
- Name composables/helpers and API modules in camelCase (e.g., `fetchCompletions`).
|
||||
- Keep shared interfaces in `src/types/*` and colocate feature-specific logic where used.
|
||||
|
||||
## Testing Guidelines
|
||||
No automated test framework is configured yet in `package.json`.
|
||||
|
||||
When adding tests, prefer Vitest + Vue Test Utils and place files as:
|
||||
- `src/**/__tests__/*.spec.ts`
|
||||
|
||||
Minimum verification for every change:
|
||||
1. `npm run build` succeeds.
|
||||
2. `npm run dev` runs without console/runtime errors for the changed flow.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
Git history is not available in this workspace snapshot, so no existing commit pattern can be inferred. Use Conventional Commits going forward:
|
||||
- `feat: add completion request timeout`
|
||||
- `fix: handle empty completion response`
|
||||
|
||||
PRs should include:
|
||||
1. Clear summary of user-visible and technical changes.
|
||||
2. Linked issue/task ID (if applicable).
|
||||
3. Validation steps and commands run.
|
||||
4. Screenshots or short recordings for UI changes.
|
||||
Reference in New Issue
Block a user