-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Save Favorite Messages (Prompt Templates) #2736
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
Open
eiseleMichael
wants to merge
9
commits into
Chainlit:main
Choose a base branch
from
eiseleMichael:feat/save-favorites
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 36 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="backend/chainlit/socket.py">
<violation number="1" location="backend/chainlit/socket.py:326">
P2: The `# pyright: ignore [reportOptionalCall]` comment is misplaced. To be consistent with other handlers in this file and to actually suppress the warning on the `sio.on` call, the comment should be on the decorator line, not the function definition.</violation>
</file>
<file name="backend/chainlit/data/sql_alchemy.py">
<violation number="1" location="backend/chainlit/data/sql_alchemy.py:841">
P2: Inconsistent `showInput` handling compared to `get_all_user_threads`. This could expose input data that should be hidden. Apply the same conditional logic used elsewhere in this file.</violation>
</file>
<file name="backend/chainlit/data/dynamodb.py">
<violation number="1" location="backend/chainlit/data/dynamodb.py:632">
P2: `strip("THREAD#")` removes any character from the set {'T','H','R','E','A','D','#'} from both ends, not the prefix substring. If a thread ID happens to end with any of these characters, it would be incorrectly truncated. Use `removeprefix("THREAD#")` instead for correct prefix removal.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
7608011 to
d3595c6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
data layer
Pertains to data layers.
frontend
Pertains to the frontend.
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a way to mark a user message as favorite. When a user has at least 1 favorite message and favorites are enabled in the config (default is False) then a new star icon allows to select favorite messages that are used as prompt templates.
The Step.metadata is used to store this information.
Summary by cubic
Add “Favorite Messages” so users can star messages and reuse them as prompt templates from the composer. The feature is behind a config flag and works across supported data layers.
New Features
Bug Fixes
Written for commit f8cf94f. Summary will update automatically on new commits.