@@ -4,7 +4,7 @@ import * as ipc from "../../ipc";
44import { Markdown } from "./Markdown" ;
55import { ToolUseCard } from "./ToolUseCard" ;
66import { ThinkingBlock } from "./ThinkingBlock" ;
7- import { PrDashboard } from "../github/PrDashboard " ;
7+ import { ThreadSetup } from "./ThreadSetup " ;
88import { McpPanel } from "../sidebar/McpPanel" ;
99import { ThemeSelector } from "../settings/ThemeSelector" ;
1010import type { ContentBlock } from "../../types" ;
@@ -175,24 +175,15 @@ export function ChatArea() {
175175 </ div >
176176 }
177177 >
178- { /* Worktree banners — only for git-activated projects */ }
179- < Show when = { isGitProject ( ) } >
180- < Show when = { worktree ( ) } >
181- < div class = "worktree-banner" >
182- < div class = "wt-info" >
183- < span class = "wt-branch" > { worktree ( ) ! . branch } </ span >
184- < span class = "wt-path" > { worktree ( ) ! . path } </ span >
185- </ div >
186- < button class = "wt-merge-btn" onClick = { handleMergeWorktree } > Merge back to main</ button >
178+ { /* Worktree banner — only shown when a worktree is active and messages exist */ }
179+ < Show when = { isGitProject ( ) && worktree ( ) && messages ( ) . length > 0 } >
180+ < div class = "worktree-banner" >
181+ < div class = "wt-info" >
182+ < span class = "wt-branch" > { worktree ( ) ! . branch } </ span >
183+ < span class = "wt-path" > { worktree ( ) ! . path } </ span >
187184 </ div >
188- </ Show >
189-
190- < Show when = { ! worktree ( ) && messages ( ) . length === 0 && ! isGenerating ( ) } >
191- < div class = "worktree-banner subtle" >
192- < span class = "wt-hint" > Working in main branch</ span >
193- < button class = "wt-create-btn" onClick = { handleCreateWorktree } > Create worktree</ button >
194- </ div >
195- </ Show >
185+ < button class = "wt-merge-btn" onClick = { handleMergeWorktree } > Merge back to main</ button >
186+ </ div >
196187 </ Show >
197188
198189 { /* Loading skeleton while messages are being fetched */ }
@@ -213,35 +204,38 @@ export function ChatArea() {
213204 < Show
214205 when = { ( messages ( ) . length > 0 || isGenerating ( ) ) && ! isLoadingMessages ( ) }
215206 fallback = {
216- < div class = "chat-empty" >
217- < p class = "new-convo" > New conversation</ p >
218- < p class = "provider-hint" >
219- Using { store . selectedProvider === "claude_code" ? "Claude Code" : "Codex" }
220- </ p >
221- < div class = "suggestion-chips" >
222- < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Explain this codebase and its architecture" ) } >
223- < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < path d = "M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z" /> < path d = "M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z" /> </ svg >
224- Explain codebase
225- </ button >
226- < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Help me fix a bug in " ) } >
227- < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" > < circle cx = "12" cy = "12" r = "10" /> < line x1 = "12" y1 = "8" x2 = "12" y2 = "12" /> < line x1 = "12" y1 = "16" x2 = "12.01" y2 = "16" /> </ svg >
228- Fix a bug
229- </ button >
230- < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Write tests for " ) } >
231- < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" > < polyline points = "9 11 12 14 22 4" /> < path d = "M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11" /> </ svg >
232- Write tests
233- </ button >
234- < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Refactor this code to be cleaner: " ) } >
235- < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < polyline points = "16 18 22 12 16 6" /> < polyline points = "8 6 2 12 8 18" /> </ svg >
236- Refactor code
237- </ button >
207+ < Show when = { isGitProject ( ) && activeProject ( ) } fallback = {
208+ < div class = "chat-empty" >
209+ < p class = "new-convo" > New conversation</ p >
210+ < p class = "provider-hint" >
211+ Using { store . selectedProvider === "claude_code" ? "Claude Code" : "Codex" }
212+ </ p >
213+ < div class = "suggestion-chips" >
214+ < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Explain this codebase and its architecture" ) } >
215+ < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < path d = "M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z" /> < path d = "M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z" /> </ svg >
216+ Explain codebase
217+ </ button >
218+ < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Help me fix a bug in " ) } >
219+ < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" > < circle cx = "12" cy = "12" r = "10" /> < line x1 = "12" y1 = "8" x2 = "12" y2 = "12" /> < line x1 = "12" y1 = "16" x2 = "12.01" y2 = "16" /> </ svg >
220+ Fix a bug
221+ </ button >
222+ < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Write tests for " ) } >
223+ < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" > < polyline points = "9 11 12 14 22 4" /> < path d = "M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11" /> </ svg >
224+ Write tests
225+ </ button >
226+ < button class = "suggestion-chip" onClick = { ( ) => setSuggestion ( "Refactor this code to be cleaner: " ) } >
227+ < svg width = "14" height = "14" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" stroke-linecap = "round" stroke-linejoin = "round" > < polyline points = "16 18 22 12 16 6" /> < polyline points = "8 6 2 12 8 18" /> </ svg >
228+ Refactor code
229+ </ button >
230+ </ div >
238231 </ div >
239-
240- { /* PR Dashboard for git-activated projects */ }
241- < Show when = { isGitProject ( ) && activeProject ( ) } >
242- < PrDashboard projectId = { activeProject ( ) ! . id } repoPath = { activeProject ( ) ! . path } />
243- </ Show >
244- </ div >
232+ } >
233+ < ThreadSetup
234+ projectId = { activeProject ( ) ! . id }
235+ repoPath = { activeProject ( ) ! . path }
236+ threadId = { store . activeTab ! }
237+ />
238+ </ Show >
245239 }
246240 >
247241 < div class = "messages-container" >
0 commit comments