feat: update finalize to return Result<()> and simplify save mode
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -209,20 +209,10 @@ fn process_input_stream(
|
||||
}
|
||||
debug!("MAIN: Ending IO loop after {:?} bytes", item.size);
|
||||
|
||||
// Finalize meta plugins and save their metadata
|
||||
// Finalize meta plugins
|
||||
for meta_plugin in meta_plugins.iter_mut() {
|
||||
match meta_plugin.finalize() {
|
||||
Ok(value) => {
|
||||
// Only save non-empty values (empty means already saved during initialize/update)
|
||||
if !value.is_empty() {
|
||||
if let Err(e) = meta_plugin.save_meta(conn, item_id, value) {
|
||||
eprintln!("Warning: Failed to save meta value: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Warning: Failed to finalize meta plugin: {}", e);
|
||||
}
|
||||
if let Err(e) = meta_plugin.finalize() {
|
||||
eprintln!("Warning: Failed to finalize meta plugin: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user