From e8190fc19437ec5aaa03e10dd6aea874904e931d Mon Sep 17 00:00:00 2001 From: abearxiong Date: Wed, 21 Jan 2026 00:13:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=93=BE=E6=8E=A5=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pay/link.md | 11 ++++++++++- package.json | 1 + src/generated/docs.ts | 12 +++++++++++- src/main.ts | 4 +++- src/routes/todo.ts | 26 ++++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 3 deletions(-) diff --git a/docs/pay/link.md b/docs/pay/link.md index bc5099e..dd02624 100644 --- a/docs/pay/link.md +++ b/docs/pay/link.md @@ -1 +1,10 @@ -开源jeepay支付 https://github.com/jeequan/jeepay \ No newline at end of file +# 相关链接 + +## 开源jeepay支付 +地址 https://github.com/jeequan/jeepay + +## 开源gopay支付 +地址 https://github.com/go-pay/gopay + +## 开源Yansongda支付 +地址 https://pay.yansongda.cn/ \ No newline at end of file diff --git a/package.json b/package.json index 22b99d8..53495c2 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "docs:build": "vitepress build", "docs:preview": "vitepress preview", "postbuild": "pnpm docs:build", + "prebuild": "bun src/inline.ts", "pub": "ev deploy .vitepress/dist -k frontend-starter-skill -v 0.0.1 -u -y y" }, "keywords": [], diff --git a/src/generated/docs.ts b/src/generated/docs.ts index cebab4f..410787e 100644 --- a/src/generated/docs.ts +++ b/src/generated/docs.ts @@ -1338,9 +1338,19 @@ features: --- `; -export const link = `开源jeepay支付 https://github.com/jeequan/jeepay`; +export const link = `# 相关链接 + +## 开源jeepay支付 +地址 https://github.com/jeequan/jeepay + +## 开源gopay支付 +地址 https://github.com/go-pay/gopay + +## 开源Yansongda支付 +地址 https://pay.yansongda.cn/`; export const pay_summary = `# 国内国外支付方式大合集 +[Github](https://github.com/chengxuyuanchuhai/chuhai-tools-all-in-one) 本指南由[程序员出海社群](https://chengxuyuanchuhai.com/)创建,版权所有。 diff --git a/src/main.ts b/src/main.ts index 1376e81..f892f6b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,4 +6,6 @@ import './routes/index.ts'; export const docsAgentPlugin: Plugin = createRouterAgentPluginFn({ // @ts-ignore router: app.router, -}); \ No newline at end of file +}); + +export { app } \ No newline at end of file diff --git a/src/routes/todo.ts b/src/routes/todo.ts index 134ff37..fc27526 100644 --- a/src/routes/todo.ts +++ b/src/routes/todo.ts @@ -163,3 +163,29 @@ app.route({ }).addTo(app); +app.route({ + path: 'web-todo', + key: 'help', + description: '获取资料库', + metadata: { + tags: ['opencode'], + ...createSkill({ + skill: 'help-web-todo', + title: '获取资料库', + summary: '根据获取的资料库提问', + args: { + question: tool.schema.string().describe('你可以问我任何关于模板的问题。'), + } + }) + } +}).define(async (ctx) => { + const docsKey = Object.keys(docs); + let base = ''; + for (const key of docsKey) { + if (key.includes('index')) continue; + base += `文档名称: ${key}\n内容预览: ${docs[key as keyof typeof docs].slice(0, 100)}...\n\n`; + } + ctx.body = { + content: `用户提出的问题: ${ctx.query?.question}\n\n请根据下面的资料库内容,给出详细的回答:\n\n${base}`, + } +}).addTo(app);