Context Status Redesign
## Context Status Redesign
### Plan
- In context status, should we consider the agent loop's context that gets passed to the agent in the loop? Right now it doesn't.
- What files did you change?
- So explain how the context status is calculated right now
- does providers provide token count and/or context usage?
- does openai api or genkit or anthropic sdk support context usage metrics or something similar?
- How can I use the provider's data to estimate context in use? Only explain without writing any code.
- before proceeding, let's first revert the last changes you made to context status
- Now create a plan for supporting context status using provider provided data, instead of existing local estimation. Save the plan in .ai-interactions/outputs/phase-5 as output-7_context-status-redesign.md
Plan Review¶
- In the plan .ai-interactions/outputs/phase-5/output-7_context-status-redesign.md, help me understand lastUsage vs nextCount
- The next request will also include the user's message, right?
- When the repl starts, what would the context used show?
- What should we do if some providers don't provide the data?
- What if we just show the lastUsage only? Do we strictly need "idle-state status"?
- Ok update the plan. Also we can show "0.0%" instead of N/A
Debug¶
- We have implemented the changes required for .ai-interactions/outputs/phase-5/output-7_context-status-redesign.md. Review the changes. It seems context in use is not getting updated. Figure out why. Don't edit.
- It's not particularly working for anthropic.
- Explore anthropic api more and figure out if there is a different way to know input tokens etc.