fix: prevent duplicate metadata storage by returning empty strings from finalize

Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-16 14:37:13 -03:00
parent 6b2cb49881
commit 31a653449c
2 changed files with 23 additions and 88 deletions

View File

@@ -213,7 +213,7 @@ fn process_input_stream(
for meta_plugin in meta_plugins.iter_mut() {
match meta_plugin.finalize() {
Ok(value) => {
// Only save non-empty values (empty means already saved)
// 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);