fix: When automatic sending is not selected, the text conversion should be displayed in the position of the question input box#2946
Conversation
…ld be displayed in the position of the question input box
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| other_list: uploadOtherList.value | ||
| }) | ||
| inputValue.value = '' | ||
| uploadImageList.value = [] |
There was a problem hiding this comment.
The code has several improvements. First, redundant checks can be removed for recorderStatus.value in the uploadRecording function. Additionally, you should use an await keyword when calling .emit() inside .then() to ensure correct flow handling of asynchronous operations.
Updated Code:
@@ -688,13 +688,7 @@ const uploadRecording = async (audioBlob: Blob) => {
recorderStatus.value = 'TRANSCRIBING'
const formData = new FormData();
formData.append('file', audioBlob, 'recording.mp3');
- if (props.applicationDetails.stt_autosend) {
- bus.emit('on:transcribing', true);
- } else {
- // Optional message or status update here
- }
+ bus.emit('on:transcribing', true);
try {
const response = await applicationApi.postSpeechToText(
props.applicationDetails.id as string,
formData
);
In addition, there's a small typo which can be fixed by using single quotes throughout:
Original line with double quotes:
'other_list': uploadOtherList.value,Corrected version:
'other_list': uploadOtherList.value
fix: When automatic sending is not selected, the text conversion should be displayed in the position of the question input box