Skip to content

Commit

Permalink
✨ feat: 完善插件开发模板的基础内容
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Sep 3, 2023
1 parent 7899fdf commit 8d354b4
Show file tree
Hide file tree
Showing 14 changed files with 272 additions and 152 deletions.
47 changes: 0 additions & 47 deletions .dumirc.ts

This file was deleted.

19 changes: 0 additions & 19 deletions .fatherrc.ts

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ yarn-error.log
.history
CNAME
/build
/public
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TOBE DONE
## ⌨️ Local Development

You can use Gitpod for online development:

``
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][gitpod-url]

Or clone it for local development:
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,32 @@
"not ie <= 10"
],
"dependencies": {
"@lobehub/chat-plugin-sdk": "^1",
"@lobehub/chat-plugin-sdk": "^1.15.1",
"@lobehub/chat-plugins-gateway": "^1",
"@lobehub/ui": "latest",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"antd": "^5",
"antd-style": "^3",
"dayjs": "^1",
"next": "^13.4.19",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-layout-kit": "^1"
},
"devDependencies": {
"@lobehub/lint": "latest",
"@lobehub/ui": "latest",
"@vercel/node": "^2",
"@vitest/coverage-v8": "latest",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^17",
"cross-env": "^7",
"eslint": "^8",
"father": "^4.3.1",
"husky": "^8",
"lint-staged": "^13",
"lucide-react": "latest",
"prettier": "^3",
"semantic-release": "^21",
"typescript": "^5",
"vercel": "^32",
"vitest": "latest"
}
}
29 changes: 17 additions & 12 deletions public/manifest-dev.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"identifier": "chat-plugin-template",
"version": "1",
"api": [
{
"url": "http://localhost:3400/api/v1",
"name": "greetUser",
"description": "当用户说出 hello 后,你需要问候用户,并祝他开心",
"url": "http://localhost:3400/api/clothes",
"name": "recommendClothes",
"description": "根据用户的心情,给用户推荐他有的衣服",
"parameters": {
"properties": {
"nickname": {
"description": "用户的名字,例如:张三 等",
"mood": {
"description": "用户当前的心情,可选值有:开心(happy), 难过(sad),生气 (anger),害怕(fear),惊喜( surprise),厌恶 (disgust)",
"enums": ["happy", "sad", "anger", "fear", "surprise", "disgust"],
"type": "string"
},
"gender": {
"type": "string",
"enum": ["man", "woman"],
"description": "用户的性别"
}
},
"required": [
"nickname"
],
"required": ["mood", "gender"],
"type": "object"
}
}
],
"gateway": "http://localhost:3400/api/gateway",
"identifier": "chat-plugin-template",
"ui": {

}
"url": "http://localhost:3400",
"height": 200
},
"version": "1"
}
26 changes: 0 additions & 26 deletions public/manifest.json

This file was deleted.

173 changes: 173 additions & 0 deletions src/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
export const manClothes = {
anger: [
{
description: '这款黑色皮夹克可以让你在生气时释放压力。',
name: '黑色皮夹克',
},
{
description: '这款深红色的衬衫可以让你在生气时感到力量。',
name: '深红色长袖衬衫',
},
{
description: '这款军绿色的工装裤可以让你在生气时感到坚韧。',
name: '军绿色工装裤',
},
],
disgust: [
{
description: '这款黑色的T恤可以让你在厌恶时感到冷静。',
name: '黑色修身T恤',
},
{
description: '这款深色的裤子可以让你在厌恶时感到自在。',
name: '深色直筒休闲裤',
},
{
description: '这款军绿色的夹克可以让你在厌恶时感到坚定。',
name: '军绿色工装夹克',
},
],
fear: [
{
description: '这款宽松的卫衣可以让你在害怕时感到安全。',
name: '灰色宽松连帽卫衣',
},
{
description: '这款黑色的裤子可以让你在害怕时感到舒适。',
name: '黑色直筒休闲裤',
},
{
description: '这款深色的夹克可以让你在害怕时感到保护。',
name: '深蓝色牛仔夹克',
},
],
happy: [
{
description: '这款明亮的T恤可以增强你的快乐气氛。',
name: '亮黄色夏日T恤',
},
{
description: '这款活泼的短裤可以让你的心情保持愉快。',
name: '卡通图案运动短裤',
},
{
description: '这款色彩明亮的衬衫可以让你看起来更加开朗。',
name: '彩色条纹休闲衬衫',
},
],
sad: [
{
description: '舒适的卫衣可以让你在难过的时候感到舒适。',
name: '深色宽松卫衣',
},
{
description: '这款深色的夹克可以让你在难过的时候感到安慰。',
name: '黑色牛仔夹克',
},
{
description: '简单的黑色T恤可以让你在难过的时候感到平静。',
name: '简洁黑色长袖T恤',
},
],
surprise: [
{
description: '这款亮色的T恤可以让你在惊喜时感到愉悦。',
name: '亮色图案T恤',
},
{
description: '这款鲜艳的短裤可以让你在惊喜时感到活力。',
name: '鲜艳色彩运动短裤',
},
{
description: '这款多彩条纹的衬衫可以让你在惊喜时感到快乐。',
name: '多彩条纹衬衫',
},
],
};

export const womanClothes = {
anger: [
{
description: '这款黑色皮夹克可以让你在生气时释放压力。',
name: '黑色皮夹克',
},
{
description: '这款深红色的衬衫可以让你在生气时感到力量。',
name: '深红色长袖衬衫',
},
{
description: '这款军绿色的工装裤可以让你在生气时感到坚韧。',
name: '军绿色工装裤',
},
],
disgust: [
{
description: '这款黑色的连衣裙可以让你在厌恶时感到冷静。',
name: '黑色修身连衣裙',
},
{
description: '这款深色的裤子可以让你在厌恶时感到自在。',
name: '深色直筒休闲裤',
},
{
description: '这款军绿色的夹克可以让你在厌恶时感到坚定。',
name: '军绿色工装夹克',
},
],
fear: [
{
description: '这款宽松的卫衣可以让你在害怕时感到安全。',
name: '灰色宽松连帽卫衣',
},
{
description: '这款黑色的裤子可以让你在害怕时感到舒适。',
name: '黑色直筒休闲裤',
},
{
description: '这款深色的夹克可以让你在害怕时感到保护。',
name: '深蓝色牛仔夹克',
},
],
happy: [
{
description: '这款明亮的连衣裙可以增强你的快乐气氛。',
name: '亮黄色夏日连衣裙',
},
{
description: '这款活泼的短裤可以让你的心情保持愉快。',
name: '卡通图案运动短裤',
},
{
description: '这款色彩明亮的衬衫可以让你看起来更加开朗。',
name: '彩色条纹休闲衬衫',
},
],
sad: [
{
description: '舒适的连衣裙可以让你在难过的时候感到舒适。',
name: '深色宽松连衣裙',
},
{
description: '这款深色的夹克可以让你在难过的时候感到安慰。',
name: '黑色牛仔夹克',
},
{
description: '简单的黑色T恤可以让你在难过的时候感到平静。',
name: '简洁黑色长袖T恤',
},
],
surprise: [
{
description: '这款亮色的连衣裙可以让你在惊喜时感到愉悦。',
name: '亮色图案连衣裙',
},
{
description: '这款鲜艳的短裤可以让你在惊喜时感到活力。',
name: '鲜艳色彩运动短裤',
},
{
description: '这款多彩条纹的衬衫可以让你在惊喜时感到快乐。',
name: '多彩条纹衬衫',
},
],
};
5 changes: 0 additions & 5 deletions src/pages/_app.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/pages/_document.tsx

This file was deleted.

Loading

0 comments on commit 8d354b4

Please sign in to comment.