Agent管理页面手动触发预检时,先删缓存再预检
This commit is contained in:
@@ -2388,11 +2388,12 @@ export function AcpAgentSettings() {
|
||||
}
|
||||
}, [])
|
||||
|
||||
const runPreflight = useCallback(async (agentType: AgentType) => {
|
||||
const runPreflight = useCallback(
|
||||
async (agentType: AgentType, forceRefresh?: boolean) => {
|
||||
setChecking((prev) => ({ ...prev, [agentType]: true }))
|
||||
try {
|
||||
const [resultState, versionState] = await Promise.allSettled([
|
||||
acpPreflight(agentType),
|
||||
acpPreflight(agentType, forceRefresh),
|
||||
acpDetectAgentLocalVersion(agentType),
|
||||
])
|
||||
|
||||
@@ -4243,12 +4244,14 @@ export function AcpAgentSettings() {
|
||||
})}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
runPreflight(agent.agent_type).catch((err) => {
|
||||
console.error(
|
||||
"[Settings] single preflight failed:",
|
||||
err
|
||||
)
|
||||
})
|
||||
runPreflight(agent.agent_type, true).catch(
|
||||
(err) => {
|
||||
console.error(
|
||||
"[Settings] single preflight failed:",
|
||||
err
|
||||
)
|
||||
}
|
||||
)
|
||||
}}
|
||||
>
|
||||
<RefreshCw className="h-3 w-3 shrink-0" />
|
||||
|
||||
@@ -210,9 +210,13 @@ export async function acpReorderAgents(agentTypes: AgentType[]): Promise<void> {
|
||||
}
|
||||
|
||||
export async function acpPreflight(
|
||||
agentType: AgentType
|
||||
agentType: AgentType,
|
||||
forceRefresh?: boolean
|
||||
): Promise<PreflightResult> {
|
||||
return invoke("acp_preflight", { agentType })
|
||||
return invoke("acp_preflight", {
|
||||
agentType,
|
||||
forceRefresh: forceRefresh ?? null,
|
||||
})
|
||||
}
|
||||
|
||||
export async function acpListAgentSkills(params: {
|
||||
|
||||
Reference in New Issue
Block a user