Conversation
📝 WalkthroughWalkthroughRemoves the Folder button from the Finder ViewSelector UI. Enables tools for modelId "openai/gpt-5" in chat logic and chat-utils, and injects an experimental smoothStream transform into streamText to smooth streaming output. No exported/public signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant UI as Right Panel UI
participant H as useChatLogic
participant S as streamText (AI SDK)
participant T as Tool Executor
U->>UI: Submit message
UI->>H: onSend(message, model)
alt model enables tools (now includes openai/gpt-5)
H->>T: Prepare/execute tools
T-->>H: Tool results
end
rect rgba(200,230,255,0.25)
note right of H: Streaming uses experimental_transform = smoothStream (word chunks, ~70ms)
H->>S: streamText(..., experimental_transform: smoothStream)
S-->>H: Streamed chunks (smoothed)
end
H-->>UI: Append streamed tokens
UI-->>U: Render incremental output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)
209-214: Extract model-gating into shared helper and include “gpt-5” alias
– In useChatLogic.ts (around line 213) addmodel.modelId === "gpt-5"alongside"openai/gpt-5".
– Do the same in chat-utils.ts (around line 78).
– Extract this list of model IDs + apiBase check into a single helper in chat-utils.ts and import it in useChatLogic.ts to avoid duplication.
🧹 Nitpick comments (2)
apps/desktop/src/components/right-panel/utils/chat-utils.ts (1)
72-80: Extract and centralize tool‐enabled model check and include bare “gpt-5” alias
– Move the gating logic in
• apps/desktop/src/components/right-panel/utils/chat-utils.ts (lines 73–80)
• apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (around line 213)
into a shared helper, e.g.isToolsEnabledModel(modelId, apiBase).
– AddmodelId === "gpt-5"alongside"openai/gpt-5"in both locations.apps/desktop/src/components/finder/view-selector.tsx (1)
15-30: Remove commented-out JSX instead of keeping dead codeCommented blocks add noise and drift. If Folder view is deprecated, delete this JSX. Optional: add a brief commit message “remove Folder view”.
- { - /* - <Button - variant={currentView === "folder" ? "default" : "ghost"} - size="sm" - className={cn( - "h-8 transition-all", - currentView === "folder" ? "px-1.5 py-1 min-w-[70px]" : "w-8 px-0 py-0", - )} - onClick={() => onViewChange("folder")} - > - <Folder size={14} /> - {currentView === "folder" && "Folder"} - </Button> - */ - } + {/* Folder view intentionally removed */}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
apps/desktop/src/components/finder/view-selector.tsx(3 hunks)apps/desktop/src/components/right-panel/hooks/useChatLogic.ts(3 hunks)apps/desktop/src/components/right-panel/utils/chat-utils.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit configuration file
**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
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/utils/chat-utils.tsapps/desktop/src/components/right-panel/hooks/useChatLogic.tsapps/desktop/src/components/finder/view-selector.tsx
🧬 Code graph analysis (1)
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)
packages/utils/src/ai.ts (1)
smoothStream(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ci (macos, macos-latest)
- GitHub Check: ci (windows, windows-latest)
🔇 Additional comments (4)
apps/desktop/src/components/finder/view-selector.tsx (2)
3-3: Icon import cleanup LGTMRemoving the Folder icon import aligns with the UI change. No unused imports introduced.
5-5: Do not remove “folder” from ViewType – FolderView is still rendered in routes/app.finder.tsx (handlesview === "folder") and exported in components/finder/views/folder-view.tsx.apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (2)
19-19: Import of smoothStream is correct and usedThe new import is used below; no unused imports.
349-353: VerifystreamTextoptions in@hypr/utils/ai
No local definitions were found forstreamTextorsmoothStream; please confirm thatstreamTextaccepts anexperimental_transformoption and thatsmoothStream({ delayInMs: 70, chunking: "word" })returns the expected transformer shape.
d387328 to
98fadea
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
apps/desktop/src/components/right-panel/utils/chat-utils.ts (1)
72-80: Gating consistency: add alias and centralize model checks.Nice addition for GPT-5. Consider also accepting the bare alias "gpt-5" (like you already do for "gpt-4o") and centralizing this allowlist to avoid future drift with useChatLogic.ts.
Apply locally in this file:
- const toolEnabled = !!( - modelId === "gpt-4.1" - || modelId === "openai/gpt-4.1" - || modelId === "anthropic/claude-sonnet-4" - || modelId === "openai/gpt-4o" - || modelId === "gpt-4o" - || modelId === "openai/gpt-5" - || (apiBase && apiBase.includes("pro.hyprnote.com")) - ); + const TOOL_MODELS = new Set([ + "gpt-4.1", + "openai/gpt-4.1", + "anthropic/claude-sonnet-4", + "openai/gpt-4o", + "gpt-4o", + "openai/gpt-5", + "gpt-5", + ]); + const toolEnabled = TOOL_MODELS.has(modelId || "") || !!apiBase?.includes("pro.hyprnote.com");Optionally, extract TOOL_MODELS to a shared util to keep this in sync with useChatLogic.ts.
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)
209-214: Keep model gating in sync and include alias.You mirrored GPT-5 here—good. To prevent divergence with chat-utils.ts and to cover both naming styles, consider adding the bare "gpt-5" and centralizing the allowlist.
- const shouldUseTools = type !== "HyprLocal" - && (model.modelId === "gpt-4.1" || model.modelId === "openai/gpt-4.1" - || model.modelId === "anthropic/claude-sonnet-4" - || model.modelId === "openai/gpt-4o" - || model.modelId === "gpt-4o" || apiBase?.includes("pro.hyprnote.com") || model.modelId === "openai/gpt-5"); + const TOOL_MODELS = new Set([ + "gpt-4.1", + "openai/gpt-4.1", + "anthropic/claude-sonnet-4", + "openai/gpt-4o", + "gpt-4o", + "openai/gpt-5", + "gpt-5", + ]); + const shouldUseTools = + type !== "HyprLocal" && + (TOOL_MODELS.has(model.modelId) || !!apiBase?.includes("pro.hyprnote.com"));
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
apps/desktop/src/components/finder/view-selector.tsx(3 hunks)apps/desktop/src/components/right-panel/hooks/useChatLogic.ts(3 hunks)apps/desktop/src/components/right-panel/utils/chat-utils.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/desktop/src/components/finder/view-selector.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit configuration file
**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
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/hooks/useChatLogic.tsapps/desktop/src/components/right-panel/utils/chat-utils.ts
🧬 Code graph analysis (1)
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)
packages/utils/src/ai.ts (1)
smoothStream(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ci (windows, windows-latest)
- GitHub Check: ci (macos, macos-latest)
🔇 Additional comments (1)
apps/desktop/src/components/right-panel/hooks/useChatLogic.ts (1)
16-23: Import looks good.smoothStream is imported and used below; no unused import concerns.
No description provided.