@eventcatalog/core 3.0.0-beta.18 → 3.0.0-beta.19

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.
Files changed (47) hide show
  1. package/README.md +10 -0
  2. package/dist/analytics/analytics.cjs +1 -1
  3. package/dist/analytics/analytics.js +2 -2
  4. package/dist/analytics/log-build.cjs +1 -1
  5. package/dist/analytics/log-build.js +3 -3
  6. package/dist/{chunk-ZOH72FV2.js → chunk-E7QOZU4L.js} +1 -1
  7. package/dist/{chunk-TIBH2HFY.js → chunk-FHSD3KUQ.js} +1 -1
  8. package/dist/{chunk-XT7O6IKS.js → chunk-FQUOTAQT.js} +1 -1
  9. package/dist/{chunk-NUF7T4KS.js → chunk-R6WYYOD5.js} +1 -1
  10. package/dist/{chunk-I4ZR6UIR.js → chunk-ZK4S7XBB.js} +1 -1
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/eventcatalog.cjs +1 -1
  14. package/dist/eventcatalog.js +5 -5
  15. package/dist/generate.cjs +1 -1
  16. package/dist/generate.js +3 -3
  17. package/dist/utils/cli-logger.cjs +1 -1
  18. package/dist/utils/cli-logger.js +2 -2
  19. package/eventcatalog/astro.config.mjs +1 -1
  20. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +814 -0
  21. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +24 -0
  22. package/eventcatalog/src/components/Header.astro +7 -3
  23. package/eventcatalog/src/components/Search/Search.astro +2 -2
  24. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/api/chat.ts +233 -30
  25. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +0 -8
  26. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +4 -0
  27. package/eventcatalog/src/utils/collections/schemas.ts +31 -7
  28. package/eventcatalog/src/utils/feature.ts +4 -1
  29. package/package.json +8 -10
  30. package/eventcatalog/src/enterprise/eventcatalog-chat/components/Chat.tsx +0 -60
  31. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatMessage.tsx +0 -414
  32. package/eventcatalog/src/enterprise/eventcatalog-chat/components/ChatSidebar.tsx +0 -169
  33. package/eventcatalog/src/enterprise/eventcatalog-chat/components/InputModal.tsx +0 -244
  34. package/eventcatalog/src/enterprise/eventcatalog-chat/components/MentionInput.tsx +0 -211
  35. package/eventcatalog/src/enterprise/eventcatalog-chat/components/WelcomePromptArea.tsx +0 -176
  36. package/eventcatalog/src/enterprise/eventcatalog-chat/components/default-prompts.ts +0 -93
  37. package/eventcatalog/src/enterprise/eventcatalog-chat/components/hooks/ChatProvider.tsx +0 -143
  38. package/eventcatalog/src/enterprise/eventcatalog-chat/components/windows/ChatWindow.server.tsx +0 -387
  39. package/eventcatalog/src/enterprise/eventcatalog-chat/pages/chat/index.astro +0 -104
  40. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/ai-provider.ts +0 -140
  41. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/anthropic.ts +0 -28
  42. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/google.ts +0 -41
  43. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/index.ts +0 -26
  44. package/eventcatalog/src/enterprise/eventcatalog-chat/providers/openai.ts +0 -61
  45. package/eventcatalog/src/enterprise/eventcatalog-chat/utils/chat-prompts.ts +0 -50
  46. package/eventcatalog/src/pages/chat/feature.astro +0 -179
  47. package/eventcatalog/src/pages/chat/index.astro +0 -10
@@ -1,104 +0,0 @@
1
- ---
2
- import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
- import Chat from '@enterprise/eventcatalog-chat/components/Chat';
4
- import { getChatPromptsGroupedByCategory } from '@enterprise/eventcatalog-chat/utils/chat-prompts';
5
- import config from '@config';
6
- import { Code } from 'astro-expressive-code/components';
7
- import { getDomains } from '@utils/collections/domains';
8
- import { getEvents } from '@utils/collections/events';
9
- import { getCommands } from '@utils/collections/commands';
10
- import { getServices } from '@utils/collections/services';
11
- import { getQueries } from '@utils/collections/queries';
12
-
13
- const isEnabled = config.chat?.enabled || false;
14
- const chatConfig = config.chat || {};
15
- const output = config.output || 'static';
16
-
17
- // Get all information for the mention input
18
- const [events, commands, queries, services, domains] = await Promise.all([
19
- getEvents({ getAllVersions: false }),
20
- getCommands({ getAllVersions: false }),
21
- getQueries({ getAllVersions: false }),
22
- getServices({ getAllVersions: false }),
23
- getDomains({ getAllVersions: false }),
24
- ]);
25
- const allItems = [...events, ...commands, ...queries, ...services, ...domains];
26
-
27
- const chatPrompts = await getChatPromptsGroupedByCategory();
28
-
29
- const resources = allItems.map((item) => ({ id: item.data.id, type: item.collection, name: item.data.name }));
30
- ---
31
-
32
- <VerticalSideBarLayout title="AI Chat" showNestedSideBar={false}>
33
- <div class="flex h-[calc(100vh-60px)] bg-white">
34
- {
35
- isEnabled ? (
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
- />
47
- </div>
48
- </>
49
- ) : (
50
- <div class="flex items-center justify-center w-full p-4 sm:p-8">
51
- <div class="max-w-6xl flex flex-col md:flex-row gap-8 md:gap-12 items-center">
52
- {/* Left side - Illustration */}
53
- <div class="flex-1">
54
- <img
55
- src="/images/ai-placeholder.png"
56
- alt="AI Assistant Illustration"
57
- class="w-full max-w-sm md:max-w-md mx-auto rounded-lg shadow-lg"
58
- />
59
- </div>
60
-
61
- {/* Right side - Content */}
62
- <div class="flex-1">
63
- <h2 class="text-2xl md:text-3xl font-bold text-gray-900 mb-4">EventCatalog AI Assistant</h2>
64
- <p class="text-gray-600 mb-6 text-base md:text-lg">
65
- Chat with your catalog to quickly find information, understand relationships, and get instant answers about your
66
- architecture. Our AI-powered assistant makes exploring your event catalog faster and more intuitive than ever.
67
- </p>
68
-
69
- <div class="bg-gray-700 rounded-lg p-4 md:p-6 mb-4">
70
- <h3 class="text-lg text-white font-semibold mb-3">Quick Setup</h3>
71
- <Code code={`npm install @eventcatalog/generator-ai`} lang="bash" frame="none" />
72
- <a
73
- href="https://www.eventcatalog.dev/features/ai-assistant"
74
- class="inline-flex items-center text-sm text-white mt-4"
75
- >
76
- Learn more about setup →
77
- </a>
78
- </div>
79
- <p class="text-gray-600 mb-6 text-sm">
80
- Your data stays private and secure - all processing happens locally on your machine.
81
- </p>
82
- </div>
83
- </div>
84
- </div>
85
- )
86
- }
87
- </div>
88
- </VerticalSideBarLayout>
89
-
90
- <style>
91
- .loading-status.ready {
92
- background-color: rgb(240 253 244); /* light green bg */
93
- color: rgb(22 163 74); /* green text */
94
- }
95
-
96
- .loading-status.hidden {
97
- display: none;
98
- }
99
-
100
- /* Add smooth scrolling behavior */
101
- .scroll-smooth {
102
- scroll-behavior: smooth;
103
- }
104
- </style>
@@ -1,140 +0,0 @@
1
- import { streamText, tool, type LanguageModel, type UIMessage, stepCountIs, convertToModelMessages } from 'ai';
2
- import { z } from 'astro/zod';
3
- import config from '@config';
4
-
5
- const getBaseURL = () => {
6
- if (import.meta.env.MODE === 'development') {
7
- return `http://localhost:${config.port || 3000}`;
8
- }
9
- return config.homepageLink || 'https://eventcatalog.dev/';
10
- };
11
-
12
- export const getEventCatalogResources = async () => {
13
- const baseUrl = process.env.EVENTCATALOG_URL || getBaseURL();
14
- const url = new URL('/docs/llm/llms.txt', baseUrl);
15
- const response = await fetch(url.toString());
16
- const text = await response.text();
17
- return text;
18
- };
19
-
20
- export const getResourceInformation = async (type: string, id: string, version: string) => {
21
- const baseUrl = process.env.EVENTCATALOG_URL || getBaseURL();
22
- const url = new URL(`/docs/${type}/${id}/${version}.mdx`, baseUrl);
23
- const response = await fetch(url.toString());
24
- const text = await response.text();
25
- return text;
26
- };
27
-
28
- // base class for AI providers
29
- export interface AIProviderOptions {
30
- modelId: string;
31
- model?: LanguageModel;
32
- temperature?: number;
33
- topP?: number | undefined;
34
- topK?: number | undefined;
35
- frequencyPenalty?: number | undefined;
36
- presencePenalty?: number | undefined;
37
- }
38
-
39
- export class AIProvider {
40
- private model?: string | LanguageModel;
41
- private modelId: string;
42
- private temperature: number;
43
- private topP: number | undefined;
44
- private topK: number | undefined;
45
- private frequencyPenalty: number | undefined;
46
- private presencePenalty: number | undefined;
47
- public models: string[];
48
-
49
- constructor({ modelId, model, temperature, topP, topK, frequencyPenalty, presencePenalty }: AIProviderOptions) {
50
- this.modelId = modelId;
51
- this.temperature = temperature ?? 0.2;
52
- this.topP = topP;
53
- this.topK = topK;
54
- this.frequencyPenalty = frequencyPenalty;
55
- this.presencePenalty = presencePenalty;
56
- this.models = [];
57
-
58
- if (model) {
59
- this.model = model;
60
- }
61
- }
62
-
63
- async validateModel(model: string): Promise<{ isValidModel: boolean; listOfModels: string[] }> {
64
- const isValidModel = this.models.includes(model);
65
- return { isValidModel, listOfModels: this.models };
66
- }
67
-
68
- async streamText(system: string, messages: Array<UIMessage> | Array<Omit<UIMessage, 'id'>>) {
69
- if (!this.model) {
70
- throw new Error('Model not set');
71
- }
72
-
73
- return await streamText({
74
- model: this.model,
75
- system: system ?? '',
76
- messages: convertToModelMessages(messages),
77
- stopWhen: stepCountIs(5),
78
- temperature: this.temperature,
79
- ...(this.topP && { topP: this.topP }),
80
- ...(this.topK && { topK: this.topK }),
81
- ...(this.frequencyPenalty && { frequencyPenalty: this.frequencyPenalty }),
82
- ...(this.presencePenalty && { presencePenalty: this.presencePenalty }),
83
- tools: {
84
- findResources: tool({
85
- description: [
86
- 'Find resources that are available in EventCatalog',
87
- '',
88
- 'Use this tool when you need to:',
89
- '- Get a list of resources in EventCatalog including services, domains, events, commands, queries and flows, ubiquitous language terms and entities',
90
- "- Find a resource's id and version to aid other tool requests",
91
- '- Just return the list of matched resources in EventCatalog with a short description of each resource',
92
- "- Don't return bullet points, just return the list of resources in a readable format",
93
- '- Include the resource name, description, and a link to the resource',
94
- '- When you return a link, remove the .mdx from the end of the url',
95
- '- Return a list of messages the resource produces and consumes, these are marked as sends and receives',
96
- '- If the resource has a domain, include it in the response',
97
- '- Ask the user if they would like more information about a specific resource',
98
- '- When you return a message, in brackets let me know if its a query, command or event',
99
- `- The host URL is ${process.env.EVENTCATALOG_URL}`,
100
- ].join('\n'),
101
- inputSchema: z.object({}),
102
- execute: async () => {
103
- const text = await getEventCatalogResources();
104
- return text;
105
- },
106
- }),
107
- findResource: tool({
108
- description: [
109
- 'Get more information about a service, domain, event, command, query or flow in EventCatalog using its id and version',
110
- 'Use this tool when you need to:',
111
- '- Get more details/information about a service, domain, event, command, query, flow or entity in EventCatalog',
112
- '- Use the id to find more information about a service, domain, event, command, query, flow or entity',
113
- '- Return everything you know about this resource',
114
- '- If the resource has a specification return links to the specification file',
115
- '- When you find owners the url would look something like /docs/users/{id} if its a user or /docs/teams/{id} if its a team',
116
- '- When you return the producers and consumers (the messages the service produces and consumes) make sure they include the url to the documentation, the url would look something like /docs/{type}/{id}, e.g /docs/events/MyEvent/1.0.0 or /docs/commands/MyCommand/1.0.0',
117
- '- When you return owners make sure they include the url to the documentation',
118
- '- If the resource has a domain, include it in the response',
119
- '- Ask the user if they would like more information about a specific resource',
120
- '- When you return a message, in brackets let me know if its a query, command or event',
121
- `- If you are returning a flow (state machine) try and return the result in mermaid to the user, visualizing how the business logic flows`,
122
- `- If you return any URLS make sure to include the host URL ${process.env.EVENTCATALOG_URL}`,
123
- '- You will ALWAYS return the visualizer URL in an IFRAME in the given response - example <iframe src="http://localhost:3000/visualiser/{type}/{id}/{version}?embed=true"></iframe>',
124
- ].join('\n'),
125
- inputSchema: z.object({
126
- id: z.string().describe('The id of the resource to find'),
127
- version: z.string().describe('The version of the resource to find'),
128
- type: z
129
- .enum(['services', 'domains', 'events', 'commands', 'queries', 'flows', 'entities'])
130
- .describe('The type of resource to find'),
131
- }),
132
- execute: async ({ id, version, type }) => {
133
- const text = await getResourceInformation(type, id, version);
134
- return text;
135
- },
136
- }),
137
- },
138
- });
139
- }
140
- }
@@ -1,28 +0,0 @@
1
- import { anthropic } from '@ai-sdk/anthropic';
2
- import { AIProvider, type AIProviderOptions } from './ai-provider';
3
-
4
- const AVAILABLE_GOOGLE_MODELS = [
5
- 'claude-3-7-sonnet-20250219',
6
- 'claude-3-5-sonnet-latest',
7
- 'claude-3-5-sonnet-20241022',
8
- 'claude-3-5-sonnet-20240620',
9
- 'claude-3-5-haiku-latest',
10
- 'claude-3-5-haiku-20241022',
11
- 'claude-3-opus-latest',
12
- 'claude-3-opus-20240229',
13
- 'claude-3-sonnet-20240229',
14
- 'claude-3-haiku-20240307',
15
- ] as const;
16
-
17
- export class AnthropicProvider extends AIProvider {
18
- public models: string[] = [...AVAILABLE_GOOGLE_MODELS];
19
-
20
- constructor(options: AIProviderOptions) {
21
- const languageModel = anthropic(options.modelId || 'claude-3-7-sonnet-20250219');
22
-
23
- super({
24
- ...options,
25
- model: languageModel,
26
- });
27
- }
28
- }
@@ -1,41 +0,0 @@
1
- import { google } from '@ai-sdk/google';
2
- import { AIProvider, type AIProviderOptions } from './ai-provider';
3
-
4
- const AVAILABLE_GOOGLE_MODELS = [
5
- 'gemini-1.5-flash',
6
- 'gemini-1.5-flash-latest',
7
- 'gemini-1.5-flash-001',
8
- 'gemini-1.5-flash-002',
9
- 'gemini-1.5-flash-8b',
10
- 'gemini-1.5-flash-8b-latest',
11
- 'gemini-1.5-flash-8b-001',
12
- 'gemini-1.5-pro',
13
- 'gemini-1.5-pro-latest',
14
- 'gemini-1.5-pro-001',
15
- 'gemini-1.5-pro-002',
16
- 'gemini-2.0-flash',
17
- 'gemini-2.0-flash-001',
18
- 'gemini-2.0-flash-live-001',
19
- 'gemini-2.0-flash-lite',
20
- 'gemini-2.0-pro-exp-02-05',
21
- 'gemini-2.0-flash-thinking-exp-01-21',
22
- 'gemini-2.0-flash-exp',
23
- 'gemini-2.5-pro-exp-03-25',
24
- 'gemini-2.5-pro-preview-05-06',
25
- 'gemini-2.5-flash-preview-04-17',
26
- 'gemini-exp-1206',
27
- 'gemma-3-27b-it',
28
- 'learnlm-1.5-pro-experimental',
29
- ] as const;
30
-
31
- export class GoogleProvider extends AIProvider {
32
- public models: string[] = [...AVAILABLE_GOOGLE_MODELS];
33
-
34
- constructor(options: AIProviderOptions) {
35
- const languageModel = google(options.modelId || 'gemini-1.5-flash');
36
- super({
37
- ...options,
38
- model: languageModel,
39
- });
40
- }
41
- }
@@ -1,26 +0,0 @@
1
- import { OpenAIProvider } from './openai';
2
- import { GoogleProvider } from './google';
3
- import { AnthropicProvider } from './anthropic';
4
- import type { AIProviderOptions } from './ai-provider';
5
-
6
- export function getProvider(provider: string, options: AIProviderOptions) {
7
- switch (provider) {
8
- case 'openai':
9
- return new OpenAIProvider({
10
- ...options,
11
- modelId: options.modelId,
12
- });
13
- case 'google':
14
- return new GoogleProvider({
15
- ...options,
16
- modelId: options.modelId,
17
- });
18
- case 'anthropic':
19
- return new AnthropicProvider({
20
- ...options,
21
- modelId: options.modelId,
22
- });
23
- default:
24
- throw new Error(`Provider ${provider} not supported`);
25
- }
26
- }
@@ -1,61 +0,0 @@
1
- import { openai } from '@ai-sdk/openai';
2
- import { AIProvider, type AIProviderOptions } from './ai-provider';
3
-
4
- const AVAILABLE_OPENAI_MODELS = [
5
- 'o1',
6
- 'o1-2024-12-17',
7
- 'o1-mini',
8
- 'o1-mini-2024-09-12',
9
- 'o1-preview',
10
- 'o1-preview-2024-09-12',
11
- 'o3-mini',
12
- 'o3-mini-2025-01-31',
13
- 'o3',
14
- 'o3-2025-04-16',
15
- 'o4-mini',
16
- 'o4-mini-2025-04-16',
17
- 'gpt-4.1',
18
- 'gpt-4.1-2025-04-14',
19
- 'gpt-4.1-mini',
20
- 'gpt-4.1-mini-2025-04-14',
21
- 'gpt-4.1-nano',
22
- 'gpt-4.1-nano-2025-04-14',
23
- 'gpt-4o',
24
- 'gpt-4o-2024-05-13',
25
- 'gpt-4o-2024-08-06',
26
- 'gpt-4o-2024-11-20',
27
- 'gpt-4o-audio-preview',
28
- 'gpt-4o-audio-preview-2024-10-01',
29
- 'gpt-4o-audio-preview-2024-12-17',
30
- 'gpt-4o-search-preview',
31
- 'gpt-4o-search-preview-2025-03-11',
32
- 'gpt-4o-mini-search-preview',
33
- 'gpt-4o-mini-search-preview-2025-03-11',
34
- 'gpt-4o-mini',
35
- 'gpt-4o-mini-2024-07-18',
36
- 'gpt-4-turbo',
37
- 'gpt-4-turbo-2024-04-09',
38
- 'gpt-4-turbo-preview',
39
- 'gpt-4-0125-preview',
40
- 'gpt-4-1106-preview',
41
- 'gpt-4',
42
- 'gpt-4-0613',
43
- 'gpt-4.5-preview',
44
- 'gpt-4.5-preview-2025-02-27',
45
- 'gpt-3.5-turbo-0125',
46
- 'gpt-3.5-turbo',
47
- 'gpt-3.5-turbo-1106',
48
- 'chatgpt-4o-latest',
49
- ] as const;
50
-
51
- export class OpenAIProvider extends AIProvider {
52
- public models: string[] = [...AVAILABLE_OPENAI_MODELS];
53
-
54
- constructor(options: AIProviderOptions) {
55
- const languageModel = openai(options.modelId || 'o4-mini');
56
- super({
57
- ...options,
58
- model: languageModel,
59
- });
60
- }
61
- }
@@ -1,50 +0,0 @@
1
- import { getCollection } from 'astro:content';
2
- import type { CollectionEntry } from 'astro:content';
3
-
4
- export type ChatPrompt = CollectionEntry<'chatPrompts'>;
5
-
6
- // Update cache to store both versions
7
- let cachedChatPrompts: Record<string, ChatPrompt[]> = {
8
- allVersions: [],
9
- currentVersions: [],
10
- };
11
-
12
- export const getChatPrompts = async (): Promise<ChatPrompt[]> => {
13
- const cacheKey = 'allVersions';
14
-
15
- // Check if we have cached domains for this specific getAllVersions value
16
- if (cachedChatPrompts[cacheKey].length > 0) {
17
- return cachedChatPrompts[cacheKey];
18
- }
19
-
20
- const prompts = await getCollection('chatPrompts');
21
-
22
- return prompts;
23
- };
24
-
25
- export type ChatPromptCategoryGroup = {
26
- label: string;
27
- icon?: string;
28
- items: ChatPrompt[];
29
- };
30
-
31
- export const getChatPromptsGroupedByCategory = async (): Promise<ChatPromptCategoryGroup[]> => {
32
- const prompts = await getChatPrompts();
33
-
34
- const grouped = prompts.reduce(
35
- (acc, prompt) => {
36
- const { id, label, icon } = prompt.data.category;
37
-
38
- if (!acc[id]) {
39
- acc[id] = { label, icon, items: [] };
40
- }
41
-
42
- acc[id].items.push(prompt);
43
- return acc;
44
- },
45
- {} as Record<string, { label: string; icon?: string; items: ChatPrompt[] }>
46
- );
47
-
48
- // Convert the grouped object into the desired array format
49
- return Object.values(grouped);
50
- };
@@ -1,179 +0,0 @@
1
- ---
2
- import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
3
- import { isEventCatalogChatEnabled as hasEventCatlaogChatLicense, isSSR } from '@utils/feature';
4
- import { BotMessageSquare } from 'lucide-react';
5
- const hasChatLicense = hasEventCatlaogChatLicense();
6
-
7
- if (hasChatLicense) {
8
- return Astro.redirect('/chat');
9
- }
10
- ---
11
-
12
- <!doctype html>
13
- <html lang="en">
14
- <head>
15
- <meta charset="UTF-8" />
16
- <meta name="viewport" content="width=device-width" />
17
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
18
- <meta name="generator" content={Astro.generator} />
19
- <title>EventCatalog chat?</title>
20
- </head>
21
- <body>
22
- <VerticalSideBarLayout title="AI Chat" showNestedSideBar={false}>
23
- <div class="min-h-[calc(100vh-60px)] bg-white">
24
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
25
- {/* Hero Section */}
26
- <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center mb-16">
27
- <div>
28
- <div class="inline-flex items-center px-4 py-2 rounded-full bg-purple-100 text-purple-700 font-medium text-sm mb-6">
29
- <BotMessageSquare className="w-4 h-4 mr-2" />
30
- EventCatalog: Agent
31
- </div>
32
- <h1 class="text-4xl font-bold text-gray-900 tracking-tight mb-4">Ask. Understand. Ship faster.</h1>
33
- <p class="text-xl text-gray-600 mb-8">
34
- Get answers about your architecture — instantly. Connect to your own AI models and data.
35
- </p>
36
- <div class="flex flex-col sm:flex-row gap-4 mb-2">
37
- <a
38
- href="https://www.eventcatalog.dev/docs/development/guides/eventcatlaog-chat/what-is-eventcatalog-chat"
39
- target="_blank"
40
- class="inline-flex items-center juNot ready for AI chat? You castify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 transition-colors duration-150"
41
- >
42
- Get Started
43
- <svg class="ml-2 w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
44
- <path
45
- fill-rule="evenodd"
46
- d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
47
- clip-rule="evenodd"></path>
48
- </svg>
49
- </a>
50
- <a
51
- href="https://www.eventcatalog.cloud"
52
- target="_blank"
53
- class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-base font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors duration-150"
54
- >
55
- Try for free
56
- </a>
57
- </div>
58
-
59
- <p class="text-sm text-gray-500 italic mb-6">Available with EventCatalog Starter or Scale plans</p>
60
-
61
- {
62
- !isSSR() && (
63
- <p class="text-sm text-gray-500 my-4 bg-yellow-50 p-4 rounded-lg">
64
- <span class="font-bold">This feature is only available on server side.</span> You can switch to server side by
65
- setting the <code class="font-mono bg-gray-100 p-0.5 rounded">output</code> property to{' '}
66
- <code class="font-mono bg-gray-100 p-0.5 rounded">server</code> in your{' '}
67
- <code class="font-mono bg-gray-100 p-0.5 rounded">eventcatalog.config.js</code> file.
68
- </p>
69
- )
70
- }
71
- </div>
72
-
73
- <div class="relative">
74
- <div class="absolute -inset-4">
75
- <div
76
- class="w-full h-full max-w-full mx-auto opacity-30 blur-lg filter"
77
- style="background: linear-gradient(90deg, #C084FC 0%, #818CF8 100%);"
78
- >
79
- </div>
80
- </div>
81
- <div class="relative">
82
- <div class="bg-white rounded-xl shadow-xl border border-gray-200 overflow-hidden">
83
- <div class="bg-gray-50 px-4 py-3 border-b border-gray-200">
84
- <div class="flex items-center space-x-2">
85
- <div class="w-3 h-3 bg-red-400 rounded-full"></div>
86
- <div class="w-3 h-3 bg-yellow-400 rounded-full"></div>
87
- <div class="w-3 h-3 bg-green-400 rounded-full"></div>
88
- </div>
89
- </div>
90
- <div class="p-4 space-y-4">
91
- <div class="flex justify-end">
92
- <div class="bg-purple-600 text-white rounded-2xl rounded-tr-sm px-4 py-2 max-w-md text-sm">
93
- What services publish order.created?
94
- </div>
95
- </div>
96
-
97
- <div class="flex justify-start">
98
- <div class="bg-gray-50 rounded-2xl rounded-tl-sm px-4 py-3 max-w-md shadow-sm">
99
- <p class="text-gray-700 text-sm">
100
- The <span class="font-semibold">Order Service</span> publishes the order.created event.
101
- </p>
102
- <p class="text-gray-700 text-sm mt-2 mb-1">This event is consumed by:</p>
103
- <ul class="space-y-1 text-gray-600 text-sm">
104
- <li>• Payment Service - Initiates payment processing</li>
105
- <li>• Inventory Service - Updates stock levels</li>
106
- <li>• Notification Service - Sends order confirmations</li>
107
- </ul>
108
- </div>
109
- </div>
110
- </div>
111
- </div>
112
- </div>
113
- </div>
114
- </div>
115
-
116
- {/* Features Section */}
117
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
118
- <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
119
- <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
120
- <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
121
- <path
122
- d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
123
- ></path>
124
- </svg>
125
- </div>
126
- <h3 class="text-lg font-semibold text-gray-900 mb-2">Direct Answers</h3>
127
- <p class="text-gray-600">
128
- Ask questions about your catalog and get direct answers, using your own models and API keys.
129
- </p>
130
- </div>
131
-
132
- <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
133
- <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
134
- <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
135
- <path
136
- d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"
137
- ></path>
138
- </svg>
139
- </div>
140
- <h3 class="text-lg font-semibold text-gray-900 mb-2">Smart Insights</h3>
141
- <p class="text-gray-600">Get intelligent suggestions and insights about your architecture automatically.</p>
142
- </div>
143
-
144
- <div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
145
- <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
146
- <svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
147
- <path
148
- d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"
149
- ></path>
150
- </svg>
151
- </div>
152
- <h3 class="text-lg font-semibold text-gray-900 mb-2">Privacy First</h3>
153
- <p class="text-gray-600">
154
- Runs on your own infrastructure, and your own models. Provide your own API keys to get started.
155
- </p>
156
- </div>
157
- </div>
158
-
159
- {/* Bottom Link */}
160
- <div class="mt-16 text-center">
161
- <a
162
- href="https://www.eventcatalog.dev/docs/development/guides/customize-sidebars/application-sidebar"
163
- target="_blank"
164
- class="text-sm text-gray-400 hover:text-gray-500 transition-colors duration-150"
165
- >
166
- Not ready for AI chat? You can hide this feature in settings
167
- </a>
168
- </div>
169
- </div>
170
- </div>
171
- </VerticalSideBarLayout>
172
- </body>
173
- </html>
174
-
175
- <style>
176
- .scroll-smooth {
177
- scroll-behavior: smooth;
178
- }
179
- </style>
@@ -1,10 +0,0 @@
1
- ---
2
- import ChatPage from '@enterprise/eventcatalog-chat/pages/chat/index.astro';
3
- import { isEventCatalogChatEnabled } from '@utils/feature';
4
- import { buildUrl } from '@utils/url-builder';
5
- if (!isEventCatalogChatEnabled()) {
6
- return Astro.redirect(buildUrl('/chat/feature'));
7
- }
8
- ---
9
-
10
- <ChatPage />