diff --git a/docs/test.txt b/docs/test.txt deleted file mode 100644 index 369a2b1..0000000 --- a/docs/test.txt +++ /dev/null @@ -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 - }' \ No newline at end of file diff --git a/lib/pixel-office/agentBridge.ts b/lib/pixel-office/agentBridge.ts index 44c66d2..af38344 100644 --- a/lib/pixel-office/agentBridge.ts +++ b/lib/pixel-office/agentBridge.ts @@ -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) {