Skip to content

Commit 24a0e4a

Browse files
committed
chore(assistant): use imports from compass-components; update eslint check to include @lg-chat namespace in it
1 parent 353e6ae commit 24a0e4a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

configs/eslint-plugin-compass/rules/no-leafygreen-outside-compass-components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ module.exports = {
138138

139139
return {
140140
ImportDeclaration(node) {
141-
if (isImportSourceEquals(/^@leafygreen-ui/, node)) {
141+
if (isImportSourceEquals(/^@(leafygreen-ui|lg-chat)/, node)) {
142142
reportLeafygreenUsage(context, node, node.source);
143143
}
144144
},
145145
CallExpression(node) {
146-
if (isRequireSourceEquals(/^@leafygreen-ui/, node)) {
146+
if (isRequireSourceEquals(/^@(leafygreen-ui|lg-chat)/, node)) {
147147
reportLeafygreenUsage(context, node, node.arguments[0]);
148148
}
149149
},

packages/compass-assistant/src/assistant-chat.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ import React, { useCallback } from 'react';
22
import type { AssistantMessage } from './compass-assistant-provider';
33
import type { Chat } from './@ai-sdk/react/chat-react';
44
import { useChat } from './@ai-sdk/react/use-chat';
5-
import { ChatWindow } from '@lg-chat/chat-window';
65
import {
7-
LeafyGreenChatProvider,
8-
Variant,
9-
} from '@lg-chat/leafygreen-chat-provider';
10-
import { Message } from '@lg-chat/message';
11-
import { MessageFeed } from '@lg-chat/message-feed';
12-
import { InputBar } from '@lg-chat/input-bar';
6+
LgChatChatWindow,
7+
LgChatLeafygreenChatProvider,
8+
LgChatMessage,
9+
LgChatMessageFeed,
10+
LgChatInputBar,
11+
} from '@mongodb-js/compass-components';
12+
13+
const { ChatWindow } = LgChatChatWindow;
14+
const { LeafyGreenChatProvider, Variant } = LgChatLeafygreenChatProvider;
15+
const { Message } = LgChatMessage;
16+
const { MessageFeed } = LgChatMessageFeed;
17+
const { InputBar } = LgChatInputBar;
1318

1419
interface AssistantChatProps {
1520
chat: Chat<AssistantMessage>;

0 commit comments

Comments
 (0)