Skip to content

Conversation

@LeonardoTrapani
Copy link

@LeonardoTrapani LeonardoTrapani commented Jan 7, 2026

Summary

Adds display_name config 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

  • Added display_name to AgentOverrideConfigSchema in Zod schema
  • Added displayName field to AvailableAgent interface
  • Updated Sisyphus prompt builder to use displayName ?? name pattern
  • Updated BackgroundManager to store and use display names
  • Updated background_task and call_omo_agent tools to show display names
  • Regenerated JSON schema

Where Display Names Appear

  1. Sisyphus prompt tables (Tool Selection, Delegation, Ultrawork sections)
  2. Background task launch output
  3. Background task status/completion messages
  4. Toast notifications
  5. Sync subagent session titles

Verification

  • ✅ TypeScript typecheck passes
  • ✅ All 648 tests pass
  • ✅ Build succeeds

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.

  • New Features
    • Config: Added display_name to the agent override schema and JSON schema.
    • Prompting: Sisyphus tables and ultrawork/delegation sections use display_name.
    • Background tasks: Manager stores display names; toasts, completion messages, background_output, and tool outputs display them.
    • Subagents: call_omo_agent uses display_name in session titles and messages; wiring added in index to pass config through.

Written for commit f73dade. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@LeonardoTrapani
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 7, 2026
@greptile-apps
Copy link

greptile-apps bot commented Jan 7, 2026

Greptile Summary

This PR adds a display_name configuration option for agents, allowing users to customize how agent names appear throughout the UI. The implementation is clean and well-integrated across all relevant touchpoints.

Key Changes:

  • Added display_name field to agent override config schema and types
  • Integrated display names into Sisyphus prompt builder (tool selection, delegation, and ultrawork sections)
  • Updated background task management to show display names in notifications, status messages, and toast notifications
  • Updated call_omo_agent tool to use display names in session titles and output
  • Consistently uses nullish coalescing (displayName ?? name) pattern as fallback

Implementation Quality:

  • Type-safe implementation with proper TypeScript types throughout
  • Consistent fallback pattern ensures backward compatibility
  • Display names properly threaded through the entire agent lifecycle
  • JSON schema automatically regenerated to reflect config changes
  • All 648 tests pass, typecheck succeeds, build succeeds

Architecture:
The implementation follows a clean data flow: config → extraction in index.ts → storage in BackgroundManager → retrieval via getDisplayName() method. The AvailableAgent interface extension allows display names to flow naturally through the Sisyphus prompt builder.

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • The implementation is straightforward, type-safe, and well-tested. The change is purely additive (optional field), maintains backward compatibility with nullish coalescing fallbacks, follows existing code patterns, and all tests pass. No logical errors, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

Filename Overview
src/config/schema.ts Added optional display_name field to AgentOverrideConfigSchema - clean schema extension
src/agents/types.ts Added display_name?: string to AgentOverrideConfig type - proper type definition
src/agents/sisyphus-prompt-builder.ts Added displayName? to AvailableAgent interface and used nullish coalescing in 3 prompt sections
src/agents/utils.ts Passes display_name from override config to availableAgents array
src/index.ts Extracts display names from config and passes to BackgroundManager and createCallOmoAgent
src/features/background-agent/manager.ts Added displayNames storage and getDisplayName() method, used in notifications and completion messages
src/tools/background-task/tools.ts Updated task status formatting to use display names via manager.getDisplayName()
src/tools/call-omo-agent/tools.ts Added displayNames parameter and used display names in session titles and task output

Sequence Diagram

sequenceDiagram
    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
Loading

Copy link

@cubic-dev-ai cubic-dev-ai bot left a 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.

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.

1 participant