+
+
+
+
{agents?.map((agent) => (
-
- {agent.id}
-
-
+
))}
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 19149d9a8..3305a0ec2 100644
--- a/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx
+++ b/apps/shinkai-visor/src/components/create-inbox/create-inbox.tsx
@@ -1,16 +1,24 @@
import { zodResolver } from '@hookform/resolvers/zod';
-import { useCreateChat } from "@shinkai_network/shinkai-node-state/lib/mutations/createChat/useCreateChat";
+import { useCreateChat } from '@shinkai_network/shinkai-node-state/lib/mutations/createChat/useCreateChat';
import { Loader2 } from 'lucide-react';
import { useEffect } from 'react';
import { useForm } from 'react-hook-form';
-import { FormattedMessage } from 'react-intl';
+import { FormattedMessage, useIntl } from 'react-intl';
import { useHistory } from 'react-router-dom';
import { z } from 'zod';
import { useAuth } from '../../store/auth/auth';
import { Button } from '../ui/button';
-import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '../ui/form';
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from '../ui/form';
import { Input } from '../ui/input';
+import { Textarea } from '../ui/textarea';
const formSchema = z.object({
receiverIdentity: z.string().nonempty(),
@@ -22,7 +30,7 @@ type FormSchemaType = z.infer
;
export const CreateInbox = () => {
const history = useHistory();
const auth = useAuth((state) => state.auth);
-
+ const intl = useIntl();
const form = useForm({
resolver: zodResolver(formSchema),
defaultValues: {
@@ -32,19 +40,17 @@ export const CreateInbox = () => {
});
const { isLoading, mutateAsync: createChat } = useCreateChat({
onSuccess: (data) => {
- history.replace(
- `/inboxes/${encodeURIComponent(data.inboxId)}`
- );
+ history.replace(`/inboxes/${encodeURIComponent(data.inboxId)}`);
},
});
const submit = (values: FormSchemaType) => {
if (!auth) return;
- const [receiver, ...rest] = values.receiverIdentity.split("/");
+ const [receiver, ...rest] = values.receiverIdentity.split('/');
createChat({
sender: auth.shinkai_identity,
senderSubidentity: `${auth.profile}/device/${auth.registration_name}`,
receiver,
- receiverSubidentity: rest.join("/"),
+ receiverSubidentity: rest.join('/'),
message: values.message,
my_device_encryption_sk: auth.my_device_encryption_sk,
my_device_identity_sk: auth.my_device_identity_sk,
@@ -61,53 +67,65 @@ export const CreateInbox = () => {
}, [auth, form]);
return (
-
-
+
+ (
+
+
+
+
+
+
+
+
+
+ )}
+ />
+
+ (
+
+
+
+
+
+
+
+
+
+ )}
+ />
+
+
+
+
+
);
};
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 b50ddc61e..f43d733bf 100644
--- a/apps/shinkai-visor/src/components/create-job/create-job.tsx
+++ b/apps/shinkai-visor/src/components/create-job/create-job.tsx
@@ -5,7 +5,7 @@ import { useAgents } from '@shinkai_network/shinkai-node-state/lib/queries/getAg
import { Loader2, Workflow } from 'lucide-react';
import { useEffect } from 'react';
import { useForm } from 'react-hook-form';
-import { FormattedMessage } from 'react-intl';
+import { FormattedMessage, useIntl } from 'react-intl';
import { useHistory, useLocation } from 'react-router-dom';
import { z } from 'zod';
@@ -41,6 +41,7 @@ type FormSchemaType = z.infer