diff --git a/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx b/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx index 3de8b8cfa..86369f173 100644 --- a/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx +++ b/apps/shinkai-desktop/src/components/chat/conversation-footer.tsx @@ -272,6 +272,13 @@ function ConversationEmptyFooter() { chatForm.setValue('message', promptSelected?.prompt ?? ''); }, [chatForm, promptSelected]); + useEffect(() => { + chatConfigForm.setValue( + 'useTools', + promptSelected?.useTools ? true : DEFAULT_CHAT_CONFIG.use_tools, + ); + }, [chatConfigForm, chatForm, promptSelected]); + const onSubmit = async (data: CreateJobFormSchema) => { if (!auth || data.message.trim() === '') return; const selectedVRFiles = diff --git a/apps/shinkai-desktop/src/pages/chat/empty-message.tsx b/apps/shinkai-desktop/src/pages/chat/empty-message.tsx index 1883048ec..fa7d41802 100644 --- a/apps/shinkai-desktop/src/pages/chat/empty-message.tsx +++ b/apps/shinkai-desktop/src/pages/chat/empty-message.tsx @@ -73,6 +73,7 @@ const EmptyMessage = () => { temperature: DEFAULT_CHAT_CONFIG.temperature, top_p: DEFAULT_CHAT_CONFIG.top_p, top_k: DEFAULT_CHAT_CONFIG.top_k, + use_tools: DEFAULT_CHAT_CONFIG.use_tools, }, }); }; @@ -130,6 +131,7 @@ const EmptyMessage = () => { is_favorite: false, is_system: true, version: '1', + useTools: true, }); const element = document.querySelector( '#chat-input', diff --git a/apps/shinkai-desktop/src/pages/public-keys.tsx b/apps/shinkai-desktop/src/pages/public-keys.tsx index f079ccef3..985da9b02 100644 --- a/apps/shinkai-desktop/src/pages/public-keys.tsx +++ b/apps/shinkai-desktop/src/pages/public-keys.tsx @@ -27,6 +27,7 @@ export const PublicKeys = () => { profile_identity_pk: auth?.profile_identity_pk, my_device_encryption_pk: auth?.my_device_encryption_pk, my_device_identity_pk: auth?.my_device_identity_pk, + api_v2_key: auth?.api_v2_key, }, }); @@ -184,6 +185,32 @@ export const PublicKeys = () => { +
+

API Bearer Token

+
+ ( + + +
+ } + field={{ ...field, readOnly: true }} + label={'Bearer Token'} + /> + )} + /> +
+ diff --git a/libs/shinkai-message-ts/src/api/tools/types.ts b/libs/shinkai-message-ts/src/api/tools/types.ts index 0f36a3f82..c5bf4af0d 100644 --- a/libs/shinkai-message-ts/src/api/tools/types.ts +++ b/libs/shinkai-message-ts/src/api/tools/types.ts @@ -150,6 +150,7 @@ export type Prompt = { version: string; is_favorite: boolean; embedding?: string; + useTools?: boolean; }; export type GetAllPromptsResponse = Prompt[]; export type SearchPromptsResponse = Prompt[]; diff --git a/libs/shinkai-node-state/src/forms/settings/public-keys.ts b/libs/shinkai-node-state/src/forms/settings/public-keys.ts index 3cc119b31..72ca5f3cb 100644 --- a/libs/shinkai-node-state/src/forms/settings/public-keys.ts +++ b/libs/shinkai-node-state/src/forms/settings/public-keys.ts @@ -7,6 +7,7 @@ export const publicKeysSchema = z.object({ profile_identity_pk: z.string().optional(), my_device_encryption_pk: z.string().optional(), my_device_identity_pk: z.string().optional(), + api_v2_key: z.string().optional(), }); export type PublicKeysFormSchema = z.infer;