fix(agent-term): split join_room/open_dm cases to fix open_dm always showing ?
join_room and open_dm shared a fall-through case with (fmtRoom(input.room) || fmtUser(input.user_id) || '?'). fmtRoom() returns the string '?' when input.room is undefined — truthy — so the fmtUser() fallback was never reached and open_dm always displayed 'open_dm* ?'. Split into two separate cases: join_room reads input.room, open_dm reads input.user_id. Both degrade to '?' via fmtRoom/fmtUser's own null guard.
This commit is contained in:
parent
44bb64fa1f
commit
66057a97f7
1 changed files with 2 additions and 1 deletions
|
|
@ -1662,8 +1662,9 @@ window.marked = marked;
|
|||
case 'mcp__matrix__send_reaction':
|
||||
return short + ' ' + fmtRoom(input.room) + ' ' + (input.key || '?');
|
||||
case 'mcp__matrix__join_room':
|
||||
return short + ' ' + fmtRoom(input.room);
|
||||
case 'mcp__matrix__open_dm':
|
||||
return short + ' ' + (fmtRoom(input.room) || fmtUser(input.user_id) || '?');
|
||||
return short + ' ' + fmtUser(input.user_id);
|
||||
case 'mcp__matrix__invite_user':
|
||||
return short + ' ' + fmtUser(input.user_id) + ' → ' + fmtRoom(input.room);
|
||||
case 'mcp__matrix__download_file':
|
||||
|
|
|
|||
Loading…
Reference in a new issue