@@ -9,7 +9,7 @@ use plugins::{CodeExecutionRequest, ExecutionResult, LanguageInfo, PluginManager
99use std:: fs;
1010use std:: process:: { Command , Stdio } ;
1111use std:: time:: { SystemTime , UNIX_EPOCH } ;
12- use tauri:: { Manager , State } ;
12+ use tauri:: State ;
1313use tokio:: sync:: Mutex ;
1414use uuid:: Uuid ;
1515
@@ -22,7 +22,6 @@ async fn execute_code(
2222 request : CodeExecutionRequest ,
2323 history : State < ' _ , ExecutionHistory > ,
2424 plugin_manager : State < ' _ , PluginManagerState > ,
25- app_handle : tauri:: AppHandle ,
2625) -> Result < ExecutionResult , String > {
2726 let manager = plugin_manager. lock ( ) . await ;
2827 let plugin = manager
@@ -152,10 +151,9 @@ async fn get_info(
152151
153152 if let Ok ( version_out) = version_output {
154153 if version_out. status . success ( ) {
155- // 获取路径信息 - 只处理 Python
156154 let path_result = Command :: new ( cmd)
157155 . arg ( "-c" )
158- . arg ( & plugin. get_path_command ( ) )
156+ . arg ( plugin. get_path_command ( ) )
159157 . output ( ) ;
160158
161159 let version = String :: from_utf8_lossy ( & version_out. stdout )
@@ -166,10 +164,10 @@ async fn get_info(
166164 if path_out. status . success ( ) {
167165 String :: from_utf8_lossy ( & path_out. stdout ) . trim ( ) . to_string ( )
168166 } else {
169- format ! ( "Command found but path unavailable" )
167+ "Command found but path unavailable" . to_string ( )
170168 }
171169 } else {
172- format ! ( "Path detection failed" )
170+ "Path detection failed" . to_string ( )
173171 } ;
174172
175173 return Ok ( LanguageInfo {
0 commit comments