Skip to content

Commit 1b79655

Browse files
resloved bug:16106
1 parent c6feddc commit 1b79655

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

src/frontend/src/components/ChatHistory/ChatHistoryListItem.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ import {
77
DialogType,
88
IconButton,
99
ITextField,
10+
ITooltipHostStyles,
1011
List,
1112
PrimaryButton,
1213
Separator,
1314
Spinner,
1415
SpinnerSize,
1516
Stack,
1617
Text,
17-
TextField
18+
TextField,
19+
TooltipHost,
20+
DirectionalHint,
1821
} from '@fluentui/react'
1922
import { useBoolean } from '@fluentui/react-hooks'
2023

@@ -77,6 +80,10 @@ export const ChatHistoryListItemCell: React.FC<ChatHistoryListItemCellProps> = (
7780
isBlocking: true,
7881
styles: { main: { maxWidth: 450 } }
7982
}
83+
84+
const tooltipStyles: Partial<ITooltipHostStyles> = {
85+
root: { display: 'inline-block', maxWidth: '80%' }
86+
};
8087

8188
if (!item) {
8289
return null
@@ -145,7 +152,7 @@ export const ChatHistoryListItemCell: React.FC<ChatHistoryListItemCellProps> = (
145152
}
146153
}
147154

148-
const truncatedTitle = item?.title?.length > 28 ? `${item.title.substring(0, 28)} ...` : item.title
155+
const truncatedTitle = item?.title?.length > 24 ? `${item.title.substring(0, 24)} ...` : item.title
149156

150157
const handleSaveEdit = async (e: any) => {
151158
e.preventDefault()
@@ -285,9 +292,17 @@ export const ChatHistoryListItemCell: React.FC<ChatHistoryListItemCellProps> = (
285292
) : (
286293
<>
287294
<Stack horizontal verticalAlign={'center'} style={{ width: '100%' }}>
288-
<div className={styles.chatTitle}>{truncatedTitle}</div>
295+
<Stack.Item grow>
296+
<TooltipHost
297+
content={item.title}
298+
directionalHint={DirectionalHint.bottomCenter}
299+
>
300+
<div className={styles.chatTitle}>{truncatedTitle}</div>
301+
</TooltipHost>
302+
</Stack.Item>
303+
{/* <div className={styles.chatTitle}>{truncatedTitle}</div> */}
289304
{(isSelected || isHovered) && (
290-
<Stack horizontal horizontalAlign="end">
305+
<Stack horizontal horizontalAlign="end" styles={{ root: { marginLeft: 'auto' } }}>
291306
<IconButton
292307
className={styles.itemButton}
293308
iconProps={{ iconName: 'Delete' }}

src/start.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set NODE_OPTIONS=--max_old_space_size=8192
55
echo.
66
echo Restoring backend python packages
77
echo.
8-
call python -m pip install -r src/requirements.txt
8+
call python -m pip install -r requirements.txt
99
if "%errorlevel%" neq "0" (
1010
echo Failed to restore backend python packages
1111
exit /B %errorlevel%
@@ -14,7 +14,7 @@ if "%errorlevel%" neq "0" (
1414
echo.
1515
echo Restoring frontend npm packages
1616
echo.
17-
cd src/frontend
17+
cd frontend
1818
call npm install
1919
if "%errorlevel%" neq "0" (
2020
echo Failed to restore frontend npm packages

0 commit comments

Comments
 (0)