fix: restrict self to sized types and clone response in process_chunk and finalize_plugins
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -260,7 +260,7 @@ pub trait MetaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Method to downcast to concrete type (for checking finalization state)
|
// Method to downcast to concrete type (for checking finalization state)
|
||||||
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
|
fn as_any_mut(&mut self) -> &mut dyn std::any::Any where Self: Sized {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ impl MetaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let response = meta_plugin.update(chunk);
|
let response = meta_plugin.update(chunk);
|
||||||
self.process_plugin_response(conn, item_id, meta_plugin, response);
|
self.process_plugin_response(conn, item_id, meta_plugin, response.clone());
|
||||||
|
|
||||||
// Set finalized flag if response indicates finalization
|
// Set finalized flag if response indicates finalization
|
||||||
if response.is_finalized {
|
if response.is_finalized {
|
||||||
@@ -148,7 +148,7 @@ impl MetaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let response = meta_plugin.finalize();
|
let response = meta_plugin.finalize();
|
||||||
self.process_plugin_response(conn, item_id, meta_plugin, response);
|
self.process_plugin_response(conn, item_id, meta_plugin, response.clone());
|
||||||
|
|
||||||
// Set finalized flag if response indicates finalization
|
// Set finalized flag if response indicates finalization
|
||||||
if response.is_finalized {
|
if response.is_finalized {
|
||||||
|
|||||||
Reference in New Issue
Block a user