Skip to content

Commit 8d354b4

Browse files
committed
✨ feat: 完善插件开发模板的基础内容
1 parent 7899fdf commit 8d354b4

File tree

14 files changed

+272
-152
lines changed

14 files changed

+272
-152
lines changed

.dumirc.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

.fatherrc.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ yarn-error.log
2020
.history
2121
CNAME
2222
/build
23-
/public

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ TOBE DONE
6666
## ⌨️ Local Development
6767

6868
You can use Gitpod for online development:
69-
69+
``
7070
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][gitpod-url]
7171

7272
Or clone it for local development:

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,32 @@
3535
"not ie <= 10"
3636
],
3737
"dependencies": {
38-
"@lobehub/chat-plugin-sdk": "^1",
38+
"@lobehub/chat-plugin-sdk": "^1.15.1",
3939
"@lobehub/chat-plugins-gateway": "^1",
40+
"@lobehub/ui": "latest",
4041
"@types/react": "18.2.21",
4142
"@types/react-dom": "18.2.7",
4243
"antd": "^5",
44+
"antd-style": "^3",
45+
"dayjs": "^1",
4346
"next": "^13.4.19",
4447
"react": "^18.2.0",
4548
"react-dom": "^18.2.0",
4649
"react-layout-kit": "^1"
4750
},
4851
"devDependencies": {
4952
"@lobehub/lint": "latest",
50-
"@lobehub/ui": "latest",
5153
"@vercel/node": "^2",
5254
"@vitest/coverage-v8": "latest",
53-
"babel-plugin-antd-style": "^1.0.4",
5455
"commitlint": "^17",
5556
"cross-env": "^7",
5657
"eslint": "^8",
5758
"father": "^4.3.1",
5859
"husky": "^8",
5960
"lint-staged": "^13",
60-
"lucide-react": "latest",
6161
"prettier": "^3",
6262
"semantic-release": "^21",
6363
"typescript": "^5",
64-
"vercel": "^32",
6564
"vitest": "latest"
6665
}
6766
}

public/manifest-dev.json

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"identifier": "chat-plugin-template",
3-
"version": "1",
42
"api": [
53
{
6-
"url": "http://localhost:3400/api/v1",
7-
"name": "greetUser",
8-
"description": "当用户说出 hello 后,你需要问候用户,并祝他开心",
4+
"url": "http://localhost:3400/api/clothes",
5+
"name": "recommendClothes",
6+
"description": "根据用户的心情,给用户推荐他有的衣服",
97
"parameters": {
108
"properties": {
11-
"nickname": {
12-
"description": "用户的名字,例如:张三 等",
9+
"mood": {
10+
"description": "用户当前的心情,可选值有:开心(happy), 难过(sad),生气 (anger),害怕(fear),惊喜( surprise),厌恶 (disgust)",
11+
"enums": ["happy", "sad", "anger", "fear", "surprise", "disgust"],
1312
"type": "string"
13+
},
14+
"gender": {
15+
"type": "string",
16+
"enum": ["man", "woman"],
17+
"description": "用户的性别"
1418
}
1519
},
16-
"required": [
17-
"nickname"
18-
],
20+
"required": ["mood", "gender"],
1921
"type": "object"
2022
}
2123
}
2224
],
2325
"gateway": "http://localhost:3400/api/gateway",
26+
"identifier": "chat-plugin-template",
2427
"ui": {
25-
26-
}
28+
"url": "http://localhost:3400",
29+
"height": 200
30+
},
31+
"version": "1"
2732
}

public/manifest.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/data.ts

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
export const manClothes = {
2+
anger: [
3+
{
4+
description: '这款黑色皮夹克可以让你在生气时释放压力。',
5+
name: '黑色皮夹克',
6+
},
7+
{
8+
description: '这款深红色的衬衫可以让你在生气时感到力量。',
9+
name: '深红色长袖衬衫',
10+
},
11+
{
12+
description: '这款军绿色的工装裤可以让你在生气时感到坚韧。',
13+
name: '军绿色工装裤',
14+
},
15+
],
16+
disgust: [
17+
{
18+
description: '这款黑色的T恤可以让你在厌恶时感到冷静。',
19+
name: '黑色修身T恤',
20+
},
21+
{
22+
description: '这款深色的裤子可以让你在厌恶时感到自在。',
23+
name: '深色直筒休闲裤',
24+
},
25+
{
26+
description: '这款军绿色的夹克可以让你在厌恶时感到坚定。',
27+
name: '军绿色工装夹克',
28+
},
29+
],
30+
fear: [
31+
{
32+
description: '这款宽松的卫衣可以让你在害怕时感到安全。',
33+
name: '灰色宽松连帽卫衣',
34+
},
35+
{
36+
description: '这款黑色的裤子可以让你在害怕时感到舒适。',
37+
name: '黑色直筒休闲裤',
38+
},
39+
{
40+
description: '这款深色的夹克可以让你在害怕时感到保护。',
41+
name: '深蓝色牛仔夹克',
42+
},
43+
],
44+
happy: [
45+
{
46+
description: '这款明亮的T恤可以增强你的快乐气氛。',
47+
name: '亮黄色夏日T恤',
48+
},
49+
{
50+
description: '这款活泼的短裤可以让你的心情保持愉快。',
51+
name: '卡通图案运动短裤',
52+
},
53+
{
54+
description: '这款色彩明亮的衬衫可以让你看起来更加开朗。',
55+
name: '彩色条纹休闲衬衫',
56+
},
57+
],
58+
sad: [
59+
{
60+
description: '舒适的卫衣可以让你在难过的时候感到舒适。',
61+
name: '深色宽松卫衣',
62+
},
63+
{
64+
description: '这款深色的夹克可以让你在难过的时候感到安慰。',
65+
name: '黑色牛仔夹克',
66+
},
67+
{
68+
description: '简单的黑色T恤可以让你在难过的时候感到平静。',
69+
name: '简洁黑色长袖T恤',
70+
},
71+
],
72+
surprise: [
73+
{
74+
description: '这款亮色的T恤可以让你在惊喜时感到愉悦。',
75+
name: '亮色图案T恤',
76+
},
77+
{
78+
description: '这款鲜艳的短裤可以让你在惊喜时感到活力。',
79+
name: '鲜艳色彩运动短裤',
80+
},
81+
{
82+
description: '这款多彩条纹的衬衫可以让你在惊喜时感到快乐。',
83+
name: '多彩条纹衬衫',
84+
},
85+
],
86+
};
87+
88+
export const womanClothes = {
89+
anger: [
90+
{
91+
description: '这款黑色皮夹克可以让你在生气时释放压力。',
92+
name: '黑色皮夹克',
93+
},
94+
{
95+
description: '这款深红色的衬衫可以让你在生气时感到力量。',
96+
name: '深红色长袖衬衫',
97+
},
98+
{
99+
description: '这款军绿色的工装裤可以让你在生气时感到坚韧。',
100+
name: '军绿色工装裤',
101+
},
102+
],
103+
disgust: [
104+
{
105+
description: '这款黑色的连衣裙可以让你在厌恶时感到冷静。',
106+
name: '黑色修身连衣裙',
107+
},
108+
{
109+
description: '这款深色的裤子可以让你在厌恶时感到自在。',
110+
name: '深色直筒休闲裤',
111+
},
112+
{
113+
description: '这款军绿色的夹克可以让你在厌恶时感到坚定。',
114+
name: '军绿色工装夹克',
115+
},
116+
],
117+
fear: [
118+
{
119+
description: '这款宽松的卫衣可以让你在害怕时感到安全。',
120+
name: '灰色宽松连帽卫衣',
121+
},
122+
{
123+
description: '这款黑色的裤子可以让你在害怕时感到舒适。',
124+
name: '黑色直筒休闲裤',
125+
},
126+
{
127+
description: '这款深色的夹克可以让你在害怕时感到保护。',
128+
name: '深蓝色牛仔夹克',
129+
},
130+
],
131+
happy: [
132+
{
133+
description: '这款明亮的连衣裙可以增强你的快乐气氛。',
134+
name: '亮黄色夏日连衣裙',
135+
},
136+
{
137+
description: '这款活泼的短裤可以让你的心情保持愉快。',
138+
name: '卡通图案运动短裤',
139+
},
140+
{
141+
description: '这款色彩明亮的衬衫可以让你看起来更加开朗。',
142+
name: '彩色条纹休闲衬衫',
143+
},
144+
],
145+
sad: [
146+
{
147+
description: '舒适的连衣裙可以让你在难过的时候感到舒适。',
148+
name: '深色宽松连衣裙',
149+
},
150+
{
151+
description: '这款深色的夹克可以让你在难过的时候感到安慰。',
152+
name: '黑色牛仔夹克',
153+
},
154+
{
155+
description: '简单的黑色T恤可以让你在难过的时候感到平静。',
156+
name: '简洁黑色长袖T恤',
157+
},
158+
],
159+
surprise: [
160+
{
161+
description: '这款亮色的连衣裙可以让你在惊喜时感到愉悦。',
162+
name: '亮色图案连衣裙',
163+
},
164+
{
165+
description: '这款鲜艳的短裤可以让你在惊喜时感到活力。',
166+
name: '鲜艳色彩运动短裤',
167+
},
168+
{
169+
description: '这款多彩条纹的衬衫可以让你在惊喜时感到快乐。',
170+
name: '多彩条纹衬衫',
171+
},
172+
],
173+
};

src/pages/_app.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/pages/_document.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)