Skip to content

Commit

Permalink
Remove the settings panel, but keep the option to add one if necessar…
Browse files Browse the repository at this point in the history
…y from an extension, and remove everything related to socket handler in the core
  • Loading branch information
brichet committed Mar 15, 2024
1 parent 99559bd commit 0cf32e6
Show file tree
Hide file tree
Showing 14 changed files with 207 additions and 529 deletions.
63 changes: 0 additions & 63 deletions src/__tests__/chat-settings.spec.ts

This file was deleted.

26 changes: 17 additions & 9 deletions src/components/chat-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ import {
} from '@mui/material';
import SendIcon from '@mui/icons-material/Send';

type ChatInputProps = {
value: string;
onChange: (newValue: string) => unknown;
onSend: () => unknown;
sendWithShiftEnter: boolean;
sx?: SxProps<Theme>;
};

export function ChatInput(props: ChatInputProps): JSX.Element {
export function ChatInput(props: ChatInput.IProps): JSX.Element {
function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
if (
event.key === 'Enter' &&
Expand Down Expand Up @@ -77,3 +69,19 @@ export function ChatInput(props: ChatInputProps): JSX.Element {
</Box>
);
}

/**
* The chat input namespace.
*/
export namespace ChatInput {
/**
* The properties of the react element.
*/
export interface IProps {
value: string;
onChange: (newValue: string) => unknown;
onSend: () => unknown;
sendWithShiftEnter: boolean;
sx?: SxProps<Theme>;
}
}
6 changes: 3 additions & 3 deletions src/components/chat-messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import type { SxProps, Theme } from '@mui/material';
import React, { useState, useEffect } from 'react';

import { RendermimeMarkdown } from './rendermime-markdown';
import { ChatService } from '../services';
import { IChatMessage, IUser } from '../types';

type ChatMessagesProps = {
rmRegistry: IRenderMimeRegistry;
messages: ChatService.IChatMessage[];
messages: IChatMessage[];
};

export type ChatMessageHeaderProps = ChatService.IUser & {
export type ChatMessageHeaderProps = IUser & {
timestamp: string;
sx?: SxProps<Theme>;
};
Expand Down
158 changes: 0 additions & 158 deletions src/components/chat-settings.tsx

This file was deleted.

Loading

0 comments on commit 0cf32e6

Please sign in to comment.