|
1 | 1 | import React from 'react';
|
2 |
| -import { ReactWidget } from '@jupyterlab/apputils'; |
| 2 | +import { IThemeManager, ReactWidget } from '@jupyterlab/apputils'; |
3 | 3 | import { settingsIcon } from '@jupyterlab/ui-components';
|
| 4 | +import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; |
4 | 5 |
|
5 | 6 | import { IJaiCompletionProvider } from '../tokens';
|
6 |
| -import { IRenderMimeRegistry } from '@jupyterlab/rendermime'; |
7 | 7 | import { ChatSettings } from '../components/chat-settings';
|
| 8 | +import { JlThemeProvider } from '../components/jl-theme-provider'; |
8 | 9 |
|
9 | 10 | export function buildAiSettings(
|
| 11 | + themeManager: IThemeManager | null, |
10 | 12 | rmRegistry: IRenderMimeRegistry,
|
11 | 13 | completionProvider: IJaiCompletionProvider | null,
|
12 | 14 | openInlineCompleterSettings: () => void
|
13 | 15 | ): ReactWidget {
|
14 | 16 | const SettingsWidget = ReactWidget.create(
|
15 |
| - <ChatSettings |
16 |
| - rmRegistry={rmRegistry} |
17 |
| - completionProvider={completionProvider} |
18 |
| - openInlineCompleterSettings={openInlineCompleterSettings} |
19 |
| - inputOptions={false} |
20 |
| - /> |
| 17 | + <JlThemeProvider themeManager={themeManager}> |
| 18 | + <ChatSettings |
| 19 | + rmRegistry={rmRegistry} |
| 20 | + completionProvider={completionProvider} |
| 21 | + openInlineCompleterSettings={openInlineCompleterSettings} |
| 22 | + inputOptions={false} |
| 23 | + /> |
| 24 | + </JlThemeProvider> |
21 | 25 | );
|
22 | 26 | SettingsWidget.id = 'jupyter-ai::settings';
|
23 | 27 | SettingsWidget.title.icon = settingsIcon;
|
|
0 commit comments