@@ -27,7 +27,7 @@ use self::{
2727 connection:: { Connection , ConnectionInitializer } ,
2828 schedule:: event_loop_thread,
2929} ;
30- use playground_server:: { FrontendMessage , LangServerToWasmMessage , PreSendToWasmMessage } ;
30+ use playground_server:: { FrontendMessage , LangServerToWasmMessage , PreLangServerToWasmMessage } ;
3131
3232use crate :: {
3333 baml_project:: file_utils:: { find_baml_src, find_top_level_parent} ,
@@ -56,8 +56,8 @@ pub type Result<T> = std::result::Result<T, api::Error>;
5656pub ( crate ) struct ServerArgs {
5757 pub tokio_handle : tokio:: runtime:: Handle ,
5858 pub broadcast_tx : broadcast:: Sender < LangServerToWasmMessage > ,
59- pub playground_rx : broadcast:: Receiver < PreSendToWasmMessage > ,
60- pub playground_tx : broadcast:: Sender < PreSendToWasmMessage > ,
59+ pub playground_rx : broadcast:: Receiver < PreLangServerToWasmMessage > ,
60+ pub playground_tx : broadcast:: Sender < PreLangServerToWasmMessage > ,
6161 pub playground_port : u16 ,
6262 pub proxy_port : u16 ,
6363}
@@ -190,25 +190,15 @@ impl Server {
190190 let client = client:: Client :: new ( connection. make_sender ( ) ) ;
191191 let notifier = client. notifier ( ) ;
192192
193- // Playground state is initialized here, but server startup is now external
194- // #[cfg(feature = "playground-server")]
195- // {
196- // let playground_state = Arc::new(RwLock::new(PlaygroundState::new()));
197- // session.playground_state = Some(playground_state.clone());
198- // // Store the runtime in the session
199- // session.playground_runtime = Some(rt);
200- // }
201193 session. reload ( Some ( notifier) ) ?;
202194
203- let mut server = Self {
195+ let server = Self {
204196 connection,
205197 worker_threads,
206198 session,
207199 client_capabilities,
208200 args,
209201 } ;
210- // #[cfg(feature = "playground-server")]
211- // server.start_playground_server();
212202
213203 {
214204 let lsp_sender = server. connection . make_sender ( ) ;
@@ -235,7 +225,7 @@ impl Server {
235225 while let Ok ( msg) = playground_rx. recv ( ) . await {
236226 tracing:: info!( "playground rx loop: {:?}" , msg) ;
237227 match msg {
238- PreSendToWasmMessage :: Initialized => {
228+ PreLangServerToWasmMessage :: WasmIsInitialized => {
239229 tracing:: info!( "Received playground INITIALIZED request" ) ;
240230 let projects = session. baml_src_projects . lock ( ) ;
241231 for ( _, project) in projects. iter ( ) {
@@ -269,7 +259,7 @@ impl Server {
269259 . unwrap ( ) ;
270260 }
271261 }
272- PreSendToWasmMessage :: FrontendMessage ( msg) => {
262+ PreLangServerToWasmMessage :: FrontendMessage ( msg) => {
273263 broadcast_tx
274264 . send ( LangServerToWasmMessage :: PlaygroundMessage ( msg) )
275265 . unwrap ( ) ;
0 commit comments