@@ -47,7 +47,6 @@ import { isElectron } from "../env";
4747import { ensureLocalApi , readLocalApi } from "../localApi" ;
4848import {
4949 closeRightPanelSearchParams ,
50- isDraftSourceControlPanelOpen ,
5150 isSourceControlPanelOpen ,
5251 parseDiffRouteSearch ,
5352 preserveRightPanelSearchParamsForDraftNavigation ,
@@ -1263,12 +1262,9 @@ export default function ChatView(props: ChatViewProps) {
12631262 composerInteractionMode ?? activeThread ?. interactionMode ?? DEFAULT_INTERACTION_MODE ;
12641263 const isLocalDraftThread = ! isServerThread && localDraftThread !== undefined ;
12651264 const canCheckoutPullRequestIntoThread = isLocalDraftThread ;
1266- // Mirror the owning route's panel default: server threads open on wide
1267- // viewports, drafts stay closed until explicitly opened.
1268- const sourceControlOpen =
1269- routeKind === "server"
1270- ? isSourceControlPanelOpen ( rawSearch , { defaultOpen : ! shouldUseRightPanelSheet } )
1271- : isDraftSourceControlPanelOpen ( rawSearch ) ;
1265+ const sourceControlOpen = isSourceControlPanelOpen ( rawSearch , {
1266+ defaultOpen : ! shouldUseRightPanelSheet ,
1267+ } ) ;
12721268 // The diff panel is a drill-in of source control, so the header toggle
12731269 // treats the right panel as one unit: it stays pressed while a diff is
12741270 // open and pressing it closes the whole panel.
@@ -1323,30 +1319,19 @@ export default function ChatView(props: ChatViewProps) {
13231319 // General Chat threads run in a hidden scratch workspace: source-control,
13241320 // scripts, and open-in affordances stay hidden even though a project exists.
13251321 const isGeneralChatThread = activeProject ?. kind === "general-chat" ;
1326- const insertDraftStarterPrompt = useCallback (
1327- ( text : string ) => {
1328- setComposerDraftPrompt ( composerDraftTarget , text ) ;
1329- window . requestAnimationFrame ( ( ) => {
1330- composerRef . current ?. focusAtEnd ( ) ;
1331- } ) ;
1332- } ,
1333- [ composerDraftTarget , composerRef , setComposerDraftPrompt ] ,
1334- ) ;
13351322 const draftTimelineEmptyState = useMemo (
13361323 ( ) =>
13371324 isLocalDraftThread && draftThread ? (
13381325 < DraftEmptyState
13391326 currentProjectRef = { scopeProjectRef ( draftThread . environmentId , draftThread . projectId ) }
13401327 currentProjectName = { activeProject ?. name ?? null }
13411328 isGeneralChat = { isGeneralChatThread }
1342- onInsertPrompt = { insertDraftStarterPrompt }
13431329 />
13441330 ) : undefined ,
13451331 [
13461332 activeProject ?. name ,
13471333 draftThread ?. environmentId ,
13481334 draftThread ?. projectId ,
1349- insertDraftStarterPrompt ,
13501335 isGeneralChatThread ,
13511336 isLocalDraftThread ,
13521337 ] ,
0 commit comments