fix(agent): reconcile agent stream mode and shared-agent readiness UX

Derive stream pipeline from selectedAgentId to fix quick-answer/isAgentEnabled drift, gate configure actions for shared agents, and polish selector detail panel positioning.
This commit is contained in:
wizardchen
2026-06-25 23:31:22 +08:00
committed by lyingbug
parent 47478491c9
commit 5f2ca6c975
16 changed files with 443 additions and 196 deletions
+5 -4
View File
@@ -67,13 +67,14 @@ export function getAgentNotReadyReasonKeys(
}
}
if (options.isAgentMode && (!config?.allowed_tools || config.allowed_tools.length === 0)) {
reasons.push('allowed_tools')
}
return reasons
}
/** Shared agents are owned by another tenant; receivers cannot edit their config. */
export function canLocallyConfigureAgent(sourceTenantId?: string): boolean {
return !sourceTenantId
}
/** Map missing-config reasons to the agent editor section that fixes them. */
export function resolveAgentNotReadySection(reasons: AgentNotReadyReasonKey[]): string {
if (reasons.includes('summary_model') || reasons.includes('rerank_model')) {