this is n * m complexity, which may be okay if m (== existing cells) remain small. If not, consider a mapping to a set here. _Originally posted by @JGuinegagne in https://github.com/jupyterlab/jupyter-chat/pull/248#discussion_r2183981412_