feat: update digest and system plugins to return PluginResponse

Co-authored-by: aider (openai/andrew/openrouter/mistralai/mistral-medium-3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-26 15:37:00 -03:00
parent 7b43827926
commit 128d98c4e3
2 changed files with 28 additions and 12 deletions

View File

@@ -174,11 +174,18 @@ impl MetaPlugin for UidMetaPlugin {
self.meta_name.clone()
}
fn initialize(&mut self, conn: &Connection, item_id: i64) -> Result<()> {
fn initialize(&mut self, item_id: i64) -> Result<PluginResponse> {
let mut metadata = Vec::new();
let uid = get_current_uid().to_string();
self.save_meta(conn, item_id, "uid", uid)?;
self.is_saved = true;
Ok(())
if let Some(meta) = self.create_meta(item_id, "uid", uid) {
metadata.push(meta);
}
Ok(PluginResponse {
metadata: Some(metadata),
is_finalized: true,
})
}
fn outputs(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {