Skip to content

Commit 7eed1ed

Browse files
Remove unused code & package
1 parent a0da372 commit 7eed1ed

File tree

6 files changed

+14
-46
lines changed

6 files changed

+14
-46
lines changed

package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
},
2626
"homepage": "https://superluminal.dev",
2727
"dependencies": {
28-
"base64-arraybuffer": "^1.0.2",
2928
"plotly.js": "^2.24.3",
3029
"react": "^18.2.0",
3130
"react-content-loader": "^6.2.1",

src/controllers/SessionController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import UUIDUtilities from "../utilities/UUIDUtilities";
55
import { ChatMessage } from "../models/ChatMessage";
66
import { SessionState } from "../models/SessionState";
77
import { SLWebSocket, SLWebSocketEventListener } from "../networking/WebSocket";
8-
import { TableInfo, TablePage, isTableInfo, isTablePage } from "../models/TableInfo";
8+
import { TablePage, isTablePage } from "../models/TableInfo";
99

1010
export interface SessionControllerEventListener {
1111
onSessionStateUpdated?: (sessionState: SessionState) => void;

src/index.tsx

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import React from 'react';
22

33
import AssistantView from './components/AssistantView';
4-
import SessionController, { SessionControllerEventListener } from './controllers/SessionController';
5-
import TableData from './table/TableData';
6-
import TableView from './table/TableView';
7-
import { TableInfo } from './models/TableInfo';
8-
import UUIDUtilities from './utilities/UUIDUtilities';
9-
import { ChatMessage } from './models/ChatMessage';
4+
import SessionController from './controllers/SessionController';
105

116
interface Props {
127
authToken: string
@@ -18,17 +13,14 @@ interface Props {
1813
sendButtonStyle?: React.CSSProperties
1914
}
2015

21-
interface State {
22-
table: TableData | null
23-
originalRowCount: number | null
24-
}
16+
interface State { }
2517

2618
class Superluminal extends React.Component<Props, State> {
2719
assistantViewRef = React.createRef<AssistantView>();
2820

2921
constructor(props: Props) {
3022
super(props);
31-
this.state = { table: null, originalRowCount: null };
23+
this.state = { };
3224
if (!props.authToken) {
3325
console.log('You must provide a valid Superluminal auth token.');
3426
}
@@ -37,22 +29,16 @@ class Superluminal extends React.Component<Props, State> {
3729

3830
render() {
3931
const { style, userProfilePictureStyle, userMessageStyle, assistantMessageStyle, inputStyle, sendButtonStyle } = this.props;
40-
const { table } = this.state;
41-
return <div style={{ display: 'flex', alignItems: 'stretch', gap: '32px', width: '100%', height: '100%' }}>
42-
<div style={{ minWidth: '420px', minHeight: '640px', maxWidth: '100%', maxHeight: '100%', flexShrink: 0 }}>
43-
<AssistantView
44-
ref={this.assistantViewRef}
45-
style={style}
46-
userProfilePictureStyle={userProfilePictureStyle}
47-
userMessageStyle={userMessageStyle}
48-
assistantMessageStyle={assistantMessageStyle}
49-
inputStyle={inputStyle}
50-
sendButtonStyle={sendButtonStyle}
51-
/>
52-
</div>
53-
<div style={{ flexGrow: 1, overflow: 'hidden' }}>
54-
{ table && <TableView table={table} /> }
55-
</div>
32+
return <div style={{ minWidth: '420px', minHeight: '640px', maxWidth: '100%', maxHeight: '100%', flexShrink: 0 }}>
33+
<AssistantView
34+
ref={this.assistantViewRef}
35+
style={style}
36+
userProfilePictureStyle={userProfilePictureStyle}
37+
userMessageStyle={userMessageStyle}
38+
assistantMessageStyle={assistantMessageStyle}
39+
inputStyle={inputStyle}
40+
sendButtonStyle={sendButtonStyle}
41+
/>
5642
</div>
5743
}
5844

src/networking/Server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import SessionController from "../controllers/SessionController";
21

32
import { ChatMessage } from "../models/ChatMessage";
43
import { SessionState } from "../models/SessionState";

src/networking/WebSocket.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
import { decode } from 'base64-arraybuffer';
3-
42
import ArrayBufferUtilities from '../utilities/ArrayBufferUtilities';
53

64
import { WebSocketMessagePath } from '../models/WebSocketMessagePath';

0 commit comments

Comments
 (0)