mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 15:54:03 +01:00
- Created a new article on "Understanding AI Agents, LLMs, and RAG" detailing the synergy between AI agents, LLMs, and Retrieval-Augmented Generation. - Added an introductory article on "What is Machine Learning?" covering types, model selection, workflow, and evaluation metrics. chore: setup ESLint and Nuxt configuration - Added ESLint configuration for code quality. - Initialized Nuxt configuration with various modules and settings for the application. chore: initialize package.json and TypeScript configuration - Created package.json for dependency management and scripts. - Added TypeScript configuration for the project. feat: implement API endpoints for activity and stats - Developed API endpoint to fetch user activity from Lanyard. - Created a stats endpoint to retrieve Wakatime coding statistics with caching. feat: add various assets and images - Included multiple images and assets for articles and projects. - Added placeholder files to maintain directory structure. refactor: define types for chat, lanyard, time, and wakatime - Created TypeScript types for chat messages, Lanyard activities, time formatting, and Wakatime statistics.
38 lines
1.3 KiB
Vue
38 lines
1.3 KiB
Vue
<script lang="ts" setup>
|
|
const props = withDefaults(defineProps<{
|
|
user?: 'user' | 'arthur'
|
|
}>(), {
|
|
user: 'user',
|
|
})
|
|
|
|
const isArthur = computed(() => props.user === 'arthur')
|
|
|
|
const { locale, locales } = useI18n({
|
|
useScope: 'local',
|
|
})
|
|
const currentLocale = computed(() => locales.value.find((l: { code: string }) => l.code === locale.value))
|
|
const formatted = computed(() => useDateFormat(useNow(), 'D MMMM YYYY, HH:mm', { locales: currentLocale.value?.code ?? 'en' }).value)
|
|
</script>
|
|
|
|
<template>
|
|
<div class="group flex flex-col gap-4">
|
|
<div class="flex flex-col-reverse gap-4 items-start md:flex-row-reverse">
|
|
<UCard
|
|
:variant="isArthur ? 'soft' : 'solid'"
|
|
class="rounded-xl p-2 mt-1"
|
|
:class="isArthur ? 'w-full bg-transparent !p-0' : 'bg-sky-300 md:max-w-3/4'"
|
|
:ui="{ body: isArthur ? 'p-0 sm:p-0' : 'sm:p-2', header: isArthur ? 'p-0 sm:p-0' : 'sm:p-2', footer: isArthur ? 'p-0 sm:p-0' : 'sm:p-2' }"
|
|
>
|
|
<slot />
|
|
</UCard>
|
|
<div v-if="isArthur" class="flex items-center gap-2">
|
|
<UAvatar src="/arthur.webp" size="lg" />
|
|
<span class="md:hidden">Arthur DANJOU</span>
|
|
</div>
|
|
</div>
|
|
<div class="opacity-0 group-hover:opacity-100 duration-500 flex" :class="isArthur ? 'justify-start ml-12' : 'justify-end'">
|
|
{{ formatted }}
|
|
</div>
|
|
</div>
|
|
</template>
|