forked from 1b-agent/opencadstudio-upstream
Fix V2/V3 messaging ABI-break
This commit is contained in:
1 parent
29c41a4041
commit
883e703b02
7 files changed
+179
-38
No files matched your search
@@ -313,6 +313,28 @@ impl OpenCADStudio {
|
||||
crate::plugin::external::with_manager(|mgr| {
|
||||
mgr.drain_requests(&mut host, &mut |_| {});
|
||||
});
|
||||
crate::plugin::external::with_manager(|mgr| {
|
||||
for line in mgr.drain_io() {
|
||||
// Skip internal runner/plugin/REPL trace noise when
|
||||
// verbose logging is enabled; real plugin stdout/stderr
|
||||
// and non-trace runner errors still pass through.
|
||||
if line.text.starts_with("[runner]")
|
||||
|| line.text.starts_with("[plugin] ")
|
||||
|| line.text.starts_with("[python-repl]")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let prefixed = format!("[{} {}] {}", line.plugin_id, line.source, line.text);
|
||||
match line.source {
|
||||
ocs_plugin_api::process::IoStream::Stderr => {
|
||||
self.command_line.push_error(&prefixed);
|
||||
}
|
||||
_ => {
|
||||
self.command_line.push_output(&prefixed);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user