feat(embedding,vision): candle embeddings with offline fallback, on-demand clipboard vision capture, and concurrency audit

This commit is contained in:
Riz Ashraf committed 2026-10-07 06:36:09 +01:00
1 parent 5bd8b1587a
commit e4a0fe72df
47 files changed
+6292 -3503

No files matched your search

+1
View File
@@ -95,6 +95,7 @@ pub async fn gate_set_handler(
status,
reason: body.reason.clone(),
timestamp: crate::handlers::utils::now_secs(),
..Default::default()
};
app_state.handler.state.env.gates.modify(|gates| {
gates.retain(|g| !(g.action == record.action && g.target == record.target));
+1
View File
@@ -131,6 +131,7 @@ pub fn create_router(app_state: Arc<AppState>) -> Router {
expires_at: None,
namespace: "global".to_string(),
timestamp: now,
..Default::default()
};
mem_state.telemetry.handoff_memos.modify(|m| m.push(memo));
+16 -6
View File
@@ -72,7 +72,11 @@ pub async fn nvim_telemetry_handler(
}
if let Some(ref f) = payload.file {
state.handler.state.record_activity("editor", &format!("Neovim {}: {}", payload.event, f), None);
state.handler.state.record_activity(
"editor",
&format!("Neovim {}: {}", payload.event, f),
None,
);
}
axum::Json(serde_json::json!({"status": "ok"}))
@@ -99,12 +103,16 @@ pub async fn terminal_telemetry_handler(
State(state): State<Arc<AppState>>,
axum::Json(payload): axum::Json<TerminalHistory>,
) -> impl axum::response::IntoResponse {
state.handler.state.record_activity("terminal", &format!("Ran command: {}", payload.command), Some(&format!("exit_code: {}, cwd: {}", payload.exit_code, payload.cwd)));
state.handler.state.record_activity(
"terminal",
&format!("Ran command: {}", payload.command),
Some(&format!(
"exit_code: {}, cwd: {}",
payload.exit_code, payload.cwd
)),
);
state
.handler
.state
.record_terminal_history(payload.clone());
state.handler.state.record_terminal_history(payload.clone());
let ws_msg = serde_json::json!({
"type": "terminal_telemetry",
@@ -163,6 +171,8 @@ mod tests {
cwd: "C:/Users/reazul.ashraf/workspace".to_string(),
os: "windows".to_string(),
timestamp: 12345,
error_output: None,
..Default::default()
};
// Post the telemetry
+1
View File
@@ -233,6 +233,7 @@ mod tests {
error: None,
timestamp: 1728129000,
session_id: None,
..Default::default()
};
// Broadcast task event