Skip to content

Display token counting and Chain-of-Thought steps in UI #253

@manavgup

Description

@manavgup

Feature Request: Token Counting and Chain-of-Thought UI Display

Description

The backend already provides token counting and Chain-of-Thought (CoT) reasoning steps, but these are not prominently displayed in the UI. Users should be able to see token usage and reasoning steps to understand how the AI arrived at its answers.

Acceptance Criteria

  • Display token usage prominently in the chat interface
  • Show Chain-of-Thought reasoning steps in an expandable section
  • Add token usage warnings when approaching limits
  • Display token breakdown (input tokens, output tokens, total)
  • Show CoT steps with clear numbering and formatting
  • Allow users to expand/collapse CoT sections
  • Add visual indicators for token usage levels (low, medium, high)
  • Show reasoning confidence scores if available
  • Add tooltips explaining token usage and CoT concepts

Technical Considerations

  • Backend already provides token_warning and cot_output in search responses
  • Frontend components for token display and CoT visualization
  • UI/UX design for complex reasoning information
  • Consider mobile responsiveness for CoT display
  • Integration with existing chat interface

Priority

Medium - Enhances transparency and user understanding

Labels

enhancement, frontend, ui, transparency

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions