refactor: adjust detection priority for teammate identification
- Updated the detection priority logic for teammate identification to ensure that the teammate ID is recognized as a message sender rather than the file owner. - Changed the priority threshold from 3 to 2 to allow for more accurate routing of messages based on sender identification.
This commit is contained in:
parent
0b5d4b41f1
commit
f0a6db6461
1 changed files with 4 additions and 3 deletions
|
|
@ -1000,12 +1000,13 @@ export class TeamMemberLogsFinder {
|
|||
parsed[0]?.summary || parsed[0]?.content?.slice(0, 200) || 'Teammate spawn';
|
||||
}
|
||||
|
||||
// teammate_id is a structured XML attribute — highest reliability signal
|
||||
if (detectionPriority < 3 && parsed[0]?.teammateId) {
|
||||
// teammate_id identifies the MESSAGE SENDER (e.g. "team-lead"), not the agent
|
||||
// owning this file. Use priority 2 so routing.sender (priority 3) can override.
|
||||
if (detectionPriority < 2 && parsed[0]?.teammateId) {
|
||||
const tmId = parsed[0].teammateId.trim().toLowerCase();
|
||||
if (tmId.length > 0 && knownMembers.has(tmId)) {
|
||||
detectedMember = parsed[0].teammateId.trim();
|
||||
detectionPriority = 3;
|
||||
detectionPriority = 2;
|
||||
}
|
||||
}
|
||||
} else if (!description) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue