@@ -29,7 +29,6 @@ import {
29
29
ServerOptions ,
30
30
URI ,
31
31
} from "vscode-languageclient/node" ;
32
- import { getHubSrc } from "./hub" ;
33
32
import { RuleInputProvider } from "./rule-search" ;
34
33
import { ScanResultProvider } from "./rule-search-results" ;
35
34
import { ChatProvider } from "./chat" ;
@@ -94,7 +93,7 @@ function showSourceryStatusBarItem(context: ExtensionContext) {
94
93
const myStatusBarItem = window . createStatusBarItem ( StatusBarAlignment . Left ) ;
95
94
myStatusBarItem . command = "sourcery.hub.start" ;
96
95
myStatusBarItem . text = "Sourcery" ;
97
- myStatusBarItem . tooltip = "Manage Sourcery settings " ;
96
+ myStatusBarItem . tooltip = "Manage Sourcery account " ;
98
97
context . subscriptions . push ( myStatusBarItem ) ;
99
98
myStatusBarItem . show ( ) ;
100
99
}
@@ -471,39 +470,10 @@ function registerCommands(
471
470
// This is activated from the status bar (see below)
472
471
context . subscriptions . push (
473
472
commands . registerCommand ( "sourcery.hub.start" , async ( ) => {
474
- // Instruct the language server to start the hub server
475
- // See `core/hub/app` and `core/binary/lsp/sourcery_ls`
476
-
477
473
languageClient . sendRequest ( ExecuteCommandRequest . type , {
478
- command : "sourcery.startHub " ,
474
+ command : "sourcery.openHub " ,
479
475
arguments : [ ] ,
480
476
} ) ;
481
-
482
- // reopen the hub panel if it exists
483
- // otherwise create it
484
- if ( hubWebviewPanel ) {
485
- hubWebviewPanel . reveal ( ) ;
486
- } else {
487
- // Open a webview panel and fill it with a static empty page
488
- // The iframe handles loading the actual content
489
- hubWebviewPanel = window . createWebviewPanel (
490
- "sourceryhub" ,
491
- "Sourcery Hub" ,
492
- ViewColumn . Active ,
493
- {
494
- enableScripts : true ,
495
- }
496
- ) ;
497
-
498
- hubWebviewPanel . webview . html = getHubSrc ( ) ;
499
- hubWebviewPanel . onDidDispose (
500
- ( ) => {
501
- hubWebviewPanel = undefined ;
502
- } ,
503
- null ,
504
- context . subscriptions
505
- ) ;
506
- }
507
477
} )
508
478
) ;
509
479
}
0 commit comments