-
Notifications
You must be signed in to change notification settings - Fork 418
Minor fix before nightly #1189
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
Minor fix before nightly #1189
Conversation
duckduckhero
commented
Jul 21, 2025
- shoutout to @plyght for fixing title generation
- tried to enhance prompting for chat
📝 WalkthroughWalkthroughThe changes introduce improved handling and formatting for generated titles and chat messages in the desktop app. Titles are now sanitized before storage, chat message containers and text are made selectable via CSS, LLM connection type is passed to system prompts, and the AI chat system template is updated to clarify markdown note formatting using triple backticks. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EditorArea
participant SessionState
User->>EditorArea: Trigger title generation
EditorArea->>EditorArea: Generate title text
EditorArea->>EditorArea: Clean title (remove quotes, trim)
EditorArea->>SessionState: updateTitle(cleanedTitle)
sequenceDiagram
participant ChatView
participant ConnectorCommands
participant TemplateCommands
ChatView->>ConnectorCommands: getLlmConnection()
ConnectorCommands-->>ChatView: Return connection type
ChatView->>TemplateCommands: render("ai_chat.system", {type})
TemplateCommands-->>ChatView: Rendered system content
Estimated code review effort2 (~15 minutes) Possibly related PRs
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/desktop/src/components/right-panel/views/chat-view.tsx (1)
163-163: Remove debug console.log before production.The console.log statement should be removed before merging to production to avoid cluttering the console output.
- console.log("systemContent", systemContent);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
apps/desktop/src/components/editor-area/index.tsx(1 hunks)apps/desktop/src/components/right-panel/components/chat/chat-messages-view.tsx(1 hunks)apps/desktop/src/components/right-panel/components/chat/message-content.tsx(2 hunks)apps/desktop/src/components/right-panel/views/chat-view.tsx(2 hunks)crates/template/assets/ai_chat_system.jinja(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit Configuration File
**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".
Files:
apps/desktop/src/components/right-panel/components/chat/chat-messages-view.tsxapps/desktop/src/components/right-panel/components/chat/message-content.tsxapps/desktop/src/components/editor-area/index.tsxapps/desktop/src/components/right-panel/views/chat-view.tsx
🔇 Additional comments (5)
apps/desktop/src/components/editor-area/index.tsx (1)
65-66: LGTM! Good title sanitization.The regex correctly removes leading and trailing quotes (both single and double) and trims whitespace before updating the session title. This ensures clean title storage without extraneous formatting.
apps/desktop/src/components/right-panel/views/chat-view.tsx (1)
6-6: LGTM! Good integration of LLM connection type.The addition of
connectorCommandsimport and retrieval of the LLM connection type enables dynamic system prompt rendering based on the connection type, which aligns well with the template enhancements.Also applies to: 151-151, 160-160
crates/template/assets/ai_chat_system.jinja (1)
10-10: LGTM! Excellent template enhancements.The changes significantly improve the template by:
- Clarifying triple backtick usage for markdown blocks (line 10)
- Adding specific response examples for "HyprLocal" connection type (lines 41-66)
- Emphasizing proper markdown formatting (line 132)
- Proper conditional structure with the Custom type block
The examples demonstrate correct markdown formatting within code blocks, which will help ensure consistent AI responses.
Also applies to: 41-66, 132-132, 135-135
apps/desktop/src/components/right-panel/components/chat/chat-messages-view.tsx (1)
20-20: LGTM! Good UX improvement.Adding the
select-textclass enables text selection in the chat messages container, improving user experience by allowing users to select and copy chat content.apps/desktop/src/components/right-panel/components/chat/message-content.tsx (1)
15-15: LGTM! Consistent text selection styling.Adding
select-textclass to both text rendering scenarios (lines 15 and 27) ensures consistent text selection behavior across all message content types, complementing the container-level styling in chat-messages-view.tsx.Also applies to: 27-27