дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
fix(agents): keep agent_refresh_models off the main thread and cache newest_install (#8070)
Opening the New Agent Task page froze the UI when a native agent such as Codex had several installs on PATH: agent_refresh_models was a synchronous command, so it resolved provider specs and ran <agent> --version for every candidate on the main thread, while agent_commands, agent_probe and catalog completion repeated the same blocking lookup on Tokio workers. agent_refresh_models now runs on the blocking pool, the remaining provider_specs / resolve_for_launch / catalog requests move to spawn_blocking, and newest_install probes candidates in parallel with a per-binary cache (canonical path, mtime, size, inode; 60 s) and single-flight deduplication.
Цей коміт міститься в:
1 джерело
5cfd5157d0
коміт
d48146f52d
8 files changed
+226
-28
No files matched your search
@@ -200,7 +200,11 @@ export const commands = {
|
||||
* recovery policy and safety guardrails.
|
||||
*/
|
||||
agentReconcileInterrupted: () => typedError<AgentRecoveryReport, IdeError>(__TAURI_INVOKE("agent_reconcile_interrupted")),
|
||||
/** Refreshes the model catalog; force bypasses freshness, not the cooldown. */
|
||||
/**
|
||||
* Refreshes the model catalog; force bypasses freshness, not the cooldown.
|
||||
* Reads provider config and resolves the agent executable on PATH, so it runs on the
|
||||
* blocking pool.
|
||||
*/
|
||||
agentRefreshModels: (provider: string, force: boolean, model: string | null) => typedError<AgentModelCatalog, IdeError>(__TAURI_INVOKE("agent_refresh_models", { provider, force, model })),
|
||||
/**
|
||||
* Installs the registry's current version of agent `id` (also to update it), streaming
|
||||
|
||||
Reference in new issue
Заблокувати користувача