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>
42 lines
1.4 KiB
Rust
42 lines
1.4 KiB
Rust
use std::path::Path;
|
|
|
|
use anyhow::Result;
|
|
use tempfile::TempDir;
|
|
|
|
fn codex_command(codex_home: &Path) -> Result<assert_cmd::Command> {
|
|
let mut cmd = assert_cmd::Command::new(akode_utils_cargo_bin::cargo_bin("akode")?);
|
|
cmd.env("AKODE_HOME", codex_home);
|
|
Ok(cmd)
|
|
}
|
|
|
|
#[test]
|
|
fn debug_models_bundled_prints_json() -> Result<()> {
|
|
let codex_home = TempDir::new()?;
|
|
let mut cmd = codex_command(codex_home.path())?;
|
|
let output = cmd.args(["debug", "models", "--bundled"]).output()?;
|
|
|
|
assert!(output.status.success());
|
|
let stdout = String::from_utf8(output.stdout)?;
|
|
let value: serde_json::Value = serde_json::from_str(&stdout)?;
|
|
assert!(value["models"].is_array());
|
|
assert!(!value["models"].as_array().unwrap_or(&Vec::new()).is_empty());
|
|
|
|
Ok(())
|
|
}
|
|
|
|
#[test]
|
|
fn debug_models_default_prints_empty_json_without_provider() -> Result<()> {
|
|
let codex_home = TempDir::new()?;
|
|
let mut cmd = codex_command(codex_home.path())?;
|
|
let output = cmd.args(["debug", "models"]).output()?;
|
|
|
|
assert!(output.status.success());
|
|
let stdout = String::from_utf8(output.stdout)?;
|
|
let value: serde_json::Value = serde_json::from_str(&stdout)?;
|
|
assert!(value["models"].is_array());
|
|
// aKode has no default provider and no built-in catalog: nothing to list, no network.
|
|
assert!(value["models"].as_array().unwrap_or(&Vec::new()).is_empty());
|
|
|
|
Ok(())
|
|
}
|