@@ -17,7 +17,13 @@ import { minDelay } from "../utils/promises.ts";
1717
1818export default createPlugin (
1919 "setup" ,
20- ( { context, outputChannel, setupStatusTracker, telemetry } ) => {
20+ ( {
21+ context,
22+ outputChannel,
23+ setupStatusTracker,
24+ localStackStatusTracker,
25+ telemetry,
26+ } ) => {
2127 context . subscriptions . push (
2228 commands . registerCommand (
2329 "localstack.setup" ,
@@ -222,16 +228,29 @@ export default createPlugin(
222228 await minDelay ( Promise . resolve ( ) ) ;
223229
224230 /////////////////////////////////////////////////////////////////////
225- window
226- . showInformationMessage ( "LocalStack is ready to start" , {
227- title : "Start LocalStack" ,
228- command : "localstack.start" ,
229- } )
230- . then ( ( selection ) => {
231- if ( selection ) {
232- commands . executeCommand ( selection . command ) ;
233- }
234- } ) ;
231+ if ( localStackStatusTracker . status ( ) === "running" ) {
232+ window
233+ . showInformationMessage ( "LocalStack is running." , {
234+ title : "View Logs" ,
235+ command : "localstack.viewLogs" ,
236+ } )
237+ . then ( ( selection ) => {
238+ if ( selection ) {
239+ commands . executeCommand ( selection . command ) ;
240+ }
241+ } ) ;
242+ } else {
243+ window
244+ . showInformationMessage ( "LocalStack is ready to start." , {
245+ title : "Start LocalStack" ,
246+ command : "localstack.start" ,
247+ } )
248+ . then ( ( selection ) => {
249+ if ( selection ) {
250+ commands . executeCommand ( selection . command ) ;
251+ }
252+ } ) ;
253+ }
235254
236255 telemetry . track ( {
237256 name : "setup_ended" ,
0 commit comments