Sets up the basic project configuration for Cognitive Clarity. This includes: - Initializing `package.json` with necessary dependencies (React, Gemini API, Lucide React) and build scripts for Vite. - Creating a basic `index.html` with Tailwind CSS and Google Fonts integration. - Setting up `index.tsx` as the React application entry point. - Configuring `tsconfig.json` for TypeScript compilation with Vite. - Establishing `vite.config.ts` for development server setup and environment variable handling. - Adding a standard `.gitignore` file. - Updating `README.md` with local run instructions and AI Studio links. - Defining `metadata.json` for application details. - Creating core type definitions in `types.ts`. - Populating `constants.ts` with initial CBT glossary terms. - Adding utility functions for audio processing in `services/audioUtils.ts`.
42 lines
860 B
TypeScript
42 lines
860 B
TypeScript
|
|
export interface Scenario {
|
|
id: string;
|
|
title: string;
|
|
description: string;
|
|
category: 'Social Anxiety' | 'Workplace' | 'Relationships' | 'Self-Talk';
|
|
difficulty: 'Beginner' | 'Intermediate' | 'Advanced';
|
|
systemInstruction: string;
|
|
initialMessage: string;
|
|
cbtFocus: string[];
|
|
}
|
|
|
|
export interface Message {
|
|
id: string;
|
|
role: 'user' | 'model' | 'system';
|
|
text: string;
|
|
timestamp: Date;
|
|
isAnalysis?: boolean; // If true, this is a CBT analysis, not part of roleplay
|
|
}
|
|
|
|
export type SessionMode = 'text' | 'voice';
|
|
|
|
export interface AudioConfig {
|
|
sampleRate: number;
|
|
}
|
|
|
|
export interface AnalysisResult {
|
|
analysis: {
|
|
distortions: string[];
|
|
isAdaptive: boolean;
|
|
evidence: string;
|
|
};
|
|
rating: {
|
|
score: number;
|
|
reason: string;
|
|
};
|
|
suggestions: {
|
|
alternativeThought: string;
|
|
behavioralStep: string;
|
|
};
|
|
}
|