2.2 KiB
2.2 KiB
Repository Guidelines
Project Structure & Module Organization
This repository is a Vite + Vue 3 + TypeScript frontend app.
src/: application source codesrc/components/: Vue UI components (for example,MonacoEditor.vue,ThemeToggle.vue)src/api/: HTTP client logic (completion.ts)src/types/: shared TypeScript interfaces for API payloadspublic/: static assets served as-isdist/: 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
anyunless 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:
npm run buildsucceeds.npm run devruns 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 timeoutfix: handle empty completion response
PRs should include:
- Clear summary of user-visible and technical changes.
- Linked issue/task ID (if applicable).
- Validation steps and commands run.
- Screenshots or short recordings for UI changes.