@@ -20,7 +20,6 @@ import {
2020} from "lucide-react" ;
2121import type React from "react" ;
2222import { useState , useEffect , useCallback } from "react" ;
23- import log from "electron-log" ;
2423
2524import { useSettings } from "@/hooks/useSettings" ;
2625import { IpcClient } from "@/ipc/ipc_client" ;
@@ -67,7 +66,6 @@ import { selectedComponentPreviewAtom } from "@/atoms/previewAtoms";
6766import { SelectedComponentDisplay } from "../chat/SelectedComponentDisplay" ;
6867
6968const showTokenBarAtom = atom ( false ) ;
70- const logger = log . scope ( "BackendChatInput" ) ;
7169
7270export function BackendChatInput ( { chatId } : { chatId ?: number } ) {
7371 const posthog = usePostHog ( ) ;
@@ -100,25 +98,6 @@ export function BackendChatInput({ chatId }: { chatId?: number }) {
10098 handlePaste,
10199 } = useAttachments ( ) ;
102100
103- // Auto-start backend server when entering backend mode
104- useEffect ( ( ) => {
105- const startBackendServer = async ( ) => {
106- if ( ! appId ) return ;
107-
108- try {
109- logger . info ( `Auto-starting backend server for app: ${ appId } ` ) ;
110- await IpcClient . getInstance ( ) . startBackendServer ( appId ) ;
111- logger . info ( "Backend server started successfully" ) ;
112- } catch ( error ) {
113- logger . error ( "Failed to auto-start backend server:" , error ) ;
114- }
115- } ;
116-
117- // Small delay to ensure component is fully mounted
118- const timeoutId = setTimeout ( startBackendServer , 1000 ) ;
119- return ( ) => clearTimeout ( timeoutId ) ;
120- } , [ appId ] ) ;
121-
122101 // Use the hook to fetch the proposal
123102 const {
124103 proposalResult,
@@ -349,7 +328,7 @@ export function BackendChatInput({ chatId }: { chatId?: number }) {
349328 </ div >
350329 < div className = "pl-2 pr-1 flex items-center justify-between pb-2" >
351330 < div className = "flex items-center" >
352- < ChatInputControls showContextFilesPicker = { true } appId = { appId ?? undefined } />
331+ < ChatInputControls showContextFilesPicker = { true } appId = { appId } />
353332 { /* File attachment dropdown */ }
354333 < FileAttachmentDropdown
355334 onFileSelect = { handleFileSelect }
0 commit comments