Skip to content

Commit fad4ce9

Browse files
feat: The model directly generates optimized prompt words
1 parent 94d3bf3 commit fad4ce9

File tree

16 files changed

+263
-212
lines changed

16 files changed

+263
-212
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<div class="text-center mb-8" v-if="loading">
44
<el-button class="border-primary video-stop-button" @click="stopChat">
55
<app-icon iconName="app-video-stop" class="mr-8"></app-icon>
6-
{{ $t('chat.operation.stopChat') }}</el-button
7-
>
6+
{{ $t('chat.operation.stopChat') }}</el-button>
87
</div>
98
<div class="operate-textarea">
109
<el-scrollbar max-height="136">

ui/src/components/app-icon/icons/application.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,4 +718,26 @@ export default {
718718
])
719719
},
720720
},
721+
722+
'app-generate-star': {
723+
iconReader: () => {
724+
return h('i', [
725+
h(
726+
'svg',
727+
{
728+
style: { height: '100%', width: '100%' },
729+
viewBox: '0 0 1024 1024',
730+
version: '1.1',
731+
xmlns: 'http://www.w3.org/2000/svg',
732+
},
733+
[
734+
h('path', {
735+
d: 'M384 832c-12.8 0-25.6-8.533333-29.866667-21.333333l-34.133333-119.466667c-17.066667-55.466667-55.466667-93.866667-110.933333-110.933333L85.333333 541.866667c-12.8-4.266667-21.333333-17.066667-21.333333-29.866667 0-12.8 8.533333-25.6 21.333333-29.866667l119.466667-34.133333c55.466667-17.066667 93.866667-55.466667 110.933333-110.933333L354.133333 213.333333c4.266667-12.8 17.066667-21.333333 29.866667-21.333333 12.8 0 25.6 8.533333 29.866667 21.333333l34.133333 119.466667c17.066667 55.466667 55.466667 93.866667 110.933333 110.933333l119.466667 34.133334c12.8 4.266667 21.333333 17.066667 21.333333 29.866666 0 12.8-8.533333 25.6-21.333333 29.866667l-119.466667 34.133333c-55.466667 17.066667-93.866667 55.466667-110.933333 110.933334l-34.133333 128c-4.266667 12.8-17.066667 21.333333-29.866667 21.333333z m384-384c-12.8 0-25.6-8.533333-29.866667-25.6l-12.8-42.666667c-8.533333-38.4-42.666667-72.533333-81.066666-81.066666l-42.666667-12.8c-12.8-4.266667-25.6-17.066667-25.6-29.866667 0-12.8 8.533333-25.6 25.6-29.866667l42.666667-12.8c38.4-8.533333 72.533333-42.666667 81.066666-81.066666l12.8-42.666667c4.266667-12.8 17.066667-25.6 29.866667-25.6 12.8 0 25.6 8.533333 29.866667 25.6l12.8 42.666667c8.533333 38.4 42.666667 72.533333 81.066666 81.066666l42.666667 12.8c12.8 4.266667 25.6 17.066667 25.6 29.866667 0 12.8-8.533333 25.6-25.6 29.866667l-42.666667 12.8c-38.4 8.533333-72.533333 42.666667-81.066666 81.066666l-12.8 42.666667c-4.266667 17.066667-17.066667 25.6-29.866667 25.6z m-64 512c-12.8 0-25.6-8.533333-29.866667-21.333333l-17.066666-51.2c-4.266667-17.066667-21.333333-34.133333-38.4-38.4l-51.2-17.066667c-12.8-4.266667-21.333333-17.066667-21.333334-29.866667 0-12.8 8.533333-25.6 21.333334-29.866666l51.2-17.066667c17.066667-4.266667 34.133333-21.333333 38.4-38.4l17.066666-51.2c4.266667-12.8 17.066667-21.333333 29.866667-21.333333 12.8 0 25.6 8.533333 29.866667 21.333333l17.066666 51.2c4.266667 17.066667 21.333333 34.133333 38.4 38.4l51.2 17.066667c12.8 4.266667 21.333333 17.066667 21.333334 29.866666 0 12.8-8.533333 25.6-21.333334 29.866667l-51.2 17.066667c-17.066667 4.266667-34.133333 21.333333-38.4 38.4l-17.066666 51.2c-4.266667 12.8-17.066667 21.333333-29.866667 21.333333z',
736+
fill: 'currentColor',
737+
}),
738+
],
739+
),
740+
])
741+
},
742+
},
721743
}

ui/src/components/common-list/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ defineExpose({
7979
line-height: 24px;
8080
&.active {
8181
background: var(--el-color-primary-light-9);
82-
border-radius: var(--app-border-radius-base);
82+
border-radius: var();
8383
color: var(--el-color-primary);
8484
font-weight: 500;
8585
&:hover {
8686
background: var(--el-color-primary-light-9);
8787
}
8888
}
8989
&:hover {
90-
border-radius: var(--app-border-radius-base);
90+
border-radius: var();
9191
background: var(--app-text-color-light-1);
9292
}
9393
&.is-active {

ui/src/components/folder-tree/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,15 @@ onUnmounted(() => {
277277
margin-bottom: 4px;
278278
&.active {
279279
background: var(--el-color-primary-light-9);
280-
border-radius: var(--app-border-radius-base);
280+
border-radius: var();
281281
color: var(--el-color-primary);
282282
font-weight: 500;
283283
&:hover {
284284
background: var(--el-color-primary-light-9);
285285
}
286286
}
287287
&:hover {
288-
border-radius: var(--app-border-radius-base);
288+
border-radius: var();
289289
background: var(--app-text-color-light-1);
290290
}
291291
&.is-active {

ui/src/locales/lang/en-US/views/application.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ export default {
131131
},
132132
mcp_output_enable: 'Output MCP/Tool Execution Process',
133133
},
134-
buttons: {},
134+
generateDialog: {
135+
label: 'Generate',
136+
generatePrompt: 'Generate Prompt',
137+
placeholder: 'Please enter the prompt topic',
138+
},
135139
dialog: {
136140
addKnowledge: 'Add Related Knowledge',
137141
addKnowledgePlaceholder: 'The selected knowledge must use the same embedding model',

ui/src/locales/lang/zh-CN/views/application.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default {
6565
label: '系统角色',
6666
placeholder: '你是 xxx 小助手',
6767
},
68+
6869
prompt: {
6970
label: '提示词',
7071
noReferences: ' (无引用知识库)',
@@ -120,9 +121,13 @@ export default {
120121
start: '开始',
121122
end: '结束',
122123
},
123-
mcp_output_enable: '输出MCP/工具执行过程'
124+
mcp_output_enable: '输出MCP/工具执行过程',
125+
},
126+
generateDialog: {
127+
label: '生成',
128+
generatePrompt: '生成提示词',
129+
placeholder: '请输入提示词主题',
124130
},
125-
126131
dialog: {
127132
addKnowledge: '添加关联知识库',
128133
addKnowledgePlaceholder: '所选知识库必须使用相同的 Embedding 模型',

ui/src/locales/lang/zh-Hant/views/application.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ export default {
122122
},
123123
mcp_output_enable: '輸出MCP/工具執行過程',
124124
},
125-
125+
generateDialog: {
126+
label: '生成',
127+
generatePrompt: '生成提示詞',
128+
placeholder: '請輸入提示詞主題',
129+
},
126130
dialog: {
127131
addKnowledge: '新增關聯知識庫',
128132
addKnowledgePlaceholder: '所選知識庫必須使用相同的 Embedding 模型',

ui/src/styles/app.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,12 @@ h5 {
315315
.border-b-light {
316316
border-bottom: 1px solid var(--el-border-color-lighter);
317317
}
318-
.border-r-4 {
319-
border-radius: var(--app-border-radius-small);
320-
}
318+
321319
.border-r-6 {
322-
border-radius: var(--app-border-radius-base);
320+
border-radius: var();
323321
}
324322
.border-r-8 {
325-
border-radius: var(--app-border-radius-large);
323+
border-radius: var(--app-border-radius-base);
326324
}
327325

328326
.border-t-dashed {

ui/src/styles/component.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
}
112112
.el-dialog__header {
113113
padding: 16px 24px;
114+
.el-dialog__headerbtn {
115+
top: 8px;
116+
}
114117
}
115118
.el-dialog__body {
116119
border-top: 1px solid var(--el-border-color);

ui/src/styles/element-plus.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,13 @@
209209
.el-dialog {
210210
--el-dialog-padding-primary: 24px;
211211
--el-dialog-border-radius: 8px;
212+
--el-dialog-title-font-size: 16px;
212213
.el-dialog__body {
213214
color: var(--el-text-color-primary);
214215
}
215216
}
216217
.el-dialog__headerbtn {
217-
top: 8px;
218+
top: 12px;
218219
right: 8px;
219220
.el-dialog__close {
220221
font-size: 20px;

0 commit comments

Comments
 (0)