Skip to content

Commit 3b0c1bf

Browse files
Merge pull request microsoft#71 from microsoft/psl-bug-14021
fix: Fixed bug to disable chat after receiving human clarification response
2 parents 8c08a19 + d94562f commit 3b0c1bf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/frontend/wwwroot/task/task.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,20 @@
217217
fetchTaskStages(data[0]);
218218

219219
sessionStorage.setItem("apiTask", JSON.stringify(data[0]));
220-
const isHumanClarificationRequestNull = data?.[0]?.human_clarification_request === null
220+
//const isHumanClarificationRequestNull = data?.[0]?.human_clarification_request === null
221+
const isHumanClarificationResponseNotNull = data?.[0]?.human_clarification_response !== null;
221222
const taskMessageTextareaElement =document.getElementById("taskMessageTextarea");
222223
const taskMessageAddButton = document.getElementById("taskMessageAddButton");
223224
const textInputContainer = document.getElementsByClassName("text-input-container");
224225

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+
225234
if(isHumanClarificationRequestNull && taskMessageTextareaElement){
226235
taskMessageTextareaElement.setAttribute('disabled', true)
227236
taskMessageTextareaElement.style.backgroundColor = "#efefef";

0 commit comments

Comments
 (0)