diff --git a/apps/shinkai-visor/public/fonts/inter-var-latin.woff2 b/apps/shinkai-visor/public/fonts/inter-var-latin.woff2 new file mode 100644 index 000000000..2fbab974a Binary files /dev/null and b/apps/shinkai-visor/public/fonts/inter-var-latin.woff2 differ diff --git a/apps/shinkai-visor/src/assets/icons/permanent-hero.svg b/apps/shinkai-visor/src/assets/icons/permanent-hero.svg new file mode 100644 index 000000000..8c5ffe0ed --- /dev/null +++ b/apps/shinkai-visor/src/assets/icons/permanent-hero.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/shinkai-visor/src/assets/icons/visor.svg b/apps/shinkai-visor/src/assets/icons/visor.svg index 7ffc86d17..37b17085f 100644 --- a/apps/shinkai-visor/src/assets/icons/visor.svg +++ b/apps/shinkai-visor/src/assets/icons/visor.svg @@ -1,4 +1,8 @@ - - - + + + \ No newline at end of file diff --git a/apps/shinkai-visor/src/components/action-button/action-button.tsx b/apps/shinkai-visor/src/components/action-button/action-button.tsx index be6bcba1d..dd395bb34 100644 --- a/apps/shinkai-visor/src/components/action-button/action-button.tsx +++ b/apps/shinkai-visor/src/components/action-button/action-button.tsx @@ -48,7 +48,12 @@ export const ActionButton = () => { src={srcUrlResolver(shinkaiLogo)} /> - ⌘ + , + + + ⌘ + īš + + ); }; @@ -58,8 +63,8 @@ root.render( -
- +
+
diff --git a/apps/shinkai-visor/src/components/add-agent/add-agent.tsx b/apps/shinkai-visor/src/components/add-agent/add-agent.tsx index 033d82545..11f41b190 100644 --- a/apps/shinkai-visor/src/components/add-agent/add-agent.tsx +++ b/apps/shinkai-visor/src/components/add-agent/add-agent.tsx @@ -103,7 +103,7 @@ export const AddAgent = () => {
@@ -190,11 +190,7 @@ export const AddAgent = () => { )} />
- diff --git a/apps/shinkai-visor/src/components/add-node/add-node.tsx b/apps/shinkai-visor/src/components/add-node/add-node.tsx index 870488c2c..56badab94 100644 --- a/apps/shinkai-visor/src/components/add-node/add-node.tsx +++ b/apps/shinkai-visor/src/components/add-node/add-node.tsx @@ -17,6 +17,7 @@ import * as z from 'zod'; import ScanQrAnimation from '../../assets/animations/scan-qr.json'; import { useAuth } from '../../store/auth/auth'; import { Button } from '../ui/button'; +import ErrorMessage from '../ui/error-message'; import { Form, FormControl, @@ -94,6 +95,8 @@ export const AddNode = () => { const { isLoading, mutateAsync: submitRegistration, + isError: isSubmitError, + error: submitError, } = useSubmitRegistration({ onSuccess: (response) => { if (response.success) { @@ -103,8 +106,14 @@ export const AddNode = () => { permission_type: values.permissionType, node_address: values.nodeAddress, shinkai_identity: values.shinkaiIdentity, - node_signature_pk: response.data?.identity_public_key ?? values.nodeSignaturePublicKey ?? '', - node_encryption_pk: response.data?.encryption_public_key ?? values.nodeEncryptionPublicKey ?? '', + node_signature_pk: + response.data?.identity_public_key ?? + values.nodeSignaturePublicKey ?? + '', + node_encryption_pk: + response.data?.encryption_public_key ?? + values.nodeEncryptionPublicKey ?? + '', registration_name: values.registrationName, my_device_identity_pk: values.myDeviceIdentityPublicKey, my_device_identity_sk: values.myDeviceIdentitySharedKey, @@ -254,15 +263,15 @@ export const AddNode = () => { if (data.status === 'ok') { form.setValue('nodeAddress', DEFAULT_NODE_ADDRESS); form.setValue('shinkaiIdentity', DEFAULT_SHINKAI_IDENTITY); - setCurrentStep(AddNodeSteps.Connect) + setCurrentStep(AddNodeSteps.Connect); } }) .catch((error) => console.error('error polling', error)); }, [form]); return ( -
- Connect +
+ Connect
{currentStep === AddNodeSteps.ScanQR && (
@@ -299,7 +308,7 @@ export const AddNode = () => { className="h-full flex flex-col space-y-2 justify-between" onSubmit={form.handleSubmit(connect)} > -
+
{ )} /> -
-
+ diff --git a/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx b/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx index f5a843f54..19149d9a8 100644 --- a/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx +++ b/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx @@ -105,7 +105,7 @@ export const CreateInbox = () => { type="submit" > {isLoading && } - + diff --git a/apps/shinkai-visor/src/components/create-job/create-job.tsx b/apps/shinkai-visor/src/components/create-job/create-job.tsx index b4fab4c23..6a012fa67 100644 --- a/apps/shinkai-visor/src/components/create-job/create-job.tsx +++ b/apps/shinkai-visor/src/components/create-job/create-job.tsx @@ -3,6 +3,7 @@ import { buildInboxIdFromJobId } from '@shinkai_network/shinkai-message-ts/utils import { useCreateJob } from '@shinkai_network/shinkai-node-state/lib/mutations/createJob/useCreateJob'; import { useAgents } from '@shinkai_network/shinkai-node-state/lib/queries/getAgents/useGetAgents'; import { Loader2 } from 'lucide-react'; +import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; import { FormattedMessage } from 'react-intl'; import { useHistory, useLocation } from 'react-router-dom'; @@ -21,7 +22,6 @@ import { FormLabel, FormMessage, } from '../ui/form'; -import { Input } from '../ui/input'; import { Select, SelectContent, @@ -30,6 +30,7 @@ import { SelectTrigger, SelectValue, } from '../ui/select'; +import { Textarea } from '../ui/textarea'; const formSchema = z.object({ agent: z.string().nonempty(), @@ -63,10 +64,19 @@ export const CreateJob = () => { }); const { isLoading, mutateAsync: createJob } = useCreateJob({ onSuccess: (data) => { + console.log('job created'); const jobId = encodeURIComponent(buildInboxIdFromJobId(data.jobId)); history.replace(`/inboxes/${jobId}`); }, }); + + //TODO: Replace this assigment with a configured default agent + useEffect(() => { + if (agents?.length) { + const defaultAgentId = agents[0].id; + form.setValue('agent', defaultAgentId); + } + }, [agents, form]); const submit = (values: FormSchemaType) => { if (!auth) return; let content = values.content; @@ -94,7 +104,7 @@ export const CreateJob = () => { className="p-1 h-full flex flex-col space-y-2 justify-between" onSubmit={form.handleSubmit(submit)} > -
+
{ +