feat: copilot change

This commit is contained in:
Nevo David 2024-06-08 22:06:35 +07:00
parent 498e688332
commit b55a245aa8
5 changed files with 42 additions and 35 deletions

View File

@ -39,6 +39,7 @@ const authenticatedController = [
NotificationsController,
MarketplaceController,
MessagesController,
CopilotController,
];
@Module({
imports: [
@ -59,12 +60,7 @@ const authenticatedController = [
]
: []),
],
controllers: [
StripeController,
AuthController,
CopilotController,
...authenticatedController,
],
controllers: [StripeController, AuthController, ...authenticatedController],
providers: [
AuthService,
StripeService,

View File

@ -145,6 +145,7 @@ export const PickPlatforms: FC<{
const handler = useCallback(
async ({ integrationId }: { integrationId: string }) => {
const findIntegration = integrations.find((p) => p.id === integrationId)!;
console.log(findIntegration);
await addPlatform(findIntegration)();
},
[selectedAccounts, integrations, selectedAccounts]

View File

@ -50,6 +50,7 @@ export const LayoutSettings = ({ children }: { children: ReactNode }) => {
return (
<ContextWrapper user={user}>
<CopilotKit
credentials="include"
runtimeUrl={process.env.NEXT_PUBLIC_BACKEND_URL + '/copilot/chat'}
>
<MantineWrapper>

59
package-lock.json generated
View File

@ -14,10 +14,10 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.529.1",
"@casl/ability": "^6.5.0",
"@copilotkit/backend": "^0.9.0",
"@copilotkit/react-core": "^0.25.0",
"@copilotkit/react-textarea": "^0.35.0",
"@copilotkit/react-ui": "^0.22.0",
"@copilotkit/backend": "^0.37.0",
"@copilotkit/react-core": "^0.37.0",
"@copilotkit/react-textarea": "^0.37.0",
"@copilotkit/react-ui": "^0.37.0",
"@hookform/resolvers": "^3.3.4",
"@mantine/core": "^5.10.5",
"@mantine/dates": "^5.10.5",
@ -3078,11 +3078,12 @@
}
},
"node_modules/@copilotkit/backend": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@copilotkit/backend/-/backend-0.9.0.tgz",
"integrity": "sha512-oAjvtKcOVSpiQDoCxS2JZUzhoaBXGMk4kDm8rDbbDluM9hg+u126IuvO0h4LEehZSoEZ4CI3NhufOl0nzscwOw==",
"version": "0.37.0",
"resolved": "https://registry.npmjs.org/@copilotkit/backend/-/backend-0.37.0.tgz",
"integrity": "sha512-GXl3FZOFcI+Ws3b+urkcFzb9pVyPkihVIKftJmp7geFDs1eSYy39Iof8RU81rWhHZeOR5sqP0CD3jfaDRW0fnQ==",
"dependencies": {
"@copilotkit/shared": "0.9.0",
"@copilotkit/shared": "0.37.0",
"@google/generative-ai": "^0.11.2",
"@langchain/core": "^0.1.61",
"@langchain/openai": "^0.0.28",
"js-tiktoken": "^1.0.8",
@ -3827,11 +3828,11 @@
}
},
"node_modules/@copilotkit/react-core": {
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-core/-/react-core-0.25.0.tgz",
"integrity": "sha512-GmTkgOnUFFJlV9EVqSkWqtwYAbS3iqtoTJm3FzPIr/is6i3x4LjKBhjuV64fB99bssPxcaQ+QyvNPVxTH0A4oQ==",
"version": "0.37.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-core/-/react-core-0.37.0.tgz",
"integrity": "sha512-gUe3ApoD79U63o8CzPL42Bnzz7nNauVs/8qhyHEWFiMHbPeNTsoo9q5L7pB0tdYJpHW3q8grZiGNVRB5utx8Mw==",
"dependencies": {
"@copilotkit/shared": "0.9.0",
"@copilotkit/shared": "0.37.0",
"nanoid": "^4.0.2",
"untruncate-json": "^0.0.1"
},
@ -3857,12 +3858,12 @@
}
},
"node_modules/@copilotkit/react-textarea": {
"version": "0.35.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-textarea/-/react-textarea-0.35.0.tgz",
"integrity": "sha512-V6ljWPds1rCb15W4A2p6TAcgDvyk6vS+mD+HthRoGGBM42JUQudmgFV/agoxWZOmA4mh65/sXedCqrms4QAyHQ==",
"version": "0.37.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-textarea/-/react-textarea-0.37.0.tgz",
"integrity": "sha512-V3mkparkEzGTFJNEx4GSJUA5jDyqqM+5Jmtu6Ku2n6vEbArIgazgYMqui8V42U/suZ09JFRnoec9qROjAPNWRA==",
"dependencies": {
"@copilotkit/react-core": "0.25.0",
"@copilotkit/shared": "0.9.0",
"@copilotkit/react-core": "0.37.0",
"@copilotkit/shared": "0.37.0",
"@emotion/css": "^11.11.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
@ -4650,12 +4651,12 @@
"integrity": "sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA=="
},
"node_modules/@copilotkit/react-ui": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-ui/-/react-ui-0.22.0.tgz",
"integrity": "sha512-rUVlLMrZQFKDTDEr3oC7dDw4Rj+hPK0rg9Rv4w1UMhBuFVT4MM+wdUluORrUwrHjPy4Irih3cvZGj/Ox5z+ggQ==",
"version": "0.37.0",
"resolved": "https://registry.npmjs.org/@copilotkit/react-ui/-/react-ui-0.37.0.tgz",
"integrity": "sha512-33gv+N22o+PzzUtDYnR6M2fgzDA/eP2elaQy1Vao4hP2uXvwC6FdLwbqnON/pNEvjbm96f79R0MpgDYUjorSBw==",
"dependencies": {
"@copilotkit/react-core": "0.25.0",
"@copilotkit/shared": "0.9.0",
"@copilotkit/react-core": "0.37.0",
"@copilotkit/shared": "0.37.0",
"nanoid": "^4.0.2",
"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.5.0",
@ -5683,9 +5684,9 @@
}
},
"node_modules/@copilotkit/shared": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-0.9.0.tgz",
"integrity": "sha512-/zvd0IPYtq+K35JUdeeujjT/UcEhpNwoxzZ7WuRSWXy9KrFBFBLCbaEgu2R4PVCjkDRYFfRbZXXw9y77qrFf+w=="
"version": "0.37.0",
"resolved": "https://registry.npmjs.org/@copilotkit/shared/-/shared-0.37.0.tgz",
"integrity": "sha512-ls4PqjxXH7NlK6ibO+4HUMArzv7ZZLhVdnx/JaG9K1b3Bnv0tuQzczu4s12T/AzXv/5FsmEghrBzMWrvUJbx0g=="
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
@ -6411,6 +6412,14 @@
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz",
"integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q=="
},
"node_modules/@google/generative-ai": {
"version": "0.11.5",
"resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.11.5.tgz",
"integrity": "sha512-DviMgrnljEKh6qkDT2pVFW+NEuVhggqBUoEnyy2PNL7l4ewxXRJubk3PctC9yPl1AdRIlhqP7E076QQt+IWuTg==",
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@hookform/resolvers": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.3.4.tgz",

View File

@ -18,10 +18,10 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.529.1",
"@casl/ability": "^6.5.0",
"@copilotkit/backend": "^0.9.0",
"@copilotkit/react-core": "^0.25.0",
"@copilotkit/react-textarea": "^0.35.0",
"@copilotkit/react-ui": "^0.22.0",
"@copilotkit/backend": "^0.37.0",
"@copilotkit/react-core": "^0.37.0",
"@copilotkit/react-textarea": "^0.37.0",
"@copilotkit/react-ui": "^0.37.0",
"@hookform/resolvers": "^3.3.4",
"@mantine/core": "^5.10.5",
"@mantine/dates": "^5.10.5",