Skip to content

Commit 35a79ed

Browse files
Added changes to disable chat after receiving human clarification response
1 parent 84b64d4 commit 35a79ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/frontend/wwwroot/task/task.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@
223223
const taskMessageAddButton = document.getElementById("taskMessageAddButton");
224224
const textInputContainer = document.getElementsByClassName("text-input-container");
225225

226+
if (isHumanClarificationResponseNotNull) {
227+
// Update the local state to set human_clarification_request to null
228+
data[0].human_clarification_request = null;
229+
console.log("Human clarification request set to null locally.");
230+
}
231+
232+
const isHumanClarificationRequestNull = data?.[0]?.human_clarification_request === null
233+
226234
if(isHumanClarificationRequestNull && taskMessageTextareaElement){
227235
taskMessageTextareaElement.setAttribute('disabled', true)
228236
taskMessageTextareaElement.style.backgroundColor = "#efefef";

0 commit comments

Comments
 (0)