How to use code to open new Agent Chat and pre-fill content

I know how to use composer.newAgentChat to open a new Agent Chat window. Is there a way to programmatically pre-fill the prompt or initial message when opening the chat?