Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Fixed a bug with `Chat()` sometimes silently dropping errors. (#1672)

* Fixed a bug with `Chat()` sometimes not removing it's loading icon (on error or a `None` transform). (#1679)

* `shiny create` now uses the template `id` rather than the directory name as the default directory. (#1666)

## [1.1.0] - 2024-09-03
Expand Down
7 changes: 3 additions & 4 deletions js/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,19 @@ class ChatContainer extends LightElement {
}
}

// Loading message is just an empty message
#addLoadingMessage(): void {
const loading_message = {
content: "",
role: "assistant",
id: `${this.id}-loading-message`,
};
const message = createElement(CHAT_MESSAGE_TAG, loading_message);
this.messages.appendChild(message);
}

#removeLoadingMessage(): void {
const id = `${this.id}-loading-message`;
const message = this.messages.querySelector(`#${id}`);
if (message) message.remove();
const content = this.lastMessage?.content;
if (!content) this.lastMessage?.remove();
}

#onAppendChunk(event: CustomEvent<Message>): void {
Expand Down
2 changes: 1 addition & 1 deletion shiny/www/py-shiny/chat/chat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions shiny/www/py-shiny/chat/chat.js.map

Large diffs are not rendered by default.

Loading