Use AbsolutePathBuf in skill loading and codex_home (#17407)

Helps with FS migration later
This commit is contained in:
pakrym-oai authored and GitHub committed 2026-04-13 10:26:51 -07:00
1 parent d25a9822a7
commit ac82443d07
86 files changed
+850 -625

No files matched your search

+5 -6
View File
@@ -1,8 +1,6 @@
use std::collections::HashMap;
use std::collections::HashSet;
use std::env;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use crate::codex::Session;
@@ -15,6 +13,7 @@ use codex_protocol::protocol::SkillScope;
use codex_protocol::request_user_input::RequestUserInputArgs;
use codex_protocol::request_user_input::RequestUserInputQuestion;
use codex_protocol::request_user_input::RequestUserInputResponse;
use codex_utils_absolute_path::AbsolutePathBuf;
use tracing::warn;
pub use codex_core_skills::SkillDependencyInfo;
@@ -43,10 +42,10 @@ pub use codex_core_skills::system;
pub(crate) fn skills_load_input_from_config(
config: &Config,
effective_skill_roots: Vec<PathBuf>,
effective_skill_roots: Vec<AbsolutePathBuf>,
) -> SkillsLoadInput {
SkillsLoadInput::new(
config.cwd.clone().to_path_buf(),
config.cwd.clone(),
effective_skill_roots,
config.config_layer_stack.clone(),
config.bundled_skills_enabled(),
@@ -172,7 +171,7 @@ pub(crate) async fn maybe_emit_implicit_skill_invocation(
sess: &Session,
turn_context: &TurnContext,
command: &str,
workdir: &Path,
workdir: &AbsolutePathBuf,
) {
let Some(candidate) = detect_implicit_skill_invocation_for_command(
turn_context.turn_skills.outcome.as_ref(),
@@ -184,7 +183,7 @@ pub(crate) async fn maybe_emit_implicit_skill_invocation(
let invocation = SkillInvocation {
skill_name: candidate.name,
skill_scope: candidate.scope,
skill_path: candidate.path_to_skills_md,
skill_path: candidate.path_to_skills_md.to_path_buf(),
invocation_type: InvocationType::Implicit,
};
let skill_scope = match invocation.skill_scope {