File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd/tui/component/prompt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -422,6 +422,9 @@ opencode.server.close()
422422/instance/dispose
423423/log
424424/lsp
425+ /lsps
426+ /lsps/killall
427+ /lsps/kill/<name>
425428/mcp
426429/mnt/
427430/mnt/c/
Original file line number Diff line number Diff line change @@ -593,22 +593,27 @@ export function Prompt(props: PromptProps) {
593593 }
594594
595595 const data = result . data ?? [ ]
596- if ( data . length === 0 ) {
597- toast . show ( { message : "No LSP servers running" , variant : "warning" } )
598- return
599- }
596+ const opts = [
597+ {
598+ title : "Kill all LSP servers" ,
599+ value : "/lsps killall" ,
600+ description : "Stop every running LSP" ,
601+ footer : `${ data . length } running` ,
602+ } ,
603+ ...data . map ( ( item ) => ( {
604+ title : item . name ,
605+ value : `/lsps kill ${ item . name } ` ,
606+ description : item . root || "." ,
607+ footer : "kill" ,
608+ } ) ) ,
609+ ]
600610
601611 dialog . replace ( ( ) => (
602612 < DialogSelect
603613 title = "LSP Servers"
604- options = { data . map ( ( item ) => ( {
605- title : item . name ,
606- value : item . name ,
607- description : `/lsps kill ${ item . name } ` ,
608- footer : item . root || "." ,
609- } ) ) }
614+ options = { opts }
610615 onSelect = { async ( option ) => {
611- await runLsps ( `/lsps kill ${ option . value } ` )
616+ await runLsps ( option . value )
612617 await showLsps ( )
613618 } }
614619 />
You can’t perform that action at this time.
0 commit comments