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 @@ -559,22 +559,27 @@ export function Prompt(props: PromptProps) {
559559 }
560560
561561 const data = result . data ?? [ ]
562- if ( data . length === 0 ) {
563- toast . show ( { message : "No LSP servers running" , variant : "warning" } )
564- return
565- }
562+ const opts = [
563+ {
564+ title : "Kill all LSP servers" ,
565+ value : "/lsps killall" ,
566+ description : "Stop every running LSP" ,
567+ footer : `${ data . length } running` ,
568+ } ,
569+ ...data . map ( ( item ) => ( {
570+ title : item . name ,
571+ value : `/lsps kill ${ item . name } ` ,
572+ description : item . root || "." ,
573+ footer : "kill" ,
574+ } ) ) ,
575+ ]
566576
567577 dialog . replace ( ( ) => (
568578 < DialogSelect
569579 title = "LSP Servers"
570- options = { data . map ( ( item ) => ( {
571- title : item . name ,
572- value : item . name ,
573- description : `/lsps kill ${ item . name } ` ,
574- footer : item . root || "." ,
575- } ) ) }
580+ options = { opts }
576581 onSelect = { async ( option ) => {
577- await runLsps ( `/lsps kill ${ option . value } ` )
582+ await runLsps ( option . value )
578583 await showLsps ( )
579584 } }
580585 />
You can’t perform that action at this time.
0 commit comments