Merged
Conversation
Contributor
There was a problem hiding this comment.
4 issues found across 19 files
Prompt for AI agents (all 4 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="cypress/e2e/llm_picker/spec.cy.ts">
<violation number="1" location="cypress/e2e/llm_picker/spec.cy.ts:104">
P2: Test name contradicts its implementation. The test claims to verify the picker is NOT displayed when no LLMs are available, but actually asserts that it DOES exist. Consider either renaming the test to match what it actually tests, or skip/remove it until a proper test fixture without LLMs is available.</violation>
</file>
<file name="cypress/e2e/llm_picker/main.py">
<violation number="1" location="cypress/e2e/llm_picker/main.py:39">
P2: Using `\\n` produces literal backslash-n characters instead of actual newlines. If you want actual line breaks in the message output, use `\n` instead.</violation>
</file>
<file name="libs/react-client/src/useConfig.ts">
<violation number="1" location="libs/react-client/src/useConfig.ts:32">
P2: When `data.llms` is falsy (undefined or null), the LLMs state is not cleared, potentially leaving stale LLM data from a previous chat profile. Consider always updating the state to ensure consistency when switching profiles.</violation>
</file>
<file name="frontend/src/components/chat/MessageComposer/index.tsx">
<violation number="1" location="frontend/src/components/chat/MessageComposer/index.tsx:127">
P1: Missing `selectedLLM` in `useCallback` dependency array causes stale closure. The `selectedLLM?.id` is used inside `onSubmit` but `selectedLLM` isn't listed as a dependency, so changing the LLM selection won't update the callback, and messages will be sent with the wrong LLM.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Contributor
Author
|
I've decided to refactor this to enable multiple dropdown pickers, so we can have things like "approach" (Plan, Chat, Design) and "effort" (high/medium/low), in addition to LLMs. That way this will be more flexible for developers needs. I also want to add image support instead of limiting to lucide icons. Converting this to a draft for now. |
- Add Mode and ModeOption dataclasses (backend/chainlit/mode.py) - Replace llm field with modes dict in messages and steps - Replace set_llms decorator with set_modes emitter pattern - Add ModePicker component, remove LLMPicker - Update react-client state and socket handling
- Add tests for Mode and ModeOption dataclasses - Add tests for Message.modes field - Add tests for emitter.set_modes() - Add tests for chainlit exports
- Add cypress/e2e/modes/ with main.py and spec.cy.ts - Use emitter pattern for set_modes in on_chat_start - Test both model and reasoning mode pickers - Remove deprecated llm_picker E2E tests
Contributor
Author
|
I have completed the updates. This is ready now. |
sandangel
approved these changes
Dec 21, 2025
sandangel
approved these changes
Dec 21, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds modes to the chat interface. It functions kinda like commands do.
Docs added here: Chainlit/docs#274
Users will need to add a new column
modesto thestepstable like they did forcommands. Here's the SQL command for postgresql.