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:
iris 2026-07-04 12:41:18 +02:00 committed by mara
commit 66057a97f7

View file

@ -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':