Skip to content

Commit

Permalink
fix: remove duplicate isInputDisabled, replace SubmitEvent, and send …
Browse files Browse the repository at this point in the history
…showInfo message to extension host
  • Loading branch information
wyennie committed Sep 25, 2024
1 parent e58f7e0 commit 39bcbab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/chat-view/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
break;
}
case 'showInfo': {
vscode.window.showInformationMessage(message.text);
vscode.window.showInformationMessage({ command: 'showInfoToExtension', text: message.text });
break;
}
case 'updateModelList': {
Expand Down Expand Up @@ -407,7 +407,7 @@
const textarea = document.getElementById('messageInput');
const sendButton = document.getElementById('sendMessage');
const loader = document.getElementById('loader');
let isInputDisabled = false;
isInputDisabled = false;

function showLoader() {
loader.classList.add('loader');
Expand All @@ -428,7 +428,7 @@
e.preventDefault();
if (!isInputDisabled) {
const form = document.getElementById('chatForm');
const event = new SubmitEvent('submit', {
const event = new Event('submit', {
bubbles: true,
cancelable: true,
});
Expand All @@ -442,4 +442,4 @@
// Restore dropdown state
restoreState();
});
})();
})();

0 comments on commit 39bcbab

Please sign in to comment.