Skip to content

Conversation

@kmackett
Copy link

Summary

This PR implements enhanced badge display for model and persona information in conversation messages, providing better visibility into which model and persona were used for each interaction.

Key Features

1. Dual Badge Display for Auto Model Selection

When model is set to 'auto', displays both the user's selection and Claude Code's actual model choice:

  • 'auto' badge (default variant) - shows user's setting
  • Actual model badge (primary variant) - shows Claude Code's selection (e.g., 'sonnet-4-5')

This provides clear visual differentiation between:

  • Explicitly selected models (single badge)
  • Auto-selected models (dual badges)

2. Model and Persona Tracking Infrastructure

  • Database migrations for model_id and persona_name columns
  • Backend support for storing and retrieving metadata
  • IPC handlers for conversation message queries

Changes Made

Frontend

  • RichOutputView.tsx: Updated badge display logic to show dual badges for auto mode
  • ClaudeMessageTransformer.ts: Enhanced to capture and pass through model/persona metadata
  • PromptNavigation.tsx: Updated to support metadata display

Backend

  • Database migrations:
    • 007_add_prompt_marker_metadata.sql
    • 008_add_conversation_message_metadata.sql
  • Database models: Updated to include metadata columns
  • Session management: Enhanced to capture model and persona information
  • IPC handlers: Added conversation message retrieval endpoints

Testing

✅ Tested with auto model selection - dual badges display correctly
✅ Tested with explicit model selection - single badge displays correctly
✅ Persona badges display alongside model badges
✅ Database migrations tested and working

Related Issues

Fixes #219

Screenshots

[User would add screenshot showing dual badge display here]


🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

actions-user and others added 3 commits October 16, 2025 22:14
Backend (Phase 1):
- Created PersonaLoader service to load agent personas from filesystem
- Added IPC handlers: list-personas, get-persona, set-persona
- Enhanced buildSystemPromptAppend() with persona injection (3-layer: global → project → persona)
- Integrated PersonaLoader into AppServices and ClaudeCodeManager

Frontend (Phase 2):
- Created PersonaSelector component following ModelSelector pattern
- Added persona TypeScript types and API methods
- Integrated PersonaSelector into ClaudeInputWithImages toolbar
- Fixed ArchiveProgress.tsx electron import issue

Fixes:
- Fixed agentsDirectory path resolution for development mode

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

Co-Authored-By: Claude <noreply@anthropic.com>
When model is set to 'auto', show dual badges to differentiate between
user's selection and Claude Code's automatic model choice.

Changes:
- Update RichOutputView.tsx badge display logic
- Show 'auto' badge (default variant) + actual model badge (primary variant)
- For explicit model selection, show single badge as before
- Add database migrations for model_id and persona_name tracking

Fixes stravu#219

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add database migrations and backend support for tracking model and
persona metadata in conversation messages and prompt markers.

Changes:
- Add migrations for model_id and persona_name columns
- Update database models and initialization
- Add IPC handlers for conversation message retrieval
- Integrate persona loading and session management
- Update PromptNavigation to support metadata display

Part of Epic 193 - Persona Management System

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

Co-Authored-By: Claude <noreply@anthropic.com>
@jordan-BAIC
Copy link
Collaborator

Looks like some of the linting failed, fix it and I will re run the workflow. I'll try to give it a proper review this weekend or Monday. Thanks for your contribution!

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.

Display both 'auto' and actual model name in message badges

3 participants