πŸ’¬ Subsystem Deep Dive

commands/context/

πŸ“ commands/context/ πŸ“„ 6 files

Tutorial: context

The project implements a context inspection tool that allows users to visualize how much of the AI's memory (token window) is currently occupied. It employs a Dual-Mode Command Strategy to automatically switch between a rich, graphical Interactive TUI for active sessions and a static Markdown report for headless or script-based usage. To ensure accuracy, it passes chat history through a Model-View Transformation pipeline so the reported statistics match exactly what the AI model sees.

flowchart TD A0["Dual-Mode Command Strategy"] A1["Model-View Transformation"] A2["Interactive Visualization (TUI)"] A3["Headless Reporting (Markdown)"] A4["Context Analysis Integration"] A0 -->|"Activates for interactive s..."| A2 A0 -->|"Activates for non-interacti..."| A3 A2 -->|"Prepares raw messages"| A1 A3 -->|"Prepares raw messages"| A1 A2 -->|"Calculates token usage"| A4 A3 -->|"Calculates token usage"| A4

Chapters

  1. Dual-Mode Command Strategy
  2. Interactive Visualization (TUI)
  3. Headless Reporting (Markdown)
  4. Context Analysis Integration
  5. Model-View Transformation

Generated by Code IQ

Files in this section