diff --git a/.bunfig.toml b/.bunfig.toml
new file mode 100644
index 0000000..d6bb75b
--- /dev/null
+++ b/.bunfig.toml
@@ -0,0 +1,3 @@
+[install.lockfile]
+
+save = false
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 7707b1a..ae2208c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -4,6 +4,7 @@
- [ ] ✨ feat
- [ ] 🐛 fix
+- [ ] ♻️ refactor
- [ ] 💄 style
- [ ] 🔨 chore
- [ ] 📝 docs
diff --git a/.github/workflows/contributor-help.yml b/.github/workflows/contributor-help.yml
deleted file mode 100644
index cc48142..0000000
--- a/.github/workflows/contributor-help.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: Contributor Helper
-
-on:
- schedule: [{ cron: '0 18 * * *' }]
- workflow_dispatch:
-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: '/'
-
- - name: Commit and push if changed
- run: |-
- git diff
- git config --global user.name "lobehubbot"
- git config --global user.email "i@lobehub.com"
- git pull
- git add -A
- git commit -m "🤖 docs: Auto update contributors" || exit 0
- git push
diff --git a/.github/workflows/issue-auto-comments.yml b/.github/workflows/issue-auto-comments.yml
new file mode 100644
index 0000000..65b3c98
--- /dev/null
+++ b/.github/workflows/issue-auto-comments.yml
@@ -0,0 +1,72 @@
+name: Issue Auto Comment
+on:
+ issues:
+ types:
+ - opened
+ - closed
+ - assigned
+ pull_request_target:
+ types:
+ - opened
+ - closed
+
+permissions:
+ contents: read
+
+jobs:
+ run:
+ permissions:
+ issues: write # for actions-cool/issues-helper to update issues
+ pull-requests: write # for actions-cool/issues-helper to update PRs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Auto Comment on Issues Opened
+ uses: wow-actions/auto-comment@v1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
+ issuesOpened: |
+ 👀 @{{ author }}
+ Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
+ Please make sure you have given us as much context as possible.\
+ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
+ - name: Auto Comment on Issues Closed
+ uses: wow-actions/auto-comment@v1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
+ issuesClosed: |
+ ✅ @{{ author }}
+
+ This issue is closed, If you have any questions, you can comment and reply.\
+ 此问题已经关闭。如果您有任何问题,可以留言并回复。
+ - name: Auto Comment on Pull Request Opened
+ uses: wow-actions/auto-comment@v1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN}}
+ pullRequestOpened: |
+ 👍 @{{ author }}
+
+ Thank you for raising your pull request and contributing to our Community
+ Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
+ If you encounter any problems, please feel free to connect with us.\
+ 非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
+ 如果您遇到任何问题,请随时与我们联系。
+ - name: Auto Comment on Pull Request Merged
+ uses: actions-cool/pr-welcome@main
+ if: github.event.pull_request.merged == true
+ with:
+ token: ${{ secrets.GH_TOKEN }}
+ comment: |
+ ❤️ Great PR @${{ github.event.pull_request.user.login }} ❤️
+
+ The growth of project is inseparable from user feedback and contribution, thanks for your contribution!\
+ 项目的成长离不开用户反馈和贡献,感谢您的贡献!
+ emoji: 'hooray'
+ pr-emoji: '+1, heart'
+ - name: Remove inactive
+ if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: 'remove-labels'
+ token: ${{ secrets.GH_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: 'Inactive'
diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml
index d37c4c3..a5ae1fb 100644
--- a/.github/workflows/issue-check-inactive.yml
+++ b/.github/workflows/issue-check-inactive.yml
@@ -18,5 +18,6 @@ jobs:
uses: actions-cool/issues-helper@v3
with:
actions: 'check-inactive'
+ token: ${{ secrets.GH_TOKEN }}
inactive-label: 'Inactive'
inactive-day: 30
diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml
index 68d6b6c..e64d0cd 100644
--- a/.github/workflows/issue-close-require.yml
+++ b/.github/workflows/issue-close-require.yml
@@ -18,29 +18,35 @@ jobs:
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
+ token: ${{ secrets.GH_TOKEN }}
labels: '✅ Fixed'
inactive-day: 3
body: |
- Since the issue was labeled with `✅ Fixed`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
-
+ 👋 @{{ github.event.issue.user.login }}
+
+ Since the issue was labeled with `✅ Fixed`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\
由于该 issue 被标记为已修复,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
- name: need reproduce
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
+ token: ${{ secrets.GH_TOKEN }}
labels: '🤔 Need Reproduce'
inactive-day: 3
body: |
- Since the issue was labeled with `🤔 Need Reproduce`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
-
+ 👋 @{{ github.event.issue.user.login }}
+
+ Since the issue was labeled with `🤔 Need Reproduce`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\
由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
- name: need reproduce
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
+ token: ${{ secrets.GH_TOKEN }}
labels: "🙅🏻♀️ WON'T DO"
inactive-day: 3
body: |
- Since the issue was labeled with `🙅🏻♀️ WON'T DO`, and no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
-
+ 👋 @{{ github.event.issue.user.login }}
+
+ Since the issue was labeled with `🙅🏻♀️ WON'T DO`, and no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\
由于该 issue 被标记为暂不处理,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
diff --git a/.github/workflows/issue-remove-inactive.yml b/.github/workflows/issue-remove-inactive.yml
deleted file mode 100644
index dbe42dd..0000000
--- a/.github/workflows/issue-remove-inactive.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Issue Remove Inactive
-
-on:
- issues:
- types: [edited]
- issue_comment:
- types: [created, edited]
-
-permissions:
- contents: read
-
-jobs:
- issue-remove-inactive:
- permissions:
- issues: write # for actions-cool/issues-helper to update issues
- pull-requests: write # for actions-cool/issues-helper to update PRs
- runs-on: ubuntu-latest
- steps:
- - name: remove inactive
- if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
- uses: actions-cool/issues-helper@v3
- with:
- actions: 'remove-labels'
- issue-number: ${{ github.event.issue.number }}
- labels: 'Inactive'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index aae65a7..148e7e5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,53 +5,29 @@ on:
- main
jobs:
- test:
- name: Test
+ release:
+ name: Release
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
-
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- with:
- version: 8
+ - uses: actions/checkout@v4
- - name: Setup Node.js environment
- uses: actions/setup-node@v3
- with:
- node-version: '18'
+ - name: Install bun
+ uses: oven-sh/setup-bun@v1
- name: Install deps
- run: pnpm install
+ run: bun i
- name: CI
- run: pnpm run ci
+ run: bun run ci
- name: Test
- run: pnpm run test
+ run: bun run test
- release:
- needs: test
- name: Release
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- with:
- version: 8
-
- - name: Setup Node.js environment
- uses: actions/setup-node@v3
- with:
- node-version: '18'
-
- - name: Install deps
- run: pnpm install
+ - name: Build
+ run: bun run build
- - name: release
- run: pnpm run release
+ - name: Release
+ run: bun run release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 5a7ecde..9e0238f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,31 +1,27 @@
-name: Test
-on: [push]
-
+name: Test CI
+on:
+ pull_request:
+ 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: 8
+ steps:
+ - uses: actions/checkout@v4
- - name: Setup Node.js environment
- uses: actions/setup-node@v3
- with:
- node-version: '18'
+ - name: Install bun
+ uses: oven-sh/setup-bun@v1
- name: Install deps
- run: pnpm install
+ run: bun i
- name: CI
- run: pnpm run ci
+ run: bun run ci
- name: Test and coverage
- run: pnpm run test:coverage
+ run: bun run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
diff --git a/.gitignore b/.gitignore
index 7eea562..8235041 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,4 @@ test-output
.vercel
public/dist
docs-dist
+bun.lockb
\ No newline at end of file
diff --git a/README.md b/README.md
index b798d8d..427a6f8 100644
--- a/README.md
+++ b/README.md
@@ -10,18 +10,18 @@
This plugin allows for the use of the SerpApi search engine
-[Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
-
-
-
-[![plugin][plugin-shield]][plugin-url]
-[![releaseDate][release-date-shield]][release-date-url]
-[![ciTest][ci-test-shield]][ci-test-url]
-[![ciRelease][ci-release-shield]][ci-release-url]
-[![contributors][contributors-shield]][contributors-url]
-[![forks][forks-shield]][forks-url]
-[![stargazers][stargazers-shield]][stargazers-url]
-[![issues][issues-shield]][issues-url]
+[![][🤯-🧩-lobehub-shield]][🤯-🧩-lobehub-link]
+[![][github-release-shield]][github-release-link]
+[![][github-releasedate-shield]][github-releasedate-link]
+[![][github-action-test-shield]][github-action-test-link]
+[![][github-action-release-shield]][github-action-release-link]
+[![][github-contributors-shield]][github-contributors-link]
+[![][github-forks-shield]][github-forks-link]
+[![][github-stars-shield]][github-stars-link]
+[![][github-issues-shield]][github-issues-link]
+[![][github-license-shield]][github-license-link]
+
+[Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
@@ -33,8 +33,10 @@ This plugin allows for the use of the SerpApi search engine
#### TOC
- [🤯 Usage](#-usage)
+- [📦 Plugin Ecosystem](#-plugin-ecosystem)
- [⌨️ Local Development](#️-local-development)
- [🤝 Contributing](#-contributing)
+- [🔗 Links](#-links)
####
@@ -50,19 +52,36 @@ This is a function calling plugin for [Lobe Chat](https://github.com/lobehub/lob
+## 📦 Plugin Ecosystem
+
+Plugins provide a means to extend the \[Function Calling]\[fc-link] capabilities of LobeChat. They can be used to introduce new function calls and even new ways to render message results. If you are interested in plugin development, please refer to our [📘 Plugin Development Guide](https://github.com/lobehub/lobe-chat/wiki/Plugin-Development) in the Wiki.
+
+- [lobe-chat-plugins][lobe-chat-plugins]: This is the plugin index for LobeChat. It accesses index.json from this repository to display a list of available plugins for LobeChat to the user.
+- [chat-plugin-template][chat-plugin-template]: This is the plugin template for LobeChat plugin development.
+- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
+- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: The LobeChat Plugins Gateway is a backend service that provides a gateway for LobeChat plugins. We deploy this service using Vercel. The primary API POST /api/v1/runner is deployed as an Edge Function.
+
+