-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add display_name config option for agents #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
feat: add display_name config option for agents #570
Conversation
|
All contributors have signed the CLA. Thank you! ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Greptile SummaryThis PR adds a Key Changes:
Implementation Quality:
Architecture: Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Config as oh-my-opencode.json
participant Index as src/index.ts
participant AgentUtils as agents/utils.ts
participant SisyphusBuilder as sisyphus-prompt-builder.ts
participant BgManager as BackgroundManager
participant CallOmoAgent as call_omo_agent tool
participant BgTask as background_task tool
User->>Config: Configure display_name in agents section
Note over Config: { "agents": { "oracle": { "display_name": "🔮 Oracle" } } }
Index->>Config: Load plugin config
Index->>Index: Extract display names into agentDisplayNames map
Index->>BgManager: new BackgroundManager(ctx, config, agentDisplayNames)
Index->>CallOmoAgent: createCallOmoAgent(ctx, bgManager, agentDisplayNames)
AgentUtils->>AgentUtils: createBuiltinAgents(overrides)
AgentUtils->>AgentUtils: Push to availableAgents with displayName
AgentUtils->>SisyphusBuilder: Pass availableAgents array
SisyphusBuilder->>SisyphusBuilder: buildToolSelectionTable(agents)
Note over SisyphusBuilder: Uses `agent.displayName ?? agent.name`
SisyphusBuilder->>SisyphusBuilder: buildDelegationTable(agents)
Note over SisyphusBuilder: Uses `agent.displayName ?? agent.name`
SisyphusBuilder->>SisyphusBuilder: buildUltraworkAgentSection(agents)
Note over SisyphusBuilder: Uses `agent.displayName ?? agent.name`
User->>CallOmoAgent: Invoke call_omo_agent tool
CallOmoAgent->>BgManager: Launch background task
BgManager->>BgManager: getDisplayName(agent)
CallOmoAgent-->>User: Shows display name in output
BgManager->>BgManager: Task completes
BgManager->>BgManager: notifyParentSession(task)
BgManager->>BgManager: getDisplayName(task.agent)
BgManager-->>User: Toast notification with display name
User->>BgTask: Invoke background_output tool
BgTask->>BgManager: getDisplayName(task.agent)
BgTask-->>User: Shows display name in task status
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 10 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Summary
Adds
display_nameconfig option for agents, allowing users to customize how agent names appear in output/prompts.Example usage:
{ "agents": { "oracle": { "display_name": "🔮 The All-Knowing One" }, "librarian": { "display_name": "📚 Book Nerd" }, "explore": { "display_name": "🕵️ Detective Pikachu" } } }Changes
display_nametoAgentOverrideConfigSchemain Zod schemadisplayNamefield toAvailableAgentinterfacedisplayName ?? namepatternBackgroundManagerto store and use display namesbackground_taskandcall_omo_agenttools to show display namesWhere Display Names Appear
Verification
Summary by cubic
Adds a display_name config for agents so you can show friendly names across prompts, background tasks, and notifications. If not set, it falls back to the agent’s name.
Written for commit f73dade. Summary will update on new commits.