From f2491169e22400804ce3b9463cc353470d919fb6 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Mon, 27 Apr 2026 20:34:53 +0700 Subject: [PATCH] Fix: upgrade to Astro 6 content collections (config.ts -> loader API) --- ...agent-replay-47a38a07-3b39-4e33-8da2-ad3c7604975c.jsonl | 3 +++ .omc/state/subagent-tracking.json | 2 +- src/{content/config.ts => content.config.ts} | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) rename src/{content/config.ts => content.config.ts} (74%) diff --git a/.omc/state/agent-replay-47a38a07-3b39-4e33-8da2-ad3c7604975c.jsonl b/.omc/state/agent-replay-47a38a07-3b39-4e33-8da2-ad3c7604975c.jsonl index 3a3c7ff..f0862d4 100644 --- a/.omc/state/agent-replay-47a38a07-3b39-4e33-8da2-ad3c7604975c.jsonl +++ b/.omc/state/agent-replay-47a38a07-3b39-4e33-8da2-ad3c7604975c.jsonl @@ -3,3 +3,6 @@ {"t":0,"agent":"a7833f9","agent_type":"unknown","event":"agent_stop","success":true} {"t":0,"agent":"a43d42e","agent_type":"unknown","event":"agent_stop","success":true} {"t":0,"agent":"a4b63dd","agent_type":"unknown","event":"agent_stop","success":true} +{"t":0,"agent":"ab760b5","agent_type":"unknown","event":"agent_stop","success":true} +{"t":0,"agent":"a480718","agent_type":"unknown","event":"agent_stop","success":true} +{"t":0,"agent":"a462a28","agent_type":"unknown","event":"agent_stop","success":true} diff --git a/.omc/state/subagent-tracking.json b/.omc/state/subagent-tracking.json index ea50c15..56e8d76 100644 --- a/.omc/state/subagent-tracking.json +++ b/.omc/state/subagent-tracking.json @@ -3,5 +3,5 @@ "total_spawned": 0, "total_completed": 0, "total_failed": 0, - "last_updated": "2026-04-27T13:00:32.726Z" + "last_updated": "2026-04-27T13:31:47.934Z" } \ No newline at end of file diff --git a/src/content/config.ts b/src/content.config.ts similarity index 74% rename from src/content/config.ts rename to src/content.config.ts index 7bf9732..2ce15ab 100644 --- a/src/content/config.ts +++ b/src/content.config.ts @@ -1,7 +1,8 @@ import { defineCollection, z } from "astro:content" +import { glob } from "astro/loaders" const postCollection = defineCollection({ - type: "content", + loader: glob({ pattern: "**/*.mdx", base: "./src/content/posts" }), schema: z.object({ title: z.string(), description: z.string().optional(), @@ -11,7 +12,7 @@ const postCollection = defineCollection({ }) const pageCollection = defineCollection({ - type: "content", + loader: glob({ pattern: "**/*.mdx", base: "./src/content/pages" }), schema: z.object({ title: z.string(), description: z.string().optional(), @@ -19,7 +20,7 @@ const pageCollection = defineCollection({ }) const settingsCollection = defineCollection({ - type: "data", + loader: glob({ pattern: "**/*.json", base: "./src/content/settings" }), schema: z.object({ siteName: z.string(), siteDescription: z.string(),