Skip to content

Conversation

@slovx2
Copy link

@slovx2 slovx2 commented Oct 30, 2025

feat: Add display_name field to ChatProfile

描述:

Summary

Add optional display_name field to ChatProfile to allow separate internal identifiers and user-facing display names.

Changes

  • Backend: Added display_name: Optional[str] to ChatProfile dataclass
  • Frontend: Updated UI to display display_name || name
  • Types: Added display_name? to TypeScript interface

Benefits

  • Use technical IDs internally (e.g., ad_designer)
  • Display user-friendly names in UI (e.g., 广告设计师)
  • Fully backward compatible (optional field)

Example

ChatProfile(
    name="ad_designer",       # Internal ID
    display_name="广告设计师",  # UI display
    markdown_description="...",
    icon="..."
)

slovx2 and others added 2 commits October 30, 2025 12:16
Added optional display_name field to ChatProfile class to allow separate
internal identifiers and user-facing display names.

Changes:
- Backend: Added display_name field to ChatProfile dataclass in types.py
- Frontend: Updated ChatProfiles component to prioritize display_name over name
- Maintains backward compatibility: falls back to name if display_name is not set

Use case:
- Allows technical identifiers (e.g., "ad_designer") while showing user-friendly
  names (e.g., "广告设计师") in the UI
- Useful for internationalization and maintaining clean database keys

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added display_name field to ChatProfile interface in react-client types
to match the backend Python dataclass.

This completes the display_name feature by ensuring type safety across
the full stack.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. backend Pertains to the Python backend. enhancement New feature or request frontend Pertains to the frontend. labels Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Pertains to the Python backend. enhancement New feature or request frontend Pertains to the frontend. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant