[Feature] Support Cline / Roo Code conversation history and token usage
Débutant
help wantedgood first issue
1 ★
Poids du clone léger
Mise à jour
Description
Description
Cline (formerly Claude Dev) and Roo Code store task execution history and token statistics locally in VS Code's global storage. We'd love to support parsing Cline / Roo Code sessions directly in agent-cost.
Storage Locations
Cline: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/tasks//api_conversation_history.json
Roo Code: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/tasks//api_conversation_history.json
Expected Log Format
The api_conversation_history.json file contains an array of message turns with Anthropic-style usage:
[
{
"role": "user",
"content": "..."
},
{
"role": "assistant",
"content": "...",
"usage": {
"input_tokens": 1250,
"output_tokens": 420,
"cache_read_input_tokens": 8500,
"cache_creation_input_tokens": 300
}
}
]
How to Implement
Add src/agent_cost/parsers/cline.py with parse_cline_session(path: Path) -> SessionStats.
Map input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens into SessionStats.
Add signature sniffing and routing in src/agent_cost/parsers/detect.py.
Add unit tests in tests/test_cline_parser.py.
PRs welcome!
Issues similaires
Tout voir
Python
Débutant
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an im…
Mise à jour
Python
Débutant
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:54…
Mise à jour
Python
Débutant
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the r…
Mise à jour