Add built-in support for GitHub Copilot CLI agent#23
Merged
nicosuave merged 3 commits intosidequery:mainfrom Mar 3, 2026
Merged
Add built-in support for GitHub Copilot CLI agent#23nicosuave merged 3 commits intosidequery:mainfrom
nicosuave merged 3 commits intosidequery:mainfrom
Conversation
Add Copilot CLI as a supported agent alongside Claude, Codex, and OpenCode. This includes: - SessionSource: new .copilotCli case with icon and label - SessionIndex: new copilotCli dictionary for index caching - Session scanning: discovers sessions from ~/.copilot/session-state/ - Session parsing: reads workspace.yaml for metadata and events.jsonl for timestamps, user message counts, and snippets - Agent wrapper: shell script that emits Start/Stop lifecycle events to agent-events.jsonl (Copilot CLI lacks native hooks) - Shell integration: copilot() wrapper functions for bash and zsh Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Copilot CLI as a supported agent alongside Claude, Codex, and OpenCode. This includes: - SessionSource: new .copilotCli case with icon and label - SessionIndex: new copilotCli dictionary for index caching - Session scanning: discovers sessions from ~/.copilot/session-state/ - Session parsing: reads workspace.yaml for metadata and events.jsonl for timestamps, user message counts, and snippets - Agent wrapper: shell script that emits Start/Stop lifecycle events to agent-events.jsonl (Copilot CLI lacks native hooks) - Shell integration: copilot() wrapper functions for bash and zsh - WorktrunkAgent/WorktrunkDefaultAction: new .copilotCli cases - TerminalController: resume support via copilot --resume Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
Thanks for this @greggroth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Copilot CLI as a supported agent alongside Claude, Codex, and OpenCode.
Changes
Session Discovery & Parsing
WorktrunkStore.swift: New.copilotClicase inSessionSourceenum,copilotClidictionary inSessionIndex, session scanning of~/.copilot/session-state/, andparseCopilotCliSession()which readsworkspace.yamlfor metadata andevents.jsonlfor timestamps, user message counts, and snippets.Agent Lifecycle Events
AgentHookInstaller.swift: Wrapper script forcopilotbinary that emits Start/Stop events toagent-events.jsonl(Copilot CLI lacks a native hooks mechanism unlike Claude/Codex).AgentStatusPaths.swift: NewcopilotCliWrapperPathconstant.Preferences & Resume
WorktrunkPreferences.swift: New.copilotClicases inWorktrunkAgentandWorktrunkDefaultActionenums.TerminalController.swift: Resume support viacopilot --resume <sessionId>.Shell Integration
ghostty.bashandghostty-integration(zsh): Addedcopilot()wrapper functions matching the existingclaude/codexpattern.Testing
zig build