Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion specs/ai/ai.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/ai.rs
db_tables: []
tracks: [110]
tracks: [19]
depends_on:
- specs/types/types.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/archive/archive.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/archive.rs
db_tables: []
tracks: [94]
depends_on:
- specs/validator/validator.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/cli/cli.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/main.rs
db_tables: []
tracks: [120]
depends_on:
- specs/config/config.spec.md
- specs/parser/parser.spec.md
Expand Down
1 change: 1 addition & 0 deletions specs/compact/compact.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/compact.rs
db_tables: []
tracks: [94]
depends_on:
- specs/validator/validator.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/config/config.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/config.rs
db_tables: []
tracks: [31]
depends_on:
- specs/types/types.spec.md
- specs/exports/exports.spec.md
Expand Down
1 change: 1 addition & 0 deletions specs/exports/exports.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ files:
- src/exports/php.rs
- src/exports/ruby.rs
db_tables: []
tracks: [60]
depends_on:
- specs/types/types.spec.md
---
Expand Down
2 changes: 1 addition & 1 deletion specs/generator/generator.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/generator.rs
db_tables: []
tracks: [99]
tracks: [73]
depends_on:
- specs/types/types.spec.md
- specs/ai/ai.spec.md
Expand Down
2 changes: 1 addition & 1 deletion specs/github/github.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/github.rs
db_tables: []
tracks: [97]
tracks: [102]
depends_on:
- specs/parser/parser.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/hash_cache/hash_cache.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/hash_cache.rs
db_tables: []
tracks: [90]
depends_on:
- specs/parser/parser.spec.md
---
Expand Down
2 changes: 1 addition & 1 deletion specs/hooks/hooks.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/hooks.rs
db_tables: []
tracks: [112]
tracks: [39]
depends_on: []
---

Expand Down
1 change: 1 addition & 0 deletions specs/manifest/manifest.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/manifest.rs
db_tables: []
tracks: [55]
depends_on: []
---

Expand Down
2 changes: 1 addition & 1 deletion specs/mcp/mcp.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/mcp.rs
db_tables: []
tracks: [113]
tracks: [30]
depends_on:
- specs/types/types.spec.md
- specs/validator/validator.spec.md
Expand Down
1 change: 1 addition & 0 deletions specs/parser/parser.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/parser.rs
db_tables: []
tracks: [117]
depends_on:
- specs/types/types.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/registry/registry.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/registry.rs
db_tables: []
tracks: [52]
depends_on:
- specs/types/types.spec.md
---
Expand Down
1 change: 1 addition & 0 deletions specs/schema/schema.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/schema.rs
db_tables: []
tracks: [63]
depends_on: []
---

Expand Down
1 change: 1 addition & 0 deletions specs/scoring/scoring.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/scoring.rs
db_tables: []
tracks: [31]
depends_on:
- specs/types/types.spec.md
- specs/parser/parser.spec.md
Expand Down
1 change: 1 addition & 0 deletions specs/types/types.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/types.rs
db_tables: []
tracks: [118]
depends_on: []
---

Expand Down
1 change: 1 addition & 0 deletions specs/validator/validator.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/validator.rs
db_tables: []
tracks: [119]
depends_on:
- specs/types/types.spec.md
- specs/parser/parser.spec.md
Expand Down
1 change: 1 addition & 0 deletions specs/view/view.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ status: stable
files:
- src/view.rs
db_tables: []
tracks: [94]
depends_on:
- specs/parser/parser.spec.md
---
Expand Down
2 changes: 1 addition & 1 deletion specs/watch/watch.spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: stable
files:
- src/watch.rs
db_tables: []
tracks: [114]
tracks: [4]
depends_on:
- specs/config/config.spec.md
---
Expand Down
13 changes: 9 additions & 4 deletions src/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,18 @@ pub fn resolve_ai_provider(
return resolve_api_provider(&provider, config);
}

// Check command_for_provider first — some providers (e.g. Cursor) have
// no CLI pipe mode and should return their specific error message
// before we check binary availability.
let cmd = command_for_provider(&provider, config.ai_model.as_deref())?;

if !is_binary_available(provider.binary_name()) {
return Err(format!(
"Provider \"{name}\" selected but `{}` is not installed or not on PATH",
provider.binary_name()
));
}
return command_for_provider(&provider, config.ai_model.as_deref())
.map(ResolvedProvider::Cli);
return Ok(ResolvedProvider::Cli(cmd));
}

// 2. aiCommand in config (explicit override)
Expand All @@ -189,15 +193,16 @@ pub fn resolve_ai_provider(
return resolve_api_provider(provider, config);
}

let cmd = command_for_provider(provider, config.ai_model.as_deref())?;

if !is_binary_available(provider.binary_name()) {
return Err(format!(
"Provider \"{}\" configured but `{}` is not installed or not on PATH",
provider,
provider.binary_name()
));
}
return command_for_provider(provider, config.ai_model.as_deref())
.map(ResolvedProvider::Cli);
return Ok(ResolvedProvider::Cli(cmd));
}

// 4. Environment variable
Expand Down
Loading