Skip to content

Commit 6bddbe1

Browse files
jongioCopilot
andcommitted
fix: map host_type icons to actual values (github, ado)
The copilot-agent-runtime uses 'github' and 'ado' as host_type values, not 'cli'/'cloud'/'actions' as previously coded. Updated IconHostType() to match the real schema enum. Co-authored-by: Copilot <[email protected]>
1 parent a61c770 commit 6bddbe1

2 files changed

Lines changed: 14 additions & 20 deletions

File tree

internal/tui/styles/icons.go

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ const (
5959
nfCalendar = "\uf073" // nf-fa-calendar
6060
nfList = "\uf03a" // nf-fa-list
6161

62-
// Host type icons — distinguish session origin (CLI, cloud, Actions).
63-
nfCloud = "\uf0c2" // nf-fa-cloud
64-
nfActions = "\uf013" // nf-fa-gear (reuse for actions/CI)
65-
nfDesktop = "\uf108" // nf-fa-desktop
62+
// Host type icons — distinguish session origin (GitHub, Azure DevOps).
63+
nfGitHub = "\uf09b" // nf-fa-github
64+
nfADO = "\uf0c2" // nf-fa-cloud (Azure DevOps)
6665
)
6766

6867
// ---------------------------------------------------------------------------
@@ -91,9 +90,8 @@ const (
9190
fbList = "≡"
9291
fbBranch = "⎇" // branch pivot fallback (distinct from fbGitBranch)
9392

94-
fbCloud = "☁"
95-
fbActions = "⚙"
96-
fbDesktop = "◻"
93+
fbGitHub = "⊙"
94+
fbADO = "☁"
9795
)
9896

9997
// ---------------------------------------------------------------------------
@@ -225,12 +223,10 @@ func IconWorkAnalyzing() string { return icon("\uf110", "~") } // nf-fa-spinner
225223
// Returns empty string for unknown/empty host types (no icon shown).
226224
func IconHostType(hostType string) string {
227225
switch hostType {
228-
case "cli":
229-
return icon(nfDesktop, fbDesktop)
230-
case "cloud":
231-
return icon(nfCloud, fbCloud)
232-
case "actions":
233-
return icon(nfActions, fbActions)
226+
case "github":
227+
return icon(nfGitHub, fbGitHub)
228+
case "ado":
229+
return icon(nfADO, fbADO)
234230
default:
235231
return ""
236232
}

internal/tui/styles/icons_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,13 @@ func TestIconHostType(t *testing.T) {
218218
nerd bool
219219
wantEmpty bool
220220
}{
221-
{name: "cli with nerd font", hostType: "cli", nerd: true, wantEmpty: false},
222-
{name: "cloud with nerd font", hostType: "cloud", nerd: true, wantEmpty: false},
223-
{name: "actions with nerd font", hostType: "actions", nerd: true, wantEmpty: false},
224-
{name: "cli without nerd font", hostType: "cli", nerd: false, wantEmpty: false},
225-
{name: "cloud without nerd font", hostType: "cloud", nerd: false, wantEmpty: false},
226-
{name: "actions without nerd font", hostType: "actions", nerd: false, wantEmpty: false},
221+
{name: "github with nerd font", hostType: "github", nerd: true, wantEmpty: false},
222+
{name: "ado with nerd font", hostType: "ado", nerd: true, wantEmpty: false},
223+
{name: "github without nerd font", hostType: "github", nerd: false, wantEmpty: false},
224+
{name: "ado without nerd font", hostType: "ado", nerd: false, wantEmpty: false},
227225
{name: "empty host type", hostType: "", nerd: true, wantEmpty: true},
228226
{name: "unknown host type", hostType: "unknown", nerd: true, wantEmpty: true},
229-
{name: "github host type", hostType: "github", nerd: true, wantEmpty: true},
227+
{name: "cli host type", hostType: "cli", nerd: true, wantEmpty: true},
230228
}
231229

232230
for _, tt := range tests {

0 commit comments

Comments
 (0)