feat(opencode): remplace le profil Ollama HTTP par OpenCode
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -251,7 +251,7 @@ async fn first_run_true_when_not_configured_with_reference_catalogue() {
|
||||
let out = uc.execute().await.unwrap();
|
||||
assert!(out.is_first_run);
|
||||
// §17.3/D7: the wizard is seeded only with the *selectable* (structured-
|
||||
// drivable) profiles — Claude + Codex + OpenAI-compatible — not the full
|
||||
// drivable) profiles — Claude + Codex + OpenCode — not the full
|
||||
// catalogue.
|
||||
assert_eq!(
|
||||
out.reference_profiles.len(),
|
||||
@ -265,7 +265,7 @@ async fn first_run_true_when_not_configured_with_reference_catalogue() {
|
||||
.collect();
|
||||
assert_eq!(
|
||||
commands,
|
||||
vec!["claude", "codex", "openai-compatible"],
|
||||
vec!["claude", "codex", "opencode"],
|
||||
"only structured profiles offered"
|
||||
);
|
||||
// Every seeded profile is selectable (the gate the menu relies on).
|
||||
@ -334,12 +334,12 @@ async fn delete_unknown_is_not_found_error() {
|
||||
#[tokio::test]
|
||||
async fn reference_profiles_use_case_returns_only_selectable() {
|
||||
// §17.3/D7: the selection use case exposes only structured-drivable profiles
|
||||
// (Claude + Codex + OpenAI-compatible). Gemini/Aider stay in the raw catalogue (see
|
||||
// (Claude + Codex + OpenCode). Gemini/Aider stay in the raw catalogue (see
|
||||
// `catalogue_*` tests below) but are not offered to selection/creation.
|
||||
let out = ReferenceProfiles::new().execute().await.unwrap();
|
||||
assert_eq!(out.profiles.len(), 3);
|
||||
let commands: Vec<&str> = out.profiles.iter().map(|p| p.command.as_str()).collect();
|
||||
assert_eq!(commands, vec!["claude", "codex", "openai-compatible"]);
|
||||
assert_eq!(commands, vec!["claude", "codex", "opencode"]);
|
||||
assert!(out.profiles.iter().all(AgentProfile::is_selectable));
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ fn raw_catalogue_still_has_all_profiles() {
|
||||
.collect();
|
||||
assert_eq!(
|
||||
commands,
|
||||
vec!["claude", "codex", "openai-compatible", "gemini", "aider"]
|
||||
vec!["claude", "codex", "opencode", "gemini", "aider"]
|
||||
);
|
||||
}
|
||||
|
||||
@ -397,8 +397,8 @@ fn is_selectable_is_true_only_for_structured_profiles() {
|
||||
"Codex carries a structured adapter ⇒ selectable"
|
||||
);
|
||||
assert!(
|
||||
by_command["openai-compatible"].is_selectable(),
|
||||
"OpenAI-compatible carries a structured adapter ⇒ selectable"
|
||||
by_command["opencode"].is_selectable(),
|
||||
"OpenCode carries a structured adapter ⇒ selectable"
|
||||
);
|
||||
assert!(
|
||||
!by_command["gemini"].is_selectable(),
|
||||
@ -435,6 +435,12 @@ fn catalogue_has_expected_commands_and_injection() {
|
||||
Some(CODEX_SUBMIT_DELAY_MS),
|
||||
"Codex TUI needs a conservative text→submit delay for delegated prompts"
|
||||
);
|
||||
assert_eq!(
|
||||
by_command["opencode"].context_injection,
|
||||
ContextInjection::ConventionFile {
|
||||
target: "AGENTS.md".to_owned()
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
by_command["gemini"].context_injection,
|
||||
ContextInjection::ConventionFile {
|
||||
@ -484,6 +490,11 @@ fn catalogue_claude_and_codex_carry_their_structured_adapter() {
|
||||
Some(StructuredAdapter::Codex),
|
||||
"Codex reference profile must declare the Codex structured adapter"
|
||||
);
|
||||
assert_eq!(
|
||||
by_command["opencode"].structured_adapter,
|
||||
Some(StructuredAdapter::OpenCode),
|
||||
"OpenCode reference profile must declare the OpenCode structured adapter"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user