mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 13:54:01 +01:00
- 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.
47 lines
885 B
TypeScript
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[]
|
|
}
|