mirror of
https://github.com/temetro/temetro.git
synced 2026-08-18 14:23:14 +00:00
929bec8f31
Stop blocking AI imports/proposals on missing non-critical fields. Records the chat agent drafts now save with safe placeholders, auto-generated file numbers, and a source="ai" marker that surfaces an "Added by AI" badge so a clinician can review/edit them later. Backend: - add `source` (manual|ai) column to patients/appointments/prescriptions (migration 0014) + canonical types, services, validation schemas - relax patient/appointment validation: empty file number allowed, demographic + type/provider/initials fall back to placeholders (initials derived from name) - patients.generateFileNumber() auto-assigns an MRN when one is missing - proposeAppointment accepts a name when no file number resolves; AI commits + /api/ai/import stamp source="ai" Frontend: - `source` on Appointment/Patient/Prescription types; AI commits send source="ai" - reusable <AiBadge> shown on the Patients table/detail and prescriptions list Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.1 KiB
3.1 KiB
coss CLI Reference (Focused)
Use this guide when installing, previewing, or discovering coss components via the shadcn CLI.
CLI Safety Rules
- Always use the project's package runner:
npx shadcn@latest ...pnpm dlx shadcn@latest ...bunx --bun shadcn@latest ...
- Do not invent flags. Use only documented CLI flags.
Core Commands for coss Usage
Recommended bootstrap paths
# New projects (recommended — includes Inter + Geist Mono fonts + full theme)
npx shadcn@latest init @coss/style
# Existing projects - all primitives
npx shadcn@latest add @coss/ui
# Existing projects - full theme setup
npx shadcn@latest add @coss/style
# Existing projects - primitives + color tokens
npx shadcn@latest add @coss/ui @coss/colors-neutral
@coss/style automatically installs @coss/fonts (Inter for --font-sans and --font-heading, Geist Mono for --font-mono), which configures all three font variables in layout.tsx. No manual font wiring needed.
add (primary)
shadcn add @coss/<component>
Examples:
npx shadcn@latest add @coss/dialog
npx shadcn@latest add @coss/select
npx shadcn@latest add @coss/toast
add preview mode (recommended)
npx shadcn@latest add @coss/dialog --dry-run
npx shadcn@latest add @coss/dialog --diff
npx shadcn@latest add @coss/dialog --view
Use preview mode when:
- user asks what will change
- component might already exist locally
- you need to inspect output before writing files
Optional discovery helpers (use when available)
npx shadcn@latest search @coss -q "dialog"
npx shadcn@latest view @coss/dialog
npx shadcn@latest docs dialog
npx shadcn@latest info --json
If these are unsupported in the environment, use fallback sources below.
Discovery Fallback Matrix
Inside the coss repo (preferred)
apps/ui/registry/registry-particles.tshttps://github.com/cosscom/coss/blob/main/apps/ui/registry/registry-particles.ts
apps/ui/registry.jsonhttps://github.com/cosscom/coss/blob/main/apps/ui/registry.json
apps/ui/content/docs/components/*.mdxhttps://github.com/cosscom/coss/tree/main/apps/ui/content/docs/components
Outside the coss repo
- coss particles catalog:
https://coss.com/ui/particles - coss docs catalog:
https://coss.com/ui/
Manual Install Path
When users explicitly request manual setup:
- Read the target component docs.
- Install exactly the listed dependencies.
- Copy all required files (including transitive local imports).
- Adjust imports for target app aliases.
- Validate the snippet against docs/particles patterns.
Important:
- CLI setup usually wires required theme tokens automatically.
- Manual setup must include required additional tokens (
destructive-foreground,info,success,warningfamilies) from coss styling docs when relevant.
Quick Output Checklist
Before returning CLI guidance:
- runner and command are valid for the user's package manager
- flags are documented and intentional
- fallback source is provided if CLI discovery commands are unavailable
- resulting usage guidance matches coss docs and particles patterns