@@ -169,17 +169,19 @@ function createEditorMcpServer(sdkModule, nodeConnector, clarificationAccessors)
169169 "- close: Close a file (force, no save prompt). Params: filePath\n" +
170170 "- openInWorkingSet: Open a file and pin it to the working set. Params: filePath\n" +
171171 "- setSelection: Open a file and select a range. Params: filePath, startLine, startCh, endLine, endCh\n" +
172- "- setCursorPos: Open a file and set cursor position. Params: filePath, line, ch" ,
172+ "- setCursorPos: Open a file and set cursor position. Params: filePath, line, ch\n" +
173+ "- toggleLivePreview: Show or hide the live preview panel. Params: show (boolean)" ,
173174 {
174175 operations : z . array ( z . object ( {
175- operation : z . enum ( [ "open" , "close" , "openInWorkingSet" , "setSelection" , "setCursorPos" ] ) ,
176- filePath : z . string ( ) . describe ( "Absolute path to the file" ) ,
176+ operation : z . enum ( [ "open" , "close" , "openInWorkingSet" , "setSelection" , "setCursorPos" , "toggleLivePreview" ] ) ,
177+ filePath : z . string ( ) . optional ( ) . describe ( "Absolute path to the file (not required for toggleLivePreview) " ) ,
177178 startLine : z . number ( ) . optional ( ) . describe ( "Start line (1-based) for setSelection" ) ,
178179 startCh : z . number ( ) . optional ( ) . describe ( "Start column (1-based) for setSelection" ) ,
179180 endLine : z . number ( ) . optional ( ) . describe ( "End line (1-based) for setSelection" ) ,
180181 endCh : z . number ( ) . optional ( ) . describe ( "End column (1-based) for setSelection" ) ,
181182 line : z . number ( ) . optional ( ) . describe ( "Line number (1-based) for setCursorPos" ) ,
182- ch : z . number ( ) . optional ( ) . describe ( "Column (1-based) for setCursorPos" )
183+ ch : z . number ( ) . optional ( ) . describe ( "Column (1-based) for setCursorPos" ) ,
184+ showPreview : z . boolean ( ) . optional ( ) . describe ( "true to show, false to hide live preview (for toggleLivePreview)" )
183185 } ) ) . describe ( "Array of editor operations to execute sequentially" )
184186 } ,
185187 async function ( args ) {
0 commit comments