diff --git a/apps/waterfall-wiki/src/components/GuidanceShell.tsx b/apps/waterfall-wiki/src/components/GuidanceShell.tsx
index 9f88625..bcc5985 100644
--- a/apps/waterfall-wiki/src/components/GuidanceShell.tsx
+++ b/apps/waterfall-wiki/src/components/GuidanceShell.tsx
@@ -1,4 +1,4 @@
import Link from 'next/link';
import type {ReactNode} from 'react';
import s from '@/styles/guidance.module.css';
-export default function GuidanceShell({children}:{children:ReactNode}){return
↗ 织页 实验版登录 / 注册 ↗{children}
}
+export default function GuidanceShell({children}:{children:ReactNode}){return
↗ 织页 实验版登录 / 注册 ↗{children}
}
diff --git a/apps/waterfall-wiki/src/pages/index.tsx b/apps/waterfall-wiki/src/pages/index.tsx
index a0943b7..200d64f 100644
--- a/apps/waterfall-wiki/src/pages/index.tsx
+++ b/apps/waterfall-wiki/src/pages/index.tsx
@@ -1,7 +1,7 @@
import Head from 'next/head';
import Link from 'next/link';
-import {useState} from 'react';
+import {useEffect,useState} from 'react';
import GuidanceShell from '@/components/GuidanceShell';
import {guides} from '@/content/guides/catalog';
import s from '@/styles/guidance.module.css';
-export default function Home(){const[q,setQ]=useState(''),[kind,setKind]=useState('all');const items=guides.filter(g=>(kind==='all'||g.kind===kind)&&`${g.title} ${g.summary} ${g.tags.join(' ')}`.toLowerCase().includes(q.toLowerCase()));return 织页 · 为 Agent 找到下一页A WEB OF USEFUL KNOWLEDGE
一个起点, 连接下一种可能。
每一篇文档,都能独立帮助你的 Agent。 从当前问题出发,沿着有用的链接继续探索。
{['代码审查','规划','验证'].map(t=>)}
从这里开始 {items.length} 篇
协议样例 · v0.1
{items.map(g=>
{g.kind==='guide'?'↗':'≋'}
织页 / protocol-examples · r{g.revision}
{g.title}
{g.summary}
{g.tags.map(t=>{t})}↗ {g.links.length} 个关联
)}{!items.length&&
没有匹配文档,请尝试其他关键词或分类。
}
}
+export default function Home(){const [published,setPublished]=useState<{id:string;revision:number;title:string;summary:string;kind:string}[]>([]),[loadError,setLoadError]=useState('');useEffect(()=>{fetch('/api/documents').then(async r=>{const b=await r.json();if(!r.ok)throw Error(b.error);setPublished(b.documents);}).catch(e=>setLoadError(e.message));},[]);const[q,setQ]=useState(''),[kind,setKind]=useState('all');const items=guides.filter(g=>(kind==='all'||g.kind===kind)&&`${g.title} ${g.summary} ${g.tags.join(' ')}`.toLowerCase().includes(q.toLowerCase()));return 织页 · 为 Agent 找到下一页A WEB OF USEFUL KNOWLEDGE