Skip to content

Add Copilot agents command and agent targeting#18

Merged
sozercan merged 4 commits intomainfrom
copilot-agents
Apr 23, 2026
Merged

Add Copilot agents command and agent targeting#18
sozercan merged 4 commits intomainfrom
copilot-agents

Conversation

@sozercan
Copy link
Copy Markdown
Owner

Summary

  • add a normalized copilot agents command backed by the DASearch available-agents endpoint
  • allow copilot chat --agent to resolve agent names, selectors, and title IDs before passing agentId to the chat tool
  • update docs, output columns, and tests while keeping dasearch agents as the raw/diagnostic DASearch view

Testing

  • go test ./...

Copilot AI review requested due to automatic review settings April 23, 2026 19:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-class a365 copilot agents command (normalized agent/selector list) and extends a365 copilot chat to resolve and pass an agentId when --agent is provided, while keeping a365 dasearch agents as a raw/diagnostic view of DASearch output.

Changes:

  • Introduce copilot agents command backed by the DASearch “available agents” tool and a normalized output schema/columns.
  • Add --agent to copilot chat, resolving agent names/selectors/title IDs to a usable selector before invoking the chat tool.
  • Update documentation and tests to cover the new command and agent-resolution behavior.
Show a summary per file
File Description
README.md Adds a365 copilot agents to the quickstart list; updates command counts/descriptions to reflect agent-aware Copilot features.
internal/output/columns.go Adds CopilotAgentColumns for table/TSV output of normalized agent lists.
internal/commands/dasearch/dasearch.go Clarifies DASearch agents help text as “raw DASearch output”.
internal/commands/copilot/copilot.go Adds copilot agents subcommand and --agent support for copilot chat, passing resolved agentId.
internal/commands/copilot/copilot_test.go Updates interactive-loop tests to match new function signatures.
internal/commands/copilot/agents.go Implements agent fetching, normalization, selector sharing detection, and chat agent resolution.
internal/commands/copilot/agents_test.go Adds coverage for normalization, resolution edge cases, copilot agents output, and copilot chat --agent integration.
docs/dasearch.md Repositions DASearch docs as low-level/raw output and points users to copilot agents for chat selectors.
docs/copilot.md Documents copilot agents and the new copilot chat --agent flag and examples.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 9/9 changed files
  • Comments generated: 1

type CopilotChatCmd struct {
Message string `arg:"" help:"Natural language question about your M365 content" optional:""`
ConversationID string `help:"Conversation ID for follow-up queries" name:"conversation-id" optional:""`
Agent string `help:"Copilot agent name or ID (resolved before chat)" name:"agent" optional:""`
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --agent flag help text says "name or ID", but the resolver accepts additional identifiers (selector and title ID) and the docs describe those. Update this help text to match the supported inputs (and ideally align wording with docs).

Suggested change
Agent string `help:"Copilot agent name or ID (resolved before chat)" name:"agent" optional:""`
Agent string `help:"Copilot agent name, selector, title ID, or ID (resolved before chat)" name:"agent" optional:""`

Copilot uses AI. Check for mistakes.
@sozercan sozercan merged commit e0da2ff into main Apr 23, 2026
8 checks passed
@sozercan sozercan deleted the copilot-agents branch April 23, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants