Skip to content

Enhance chat panel with session stats and improved UI#105

Merged
rg4444 merged 1 commit into
mainfrom
claude/fix-chat-panel-instructions-3RTvk
Feb 13, 2026
Merged

Enhance chat panel with session stats and improved UI#105
rg4444 merged 1 commit into
mainfrom
claude/fix-chat-panel-instructions-3RTvk

Conversation

@rg4444
Copy link
Copy Markdown
Contributor

@rg4444 rg4444 commented Feb 13, 2026

Summary

This PR enhances the ChatPanel component with comprehensive session statistics tracking and improves the user interface with better styling and localization support.

Key Changes

Session Statistics Tracking:

  • Added sessionStats ref to track conversation metrics: turns, total tokens, total cost, and tools called
  • Updated status bar to display aggregated session statistics instead of just the last message
  • Statistics are reset when starting a new conversation

LLM Configuration:

  • Added llm config type with model field to support dynamic model names
  • Updated modelName computed property to parse model names from config and strip version suffixes (e.g., "claude-sonnet-4-5" → "Sonnet")

UI Improvements:

  • Refactored tool calls display from expandable details to compact chips with improved styling
  • Moved quick questions section above the input area and made it conditional (only show when no messages exist)
  • Updated status bar with better emoji indicators and monospace font for metrics
  • Improved quick question button styling with hover effects and better color scheme
  • Enhanced header subtitle styling with adjusted opacity and spacing

Localization:

  • Changed welcome message from English to Latvian: "Sveiki! Es esmu {agentName}. Kā varu palīdzēt?"

Cost Estimation Updates:

  • Adjusted Claude Opus pricing rates in both Go implementations (integration tests and router):
    • Input rate: 15.0 → 5.0 per million tokens
    • Output rate: 75.0 → 25.0 per million tokens

Validation

  • No BPMN render/diff impact
  • No image regeneration needed
  • No schema/validator updates required

Testing

Existing integration tests updated and passing:

  • TestEstimateCost in modules/chat/integration_test.go validates cost estimation with updated Opus pricing
  • Manual verification of chat panel functionality with session statistics tracking

https://claude.ai/code/session_015oJpLxdf2NXp7UbYMD1yaY

- Welcome message fallback uses Latvian instead of English
- Quick questions hide after first user message and moved above input
- Status bar shows session turns, tokens, cost, and tools count
- Model name derived from agent config instead of hardcoded 'Claude'
- Tool calls displayed as chips instead of expandable details
- Updated subtitle, quick question, and status bar styles
- Fixed Opus pricing to $5/$25 per MTok (was $15/$75)
- Updated test bounds for Opus cost estimation

https://claude.ai/code/session_015oJpLxdf2NXp7UbYMD1yaY
@rg4444 rg4444 merged commit ca8d438 into main Feb 13, 2026
12 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants