Skip to content

Commit a859690

Browse files
committed
remove other cruft
1 parent db82455 commit a859690

File tree

7 files changed

+7
-39
lines changed

7 files changed

+7
-39
lines changed

frontend/app/view/chat/chat.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class ChatModel {
3131
});
3232
}
3333

34-
function makeChatModel(blockId: string): ChatModel {
35-
return new ChatModel(blockId);
36-
}
37-
3834
interface ChatProps {
3935
model: ChatModel;
4036
}
@@ -67,4 +63,4 @@ const Chat = memo(({ model }: ChatProps) => {
6763
);
6864
});
6965

70-
export { Chat, ChatModel, makeChatModel };
66+
export { Chat, ChatModel };

frontend/app/view/helpview/helpview.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ class HelpViewModel extends WebViewModel {
141141
}
142142
}
143143

144-
function makeHelpViewModel(blockId: string, nodeModel: BlockNodeModel) {
145-
return new HelpViewModel(blockId, nodeModel);
146-
}
147-
148144
function HelpView(props: ViewComponentProps<HelpViewModel>) {
149145
const model = props.model;
150146
const homepageUrl = useAtomValue(model.homepageUrl);
@@ -176,4 +172,4 @@ function HelpView(props: ViewComponentProps<HelpViewModel>) {
176172
);
177173
}
178174

179-
export { HelpView, HelpViewModel, makeHelpViewModel };
175+
export { HelpViewModel };

frontend/app/view/preview/preview.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -869,11 +869,6 @@ export class PreviewModel implements ViewModel {
869869
}
870870
}
871871

872-
function makePreviewModel(blockId: string, nodeModel: BlockNodeModel): PreviewModel {
873-
const previewModel = new PreviewModel(blockId, nodeModel);
874-
return previewModel;
875-
}
876-
877872
function MarkdownPreview({ model }: SpecializedViewProps) {
878873
const connName = useAtomValue(model.connection);
879874
const fileInfo = useAtomValue(model.statFile);
@@ -1231,4 +1226,4 @@ const OpenFileModal = memo(
12311226
}
12321227
);
12331228

1234-
export { makePreviewModel, PreviewView };
1229+
export { PreviewView };

frontend/app/view/quicktipsview/quicktipsview.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ class QuickTipsViewModel implements ViewModel {
2525
}
2626
}
2727

28-
function makeQuickTipsViewModel() {
29-
return new QuickTipsViewModel();
30-
}
31-
3228
function QuickTipsView({ model }: { model: QuickTipsViewModel }) {
3329
return (
3430
<div className="quicktips-view">
@@ -37,4 +33,4 @@ function QuickTipsView({ model }: { model: QuickTipsViewModel }) {
3733
);
3834
}
3935

40-
export { makeQuickTipsViewModel, QuickTipsView, QuickTipsViewModel };
36+
export { QuickTipsViewModel };

frontend/app/view/sysinfo/sysinfo.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,6 @@ class SysinfoViewModel implements ViewModel {
321321
}
322322
}
323323

324-
function makeSysinfoViewModel(blockId: string, viewType: string): SysinfoViewModel {
325-
const sysinfoViewModel = new SysinfoViewModel(blockId, viewType);
326-
return sysinfoViewModel;
327-
}
328-
329324
const plotColors = ["#58C142", "#FFC107", "#FF5722", "#2196F3", "#9C27B0", "#00BCD4", "#FFEB3B", "#795548"];
330325

331326
type SysinfoViewProps = {
@@ -562,4 +557,4 @@ const SysinfoViewInner = React.memo(({ model }: SysinfoViewProps) => {
562557
);
563558
});
564559

565-
export { makeSysinfoViewModel, SysinfoView, SysinfoViewModel };
560+
export { SysinfoViewModel };

frontend/app/view/waveai/waveai.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,6 @@ export class WaveAiModel implements ViewModel {
434434
}
435435
}
436436

437-
function makeWaveAiViewModel(blockId: string): WaveAiModel {
438-
const waveAiModel = new WaveAiModel(blockId);
439-
return waveAiModel;
440-
}
441-
442437
const ChatItem = ({ chatItemAtom, model }: ChatItemProps) => {
443438
const chatItem = useAtomValue(chatItemAtom);
444439
const { user, text } = chatItem;
@@ -873,4 +868,4 @@ const WaveAi = ({ model }: { model: WaveAiModel; blockId: string }) => {
873868
);
874869
};
875870

876-
export { makeWaveAiViewModel, WaveAi };
871+
export { WaveAi };

frontend/app/view/webview/webview.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,11 +594,6 @@ export class WebViewModel implements ViewModel {
594594
}
595595
}
596596

597-
function makeWebViewModel(blockId: string, nodeModel: BlockNodeModel): WebViewModel {
598-
const webviewModel = new WebViewModel(blockId, nodeModel);
599-
return webviewModel;
600-
}
601-
602597
const BookmarkTypeahead = memo(
603598
({ model, blockRef }: { model: WebViewModel; blockRef: React.RefObject<HTMLDivElement> }) => {
604599
const openBookmarksJson = () => {
@@ -898,4 +893,4 @@ const WebView = memo(({ model, onFailLoad, blockRef }: WebViewProps) => {
898893
);
899894
});
900895

901-
export { WebView, makeWebViewModel };
896+
export { WebView };

0 commit comments

Comments
 (0)