mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🔧 chore: Update workflow and github action
This commit is contained in:
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -23,6 +23,9 @@ jobs:
|
||||
- name: Test
|
||||
run: bun run test
|
||||
|
||||
- name: Workflow
|
||||
run: bun run workflow:readme
|
||||
|
||||
- name: Release
|
||||
run: bun run release
|
||||
env:
|
||||
|
||||
16
README.md
16
README.md
@@ -124,8 +124,8 @@ In our agent market. We have accumulated a large number of practical, prompt age
|
||||
|
||||
| Recent Submits | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [Sketch Feature Summary Expert](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | Skilled at extracting key changes from Sketch release notes<br/>`Experience Design` `sketch` `update` `feature` `text summary` |
|
||||
| [Master of Debating](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | Simulates people who enjoy debating and can express counterarguments to any user input<br/>`Writing` `Dialogue` |
|
||||
| [Sketch Feature Summary Expert](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | Skilled at extracting key changes from Sketch release notes<br/>`experience-design` `sketch` `update` `feature` `text-summary` |
|
||||
| [Master of Debating](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | Simulates people who enjoy debating and can express counterarguments to any user input<br/>`writing` `dialogue` |
|
||||
| [Graph Generator](https://chat-preview.lobehub.com/market?agent=graph-generator)<br/><sup>By **[choldrim](https://github.com/choldrim)** on **2023-10-23**</sup> | Automatic Graph Generator<br/>`graph` |
|
||||
| [Master of Naming](https://chat-preview.lobehub.com/market?agent=meaningful-name)<br/><sup>By **[yingxirz](https://github.com/yingxirz)** on **2023-10-18**</sup> | Provides concise and meaningful names for your artistic creations.<br/>`naming` `creative` |
|
||||
|
||||
@@ -297,12 +297,12 @@ Plugins provide a means to extend the [Function Calling][fc-link] capabilities o
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
| Official Plugin | Description |
|
||||
| --------------------------------------------------------------------------- | -------------------------------------- |
|
||||
| [Clock Time](https://github.com/lobehub/chat-plugin-clock-time) | display a clock to show current time |
|
||||
| [Website Crawler](https://github.com/lobehub/chat-plugin-web-crawler) | Extract content from web links |
|
||||
| [Search Engine](https://github.com/lobehub/chat-plugin-search-engine) | Query search engine to get information |
|
||||
| [Realtime Weather](https://github.com/lobehub/chat-plugin-realtime-weather) | Get realtime weather information |
|
||||
| Official Plugin | Repository | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| [Clock Time](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | [lobehub/chat-plugin-clock-time](https://github.com/lobehub/chat-plugin-clock-time) | Display a clock to show current time<br/>`clock` `time` |
|
||||
| [Website Crawler](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-17**</sup> | [lobehub/chat-plugin-web-crawler](https://github.com/lobehub/chat-plugin-web-crawler) | Extract content from web links<br/>`web` `content-crawler` |
|
||||
| [Search Engine](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-15**</sup> | [lobehub/chat-plugin-search-engine](https://github.com/lobehub/chat-plugin-search-engine) | Query search engine to get information<br/>`web` `search` |
|
||||
| [Realtime Weather](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-12**</sup> | [lobehub/chat-plugin-realtime-weather](https://github.com/lobehub/chat-plugin-realtime-weather) | Get realtime weather information<br/>`weather` `realtime` |
|
||||
|
||||
> 📊 Total plugins: [<kbd>**4**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ $ docker run -d -p 3210:3210 \
|
||||
|
||||
## 📦 生态系统
|
||||
|
||||
| NPM | 代码库 | 描述 | 版本 |
|
||||
| NPM | 仓库 | 描述 | 版本 |
|
||||
| ------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | Lobe UI 是一个专为构建 AIGC 网页应用程序而设计的开源 UI 组件库。 | [![][lobe-ui-shield]][lobe-ui-link] |
|
||||
| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeLint 为 LobeHub 提供 ESlint,Stylelint,Commitlint,Prettier,Remark 和 Semantic Release 的配置。 | [![][lobe-lint-shield]][lobe-lint-link] |
|
||||
@@ -301,12 +301,12 @@ $ docker run -d -p 3210:3210 \
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
| 官方插件 | 插件说明 |
|
||||
| ------------------------------------------------------------------- | -------------------------- |
|
||||
| [时钟时间](https://github.com/lobehub/chat-plugin-clock-time) | 显示一个时钟来展示当前时间 |
|
||||
| [网站爬虫](https://github.com/lobehub/chat-plugin-web-crawler) | 从网页链接中提取内容 |
|
||||
| [搜索引擎](https://github.com/lobehub/chat-plugin-search-engine) | 查询搜索引擎以获取信息 |
|
||||
| [实时天气](https://github.com/lobehub/chat-plugin-realtime-weather) | 获取实时天气信息 |
|
||||
| 官方插件 | 仓库 | 插件描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------- |
|
||||
| [时钟时间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | [lobehub/chat-plugin-clock-time](https://github.com/lobehub/chat-plugin-clock-time) | 显示一个时钟来展示当前时间<br/>`时钟` `时间` |
|
||||
| [网站爬虫](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-17**</sup> | [lobehub/chat-plugin-web-crawler](https://github.com/lobehub/chat-plugin-web-crawler) | 从网页链接中提取内容<br/>`网页` `内容爬取器` |
|
||||
| [搜索引擎](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-15**</sup> | [lobehub/chat-plugin-search-engine](https://github.com/lobehub/chat-plugin-search-engine) | 查询搜索引擎以获取信息<br/>`网络` `搜索` |
|
||||
| [实时天气](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-12**</sup> | [lobehub/chat-plugin-realtime-weather](https://github.com/lobehub/chat-plugin-realtime-weather) | 获取实时天气信息<br/>`天气` `实时` |
|
||||
|
||||
> 📊 Total plugins: [<kbd>**4**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface DataItem {
|
||||
}
|
||||
|
||||
export const MARKET_URL = 'https://chat-preview.lobehub.com/market';
|
||||
export const PLGUIN_URL = 'https://chat-preview.lobehub.com/settings/agent';
|
||||
export const AGENT_EN_URL = 'https://chat-agents.lobehub.com/index.json';
|
||||
export const AGENT_CN_URL = 'https://chat-agents.lobehub.com/index.zh-CN.json';
|
||||
export const AGENT_REPO = 'https://github.com/lobehub/lobe-chat-agents';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { markdownTable } from 'markdown-table';
|
||||
import qs from 'query-string';
|
||||
|
||||
import { AGENT_REPO, AGENT_SPLIT, DataItem, MARKET_URL } from './const';
|
||||
import { fetchAgentIndex, genLink, readReadme, updateReadme, writeReadme } from './utlis';
|
||||
import { fetchAgentIndex, genLink, genTags, readReadme, updateReadme, writeReadme } from './utlis';
|
||||
|
||||
const genAgentTable = (data: DataItem[], lang: string) => {
|
||||
const isCN = lang === 'zh-CN';
|
||||
@@ -18,16 +18,10 @@ const genAgentTable = (data: DataItem[], lang: string) => {
|
||||
),
|
||||
`<sup>By **${genLink(item.author, item.homepage)}** on **${item.createAt}**</sup>`,
|
||||
].join('<br/>'),
|
||||
[
|
||||
item.meta.description,
|
||||
item.meta.tags
|
||||
.filter(Boolean)
|
||||
.map((tag) => `\`${tag}\``)
|
||||
.join(' '),
|
||||
].join('<br/>'),
|
||||
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
|
||||
]);
|
||||
return markdownTable([
|
||||
[isCN ? '最近新增' : 'Recent Submits', isCN ? '助手说明' : 'Description'],
|
||||
isCN ? ['最近新增', '助手说明'] : ['Recent Submits', 'Description'],
|
||||
...content,
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
import { consola } from 'consola';
|
||||
import { markdownTable } from 'markdown-table';
|
||||
|
||||
import { DataItem, PLUGIN_REPO, PLUGIN_SPLIT } from './const';
|
||||
import { fetchPluginIndex, genLink, readReadme, updateReadme, writeReadme } from './utlis';
|
||||
import { DataItem, PLGUIN_URL, PLUGIN_REPO, PLUGIN_SPLIT } from './const';
|
||||
import { fetchPluginIndex, genLink, genTags, readReadme, updateReadme, writeReadme } from './utlis';
|
||||
|
||||
const genPluginTable = (data: DataItem[], lang: string) => {
|
||||
const isCN = lang === 'zh-CN';
|
||||
const content = data
|
||||
.filter((item) => item.author === 'LobeHub')
|
||||
.map((item) => [genLink(item.meta.title, item.homepage), item.meta.description]);
|
||||
.map((item) => [
|
||||
[
|
||||
genLink(item.meta.title, PLGUIN_URL),
|
||||
`<sup>By **${item.author}** on **${item.createAt}**</sup>`,
|
||||
].join('<br/>'),
|
||||
genLink(item.homepage.split('github.com/')[1], item.homepage),
|
||||
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
|
||||
]);
|
||||
return markdownTable([
|
||||
[isCN ? '官方插件' : 'Official Plugin', isCN ? '插件说明' : 'Description'],
|
||||
isCN ? ['官方插件', '仓库', '插件描述'] : ['Official Plugin', 'Repository', 'Description'],
|
||||
...content,
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { kebabCase } from 'lodash';
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
@@ -24,6 +25,12 @@ export const fetchPluginIndex = async (lang: string) => {
|
||||
|
||||
export const genLink = (title: string, url: string) => `[${title}](${url})`;
|
||||
|
||||
export const genTags = (tags: string[]) =>
|
||||
tags
|
||||
.filter(Boolean)
|
||||
.map((tag) => `\`${kebabCase(tag)}\``)
|
||||
.join(' ');
|
||||
|
||||
const getReadmePath = (lang: string) => {
|
||||
const isCN = lang === 'zh-CN';
|
||||
return resolve(__dirname, '../../', isCN ? `./README.zh-CN.md` : `./README.md`);
|
||||
|
||||
Reference in New Issue
Block a user