refactor: rename PluginResponse to MetaPluginResponse
Co-authored-by: aider (openai/andrew/openrouter/mistralai/mistral-medium-3.1) <aider@aider.chat>
This commit is contained in:
@@ -122,10 +122,10 @@ impl MetaPlugin for MetaPluginProgram {
|
|||||||
self.writer = Some(Box::new(stdin));
|
self.writer = Some(Box::new(stdin));
|
||||||
self.process = Some(process);
|
self.process = Some(process);
|
||||||
|
|
||||||
Ok(PluginResponse::default())
|
Ok(MetaPluginResponse::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finalize(&mut self) -> Result<PluginResponse> {
|
fn finalize(&mut self) -> Result<MetaPluginResponse> {
|
||||||
debug!("META: Finalizing program plugin");
|
debug!("META: Finalizing program plugin");
|
||||||
let mut metadata = Vec::new();
|
let mut metadata = Vec::new();
|
||||||
|
|
||||||
@@ -165,13 +165,13 @@ impl MetaPlugin for MetaPluginProgram {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(PluginResponse {
|
Ok(MetaPluginResponse {
|
||||||
metadata: if metadata.is_empty() { None } else { Some(metadata) },
|
metadata: if metadata.is_empty() { None } else { Some(metadata) },
|
||||||
is_finalized: true,
|
is_finalized: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(&mut self, data: &[u8]) -> Result<PluginResponse> {
|
fn update(&mut self, data: &[u8]) -> Result<MetaPluginResponse> {
|
||||||
if let Some(ref mut writer) = self.writer {
|
if let Some(ref mut writer) = self.writer {
|
||||||
if let Err(e) = writer.write_all(data) {
|
if let Err(e) = writer.write_all(data) {
|
||||||
debug!("META: Failed to write to process stdin: {}", e);
|
debug!("META: Failed to write to process stdin: {}", e);
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ impl MetaPlugin for CwdMetaPlugin {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finalize(&mut self) -> Result<PluginResponse> {
|
fn finalize(&mut self) -> Result<MetaPluginResponse> {
|
||||||
// Since we save during initialize(), return Ok to avoid duplicate saves
|
// Since we save during initialize(), return Ok to avoid duplicate saves
|
||||||
Ok(PluginResponse::default())
|
Ok(MetaPluginResponse::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(&mut self, _data: &[u8]) -> Result<PluginResponse> {
|
fn update(&mut self, _data: &[u8]) -> Result<PluginResponse> {
|
||||||
@@ -74,7 +74,7 @@ impl MetaPlugin for CwdMetaPlugin {
|
|||||||
self.meta_name.clone()
|
self.meta_name.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn initialize(&mut self, conn: &Connection, item_id: i64) -> Result<()> {
|
fn initialize(&mut self, conn: &Connection, item_id: i64) -> Result<MetaPluginResponse> {
|
||||||
let cwd = match env::current_dir() {
|
let cwd = match env::current_dir() {
|
||||||
Ok(path) => path.to_string_lossy().to_string(),
|
Ok(path) => path.to_string_lossy().to_string(),
|
||||||
Err(_) => "unknown".to_string(),
|
Err(_) => "unknown".to_string(),
|
||||||
@@ -182,7 +182,7 @@ impl MetaPlugin for UidMetaPlugin {
|
|||||||
metadata.push(meta);
|
metadata.push(meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(PluginResponse {
|
Ok(MetaPluginResponse {
|
||||||
metadata: Some(metadata),
|
metadata: Some(metadata),
|
||||||
is_finalized: true,
|
is_finalized: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user