chore: fix clippy warnings, add embedding/omni_patch, update telemetry, and ignore temp files

This commit is contained in:
Riz Ashraf committed 2026-09-29 06:42:29 +01:00
1 parent 495304f3fa
commit 98a1716ac8
23 files changed
+2253 -75

No files matched your search

+51
View File
@@ -178,6 +178,28 @@ impl MemoryHandler {
register_resource!(TasksActiveResource);
register_prompt!(AnalyzeTechDebtPrompt);
struct TerminalHistoryResource;
#[async_trait]
impl McpResource for TerminalHistoryResource {
fn uri(&self) -> &'static str {
"memory://terminal/recent"
}
fn name(&self) -> &'static str {
"Terminal History"
}
fn description(&self) -> Option<&'static str> {
Some("Recent terminal execution history and exit codes")
}
async fn read(&self, state: Arc<MemoryState>) -> Result<String, String> {
let state_clone = Arc::clone(&state);
tokio::task::spawn_blocking(move || {
let items = state_clone.terminal_history.cache.read().unwrap();
serde_json::to_string_pretty(&*items).map_err(|e| e.to_string())
})
.await
.unwrap()
}
}
struct PinnedFilesResource;
#[async_trait]
impl McpResource for PinnedFilesResource {
@@ -252,9 +274,38 @@ impl MemoryHandler {
}
}
register_resource!(TerminalHistoryResource);
register_resource!(PinnedFilesResource);
register_resource!(MilestonesResource);
struct ArchiveRoutinePrompt;
#[async_trait]
impl McpPrompt for ArchiveRoutinePrompt {
fn name(&self) -> &'static str {
"archive_routine"
}
fn description(&self) -> Option<&'static str> {
Some("Compress old session summaries into a milestone retrospective")
}
async fn get(
&self,
_args: Value,
_state: Arc<MemoryState>,
) -> Result<serde_json::Value, String> {
Ok(serde_json::json!({"
messages": [
{
"role": "user",
"content": {
"type": "text",
"text": "Please read the old session summaries, synthesize them into a dense Milestone Retrospective entity, and then use the appropriate tools to delete the old session summaries."
}
}
]
}))
}
}
register_prompt!(HandoffRoutinePrompt);
register_prompt!(ArchiveRoutinePrompt);
macro_rules! register {
($module:ident::$handler:ident) => {