mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
## What changed - Move `SkillLoadOutcome` and its implicit-path indexing into `codex-skills-extension`. - Import shared skill types directly from `codex-skills` and keep the skill prompt size limit with the extension renderer that uses it. - Remove `codex-core-skills` from the Cargo workspace and dependent crates. GitOrigin-RevId: 4e9e84909fa2f692bcc94af990bb4671affd776f
26 lines
612 B
Rust
26 lines
612 B
Rust
use std::io;
|
|
use std::sync::Arc;
|
|
|
|
use crate::SkillLoadOutcome;
|
|
use codex_skills::SkillMetadata;
|
|
|
|
/// Immutable snapshot of host-owned skills and their source filesystems.
|
|
#[derive(Debug, Clone)]
|
|
pub struct HostSkillsSnapshot {
|
|
outcome: Arc<SkillLoadOutcome>,
|
|
}
|
|
|
|
impl HostSkillsSnapshot {
|
|
pub fn new(outcome: Arc<SkillLoadOutcome>) -> Self {
|
|
Self { outcome }
|
|
}
|
|
|
|
pub fn outcome(&self) -> &SkillLoadOutcome {
|
|
self.outcome.as_ref()
|
|
}
|
|
|
|
pub async fn read_skill_text(&self, skill: &SkillMetadata) -> io::Result<String> {
|
|
self.outcome.read_skill_text(skill).await
|
|
}
|
|
}
|