mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-19 05:51:26 +08:00
omx(team): auto-checkpoint worker-1 [1]
This commit is contained in:
@@ -4316,7 +4316,7 @@ mod tests {
|
|||||||
};
|
};
|
||||||
use plugins::{
|
use plugins::{
|
||||||
PluginError, PluginKind, PluginLoadFailure, PluginManager, PluginManagerConfig,
|
PluginError, PluginKind, PluginLoadFailure, PluginManager, PluginManagerConfig,
|
||||||
PluginMetadata, PluginSummary,
|
PluginLifecycle, PluginMetadata, PluginSummary,
|
||||||
};
|
};
|
||||||
use runtime::{
|
use runtime::{
|
||||||
CompactionConfig, ConfigLoader, ContentBlock, ConversationMessage, MessageRole, Session,
|
CompactionConfig, ConfigLoader, ContentBlock, ConversationMessage, MessageRole, Session,
|
||||||
@@ -5127,6 +5127,7 @@ mod tests {
|
|||||||
root: None,
|
root: None,
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
lifecycle: PluginLifecycle::default(),
|
||||||
},
|
},
|
||||||
PluginSummary {
|
PluginSummary {
|
||||||
metadata: PluginMetadata {
|
metadata: PluginMetadata {
|
||||||
@@ -5140,6 +5141,7 @@ mod tests {
|
|||||||
root: None,
|
root: None,
|
||||||
},
|
},
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
lifecycle: PluginLifecycle::default(),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -5166,6 +5168,7 @@ mod tests {
|
|||||||
root: None,
|
root: None,
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
lifecycle: PluginLifecycle::default(),
|
||||||
}],
|
}],
|
||||||
&[PluginLoadFailure::new(
|
&[PluginLoadFailure::new(
|
||||||
PathBuf::from("/tmp/broken-plugin"),
|
PathBuf::from("/tmp/broken-plugin"),
|
||||||
|
|||||||
@@ -648,6 +648,7 @@ impl RegisteredPlugin {
|
|||||||
PluginSummary {
|
PluginSummary {
|
||||||
metadata: self.metadata().clone(),
|
metadata: self.metadata().clone(),
|
||||||
enabled: self.enabled,
|
enabled: self.enabled,
|
||||||
|
lifecycle: self.definition.lifecycle().clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -656,6 +657,18 @@ impl RegisteredPlugin {
|
|||||||
pub struct PluginSummary {
|
pub struct PluginSummary {
|
||||||
pub metadata: PluginMetadata,
|
pub metadata: PluginMetadata,
|
||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
|
pub lifecycle: PluginLifecycle,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PluginSummary {
|
||||||
|
#[must_use]
|
||||||
|
pub fn lifecycle_state(&self) -> &'static str {
|
||||||
|
if self.enabled {
|
||||||
|
"ready"
|
||||||
|
} else {
|
||||||
|
"disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|||||||
Reference in New Issue
Block a user