Skip to content

Commit 058c922

Browse files
committed
feat(requirement): 增加前后端的支持 & 增加官网的链接
1 parent 8c4bdd0 commit 058c922

4 files changed

Lines changed: 72 additions & 21 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ Through the above introduction and Demo demonstration, you must be curious about
4949
- Continuous integration: Utilize DevOps tools for continuous integration to automate code integration and testing.
5050
- Software version release: Deploy software versions to the target environment using DevOpsGPT and DevOps tools.
5151

52+
## Use Cloud Services
53+
Vists [kuafuai.net](https://www.kuafuai.net)
54+
5255
## Quick Start
5356

5457
1. Run with source code

backend/app/pkgs/prompt/requirement_basic.py

Lines changed: 63 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,6 @@
5151
]
5252
```
5353
54-
## 接口类型
55-
如RESTful API或GraphQL或GRPC等
56-
57-
## 请求方式
58-
POST、GET、DELETE、PUT等,没有请忽略
59-
60-
## 调用路径或调用方法
61-
path or method
62-
6354
## 请求体参数
6455
```python
6556
[
@@ -81,6 +72,59 @@
8172
]
8273
```
8374
""")
75+
FRONTEND_BACKEND = _("""
76+
## Original Requirements
77+
Develop one ...
78+
79+
Product Goals
80+
```python
81+
[
82+
"Create a ...",
83+
]
84+
```
85+
86+
User Stories
87+
```python
88+
[
89+
"As a user, ...",
90+
]
91+
```
92+
93+
## Frontend Design
94+
UI/UX Design
95+
```python
96+
[
97+
"Three-column layout ...",
98+
]
99+
```
100+
101+
Frontend Business logic
102+
```python
103+
[
104+
"Request the back-end interface to pass parameters ...",
105+
]
106+
107+
## Backend RESTful API
108+
请求体参数
109+
```python
110+
[
111+
"name, type",
112+
]
113+
```
114+
115+
响应体参数
116+
```python
117+
[
118+
"name, type",
119+
]
120+
```
121+
122+
Backend Business logic
123+
```python
124+
[
125+
"Accept request parameter: ...",
126+
]
127+
""")
84128
DOC_GAME = _("""
85129
## 游戏名称
86130
pingpang game...
@@ -177,6 +221,8 @@ def clarifyRequirement(self, requirementID, userPrompt, globalContext, appArchit
177221
PRDTemplate = DOC_BACKEND
178222
elif service["service_type"] == "GAME":
179223
PRDTemplate = DOC_GAME
224+
elif service["service_type"] == "FRONTEND_BACKEND":
225+
PRDTemplate = FRONTEND_BACKEND
180226

181227
# todo 这个参数暂时不要调整,过多的澄清会导致出现幻觉,并且程序在获取澄清列表的时候也需要调整
182228
maxCycle = 2
@@ -276,11 +322,9 @@ def organize(requirementID, firstPrompt, PRDTemplate, appArchitecture, service_l
276322
"""+appArchitecture+"""
277323
```
278324
279-
Output carefully referenced "Format example" in format.
280-
## Format example
325+
Output carefully referenced "Format example" in format in """+getCurrentLanguageName()+""".
326+
# Format example
281327
"""+PRDTemplate+"""
282-
283-
Note: Please respond in """+getCurrentLanguageName()+""".
284328
"""
285329
})
286330

@@ -319,21 +363,19 @@ def adjust(requirementID, userPrompt, PRDTemplate, appArchitecture, service_list
319363
Organize.append({
320364
"role": "system",
321365
"content": """
322-
Role: You are a professional software developer, your task is to modify the requirements document based on the feedback received and provide the revised final document content without altering the original structure of the requirements document.
323-
324-
Directly modify the original content to give the final document, there is no need to explain which part is modified.
366+
Keep the structure of the requirements document unchanged Re-generate the requirements document based on feedback below.
325367
326-
## requirements document
368+
feedback
327369
```
328-
"""+last_prd+"""
370+
"""+userPrompt+"""
329371
```
330372
331-
## feedback list
373+
requirements document
332374
```
333-
"""+userPrompt+"""
375+
"""+last_prd+"""
334376
```
335377
336-
Output modified requirement document content in """+getCurrentLanguageName()+""" directly.
378+
Output modified final requirement document content directly in """+getCurrentLanguageName()+""".
337379
"""
338380
})
339381

docs/README_CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
- 持续集成:使用 DevOps 工具进行持续集成,确保代码的集成和测试过程自动化。
6161
- 软件版本发布:通过 DevOpsGPT 和 DevOps 工具,将软件版本发布到目标环境。
6262

63+
## 在线环境
64+
直接访问 [kuafuai.net](https://www.kuafuai.net)
65+
66+
6367
## 快速开始
6468

6569
1. 源码运行

frontend/static/js/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ $(document).ready(function () {
118118
<select class="ui fluid dropdown" id="service_service_type_`+serviceID+`">
119119
<option value="FRONTEND">前端/移动端(Frontend/Mobile)</option>
120120
<option value="BACKEND">后端服务(Backend)</option>
121+
<option value="FRONTEND_BACKEND">前端+后端(Frontend + Backend)</option>
121122
<option value="GAME">游戏(GAME)</option>
122123
<option value="COMMON">其它(Others)</option>
123124
</select>
@@ -244,6 +245,7 @@ function showApp(appID, isTpl) {
244245
<label>`+globalFrontendText["service_type"]+`</label>
245246
<select class="ui fluid dropdown" id="service_service_type_`+idx+`" value=`+service.service_type+`>
246247
<option value="FRONTEND">前端/移动端(Frontend/Mobile)</option>
248+
<option value="FRONTEND_BACKEND">前端+后端(Frontend + Backend)</option>
247249
<option value="BACKEND">后端服务(Backend)</option>
248250
<option value="GAME">游戏(GAME)</option>
249251
<option value="COMMON">其它(Others)</option>

0 commit comments

Comments
 (0)