@eventcatalog/core 2.61.0 → 2.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-3CAAQQUB.js → chunk-CMVDQ42N.js} +1 -1
- package/dist/{chunk-OEWPHKD6.js → chunk-MDWG55PH.js} +1 -1
- package/dist/{chunk-I2B6B3XZ.js → chunk-RPWUOJ3F.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +12 -75
- package/package.json +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MDWG55PH.js";
|
|
4
|
+
import "../chunk-RPWUOJ3F.js";
|
|
5
|
+
import "../chunk-CMVDQ42N.js";
|
|
6
6
|
import "../chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-MDWG55PH.js";
|
|
10
|
+
import "./chunk-RPWUOJ3F.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-55D645EH.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CMVDQ42N.js";
|
|
19
19
|
import {
|
|
20
20
|
getProjectOutDir,
|
|
21
21
|
isAuthEnabled,
|
|
@@ -3,32 +3,17 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
|
3
3
|
import Chat from '@enterprise/eventcatalog-chat/components/Chat';
|
|
4
4
|
import { getChatPromptsGroupedByCategory } from '@enterprise/eventcatalog-chat/utils/chat-prompts';
|
|
5
5
|
import config from '@config';
|
|
6
|
-
import path from 'node:path';
|
|
7
|
-
import fs from 'node:fs';
|
|
8
6
|
import { Code } from 'astro-expressive-code/components';
|
|
9
7
|
import { getDomains } from '@utils/collections/domains';
|
|
10
8
|
import { getEvents } from '@utils/events';
|
|
11
9
|
import { getCommands } from '@utils/commands';
|
|
12
10
|
import { getServices } from '@utils/collections/services';
|
|
13
11
|
import { getQueries } from '@utils/queries';
|
|
14
|
-
import { getConfigurationForGivenGenerator } from '@utils/generators';
|
|
15
12
|
|
|
16
13
|
const isEnabled = config.chat?.enabled || false;
|
|
17
14
|
const chatConfig = config.chat || {};
|
|
18
15
|
const output = config.output || 'static';
|
|
19
16
|
|
|
20
|
-
const aiGeneratorConfig = getConfigurationForGivenGenerator('@eventcatalog/generator-ai');
|
|
21
|
-
let embeddingModel = aiGeneratorConfig?.embedding?.model || 'all-MiniLM-L6-v2';
|
|
22
|
-
|
|
23
|
-
if (aiGeneratorConfig?.embedding?.provider === 'openai') {
|
|
24
|
-
embeddingModel = aiGeneratorConfig?.embedding?.model || 'text-embedding-3-large';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const PROJECT_DIR = path.resolve(process.env.PROJECT_DIR || process.cwd());
|
|
28
|
-
const GENERATED_AI_DIR = path.resolve(PROJECT_DIR, 'public/ai');
|
|
29
|
-
|
|
30
|
-
const directoryExists = fs.existsSync(GENERATED_AI_DIR);
|
|
31
|
-
|
|
32
17
|
// Get all information for the mention input
|
|
33
18
|
const [events, commands, queries, services, domains] = await Promise.all([
|
|
34
19
|
getEvents({ getAllVersions: false }),
|
|
@@ -42,73 +27,25 @@ const allItems = [...events, ...commands, ...queries, ...services, ...domains];
|
|
|
42
27
|
const chatPrompts = await getChatPromptsGroupedByCategory();
|
|
43
28
|
|
|
44
29
|
const resources = allItems.map((item) => ({ id: item.data.id, type: item.collection, name: item.data.name }));
|
|
45
|
-
|
|
46
|
-
const generatorConfig = `
|
|
47
|
-
generators: [
|
|
48
|
-
[
|
|
49
|
-
"@eventcatalog/generator-ai", {
|
|
50
|
-
// If you want to chunk files into smaller chunks, set this to true
|
|
51
|
-
splitMarkdownFiles: true
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
],
|
|
55
|
-
`;
|
|
56
30
|
---
|
|
57
31
|
|
|
58
32
|
<VerticalSideBarLayout title="AI Chat">
|
|
59
33
|
<div class="flex h-[calc(100vh-60px)] bg-white">
|
|
60
34
|
{
|
|
61
35
|
isEnabled ? (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
chatConfig
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
output={output as 'static' | 'server'}
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
</>
|
|
77
|
-
) : (
|
|
78
|
-
<div class="flex items-center justify-center w-full p-4 sm:p-8">
|
|
79
|
-
<div class="max-w-2xl text-center">
|
|
80
|
-
<h2 class="text-2xl font-bold text-gray-900 mb-4">EventCatalog AI Assistant Setup Required</h2>
|
|
81
|
-
<p class="text-gray-600 mb-6">
|
|
82
|
-
To use the AI Assistant, you need to generate the AI data first.
|
|
83
|
-
<br />
|
|
84
|
-
Please install the plugin and run the generator command to generate the AI data.
|
|
85
|
-
</p>
|
|
86
|
-
|
|
87
|
-
<div class="text-left space-y-4">
|
|
88
|
-
<div class="space-y-2">
|
|
89
|
-
<h2 class="text-lg font-semibold text-left">1. Install the generator</h2>
|
|
90
|
-
<Code code={`npm i @eventcatalog/generator-ai`} lang="bash" frame="terminal" />
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div class="space-y-2">
|
|
94
|
-
<h2 class="text-lg font-semibold text-left">2. Configure the generator</h2>
|
|
95
|
-
<Code code={generatorConfig} lang="javascript" frame="terminal" title="eventcatalog.config.js" />
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div class="space-y-2">
|
|
99
|
-
<h2 class="text-lg font-semibold text-left">3. Generate the AI data</h2>
|
|
100
|
-
<Code code={`npm run generate`} lang="bash" frame="none" />
|
|
101
|
-
</div>
|
|
102
|
-
<p class="text-gray-600 text-sm mt-2">
|
|
103
|
-
After running the generator, a new folder called <code class="bg-gray-100 p-1 rounded-md">generated-ai</code>{' '}
|
|
104
|
-
will be created in your project.
|
|
105
|
-
</p>
|
|
106
|
-
|
|
107
|
-
<p class="text-gray-600 text-sm mt-2">Once done, refresh this page.</p>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
36
|
+
<>
|
|
37
|
+
<div id="chatContainer" class="w-full">
|
|
38
|
+
<Chat
|
|
39
|
+
client:only="react"
|
|
40
|
+
chatConfig={{
|
|
41
|
+
...chatConfig,
|
|
42
|
+
}}
|
|
43
|
+
resources={resources}
|
|
44
|
+
chatPrompts={chatPrompts}
|
|
45
|
+
output={output as 'static' | 'server'}
|
|
46
|
+
/>
|
|
110
47
|
</div>
|
|
111
|
-
|
|
48
|
+
</>
|
|
112
49
|
) : (
|
|
113
50
|
<div class="flex items-center justify-center w-full p-4 sm:p-8">
|
|
114
51
|
<div class="max-w-6xl flex flex-col md:flex-row gap-8 md:gap-12 items-center">
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/event-catalog/eventcatalog.git"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"version": "2.61.
|
|
9
|
+
"version": "2.61.1",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@ai-sdk/openai": "^2.0.42",
|
|
27
27
|
"@ai-sdk/react": "^2.0.60",
|
|
28
28
|
"@ai-sdk/rsc": "^1.0.60",
|
|
29
|
-
"@astrojs/markdown-remark": "^6.3.
|
|
30
|
-
"@astrojs/mdx": "^4.3.
|
|
31
|
-
"@astrojs/node": "^9.4.
|
|
32
|
-
"@astrojs/react": "^4.
|
|
29
|
+
"@astrojs/markdown-remark": "^6.3.7",
|
|
30
|
+
"@astrojs/mdx": "^4.3.6",
|
|
31
|
+
"@astrojs/node": "^9.4.4",
|
|
32
|
+
"@astrojs/react": "^4.4.0",
|
|
33
33
|
"@astrojs/rss": "^4.0.12",
|
|
34
34
|
"@astrojs/tailwind": "^6.0.2",
|
|
35
35
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@tanstack/react-table": "^8.17.3",
|
|
57
57
|
"@xyflow/react": "^12.3.6",
|
|
58
58
|
"ai": "^5.0.60",
|
|
59
|
-
"astro": "^5.
|
|
59
|
+
"astro": "^5.14.1",
|
|
60
60
|
"astro-compress": "^2.3.8",
|
|
61
61
|
"astro-expressive-code": "^0.41.3",
|
|
62
62
|
"astro-seo": "^0.8.4",
|