mirror of
https://github.com/xmanrui/OpenClaw-bot-review.git
synced 2026-07-27 22:25:52 +00:00
fix: avoid duplicate pixel office agent labels
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
curl https://gpt.qt.cool/v1/chat/completions \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer sk-qt-cool-rAesCG1982qKfefUDoKa2zREJMkMTDMY" \
|
||||
-d '{
|
||||
"model": "gpt-5.3-codex",
|
||||
"messages": [
|
||||
{"role": "user", "content": "hi"}
|
||||
],
|
||||
"max_tokens": 16
|
||||
}'
|
||||
@@ -66,10 +66,13 @@ export function syncAgentsToOffice(
|
||||
office.addAgent(charId, undefined, undefined, undefined, undefined, wasOffline || isNew)
|
||||
}
|
||||
|
||||
// Set label (agent name with id in parentheses)
|
||||
// Set label, avoiding duplicated values like "main (main)"
|
||||
const ch = office.characters.get(charId)
|
||||
if (ch) {
|
||||
ch.label = activity.name ? `${activity.name} (${activity.agentId})` : activity.agentId
|
||||
const displayName = activity.name?.trim()
|
||||
ch.label = displayName && displayName !== activity.agentId
|
||||
? `${displayName} (${activity.agentId})`
|
||||
: activity.agentId
|
||||
}
|
||||
|
||||
switch (activity.state) {
|
||||
|
||||
Reference in New Issue
Block a user