refactor: rename swift → cortex in code and documentation
Complete rename of "swift" terminology to "cortex" across the codebase: Code Changes: - Rename directories: lib/swift → lib/cortex, components/swift → components/cortex - Rename API routes: /api/swift/* → /api/cortex/* - Rename page routes: /epd/swift → /epd/cortex - Rename store: swift-store.ts → cortex-store.ts Type Renames: - SwiftIntent → CortexIntent - SwiftStore → CortexStore - useSwiftStore → useCortexStore - SwiftContext → CortexContext - useSwiftVoice → useCortexVoice Documentation Updates (docs/intent/): - Safety Net → Nudge (Layer 3 rename) - SafetySuggestion → NudgeSuggestion - evaluateSafetyNet → evaluateNudge - SWIFT_* feature flags → CORTEX_* - All path references updated to match new structure Files affected: 47 files, ~700 lines changed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,10 +6,10 @@ import type { VerpleegkundigCategory } from '@/lib/types/report';
|
||||
// Database types
|
||||
export type Patient = Database['public']['Tables']['patients']['Row'];
|
||||
|
||||
// Swift-specific types
|
||||
// Cortex-specific types
|
||||
export type ShiftType = 'nacht' | 'ochtend' | 'middag' | 'avond';
|
||||
|
||||
export type SwiftIntent =
|
||||
export type CortexIntent =
|
||||
| 'dagnotitie'
|
||||
| 'zoeken'
|
||||
| 'overdracht'
|
||||
@@ -19,7 +19,7 @@ export type SwiftIntent =
|
||||
| 'reschedule_appointment'
|
||||
| 'unknown';
|
||||
|
||||
export type BlockType = Exclude<SwiftIntent, 'unknown'> | 'fallback' | 'patient-dashboard';
|
||||
export type BlockType = Exclude<CortexIntent, 'unknown'> | 'fallback' | 'patient-dashboard';
|
||||
|
||||
// Chat types (v3.0)
|
||||
export type ChatMessageType = 'user' | 'assistant' | 'system' | 'error';
|
||||
@@ -33,7 +33,7 @@ export interface ChatMessage {
|
||||
}
|
||||
|
||||
export interface ChatAction {
|
||||
intent: SwiftIntent;
|
||||
intent: CortexIntent;
|
||||
entities: ExtractedEntities;
|
||||
confidence: number;
|
||||
artifact?: {
|
||||
@@ -71,14 +71,14 @@ export interface Artifact {
|
||||
// Recent action for the Recent Strip
|
||||
export interface RecentAction {
|
||||
id: string;
|
||||
intent: SwiftIntent;
|
||||
intent: CortexIntent;
|
||||
label: string;
|
||||
timestamp: Date;
|
||||
patientName?: string;
|
||||
}
|
||||
|
||||
// Store interface
|
||||
interface SwiftStore {
|
||||
interface CortexStore {
|
||||
// Context
|
||||
activePatient: Patient | null;
|
||||
shift: ShiftType;
|
||||
@@ -167,7 +167,7 @@ const initialState = {
|
||||
};
|
||||
|
||||
// Create the store
|
||||
export const useSwiftStore = create<SwiftStore>()(
|
||||
export const useCortexStore = create<CortexStore>()(
|
||||
devtools(
|
||||
(set, get) => ({
|
||||
...initialState,
|
||||
@@ -372,7 +372,7 @@ export const useSwiftStore = create<SwiftStore>()(
|
||||
reset: () => set(initialState, false, 'reset'),
|
||||
}),
|
||||
{
|
||||
name: 'swift-store',
|
||||
name: 'cortex-store',
|
||||
}
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user