ITADN
posit-dev/shinychat

版本发布 8

[py] shinychat 0.2.9py/v0.2.9
? · 2026-02-09

### Improvements * Improved scroll to bottom behavior with tool requests/results. (#157) * Constrain images in markdown content with max-width: 100%. (#168) ### Maintenance * Fixed an issue where user chat messages would display the default assistant icon. (#162) * shinychat now requires Python 3.10 or later and, optionally, langchain 1.0.0 or newer. (#156)

r-shinychat 0.3.0r/v0.3.0
? · 2025-11-21

## Breaking changes * `chat_mod_server()` now returns a list of reactives for `last_input` and `last_turn`, as well functions to `update_user_input()`, `append()` and `clear()` the chat. (#130, #143, #145) ## New features * Added `chat_restore()` which adds Shiny bookmarking hooks to save and restore the `{ellmer}` chat client. (#28, #82) * Added `update_chat_user_input()` for programmatically updating the user input of a chat UI element. (#78) * shinychat now shows tool call request and results in the UI, and the feature is enabled by default in `chat_app()` and the chat module (`chat_mod_server()`). When using `chat_append()` with `chat_ui()`, set `stream = "content"` when you call the `$stream_async()` method on the `ellmer::Chat` client to ensure tool calls are included in the chat stream output. Learn more in the [tool calling UI article](https://posit-dev.github.io/shinychat/r/articles/tool-ui.html). (#52) * Added `chat_append(icon=...)` and `chat_ui(icon_assistant=...)` for customizing the icon that appears next to assistant responses. (#88) ## Improvements * `chat_app()` now correctly restores the chat client state when refreshing the app, e.g. by reloading the page. (#71) * External links in chat messages in `chat_ui()` now open in a new tab by default, with a confirmation dialog. (#120) ## Bug fixes * The chat input no longer submits incomplete text when the user has activated IME completions (e.g. while typing in Japanese or Chinese). (#85) ## Internal changes * We consolidated the `<shiny-chat-message>` and `<shiny-user-message>` components into a single `<shiny-chat-message>` component with a `data-role` attribute to indicate whether it's an "assistant" or "user" message. This likely has minimal impact on your apps, other than custom styles. You should update any `shiny-user-message` rules to use `shiny-chat-message[data-role="user"]`. (#101) * The chat UI's send input button is now identified by the class `.shiny-chat-btn-send`. (@DeepanshKhurana, #138)

py-shinychat 0.2.7py/v0.2.7
? · 2025-09-11

### Bug fixes * Only import `pydantic` if `chatlas` is relevant.

py-shinychat 0.2.5py/v0.2.5
? · 2025-09-11

`chatlas` is (once again) a soft dependency (included in the `providers` extra).

py-shinychat 0.2.4py/v0.2.4
? · 2025-09-10

### Bug fixes * Fixed an issue (introduced in v0.2.0) where statically rendered messages with HTML dependencies weren't being handled properly. (#134)

py-shinychat 0.2.2py/v0.2.2
? · 2025-09-10

### Improvements * `message_content()` and `message_content_chunk()` can now take `ChatMessage()` as input. (#132)

py-shinychat 0.2.1py/v0.2.1
? · 2025-09-10

### New features * `Chat.chat_ui(messages=...)` now supports any type also supported by `message_content()`. (#131) * `ChatMessage()` can now be constructed outside of a Shiny session. (#131)

py-shinychat 0.2.0py/v0.2.0
? · 2025-09-10

### New features * New and improved UI for tool calls that occur via [chatlas](https://posit-dev.github.io/chatlas/). As a reminder, tool call displays are enabled by setting `content="all"` in chatlas' `.stream()` (or `.stream_async()`) method. See the tests under the `pkg-py/tests/playwright/tools` directory for inspiration of what is now possible with custom tool displays via the new `ToolResultDisplay` class. (#107) * Added new `message_content()` and `message_content_chunk()` generic (`singledispatch`) functions. These functions aren't intended to be called directly by users, but instead, provide an opportunity to teach `Chat.append_message()`/`Chat.append_message_stream()` to extract message contents from different types of objects. (#96) * External links in chat messages in `chat_ui()` now open in a new tab by default, with a confirmation dialog. (#120) ### Bug fixes * The chat input no longer submits incomplete text when the user has activated IME completions (e.g. while typing in Japanese or Chinese). (#85) ### Deprecations * Numerous `Chat()` features have been deprecated in preparation for future removal to simplify the API (#91) * `Chat(messages=...)` was deprecated. Use `chat.ui(messages=...)` instead. * `Chat(tokenizer=...)` was deprecated. This is only relevant for `.messages(token_limits=...)` which is also now deprecated. * All parameters to `.messages()` were deprecated. This reflects an overall change philosophy for maintaining the conversation history sent to the LLM -- `Chat` should no longer be responsible for maintaining it -- another stateful object (perhaps the one provided by chatlas, LangChain, etc.) should be used instead. That said, `.messages()` is still useful if you want to access UI message state. * The `.transform_user_input` and `.transform_assistant_response` decorators were deprecated. Instead, transformation of input/responses should be done manually and independently of `Chat`. * As a result of the previous deprecations, `.user_input(transform=...)` was also deprecated. * We consolidated the `<shiny-chat-message>` and `<shiny-user-message>` components into a single `<shiny-chat-message>` component with a `data-role` attribute to indicate whether it's an "assistant" or "user" message. This likely has minimal impact on your apps, other than custom styles. You should update any `shiny-user-message` rules to use `shiny-chat-message[data-role="user"]`. (#101)