feat: 添加 cnb-board 路由及相关功能,获取 live 的 repo、构建、PR、NPC 和评论信息,并更新文档
fix: 更新 SKILL.md 文件格式,调整 metadata 标签位置
This commit is contained in:
23
assistant/src/routes/cnb-board/index.ts
Normal file
23
assistant/src/routes/cnb-board/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { app } from '../../app.ts';
|
||||
import { getLiveMdContent } from './live/live-content.ts';
|
||||
import './cnb-dev-env.ts';
|
||||
import z from 'zod';
|
||||
app.route({
|
||||
path: 'cnb-board',
|
||||
key: 'live',
|
||||
description: '获取cnb-board live的mdContent内容',
|
||||
middleware: ['auth-admin'],
|
||||
metadata: {
|
||||
args: {
|
||||
more: z.boolean().optional().describe('是否获取更多系统信息,默认false'),
|
||||
}
|
||||
}
|
||||
}).define(async (ctx) => {
|
||||
const more = ctx.query?.more ?? false
|
||||
const list = getLiveMdContent({ more: more });
|
||||
ctx.body = {
|
||||
title: '开发环境模式配置',
|
||||
list,
|
||||
};
|
||||
}).addTo(app);
|
||||
|
||||
Reference in New Issue
Block a user