refactor: update meta plugins to use MetaPluginResponse
Co-authored-by: aider (openai/andrew/openrouter/mistralai/mistral-medium-3.1) <aider@aider.chat>
This commit is contained in:
@@ -169,7 +169,7 @@ impl MetaPlugin for ReadTimeMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> Result<PluginResponse> {
|
||||
fn finalize(&mut self) -> Result<MetaPluginResponse> {
|
||||
let mut metadata = Vec::new();
|
||||
|
||||
if let Some(start_time) = self.start_time {
|
||||
@@ -183,17 +183,17 @@ impl MetaPlugin for ReadTimeMetaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(PluginResponse {
|
||||
Ok(MetaPluginResponse {
|
||||
metadata: Some(metadata),
|
||||
is_finalized: true,
|
||||
})
|
||||
}
|
||||
|
||||
fn update(&mut self, _data: &[u8]) -> Result<PluginResponse> {
|
||||
fn update(&mut self, _data: &[u8]) -> Result<MetaPluginResponse> {
|
||||
if self.start_time.is_none() {
|
||||
self.start_time = Some(Instant::now());
|
||||
}
|
||||
Ok(PluginResponse::default())
|
||||
Ok(MetaPluginResponse::default())
|
||||
}
|
||||
|
||||
fn meta_name(&self) -> String {
|
||||
@@ -278,7 +278,7 @@ impl MetaPlugin for ReadRateMetaPlugin {
|
||||
true
|
||||
}
|
||||
|
||||
fn finalize(&mut self) -> Result<PluginResponse> {
|
||||
fn finalize(&mut self) -> Result<MetaPluginResponse> {
|
||||
let mut metadata = Vec::new();
|
||||
|
||||
if let Some(start_time) = self.start_time {
|
||||
@@ -296,18 +296,18 @@ impl MetaPlugin for ReadRateMetaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(PluginResponse {
|
||||
Ok(MetaPluginResponse {
|
||||
metadata: Some(metadata),
|
||||
is_finalized: true,
|
||||
})
|
||||
}
|
||||
|
||||
fn update(&mut self, data: &[u8]) -> Result<PluginResponse> {
|
||||
fn update(&mut self, data: &[u8]) -> Result<MetaPluginResponse> {
|
||||
if self.start_time.is_none() {
|
||||
self.start_time = Some(Instant::now());
|
||||
}
|
||||
self.bytes_read += data.len() as u64;
|
||||
Ok(PluginResponse::default())
|
||||
Ok(MetaPluginResponse::default())
|
||||
}
|
||||
|
||||
fn meta_name(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user