Files
artchat/types/chat.ts
Arthur DANJOU 3fa4f574d3 refactor: update ESLint configuration and remove unused dependencies
- Replaced Nuxt ESLint configuration with Antfu's ESLint config.
- Removed 'nuxt-visitors' module from Nuxt configuration.
- Added linting scripts to package.json for easier code quality checks.
- Introduced a new API endpoint for fetching weather data from OpenWeather.
- Enhanced chat types with new enums and properties for better state management.
- Added OpenWeather response types for improved type safety.
- Updated social links in types/index.ts to include an email contact.
2025-09-02 17:45:01 +02:00

47 lines
885 B
TypeScript

export enum ChatType {
WEATHER = 'weather',
LOCATION = 'location',
THEME = 'theme',
LANGUAGE = 'language',
ABOUT = 'about',
PROJECTS = 'projects',
WRITINGS = 'writings',
EXPERIENCES = 'experiences',
SKILLS = 'skills',
HOBBIES = 'hobbies',
STACK = 'stack',
STATUS = 'status',
CREDITS = 'credits',
CONTACT = 'contact',
STATS = 'stats',
ACTIVITY = 'activity',
RESUME = 'resume',
INIT = 'init',
}
export enum ChatState {
SENT = 'sent',
LOADING = 'loading',
}
export enum ChatSender {
USER = 'user',
ARTHUR = 'arthur',
}
export enum ChatFetchState {
THINKING = 'Thinking...',
FETCHING = 'Fetching the data...',
GENERATING = 'Generating the component...',
DONE = 'Done!',
}
export interface ChatMessage {
id: number
content: string | null
sender: ChatSender
type: ChatType
state: ChatState
fetchStates?: ChatFetchState[]
}