Skip to content

Commit

Permalink
Cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Feb 29, 2024
1 parent 6583d30 commit f5f8ef8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/chat-handler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { URLExt } from '@jupyterlab/coreutils';
import { IDisposable } from '@lumino/disposable';
import { ServerConnection } from '@jupyterlab/services';
import { URLExt } from '@jupyterlab/coreutils';

import { requestAPI } from './handler';
import { ChatService } from './services';

Expand Down
5 changes: 2 additions & 3 deletions src/components/chat-messages.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useState, useEffect } from 'react';

import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import { Avatar, Box, Typography } from '@mui/material';
import type { SxProps, Theme } from '@mui/material';
import React, { useState, useEffect } from 'react';

import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import { RendermimeMarkdown } from './rendermime-markdown';
import { ChatService } from '../services';

Expand Down
10 changes: 5 additions & 5 deletions src/components/chat-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {
} from '@mui/material';
import React, { useEffect, useState } from 'react';

import { ChatService } from '../services';
import { useStackingAlert } from './mui-extras/stacking-alert';
import { ServerInfoState, useServerInfo } from './settings/use-server-info';
import { minifyUpdate } from './settings/minify';
import { useStackingAlert } from './mui-extras/stacking-alert';
import { ChatService } from '../services';

// /**
// * Component that returns the settings view in the chat panel.
// */
/**
* Component that returns the settings view in the chat panel.
*/
export function ChatSettings(): JSX.Element {
// state fetched on initial render
const server = useServerInfo();
Expand Down
1 change: 0 additions & 1 deletion src/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { URLExt } from '@jupyterlab/coreutils';

import { ServerConnection } from '@jupyterlab/services';

const API_NAMESPACE = 'api/chat';
Expand Down
7 changes: 3 additions & 4 deletions src/widgets/chat-error.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react';
import { ReactWidget } from '@jupyterlab/apputils';
import type { IThemeManager } from '@jupyterlab/apputils';
import { IThemeManager, ReactWidget } from '@jupyterlab/apputils';
import { Alert, Box } from '@mui/material';
import React from 'react';

import { chatIcon } from '../icons';
import { JlThemeProvider } from '../components/jl-theme-provider';
import { chatIcon } from '../icons';

export function buildErrorWidget(
themeManager: IThemeManager | null
Expand Down
7 changes: 3 additions & 4 deletions src/widgets/chat-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { IThemeManager, ReactWidget } from '@jupyterlab/apputils';
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import React from 'react';
import { ReactWidget } from '@jupyterlab/apputils';
import type { IThemeManager } from '@jupyterlab/apputils';

import { Chat } from '../components/chat';
import { chatIcon } from '../icons';
import { ChatHandler } from '../chat-handler';
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
import { chatIcon } from '../icons';

export function buildChatSidebar(
chatHandler: ChatHandler,
Expand Down

0 comments on commit f5f8ef8

Please sign in to comment.