Skip to content

Commit d0b58e9

Browse files
committed
Clear prompt after response
1 parent 6eb419b commit d0b58e9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

examples/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,5 +283,9 @@ runBtn.addEventListener("click", async () => {
283283
addMessage("assistant", `${String(error)}`);
284284
} finally {
285285
runBtn.disabled = false;
286+
if (promptInput) {
287+
promptInput.value = "";
288+
promptInput.focus();
289+
}
286290
}
287291
});

0 commit comments

Comments
 (0)