Skip to content

Commit 38a6cdc

Browse files
feat: Translate voice input to text and append it.(#6212) (#6234)
* feat: Conversation content is deletable‌ * feat: Translate voice input to text and append it.(#6212) --------- Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
1 parent 20382fc commit 38a6cdc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • ui/src/components/ai-chat/component/chat-input-operate

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@
209209
@keydown.enter="sendChatHandle($event)"
210210
@paste="handlePaste"
211211
class="chat-operate-textarea"
212+
clearable
212213
/>
213214
<div class="operate flex-between">
214215
<div>
@@ -803,7 +804,8 @@ const uploadRecording = async (audioBlob: Blob) => {
803804
}
804805
speechToTextAPI(props.applicationDetails.id as string, formData, speechLoading)
805806
.then((response) => {
806-
inputValue.value = typeof response.data === 'string' ? response.data : ''
807+
const newText = typeof response.data === 'string' ? response.data : ''
808+
inputValue.value = inputValue.value ? `${inputValue.value} ${newText}` : newText
807809
// 自动发送
808810
if (props.applicationDetails.stt_autosend) {
809811
nextTick(() => {

0 commit comments

Comments
 (0)