@@ -382,57 +382,6 @@ func (c *Config) effectiveWorkspaceProviderLocked() string {
382382 return c .WorkspaceProvider
383383}
384384
385- // IsCoderConfigured reports whether Coder is in use anywhere in the
386- // config: as the effective provider, or via any target that declares a
387- // `coder` block. Used to keep the Coder menu visible whenever the user
388- // has wired up Coder, even if the API call failed on the last poll.
389- func (c * Config ) IsCoderConfigured () bool {
390- if c == nil {
391- return false
392- }
393- c .mu .RLock ()
394- defer c .mu .RUnlock ()
395- // NOTE: cannot import provider package due to import cycle
396- // (provider imports config). Keep this literal in sync with
397- // provider.NameCoder.
398- if c .effectiveWorkspaceProviderLocked () == "coder" {
399- return true
400- }
401- for _ , t := range c .Targets {
402- if t .Coder != nil {
403- return true
404- }
405- }
406- return false
407- }
408-
409- // IsGitHubConfigured reports whether GitHub Codespaces is in use:
410- // either as the effective provider (the default), or via any target
411- // that doesn't declare a `coder` block.
412- //
413- // Note the asymmetry with IsCoderConfigured: GitHub is the default
414- // provider, so the absence of an explicit `coder` block on a target
415- // makes that target an implicit GitHub target. A nil Config (no file
416- // loaded yet) is therefore treated as "GitHub configured", which lets
417- // the Codespaces tray submenu appear during early startup. Coder, by
418- // contrast, only counts when targets opt in explicitly via t.Coder.
419- func (c * Config ) IsGitHubConfigured () bool {
420- if c == nil {
421- return true
422- }
423- c .mu .RLock ()
424- defer c .mu .RUnlock ()
425- if c .effectiveWorkspaceProviderLocked () == "github" {
426- return true
427- }
428- for _ , t := range c .Targets {
429- if t .Coder == nil {
430- return true
431- }
432- }
433- return false
434- }
435-
436385func (t Target ) ExplicitWorkspaceName (provider string ) string {
437386 // NOTE: cannot import provider package due to import cycle
438387 // (provider imports config). Keep this literal in sync with
0 commit comments