tao-shen Claude Opus 4.6 commited on
Commit
7e86ab4
·
1 Parent(s): 0d0d458

feat: replace guest sprites with lobster/crab characters, fix agent hash collision

Browse files

- Replace 6 guest sprites with themed lobster/crab pixel art in different colors:
red, blue, golden, green, purple, orange
- Add fixed sprite mapping for known agents (main→blue, adam→red, eve→golden)
to prevent hash collision where Adam and HuggingClaw mapped to same sprite

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

frontend/electron-standalone.html CHANGED
@@ -4460,10 +4460,15 @@ function toggleBrokerPanel() {
4460
  ? parseInt((agent.avatar.match(/_(\d+)$/) || [])[1] || '0', 10)
4461
  : 0;
4462
  if (!animIdx || animIdx < 1 || animIdx > 6) {
 
 
4463
  const aid = String(agent.agentId || '');
4464
- let hash = 0;
4465
- for (let i = 0; i < aid.length; i++) hash = (hash * 31 + aid.charCodeAt(i)) >>> 0;
4466
- animIdx = (hash % 6) + 1;
 
 
 
4467
  }
4468
  const animKey = `guest_anim_${animIdx}`;
4469
  const animIdleKey = `guest_anim_${animIdx}_idle`;
 
4460
  ? parseInt((agent.avatar.match(/_(\d+)$/) || [])[1] || '0', 10)
4461
  : 0;
4462
  if (!animIdx || animIdx < 1 || animIdx > 6) {
4463
+ // Fixed mapping for known agents to avoid hash collisions
4464
+ const KNOWN_AGENTS = { 'main': 2, 'adam': 1, 'eve': 3 };
4465
  const aid = String(agent.agentId || '');
4466
+ animIdx = KNOWN_AGENTS[aid.toLowerCase()];
4467
+ if (!animIdx) {
4468
+ let hash = 0;
4469
+ for (let i = 0; i < aid.length; i++) hash = (hash * 31 + aid.charCodeAt(i)) >>> 0;
4470
+ animIdx = (hash % 6) + 1;
4471
+ }
4472
  }
4473
  const animKey = `guest_anim_${animIdx}`;
4474
  const animIdleKey = `guest_anim_${animIdx}_idle`;
frontend/guest_anim_1.webp CHANGED

Git LFS Details

  • SHA256: 66eda7c39f233f7e1fd74696f4737a3e1ec51de0a63575f4616fb1646c74b254
  • Pointer size: 128 Bytes
  • Size of remote file: 468 Bytes

Git LFS Details

  • SHA256: 4d6d5d2fb33b6f886b606b947a780f84fb880805786495335fab61cb4f280cdd
  • Pointer size: 128 Bytes
  • Size of remote file: 452 Bytes
frontend/guest_anim_2.webp CHANGED

Git LFS Details

  • SHA256: 43ab6870067f634320a7090210de948b456ef231b50dca37e535c1144873ed37
  • Pointer size: 128 Bytes
  • Size of remote file: 464 Bytes

Git LFS Details

  • SHA256: 097bb2cecb0386d4cf113d9f60a10a9e028c1d1c0b348e6d39cabac8b3e9ebdd
  • Pointer size: 128 Bytes
  • Size of remote file: 446 Bytes
frontend/guest_anim_3.webp CHANGED

Git LFS Details

  • SHA256: 5f2f627a8f654987f952f32bb4e5b283555a06641f1e57faa206d198cd046825
  • Pointer size: 128 Bytes
  • Size of remote file: 306 Bytes

Git LFS Details

  • SHA256: e8cb9c060bef3dc2bb7831c3ecf278371fc5ead9da3012af1e5ef2450e4f8303
  • Pointer size: 128 Bytes
  • Size of remote file: 448 Bytes
frontend/guest_anim_4.webp CHANGED

Git LFS Details

  • SHA256: 0f14865c3e1f89efd7172b1a6fef7146bae5374d94a8fb6e45ce10a59dbedd0e
  • Pointer size: 128 Bytes
  • Size of remote file: 322 Bytes

Git LFS Details

  • SHA256: f3fbf03787246518e1bff00aba9a425e907dfb0840d4bea402f0bb6e18ad0b47
  • Pointer size: 128 Bytes
  • Size of remote file: 460 Bytes
frontend/guest_anim_5.webp CHANGED

Git LFS Details

  • SHA256: 81d2d1c2c66d51903b61b3cf43b643d9521fec0610f2221168eaafe96aa71fd6
  • Pointer size: 128 Bytes
  • Size of remote file: 364 Bytes

Git LFS Details

  • SHA256: 56a99e44f0142c14040ab36a6108cc5aef0541d1000d7acd9f727689c871e9b5
  • Pointer size: 128 Bytes
  • Size of remote file: 456 Bytes
frontend/guest_anim_6.webp CHANGED

Git LFS Details

  • SHA256: 81d2d1c2c66d51903b61b3cf43b643d9521fec0610f2221168eaafe96aa71fd6
  • Pointer size: 128 Bytes
  • Size of remote file: 364 Bytes

Git LFS Details

  • SHA256: 748fef5f3ed94698a0d3d96b356407ef8af1997a9fd46f1928e9f75d5570c8c7
  • Pointer size: 128 Bytes
  • Size of remote file: 450 Bytes