- lib/system-prompts.ts: delete the extended prompt kept only to reach
the 4096-token cache threshold of two old Claude models; describe the
current canvas-first UI in the App Features section
- app/api/chat/route.ts: remove the server-side example cache (the
browser answers examples itself), the ENABLE_HISTORY_XML_REPLACE
option and its helper, the unread messageMetadata fields; the
DEBUG_LLM_PAYLOAD blocks become one describeMessages summary
- app/api/log-feedback and log-save share scoreLatestTrace in
lib/langfuse.ts
- app/api/admin/test-model and validate-model call a shared
testModelConnection() instead of one route faking a request to the
other and passing trust through the body
- lib/dynamo-quota-manager.ts reads the failing item from the
conditional update instead of a second GetItem
- lib/ai-providers.ts: geminiThinkingOptions helper for the google and
vertexai cases, drop the unused fourth resolveBaseURL parameter
- edge-functions: always stream, shrink messageSchema, drop model
aliases nothing sends
- delete app/api/chat/xml_guide.md, parseOutputTokenLimit, unused type
exports and export keywords on file-internal symbols
- env.example: drop variables nothing reads, document the quota,
validation and analytics variables, mention the apiKeyEnv array form
(also in docs/*/ai-providers.md)
* fix: use full IP for userId to prevent quota collision
- Remove .slice(0, 8) from base64 encoded IP
- Each IP now has unique userId (no /16 collision)
- Affects: quota tracking, Langfuse tracing
* refactor: extract getUserIdFromRequest to shared utility
- Create lib/user-id.ts with shared function
- Fix misleading 'privacy' comment (base64 is not privacy)
- Remove duplicate code from chat and log-feedback routes
- Add Biome as formatter and linter (replaces Prettier)
- Configure Husky + lint-staged for pre-commit hooks
- Add VS Code settings for format on save
- Ignore components/ui/ (shadcn generated code)
- Remove semicolons, use 4-space indent
- Reformat all files to new style
- Add Zod schema validation for log-feedback and log-save endpoints
- Create singleton LangfuseClient to avoid per-request instantiation
- Simplify log-save to only flag trace (no XML content sent)
- Use generic error messages to prevent info leakage
- Update log-feedback API to find existing chat trace by sessionId and attach score to it
- Update log-save API to create span on existing chat trace instead of standalone trace
- Add thumbs up/down feedback buttons on assistant messages
- Add message regeneration and edit functionality
- Add save dialog with format selection (drawio, png, svg)
- Pass sessionId through components for Langfuse linking