fix: handle single-connector case in matching heuristic and CEO prompt
- matchConnector returns honest reason when only one connector is ready - CEO prompt detects single-connector scenario and tells CEO to use it for all agents - Removes misleading 'Best match' language when there's no actual choice
This commit is contained in:
1 parent
51dbeb0cac
commit
6f13d324e4
2 files changed
+18
-2
No files matched your search
@@ -140,10 +140,13 @@ export function matchConnector(input: ConnectorMatchInput): ConnectorMatchResult
|
||||
|
||||
// recommended should always be set if readySet.size > 0, but guard
|
||||
if (recommended) {
|
||||
const onlyOneReady = readySet.size === 1;
|
||||
return {
|
||||
recommendedConnectorId: recommended,
|
||||
fallbackConnectorId: fallback,
|
||||
reason: `Best match for ${taskType} tasks: ${CONNECTOR_STRENGTHS[recommended]}`,
|
||||
reason: onlyOneReady
|
||||
? `Only available connector: ${recommended}. Assign to all agents.`
|
||||
: `Best match for ${taskType} tasks: ${CONNECTOR_STRENGTHS[recommended]}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user