mirror of
https://github.com/furyhawk/ai_agent.git
synced 2026-07-21 10:15:44 +00:00
- Implemented `conversation-store` for managing conversations and messages. - Created `file-preview-store` to handle file preview state. - Added `sidebar-store` for sidebar visibility management. - Developed `theme-store` for theme persistence and management. - Introduced `kb-selection-store` for managing active knowledge base selections with persistence. chore: define API and chat types - Added types for API responses, authentication, chat messages, conversations, and projects. - Defined interfaces for various entities including users, sessions, and message ratings. build: configure TypeScript and testing setup - Set up `tsconfig.json` for TypeScript configuration. - Created `vitest.config.ts` for testing configuration with Vitest. - Added `vitest.setup.ts` for global test setup including mocks for Next.js router and media queries. - Configured Vercel deployment settings in `vercel.json`.
1.2 KiB
1.2 KiB
description
| description |
|---|
| Review code changes against project conventions |
Review all staged and unstaged changes in the current branch.
For each changed file, verify:
Architecture:
- Routes only call services, never repositories
- Services raise domain exceptions (NotFoundError, AlreadyExistsError, etc.), not HTTP exceptions
- Repositories use
db.flush()+db.refresh(), neverdb.commit() - DI uses Annotated aliases from
deps.py(CurrentUser, *Svc), not rawDepends()in signatures
Schemas & Types:
- Separate Create/Update/Read/List Pydantic models
- Type hints on all function signatures (params + return)
- Modern syntax:
str | NonenotOptional[str] - Route return type is
-> Any
Code Quality:
- No debug code (print, commented-out code, TODO without issue reference)
- No security issues (SQL injection, exposed secrets, missing auth)
- Consistent naming (snake_case functions, PascalCase classes)
- Imports ordered: stdlib → third-party → local
Validation:
- Run
cd backend && uv run ruff check . - Run
cd backend && uv run pytest(if test files changed)
Provide findings with specific file:line references and suggest fixes.