mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Add back running dots effect
This commit is contained in:
parent
9ec52d3433
commit
be801e335a
1 changed files with 5 additions and 5 deletions
|
|
@ -181,14 +181,14 @@ export default class CopilotChatView extends ItemView {
|
|||
// Your ChatGPT API interaction logic here
|
||||
console.log(`Sending message: ${message}`);
|
||||
|
||||
// const {loadingMessageEl, dotInterval} = this.createLoadingDots(chatMessages);
|
||||
const {loadingMessageEl, dotInterval} = this.createLoadingDots(chatMessages);
|
||||
// Get a response from the ChatGPT API
|
||||
const chatGPTResponse = await this.getChatGPTResponse(message);
|
||||
// Stop the running "..." effect
|
||||
// clearInterval(dotInterval);
|
||||
// if (loadingMessageEl.parentElement) {
|
||||
// loadingMessageEl.parentElement.remove();
|
||||
// }
|
||||
clearInterval(dotInterval);
|
||||
if (loadingMessageEl.parentElement) {
|
||||
loadingMessageEl.parentElement.remove();
|
||||
}
|
||||
// After receiving a response from the ChatGPT API, append it to the chat interface
|
||||
this.appendMessage(chatMessages, chatGPTResponse, this.model);
|
||||
this.scrollToBottom(chatMessages);
|
||||
|
|
|
|||
Loading…
Reference in a new issue