u
This commit is contained in:
@@ -327,6 +327,24 @@ const actions = {
|
||||
void chatAutomat.actions.loadConversations();
|
||||
},
|
||||
|
||||
/**
|
||||
* Open the chat drawer and append text / prompt to the chat composer.
|
||||
* @param {string} prompt
|
||||
*/
|
||||
insertPrompt(prompt = '') {
|
||||
chatOpenedThisSession = true;
|
||||
chatAutomat.setState((prev) => ({
|
||||
isOpen: true,
|
||||
sseEstablished: true,
|
||||
pendingInput: prev.pendingInput ? `${prev.pendingInput}\n\n${prompt}` : prompt,
|
||||
}));
|
||||
ensureCompanyEventsConnected();
|
||||
if (!chatAutomat.state.selectedConversationId && !chatAutomat.state.draftConversation) {
|
||||
chatAutomat.actions.startDraft();
|
||||
}
|
||||
void chatAutomat.actions.loadConversations();
|
||||
},
|
||||
|
||||
/**
|
||||
* Start an implicit new conversation with the first preset model. Nothing is
|
||||
* created on the server until the first message is sent.
|
||||
|
||||
Reference in New Issue
Block a user