diff --git a/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx b/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx index e11d586b9..a695607cf 100644 --- a/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx +++ b/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx @@ -292,6 +292,13 @@ function ConversationEmptyFooter() { chatForm.setValue('message', promptSelected?.prompt ?? ''); }, [chatForm, promptSelected]); + useEffect(() => { + chatConfigForm.setValue( + 'stream', + promptSelected?.isToolNeeded ? false : DEFAULT_CHAT_CONFIG.stream, + ); + }, [chatConfigForm, chatForm, promptSelected]); + useEffect(() => { if (isWorkflowSelectedAndFilesPresent) { chatForm.setValue( diff --git a/apps/shinkai-desktop/src/pages/chat/empty-message.tsx b/apps/shinkai-desktop/src/pages/chat/empty-message.tsx index cbb5b4419..65eb48b38 100644 --- a/apps/shinkai-desktop/src/pages/chat/empty-message.tsx +++ b/apps/shinkai-desktop/src/pages/chat/empty-message.tsx @@ -117,33 +117,49 @@ const EmptyMessage = () => { {[ { text: 'Search in Perplexity', - prompt: - 'Can you search in Perplexity? If you need more information, ask me a follow up question.', + prompt: 'Search in Perplexity for: ', isToolNeeded: true, }, { text: 'Summarize a Youtube video', - prompt: - 'Can you help me summarize a youtube video? If you need more information, ask me a follow up question.', + prompt: 'Summarize a Youtube video: ', isToolNeeded: true, }, - { - text: 'Tell me about the Roman Empire', - prompt: 'Tell me about the Roman Empire', - }, ].map((suggestion) => ( - onCreateJob(suggestion.prompt, suggestion.isToolNeeded) - } + onClick={() => { + setPromptSelected({ + name: '', + prompt: suggestion.prompt, + is_enabled: true, + is_favorite: false, + is_system: true, + version: '1', + isToolNeeded: suggestion.isToolNeeded, + }); + const element = document.querySelector( + '#chat-input', + ) as HTMLDivElement; + if (element) { + element?.focus?.(); + } + }} variant="outline" > {suggestion.text} ))} + onCreateJob('Tell me about the Roman Empire')} + variant="outline" + > + Tell me about the Roman Empire + +
diff --git a/libs/shinkai-message-ts/src/api/tools/types.ts b/libs/shinkai-message-ts/src/api/tools/types.ts index 73dbf5c32..0231364f5 100644 --- a/libs/shinkai-message-ts/src/api/tools/types.ts +++ b/libs/shinkai-message-ts/src/api/tools/types.ts @@ -138,6 +138,7 @@ export type Prompt = { version: string; is_favorite: boolean; embedding?: string; + isToolNeeded?: boolean; }; export type GetAllPromptsResponse = Prompt[]; export type SearchPromptsResponse = Prompt[];