Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Splitrail is a **fast, cross-platform, real-time token usage tracker and cost mo
- [Gemini CLI](https://github.com/google-gemini/gemini-cli) (and [Qwen Code](https://github.com/qwenlm/qwen-code))
- [Claude Code](https://github.com/anthropics/claude-code)
- [Codex CLI](https://github.com/openai/codex)
- [Cline](https://github.com/cline/cline) / [Roo Code](https://github.com/RooCodeInc/Roo-Code) / [Kilo Code](https://github.com/Kilo-Org/kilocode)
- [Cline](https://github.com/cline/cline) / [Roo Code](https://github.com/RooCodeInc/Roo-Code) / [Kilo Code](https://github.com/Kilo-Org/kilocode) (VS Code extension + CLI)
- [GitHub Copilot](https://github.com/features/copilot)
- [OpenCode](https://github.com/sst/opencode)
- [Pi Agent](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent)
Expand Down
66 changes: 66 additions & 0 deletions src/analyzers/kilo_cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
use super::opencode_common::{OpenCodeFormatAnalyzer, OpenCodeFormatConfig};
use crate::analyzer::{Analyzer, DataSource};
use crate::contribution_cache::ContributionStrategy;
use crate::types::{Application, ConversationMessage};
use anyhow::Result;
use async_trait::async_trait;
use std::path::{Path, PathBuf};

/// Analyzer for [Kilo Code CLI](https://kilocode.ai) — a terminal-based AI
/// coding agent forked from OpenCode. Delegates to the shared
/// [`OpenCodeFormatAnalyzer`] with Kilo-specific paths and identity.
pub struct KiloCliAnalyzer(OpenCodeFormatAnalyzer);

impl KiloCliAnalyzer {
pub fn new() -> Self {
Self(OpenCodeFormatAnalyzer::new(OpenCodeFormatConfig {
display_name: "Kilo CLI",
application: Application::KiloCli,
hash_prefix: "kilo_cli",
storage_subdir: "kilo",
}))
}
}

#[async_trait]
impl Analyzer for KiloCliAnalyzer {
fn display_name(&self) -> &'static str {
self.0.display_name()
}
fn get_data_glob_patterns(&self) -> Vec<String> {
self.0.get_data_glob_patterns()
}
fn discover_data_sources(&self) -> Result<Vec<DataSource>> {
self.0.discover_data_sources()
}
fn is_available(&self) -> bool {
self.0.is_available()
}
fn parse_source(&self, source: &DataSource) -> Result<Vec<ConversationMessage>> {
self.0.parse_source(source)
}
fn parse_sources_parallel_with_paths(
&self,
sources: &[DataSource],
) -> Vec<(PathBuf, Vec<ConversationMessage>)> {
self.0.parse_sources_parallel_with_paths(sources)
}
fn parse_sources_parallel(&self, sources: &[DataSource]) -> Vec<ConversationMessage> {
self.0.parse_sources_parallel(sources)
}
fn get_stats_with_sources(
&self,
sources: Vec<DataSource>,
) -> Result<crate::types::AgenticCodingToolStats> {
self.0.get_stats_with_sources(sources)
}
fn get_watch_directories(&self) -> Vec<PathBuf> {
self.0.get_watch_directories()
}
fn is_valid_data_path(&self, path: &Path) -> bool {
self.0.is_valid_data_path(path)
}
fn contribution_strategy(&self) -> ContributionStrategy {
self.0.contribution_strategy()
}
}
3 changes: 3 additions & 0 deletions src/analyzers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ pub mod cline;
pub mod codex_cli;
pub mod copilot;
pub mod gemini_cli;
pub mod kilo_cli;
pub mod kilo_code;
pub mod opencode;
pub(crate) mod opencode_common;
pub mod pi_agent;
pub mod piebald;
pub mod qwen_code;
Expand All @@ -15,6 +17,7 @@ pub use cline::ClineAnalyzer;
pub use codex_cli::CodexCliAnalyzer;
pub use copilot::CopilotAnalyzer;
pub use gemini_cli::GeminiCliAnalyzer;
pub use kilo_cli::KiloCliAnalyzer;
pub use kilo_code::KiloCodeAnalyzer;
pub use opencode::OpenCodeAnalyzer;
pub use pi_agent::PiAgentAnalyzer;
Expand Down
Loading