fix: remove duplicate metadata processing in meta service
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -165,23 +165,18 @@ impl MetaService {
|
||||
response: crate::meta_plugin::MetaPluginResponse,
|
||||
) {
|
||||
for meta_data in response.metadata {
|
||||
if let Some(processed_meta) = crate::meta_plugin::process_metadata_outputs(
|
||||
&meta_data.name,
|
||||
meta_data.value,
|
||||
plugin.outputs()
|
||||
) {
|
||||
// The metadata has already been processed by the plugin, so we can use it directly
|
||||
// Save to database
|
||||
let db_meta = crate::db::Meta {
|
||||
id: item_id,
|
||||
name: processed_meta.name,
|
||||
value: processed_meta.value,
|
||||
name: meta_data.name,
|
||||
value: meta_data.value,
|
||||
};
|
||||
if let Err(e) = crate::db::store_meta(conn, db_meta) {
|
||||
log::warn!("META_SERVICE: Failed to store metadata: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn collect_initial_meta(&self) -> HashMap<String, String> {
|
||||
let mut item_meta: HashMap<String, String> = crate::modes::common::get_meta_from_env();
|
||||
|
||||
Reference in New Issue
Block a user