feat: add finalization state tracking to meta plugins
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -161,6 +161,14 @@ pub trait MetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
// Check if the plugin is already finalized
|
||||
fn is_finalized(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
// Set the finalized state (only for plugins that can track this)
|
||||
fn set_finalized(&mut self, _finalized: bool) {}
|
||||
|
||||
// Update the meta plugin with new data
|
||||
fn update(&mut self, _data: &[u8]) -> MetaPluginResponse {
|
||||
// Default implementation does nothing
|
||||
@@ -250,6 +258,11 @@ pub trait MetaPlugin {
|
||||
self.configure_outputs(outputs)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Method to downcast to concrete type (for checking finalization state)
|
||||
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_meta_plugin(meta_plugin_type: MetaPluginType) -> Box<dyn MetaPlugin> {
|
||||
|
||||
Reference in New Issue
Block a user