Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare release #1800

Merged
merged 2 commits into from
Jan 24, 2025
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to Chainlit will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [2.0.6] - 2025-01-24

### Added

- The element sidebar is now controllable from the python code

### Fixed
- The auth cookie no longer has a maximal size
- Pasting text in the chat input should now work
- Long text in AskAction buttons are now gracefully displayed
- Server connection error translation path

## [2.0.5] - 2025-01-21

### Added
Expand Down
4 changes: 2 additions & 2 deletions backend/chainlit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
ErrorMessage,
Message,
)
from chainlit.sidebar import Sidebar
from chainlit.sidebar import ElementSidebar
from chainlit.step import Step, step
from chainlit.sync import make_async, run_sync
from chainlit.types import ChatProfile, InputAudioChunk, OutputAudioChunk, Starter
Expand Down Expand Up @@ -131,6 +131,7 @@ def acall(self):
"CopilotFunction",
"CustomElement",
"Dataframe",
"ElementSidebar",
"ErrorMessage",
"File",
"GenerationMessage",
Expand All @@ -145,7 +146,6 @@ def acall(self):
"PersistedUser",
"Plotly",
"Pyplot",
"Sidebar",
"Starter",
"Step",
"Task",
Expand Down
6 changes: 3 additions & 3 deletions backend/chainlit/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from chainlit.element import ElementBased


class Sidebar:
"""Helper class to open/close the sidebar server side.
The sidebar accepts a title and list of elements."""
class ElementSidebar:
"""Helper class to open/close the element sidebar server side.
The element sidebar accepts a title and list of elements."""

@staticmethod
async def set_title(title: str):
Expand Down
2 changes: 1 addition & 1 deletion backend/chainlit/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
except metadata.PackageNotFoundError:
# Case where package metadata is not available, default to a 'non-outdated' version.
# Ref: config.py::load_settings()
__version__ = "2.0.5"
__version__ = "2.0.6"
2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chainlit"
version = "2.0.5"
version = "2.0.6"
keywords = [
'LLM',
'Agents',
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/sidebar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ async def start():
cl.Text(content="Here is a page text document", name="text2"),
]

await cl.Sidebar.set_elements(elements)
await cl.Sidebar.set_title("Test title")
await cl.ElementSidebar.set_elements(elements)
await cl.ElementSidebar.set_title("Test title")


@cl.on_message
async def message(msg: cl.Message):
await cl.Sidebar.set_elements([cl.Text(content="Text changed!")])
await cl.Sidebar.set_title("Title changed!")
await cl.ElementSidebar.set_elements([cl.Text(content="Text changed!")])
await cl.ElementSidebar.set_title("Title changed!")

await cl.sleep(2)

await cl.Sidebar.set_elements([])
await cl.ElementSidebar.set_elements([])
Loading