From e57a0cbb1f17e45904304984e64b107c6061a5c1 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Mon, 22 Dec 2025 19:40:06 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20supprimer=20les=20outils=20inutilis?= =?UTF-8?q?=C3=A9s=20dans=20le=20dossier=20shared/utils/tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/utils/tools/activity.ts | 12 ------------ shared/utils/tools/read-resources.ts | 25 ------------------------- shared/utils/tools/read-resume.ts | 15 --------------- shared/utils/tools/stats.ts | 12 ------------ shared/utils/tools/status-page.ts | 11 ----------- shared/utils/tools/uses-by-category.ts | 17 ----------------- 6 files changed, 92 deletions(-) delete mode 100644 shared/utils/tools/activity.ts delete mode 100644 shared/utils/tools/read-resources.ts delete mode 100644 shared/utils/tools/read-resume.ts delete mode 100644 shared/utils/tools/stats.ts delete mode 100644 shared/utils/tools/status-page.ts delete mode 100644 shared/utils/tools/uses-by-category.ts diff --git a/shared/utils/tools/activity.ts b/shared/utils/tools/activity.ts deleted file mode 100644 index ab7a69f..0000000 --- a/shared/utils/tools/activity.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' -import type { Activity } from '~~/types' - -export type ActivityUIToolInvocation = UIToolInvocation - -export const activityTool = tool({ - description: 'Real-time current activity and status of Arthur Danjou, including what he\'s currently working on', - execute: async () => { - return await $fetch('/api/activity') - } -}) diff --git a/shared/utils/tools/read-resources.ts b/shared/utils/tools/read-resources.ts deleted file mode 100644 index bd01385..0000000 --- a/shared/utils/tools/read-resources.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' -import { z } from 'zod' - -export type resourceUIToolInvocation = UIToolInvocation - -export const resourceTool = tool({ - description: 'Read a resource from the server API', - inputSchema: z.object({ - resource: z.enum([ - 'contact', - 'education', - 'experiences', - 'hobbies', - 'languages', - 'profile', - 'projects', - 'skills', - 'uses' - ]).describe('resource name') - }), - execute: async ({ resource }) => { - return await $fetch(`/api/${resource}`) - } -}) diff --git a/shared/utils/tools/read-resume.ts b/shared/utils/tools/read-resume.ts deleted file mode 100644 index f1c7182..0000000 --- a/shared/utils/tools/read-resume.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' -import { z } from 'zod' - -export type ResumesUIToolInvocation = UIToolInvocation - -export const resumesTool = tool({ - description: 'Retrieves a direct download link to Arthur Danjou\'s professional resume in the specified language. Supports both English and French versions.', - inputSchema: z.object({ - lang: z.enum(['en', 'fr']).describe('The language for the resume: \'en\' for English or \'fr\' for French.') - }), - execute: async ({ lang }) => { - return `/api/resumes/${lang}` - } -}) diff --git a/shared/utils/tools/stats.ts b/shared/utils/tools/stats.ts deleted file mode 100644 index cba3304..0000000 --- a/shared/utils/tools/stats.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' -import type { Stats } from '~~/types' - -export type StatsUIToolInvocation = UIToolInvocation - -export const statsTool = tool({ - description: 'Detailed coding statistics and analytics from WakaTime, including programming languages, time spent coding, and productivity metrics', - execute: async () => { - return await $fetch('/api/stats') - } -}) diff --git a/shared/utils/tools/status-page.ts b/shared/utils/tools/status-page.ts deleted file mode 100644 index bd71c84..0000000 --- a/shared/utils/tools/status-page.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' - -export type StatusPageUIToolInvocation = UIToolInvocation - -export const statusPageTool = tool({ - description: 'Real-time status, uptime monitoring, and incident reports for Arthur Danjou\'s homelab infrastructure, powered by UptimeKuma', - execute: async () => { - return await $fetch('/api/status-page') - } -}) diff --git a/shared/utils/tools/uses-by-category.ts b/shared/utils/tools/uses-by-category.ts deleted file mode 100644 index 615622d..0000000 --- a/shared/utils/tools/uses-by-category.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { UIToolInvocation } from 'ai' -import { tool } from 'ai' -import { z } from 'zod' - -export type UsesByCategoryUIToolInvocation = UIToolInvocation - -export const usesByCategoryTool = tool({ - description: 'Retrieves a filtered list of tools, software, and hardware used by Arthur Danjou based on a specific category. Available categories: homelab, IDE, hardware, and software.', - inputSchema: z.object({ - categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']).describe('The category to filter by: \'homelab\', \'ide\', \'hardware\', or \'software\'.') - }), - execute: async ({ categoryName }: { categoryName: 'homelab' | 'ide' | 'hardware' | 'software' }) => { - const uses = await $fetch<{ category: string }[]>('/api/uses') - - return uses.filter(use => use.category === categoryName) - } -})