Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
32 lines
783 B
Rust
32 lines
783 B
Rust
use std::path::Path;
|
|
use std::path::PathBuf;
|
|
|
|
pub fn canonicalize_path(path: &Path) -> PathBuf {
|
|
dunce::canonicalize(path).unwrap_or_else(|_| path.to_path_buf())
|
|
}
|
|
|
|
pub fn canonical_path_key(path: &Path) -> String {
|
|
canonicalize_path(path)
|
|
.to_string_lossy()
|
|
.replace('\\', "/")
|
|
.to_ascii_lowercase()
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::canonical_path_key;
|
|
use pretty_assertions::assert_eq;
|
|
use std::path::Path;
|
|
|
|
#[test]
|
|
fn canonical_path_key_normalizes_case_and_separators() {
|
|
let windows_style = Path::new(r"C:\Users\Dev\Repo");
|
|
let slash_style = Path::new("c:/users/dev/repo");
|
|
|
|
assert_eq!(
|
|
canonical_path_key(windows_style),
|
|
canonical_path_key(slash_style)
|
|
);
|
|
}
|
|
}
|