fix(chat): query expert skills via symlinks and use $ prefix for Codex
Expert skills in the chat session were derived by intersecting built-in experts with ACP availableCommands, which caused Codex experts to never appear since Codex does not advertise skills through ACP. - Add `experts_list_for_agent` backend API that checks symlink status across all global skill dirs for the given agent type - Replace availableCommands-based expert filtering with symlink-based query, making the settings page the single source of truth - Use `$` prefix for Codex expert skills while keeping `/` for slash commands and other agents' experts - Disable the expert button when no experts are linked for the agent - Invalidate per-agent expert cache after link/unlink in settings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,12 @@ pub struct ExpertIdParams {
|
||||
pub expert_id: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct AgentTypeOnlyParams {
|
||||
pub agent_type: AgentType,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ExpertAgentParams {
|
||||
@@ -26,6 +32,15 @@ pub async fn experts_list() -> Result<Json<Vec<ExpertListItem>>, AppCommandError
|
||||
Ok(Json(result))
|
||||
}
|
||||
|
||||
pub async fn experts_list_for_agent(
|
||||
Json(params): Json<AgentTypeOnlyParams>,
|
||||
) -> Result<Json<Vec<ExpertListItem>>, AppCommandError> {
|
||||
let result = experts_commands::experts_list_for_agent(params.agent_type)
|
||||
.await
|
||||
.map_err(|e| AppCommandError::task_execution_failed(e.to_string()))?;
|
||||
Ok(Json(result))
|
||||
}
|
||||
|
||||
pub async fn experts_get_install_status(
|
||||
Json(params): Json<ExpertIdParams>,
|
||||
) -> Result<Json<Vec<ExpertInstallStatus>>, AppCommandError> {
|
||||
|
||||
Reference in New Issue
Block a user