Consume the new session.next.shell.started/ended events instead so
direct shell calls render live, in order with the rest of the
stream, and without SDK fallback polling.
Track each call's source (shell event vs legacy bash tool part) so
whichever arrives first wins; the other is ignored to avoid double
commits when both representations reach the client.
String.length counts code points, not display columns, so CJK
characters and emoji that occupy two terminal cells caused
misaligned cursors, broken mention triggers, and incorrect
history restoration offsets.
Use Bun.stringWidth for now, we need an alternative for this.
Fix#26716Close#26922