diff --git a/content.config.ts b/content.config.ts index 6e0282d..0958c7c 100644 --- a/content.config.ts +++ b/content.config.ts @@ -34,7 +34,7 @@ export default defineContentConfig({ }) }), skills: defineCollection({ - type: 'data', + type: 'page', source: 'skills.json', schema: z.object({ description: z.string(), @@ -74,7 +74,7 @@ export default defineContentConfig({ }) }), contact: defineCollection({ - type: 'data', + type: 'page', source: 'contact.json', schema: z.object({ body: z.array(z.object({ diff --git a/content/hobbies.md b/content/hobbies.md index ccb9e91..4ffc9df 100644 --- a/content/hobbies.md +++ b/content/hobbies.md @@ -1,5 +1,5 @@ --- -title: Balance and Drive: Beyond the Data +title: "Balance and Drive: Beyond the Data" description: Exploring my passions outside of data science and machine learning engineering that fuel my creativity and performance. --- diff --git a/content/skills.json b/content/skills.json index 6fdb710..0480c32 100644 --- a/content/skills.json +++ b/content/skills.json @@ -2,7 +2,7 @@ "description": "As a software engineer and mathematics student, I combine scientific rigor with technical pragmatism to design solutions tailored to the challenges of data and mathematical projects. My approach focuses on a deep understanding of needs, from data preparation to deployment, while emphasizing modeling and performance optimization.Passionate about artificial intelligence and data science, I strive to balance innovation with statistical robustness. Always eager to learn, I explore both technological advancements and entrepreneurial or financial challenges. Curious and enthusiastic, I enjoy sharing knowledge and discovering new concepts, whether in theorems or emerging technologies.", "body": [ { - "id": "Programming", + "id": "programming", "name": "Programming", "items": [ { diff --git a/server/api/uses_by_category.get.ts b/server/api/uses_by_category.get.ts new file mode 100644 index 0000000..236be00 --- /dev/null +++ b/server/api/uses_by_category.get.ts @@ -0,0 +1,18 @@ +import { queryCollection } from '@nuxt/content/server' +import { z } from 'zod' + +const querySchema = z.object({ + categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']) +}) + +export default defineCachedEventHandler(async (event) => { + const { categoryName } = await getValidatedQuery(event, querySchema.parse) + + return await queryCollection(event, 'uses') + .where('extension', '=', 'md') + .where('category', '=', categoryName) + .all() +}, { + name: 'uses-list', + maxAge: 3600 // 1 hour +}) diff --git a/server/routes/mcp.ts b/server/routes/mcp.ts index 59f6fc5..a6d6325 100644 --- a/server/routes/mcp.ts +++ b/server/routes/mcp.ts @@ -187,7 +187,7 @@ function createServer() { title: 'Get Resume Link', description: 'Provide a link to download Arthur Danjou\'s resume in the requested language.', inputSchema: { - // @ts-expect-error zod inference issue + // @ts-expect-error - need to wait for support for zod 4 lang: z.enum(['en', 'fr']).describe('The language for the resume, \'en\' or \'fr\'.') } }, @@ -200,14 +200,33 @@ function createServer() { } ) - // Prompts : toutes les commandes de artchat + server.registerTool( + 'get_uses_by_category', + { + title: 'Get Uses by Category', + description: 'Retrieves uses Arthur Danjou uses filtered by a specific category.', + inputSchema: { + // @ts-expect-error - need to wait for support for zod 4 + categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']).describe('The name of the category to filter uses by.') + } + }, + async (params: { categoryName: 'homelab' | 'ide' | 'hardware' | 'software' }) => { + const result = await $fetch('/api/uses_by_category', { query: params }) + return { + content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], + structuredContent: result as unknown + } + } + ) + + // Prompts server.registerPrompt( 'artmcp-resume', { title: 'Get Resume of Arthur Danjou', description: 'Get Resume in French or English format of Arthur Danjou', argsSchema: { - // @ts-expect-error zod inference issue + // @ts-expect-error - need to wait for support for zod 4 lang: z.enum(['en', 'fr']).describe('The language for the resume, \'en\' or \'fr\'.') } }, @@ -338,6 +357,31 @@ function createServer() { } ) + server.registerPrompt( + 'get_uses_by_category', + { + title: 'Get Uses by Category', + description: 'Retrieves uses Arthur Danjou uses filtered by a specific category.', + argsSchema: { + // @ts-expect-error - need to wait for support for zod 4 + categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']).describe('Type of project (dashboard, landing page, admin panel, etc.)') + } + }, + async ({ categoryName }) => { + return { + messages: [ + { + role: 'user', + content: { + type: 'text', + text: `How can I view the setup of Arthur for this category : ${categoryName}?` + } + } + ] + } + } + ) + return server }