-
Notifications
You must be signed in to change notification settings - Fork 0
feat: major platform overhaul — rebrand, AI SDK v6, sidebar redesign, model catalog refresh #25
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
Conversation
Enable prompt suggestions and file uploads in multi-chat, and simplify model selection controls.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryThis PR enhances the multi-chat input with file upload capabilities and prompt suggestions, while simplifying the model selector UI and removing the minimum favorite model constraint. Key Changes
Issues Found
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant MultiChatInput
participant MultiChat
participant useFileUpload
participant useMultiChat
participant API as /api/chat
User->>MultiChatInput: Selects models
MultiChatInput->>MultiChat: Updates selectedModelIds
MultiChat->>MultiChat: Calculate fileUploadState
Note over MultiChat: fileUploadState = "supported"<br/>if all models have vision
User->>MultiChatInput: Uploads files
MultiChatInput->>useFileUpload: handleFileUpload(files)
useFileUpload->>useFileUpload: Update files state
User->>MultiChatInput: Clicks send or uses suggestion
MultiChatInput->>MultiChat: onSend() or onSuggestion(text)
MultiChat->>MultiChat: Validate file upload support
alt Files exist but not supported
MultiChat->>User: Show error toast
else Valid
MultiChat->>useFileUpload: handleFileUploads(chatId)
useFileUpload->>API: Upload files to Convex
API-->>useFileUpload: Return attachments[]
useFileUpload->>useFileUpload: Clear files state
loop For each selected model
MultiChat->>useMultiChat: sendMessage(text, files, options)
useMultiChat->>API: POST with model ID and attachments
API-->>useMultiChat: Stream response
useMultiChat->>MultiChat: Update messages
end
MultiChat->>User: Display responses from all models
end
|
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.
4 files reviewed, 1 comment
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.
1 issue found across 8 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="app/components/multi-chat/multi-chat-input.tsx">
<violation number="1" location="app/components/multi-chat/multi-chat-input.tsx:167">
P1: The usage of `FileList` causes a memory leak because `FileItem` (which `FileList` renders) creates unrevoked object URLs on every render. Since `MultiChatInput` updates frequently (on every keystroke), `FileList` and `FileItem` re-render repeatedly, creating thousands of leaked blob URLs if files are attached.
Recommended fix (requires changes to `file-list.tsx` or `file-items.tsx`):
1. Wrap `FileList` in `React.memo` to prevent re-renders when `value` changes.
2. In `FileItem`, use `useEffect` to manage object URLs and revoke them.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| value={value} | ||
| onValueChange={onValueChange} | ||
| > | ||
| <FileList files={files} onFileRemove={onFileRemove} /> |
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.
P1: The usage of FileList causes a memory leak because FileItem (which FileList renders) creates unrevoked object URLs on every render. Since MultiChatInput updates frequently (on every keystroke), FileList and FileItem re-render repeatedly, creating thousands of leaked blob URLs if files are attached.
Recommended fix (requires changes to file-list.tsx or file-items.tsx):
- Wrap
FileListinReact.memoto prevent re-renders whenvaluechanges. - In
FileItem, useuseEffectto manage object URLs and revoke them.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/components/multi-chat/multi-chat-input.tsx, line 167:
<comment>The usage of `FileList` causes a memory leak because `FileItem` (which `FileList` renders) creates unrevoked object URLs on every render. Since `MultiChatInput` updates frequently (on every keystroke), `FileList` and `FileItem` re-render repeatedly, creating thousands of leaked blob URLs if files are attached.
Recommended fix (requires changes to `file-list.tsx` or `file-items.tsx`):
1. Wrap `FileList` in `React.memo` to prevent re-renders when `value` changes.
2. In `FileItem`, use `useEffect` to manage object URLs and revoke them.</comment>
<file context>
@@ -80,20 +150,29 @@ export function MultiChatInput({
value={value}
onValueChange={onValueChange}
>
+ <FileList files={files} onFileRemove={onFileRemove} />
<PromptInputTextarea
placeholder="Ask all selected models..."
</file context>
Clarifies where AI-generated docs belong and captures competitive research for roadmap decisions. Co-authored-by: Cursor <cursoragent@cursor.com>
Move side effects into hooks for image previews and default selection. Update competitive analysis notes. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…urrent versions - Remove old Claude 3.5/3.7 and speculative Claude 4 entries; add Claude Opus 4 and Sonnet 4 - Remove GPT-4.5 Preview and o1-mini from OpenAI; fix o3 SDK mapping - Remove Grok 3 beta variants (grok-3, grok-3-fast, grok-3-mini, grok-3-mini-fast) - Remove Gemini preview/experimental models; update Flash 2.0 pricing - Sync provider-map and types with updated model IDs Co-authored-by: Cursor <cursoragent@cursor.com>
Add Claude Opus 4.6, Sonnet 4.5, Haiku 4.5; GPT-5.2, GPT-5, GPT-5 Mini, GPT-5 Nano; Gemini 2.5 Flash/Pro, 3 Pro Preview, 2.0 Flash-Lite; Grok 4, Grok 4.1 Fast, Grok Code Fast — with types and provider mappings. Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor FileItem to use lazy URL initialization and ref-based cleanup instead of useEffect, preventing stale closures. Replace <img> with Next.js Image component for sidebar user avatar. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@batmn-dev I have started the AI code review. It will take a few minutes to complete. |
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.
1 issue found across 24 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="app/components/chat-input/file-items.tsx">
<violation number="1" location="app/components/chat-input/file-items.tsx:45">
P2: Avoid calling setState during render when file changes; it causes render-phase side effects and can trigger warnings or extra renders. Move the object URL update into a `useEffect` that depends on `file`/`isImage`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if (imageUrlRef.current) URL.revokeObjectURL(imageUrlRef.current) | ||
| const newUrl = isImage ? URL.createObjectURL(file) : null | ||
| imageUrlRef.current = newUrl | ||
| setImageUrl(newUrl) |
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.
P2: Avoid calling setState during render when file changes; it causes render-phase side effects and can trigger warnings or extra renders. Move the object URL update into a useEffect that depends on file/isImage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/components/chat-input/file-items.tsx, line 45:
<comment>Avoid calling setState during render when file changes; it causes render-phase side effects and can trigger warnings or extra renders. Move the object URL update into a `useEffect` that depends on `file`/`isImage`.</comment>
<file context>
@@ -13,16 +13,47 @@ import {
+ if (imageUrlRef.current) URL.revokeObjectURL(imageUrlRef.current)
+ const newUrl = isImage ? URL.createObjectURL(file) : null
+ imageUrlRef.current = newUrl
+ setImageUrl(newUrl)
+ }
+
</file context>
Replace useRef-based tracking with useState for previous file detection and let the cleanup effect depend on imageUrl directly, removing the need for a stale-closure workaround. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Major platform overhaul across 44 commits touching 249 files. This branch encompasses a full rebrand, core SDK upgrade, UI redesign, and model catalog modernization.
Rebranding
AI SDK Upgrade (v4 → v5 → v6)
useChathooks, message formats, and streaming responsesSidebar Redesign
SidebarMenuItemcomponent and collapsible sectionsIcon System Migration
NewChatIconand refined icon choices throughoutMulti-Chat Input Enhancements
Model Catalog Refresh (Feb 2026)
Documentation & Agent Context System
.agents/directory with skills, workflows, ADRs, and research.cursor/rules/) for project patternsBug Fixes & Chores
Test plan