mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
feat: supprimer les outils inutilisés dans le dossier shared/utils/tools
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
import type { Activity } from '~~/types'
|
||||
|
||||
export type ActivityUIToolInvocation = UIToolInvocation<typeof activityTool>
|
||||
|
||||
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<Activity>('/api/activity')
|
||||
}
|
||||
})
|
||||
@@ -1,25 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
import { z } from 'zod'
|
||||
|
||||
export type resourceUIToolInvocation = UIToolInvocation<typeof resourceTool>
|
||||
|
||||
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}`)
|
||||
}
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
import { z } from 'zod'
|
||||
|
||||
export type ResumesUIToolInvocation = UIToolInvocation<typeof resumesTool>
|
||||
|
||||
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}`
|
||||
}
|
||||
})
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
import type { Stats } from '~~/types'
|
||||
|
||||
export type StatsUIToolInvocation = UIToolInvocation<typeof statsTool>
|
||||
|
||||
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<Stats>('/api/stats')
|
||||
}
|
||||
})
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
|
||||
export type StatusPageUIToolInvocation = UIToolInvocation<typeof statusPageTool>
|
||||
|
||||
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')
|
||||
}
|
||||
})
|
||||
@@ -1,17 +0,0 @@
|
||||
import type { UIToolInvocation } from 'ai'
|
||||
import { tool } from 'ai'
|
||||
import { z } from 'zod'
|
||||
|
||||
export type UsesByCategoryUIToolInvocation = UIToolInvocation<typeof usesByCategoryTool>
|
||||
|
||||
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)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user