Support GitHub Copilot CLI agent detection (#866)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Drakontia 2026-04-21 15:44:37 +09:00 committed by GitHub
parent 633204babd
commit 53f911ddc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -245,6 +245,12 @@ describe('getAgentLabel', () => {
expect(getAgentLabel('⠂ Claude Code')).toBe('Claude Code')
expect(getAgentLabel('⠋ Codex is thinking')).toBe('Codex')
})
it('labels GitHub Copilot CLI', () => {
expect(getAgentLabel('copilot working')).toBe('GitHub Copilot')
expect(getAgentLabel('copilot idle')).toBe('GitHub Copilot')
expect(getAgentLabel('GitHub Copilot CLI')).toBe('GitHub Copilot')
})
})
describe('createAgentStatusTracker', () => {

View file

@ -16,7 +16,7 @@ const GEMINI_SILENT_WORKING = '\u23F2' // ⏲
const GEMINI_IDLE = '\u25C7' // ◇
const GEMINI_PERMISSION = '\u270B' // ✋
export const AGENT_NAMES = ['claude', 'codex', 'gemini', 'opencode', 'aider']
export const AGENT_NAMES = ['claude', 'codex', 'copilot', 'gemini', 'opencode', 'aider']
const PI_IDLE_PREFIX = '\u03c0 - ' // π - (Pi titlebar extension idle format)
// eslint-disable-next-line no-control-regex -- intentional terminal escape sequence matching
@ -255,6 +255,9 @@ export function getAgentLabel(title: string): string | null {
if (lower.includes('codex')) {
return 'Codex'
}
if (lower.includes('copilot')) {
return 'GitHub Copilot'
}
if (lower.includes('opencode')) {
return 'OpenCode'
}