Skip to content

Commit

Permalink
✨ feat: Add templates, workflows, and configuration files for chat ag…
Browse files Browse the repository at this point in the history
…ents

This commit introduces new features to the repository, including templates, workflows, and configuration files for chat agents. The changes involve the addition of JavaScript modules that perform tasks related to formatting and checking JSON schemas for agent data. The code includes functions to format and test JSON files, making use of external libraries.

Changes made:
- Added templates, workflows, and configuration files for chat agents
- Implemented JavaScript modules for formatting and checking JSON schemas
- Added functions to format and test JSON files
- Utilized external libraries for JSON manipulation

These changes were made to enhance the functionality of the repository and improve the handling of JSON data for chat agents.
  • Loading branch information
canisminor1990 committed Sep 1, 2023
0 parents commit e413c36
Show file tree
Hide file tree
Showing 20 changed files with 866 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#### 📝 信息 | Information

<!--- Repo url or any other thing you like to say --->

#### ✅ 检查列表 | Checklist:

<!--- Checkboxes will become clickable after submit, no need to fill them now --->

- [ ] 我已阅读了 [`Readme.md`](/~https://github.com/lobehub/lobe-chat-agents/)
- [ ] 描述是用英文编写的。
- [ ] `meta.json``agent_template.json` 没有被修改过。
- [ ] `entry` 放置在 `plugins` 目录中,并且使用 `.json` 文件扩展名。

---

- [ ] I have read the [`Readme.md`](/~https://github.com/lobehub/lobe-chat-agents/)
- [ ] The description is written in English.
- [ ] The `meta.json` and `agent_template.json` have not been modified.
- [ ] The `entry` is placed in the `plugins` directory with the `.json` file extension.
29 changes: 29 additions & 0 deletions .github/workflows/contributor-help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Contributor Helper

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
contributor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions-cool/contributor-helper@v1
with:
token: ${{ secrets.GH_TOKEN }}
style: 'simple'
update-files: 'README.md'
update-places: '<!-- CONTRIBUTION GROUP -->/<!-- CONTRIBUTION END -->'

- name: Commit and push if changed
run: |-
git diff
git config --global user.email "actions@github.com"
git config --global user.name "github-actions"
git pull
git add -A
git commit -m "🤖 docs: Auto update contributors" || exit 0
git push
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Release

on:
push:
branches:
- main

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: Test
run: pnpm run test
build:
needs: test
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: Format
run: pnpm run format
env:
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}

- name: Prettier
run: |
echo "module.exports = require('@lobehub/lint').prettier;" >> .prettierrc.js
pnpm run prettier
- name: Commit changes
run: |
git config user.name "lobehubbot"
git config user.email "i@lobehub.com"
git add .
git commit -m "🤖 chore: Auto format json files"
git push
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: lint
run: pnpm run test
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Gitignore for LobeHub
################################################################

# general
.DS_Store
.idea
.vscode
.history
.temp
.env.local
venv
temp
tmp

# dependencies
node_modules
*.log
*.lock
package-lock.json

# ci
.coverage
.eslintcache
.stylelintcache

# production
dist
es
logs
test-output

# umi
.umi
.umi-production
.umi-test
.dumi/tmp*

# husky
.husky/prepare-commit-msg

# misc
# add other ignore file below
public
.prettierrc.js
.eslintrc.js
.remarkrc.js
.env
11 changes: 11 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
lockfile=false
resolution-mode=highest
public-hoist-pattern[]=*@umijs/lint*
public-hoist-pattern[]=*changelog*
public-hoist-pattern[]=*remark*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*commitlint*
public-hoist-pattern[]=*postcss*
public-hoist-pattern[]=*semantic-release*
178 changes: 178 additions & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<a name="readme-top"></a>

<div align="center">

<img height="120" src="https://registry.npmmirror.com/@lobehub/assets-emoji/1.3.0/files/assets/robot.webp">
<img height="120" src="https://gw.alipayobjects.com/zos/kitchen/qJ3l3EPsdW/split.svg">
<img height="120" src="https://registry.npmmirror.com/@lobehub/assets-emoji/1.3.0/files/assets/convenience-store.webp">

<h1>Lobe Chat 助手索引</h1>

[**提交您的助手 >>**](/~https://github.com/lobehub/lobe-chat-agents/pulls)

[Lobe Chat](/~https://github.com/lobehub/lobe-chat) 从该存储库访问 [`index.json`](https://registry.npmmirror.com/@lobehub/lobe-chat-agents/latest/files) 来为用户展示可用的 LobeChat 助手列表。

[English](./README.md) · **简体中文**

<!-- SHIELD GROUP -->

![awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)
[![website][website-shield]][website-url]
[![ciTest][ci-test-shield]][ci-test-url]
[![ciRelease][ci-release-shield]][ci-release-url] <br/>
[![contributors][contributors-shield]][contributors-url]
[![forks][forks-shield]][forks-url]
[![stargazers][stargazers-shield]][stargazers-url]
[![issues][issues-shield]][issues-url]

![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

</div>

<details>
<summary><kbd>目录</kbd></summary>

#### TOC

- [🚀 如何提交您的助手](#-如何提交您的助手)

- [提交步骤](#提交步骤)

- [👀 注意事项](#-注意事项)

- [🛳 自主托管](#-自主托管)

- [部署到 Vercel](#部署到-vercel)

- [🤝 参与贡献](#-参与贡献)

####

</details>

## 🚀 如何提交您的助手

如果您想将助手添加到索引中,请使用 `agent_template.json``plugins` 目录中创建一个条目,编写简短的描述并适当标记,然后创建一个拉取请求。

### 提交步骤

1. <kbd>Fork</kbd> 这个存储库
2. 复制 `agent_template.json`
3. 填写副本并适当重命名
4. 将其移动到 `agents` 目录中
5. 提交一个拉取请求并等待审核

> 👉 **注意:** `createAt` 日期将在合并后自动填充。
<div align="right">

[![][back-to-top]](#readme-top)

</div>

## 👀 注意事项

- 并非所有的助手都会被接受,我们将审核助手并进行评估
- 即使您不是作者,也可以提交助手,但最好是由作者自己提交
- 如果您希望删除您的助手,或者认为描述不正确,请提交问题或拉取请求

<div align="right">

[![][back-to-top]](#readme-top)

</div>

## 🛳 自主托管

如果您想自己部署此服务,可以按照以下步骤操作

### 部署到 Vercel

单击下面的按钮以部署您的私有助手索引

[![Vercel][deploy-shield]][deploy-url]

<div align="right">

[![][back-to-top]](#readme-top)

</div>

## 🤝 参与贡献

<!-- CONTRIBUTION GROUP -->

> 📊 Total: <kbd>**4**</kbd>
<a href="/~https://github.com/arvinxx" title="arvinxx">
<img src="/~https://avatars.githubusercontent.com/u/28616219?v=4" width="50" />
</a>
<a href="/~https://github.com/canisminor1990" title="canisminor1990">
<img src="/~https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
</a>
<a href="/~https://github.com/actions-user" title="actions-user">
<img src="/~https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
</a>
<a href="/~https://github.com/lobehubbot" title="lobehubbot">
<img src="/~https://avatars.githubusercontent.com/u/134299653?v=4" width="50" />
</a>

<!-- CONTRIBUTION END -->

<div align="right">

[![][back-to-top]](#readme-top)

</div>

---

#### 📝 License

Copyright © 2023 [LobeHub][profile-url]. <br />
This project is [MIT](./LICENSE) licensed.

<!-- PLUGIN GROUP -->

[website-shield]: https://img.shields.io/website?down_message=offline&label=🤯%20chat-agents.lobehub.com&up_message=online&url=https%3A%2F%2Fchat-agents.lobehub.com&style=flat
[website-url]: https://chat-agents.lobehub.com

<!-- LINK GROUP -->

[profile-url]: /~https://github.com/lobehub
[deploy-shield]: https://vercel.com/button
[deploy-url]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat-agents&project-name=lobe-chat-agents&repository-name=lobe-chat-agents

<!-- SHIELD LINK GROUP -->

[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square

<!-- ciTest -->

[ci-test-shield]: /~https://github.com/lobehub/lobe-chat-agents/actions/workflows/test.yml/badge.svg
[ci-test-url]: /~https://github.com/lobehub/lobe-chat-agents/actions/workflows/test.yml

<!-- ciRelease -->

[ci-release-shield]: /~https://github.com/lobehub/lobe-chat-agents/actions/workflows/release.yml/badge.svg
[ci-release-url]: /~https://github.com/lobehub/lobe-chat-agents/actions/workflows/release.yml

<!-- contributors -->

[contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat-agents.svg?style=flat
[contributors-url]: /~https://github.com/lobehub/lobe-chat-agents/graphs/contributors

<!-- forks -->

[forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat-agents.svg?style=flat
[forks-url]: /~https://github.com/lobehub/lobe-chat-agents/network/members

<!-- stargazers -->

[stargazers-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat-agents.svg?style=flat
[stargazers-url]: /~https://github.com/lobehub/lobe-chat-agents/stargazers

<!-- issues -->

[issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat-agents.svg?style=flat
[issues-url]: /~https://github.com/lobehub/lobe-chat-agents/issues/new/choose
Loading

0 comments on commit e413c36

Please sign in to comment.