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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite", "migrate"] }
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] }
tempfile = "3"
thiserror = "2"
tokio = { version = "1", features = ["fs", "io-util", "macros", "process", "rt-multi-thread", "signal", "sync", "time"] }
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
11 changes: 6 additions & 5 deletions crates/adapters/aider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use agenttrace_protocol::{
use async_trait::async_trait;
use futures::stream;
use serde_json::{Value, json};
use std::{collections::BTreeMap, ffi::OsString};
use std::collections::BTreeMap;
use uuid::Uuid;

const ANALYTICS: &str = "aider --analytics-log JSONL";
Expand Down Expand Up @@ -170,7 +170,8 @@ pub fn normalize_analytics(
let name = raw
.get("event")
.and_then(Value::as_str)
.unwrap_or("unknown");
.map(str::to_owned)
.unwrap_or_else(|| "unknown".to_owned());
let properties = raw.get("properties").cloned().unwrap_or_else(|| json!({}));
let kind = if name == "launched" {
EventKind::RunStarted
Expand All @@ -189,7 +190,7 @@ pub fn normalize_analytics(
IntegrationMode::LogImport,
ANALYTICS,
kind,
json!({"event":name,"properties":properties}),
json!({"event":name.clone(),"properties":properties}),
raw,
);

Expand Down Expand Up @@ -238,8 +239,8 @@ pub fn normalize_analytics(

if kind == EventKind::Error {
event.error = Some(ErrorInfo {
message: name.into(),
code: Some(name.into()),
message: name.clone(),
code: Some(name),
recoverable: None,
});
}
Expand Down
4 changes: 2 additions & 2 deletions crates/adapters/claude-code/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ fn normalize_assistant(
sequence,
EventKind::Error,
json!({"error": error}),
raw,
raw.clone(),
);
event.error = Some(ErrorInfo {
message: error.to_owned(),
Expand Down Expand Up @@ -557,7 +557,7 @@ fn normalize_user(
sequence,
EventKind::FilePatch,
edit.clone(),
raw,
raw.clone(),
);
let mut impact = FilesystemImpact::default();
if let Some(path) = path {
Expand Down
2 changes: 1 addition & 1 deletion crates/adapters/cline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use agenttrace_protocol::{
};
use async_trait::async_trait;
use serde_json::{Value, json};
use std::{collections::BTreeMap, ffi::OsString};
use std::collections::BTreeMap;
use uuid::Uuid;
const SOURCE: &str = "cline --json NDJSON";
#[derive(Clone, Default)]
Expand Down
2 changes: 1 addition & 1 deletion crates/adapters/goose/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use agenttrace_protocol::{
ProvenanceLevel, TokenUsage,
};
use async_trait::async_trait;
use serde_json::{Value, json};
use serde_json::Value;
use std::{collections::BTreeMap, ffi::OsString};
use uuid::Uuid;
const SOURCE: &str = "goose run --output-format stream-json";
Expand Down
Loading