Skip to content

Commit cf110f9

Browse files
committed
minor changes
1 parent c203815 commit cf110f9

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

tools/server/webui/src/components/ChatScreen.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ function getListMessageDisplay(
6161
for (const msg of msgs) {
6262
nodeMap.set(msg.id, msg);
6363
}
64-
6564
// find leaf node from a message node
6665
const findLeafNode = (msgId: Message['id']): Message['id'] => {
6766
let currNode: Message | undefined = nodeMap.get(msgId);
@@ -71,9 +70,8 @@ function getListMessageDisplay(
7170
}
7271
return currNode?.id ?? -1;
7372
};
74-
7573
const processedIds = new Set<Message['id']>();
76-
74+
// traverse the current nodes
7775
for (const currentMessage of currNodes) {
7876
if (processedIds.has(currentMessage.id) || currentMessage.type === 'root') {
7977
continue;

tools/server/webui/src/components/SettingDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from 'react';
1+
import { ReactElement, useState } from 'react';
22
import { useAppContext } from '../utils/app.context';
33
import { CONFIG_DEFAULT, CONFIG_INFO } from '../Config';
44
import { isDev } from '../Config';
@@ -53,8 +53,8 @@ enum SettingInputType {
5353

5454
interface SettingFieldInput {
5555
type: Exclude<SettingInputType, SettingInputType.CUSTOM>;
56-
label: string | React.ReactElement;
57-
help?: string | React.ReactElement;
56+
label: string | ReactElement;
57+
help?: string | ReactElement;
5858
key: SettKey;
5959
}
6060

tools/server/webui/src/utils/misc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function normalizeMsgsForAPI(messages: Readonly<Message[]>) {
103103
return {
104104
role: msg.role,
105105
content: contentArr,
106-
} as APIMessage;
106+
};
107107
}) as APIMessage[];
108108
}
109109

0 commit comments

Comments
 (0)