feat: improve assistant background controls
This commit is contained in:
1 parent
0c5fc1d331
commit
41389b61e2
13 files changed
+644
-86
No files matched your search
@@ -0,0 +1,13 @@
|
||||
type AssistantComposerActions = {
|
||||
setText: (text: string) => void;
|
||||
send: () => void;
|
||||
};
|
||||
|
||||
export const sendAssistantPrompt = (composer: AssistantComposerActions, prompt: string) => {
|
||||
const text = prompt.trim();
|
||||
if (text.length === 0) return false;
|
||||
|
||||
composer.setText(text);
|
||||
composer.send();
|
||||
return true;
|
||||
};
|
||||
Reference in new issue
Block a user