Add Copilot agents command and agent targeting#18
Merged
Conversation
There was a problem hiding this comment.
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 agentscommand backed by the DASearch “available agents” tool and a normalized output schema/columns. - Add
--agenttocopilot 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:""` |
There was a problem hiding this comment.
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:""` |
# Conflicts: # internal/commands/copilot/copilot_test.go
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
copilot agentscommand backed by the DASearch available-agents endpointcopilot chat --agentto resolve agent names, selectors, and title IDs before passingagentIdto the chat tooldasearch agentsas the raw/diagnostic DASearch viewTesting
go test ./...