mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 23:11:52 +08:00
feat: support Alibaba & Apache dubbo service
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { getLLMText, source } from '@/lib/source';
|
||||
import { getLLMText, source } from "@/lib/source";
|
||||
|
||||
export async function loader() {
|
||||
const scan = source.getPages().map(getLLMText);
|
||||
const scanned = await Promise.all(scan);
|
||||
const scan = source.getPages().map(getLLMText);
|
||||
const scanned = await Promise.all(scan);
|
||||
|
||||
return new Response(scanned.join('\n\n'));
|
||||
}
|
||||
return new Response(scanned.join("\n\n"));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { source } from '@/lib/source';
|
||||
import { llms } from 'fumadocs-core/source';
|
||||
import { source } from "@/lib/source";
|
||||
import { llms } from "fumadocs-core/source";
|
||||
|
||||
export function loader() {
|
||||
return new Response(llms(source).index());
|
||||
}
|
||||
return new Response(llms(source).index());
|
||||
}
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
import type { Route } from './+types/mdx';
|
||||
import { getLLMText, source } from '@/lib/source';
|
||||
import type { Route } from "./+types/mdx";
|
||||
import { getLLMText, source } from "@/lib/source";
|
||||
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const slugs = params['*'].split('/').filter((v) => v.length > 0);
|
||||
// remove the appended "content.md"
|
||||
slugs.pop();
|
||||
const page = source.getPage(slugs);
|
||||
if (!page) {
|
||||
return new Response('not found', { status: 404 });
|
||||
}
|
||||
return new Response(await getLLMText(page), {
|
||||
headers: {
|
||||
'Content-Type': 'text/markdown; charset=utf-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
const slugs = params["*"].split("/").filter((v) => v.length > 0);
|
||||
// remove the appended "content.md"
|
||||
slugs.pop();
|
||||
const page = source.getPage(slugs);
|
||||
if (!page) {
|
||||
return new Response("not found", { status: 404 });
|
||||
}
|
||||
return new Response(await getLLMText(page), {
|
||||
headers: {
|
||||
"Content-Type": "text/markdown; charset=utf-8",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user