mirror of
https://github.com/arc53/DocsGPT.git
synced 2026-03-07 14:24:35 +00:00
fix: sources display2
This commit is contained in:
@@ -262,6 +262,7 @@ const ConnectorTree: React.FC<ConnectorTreeProps> = ({
|
||||
name: string,
|
||||
isFile: boolean,
|
||||
_itemId: string,
|
||||
displayName?: string,
|
||||
): MenuOption[] => {
|
||||
const options: MenuOption[] = [];
|
||||
|
||||
@@ -271,7 +272,7 @@ const ConnectorTree: React.FC<ConnectorTreeProps> = ({
|
||||
onClick: (event: React.SyntheticEvent) => {
|
||||
event.stopPropagation();
|
||||
if (isFile) {
|
||||
handleFileClick(name);
|
||||
handleFileClick(name, displayName);
|
||||
} else {
|
||||
navigateToDirectory(name);
|
||||
}
|
||||
@@ -540,7 +541,7 @@ const ConnectorTree: React.FC<ConnectorTreeProps> = ({
|
||||
setIsOpen={(isOpen) =>
|
||||
setActiveMenuId(isOpen ? itemId : null)
|
||||
}
|
||||
options={getActionOptions(name, true, itemId)}
|
||||
options={getActionOptions(name, true, itemId, displayName)}
|
||||
anchorRef={menuRef}
|
||||
position="bottom-left"
|
||||
offset={{ x: -4, y: 4 }}
|
||||
|
||||
@@ -215,6 +215,7 @@ const FileTree: React.FC<FileTreeProps> = ({
|
||||
name: string,
|
||||
isFile: boolean,
|
||||
_itemId: string,
|
||||
displayName?: string,
|
||||
): MenuOption[] => {
|
||||
const options: MenuOption[] = [];
|
||||
|
||||
@@ -224,7 +225,7 @@ const FileTree: React.FC<FileTreeProps> = ({
|
||||
onClick: (event: React.SyntheticEvent) => {
|
||||
event.stopPropagation();
|
||||
if (isFile) {
|
||||
handleFileClick(name);
|
||||
handleFileClick(name, displayName);
|
||||
} else {
|
||||
navigateToDirectory(name);
|
||||
}
|
||||
@@ -669,7 +670,7 @@ const FileTree: React.FC<FileTreeProps> = ({
|
||||
setIsOpen={(isOpen) =>
|
||||
setActiveMenuId(isOpen ? itemId : null)
|
||||
}
|
||||
options={getActionOptions(name, true, itemId)}
|
||||
options={getActionOptions(name, true, itemId, displayName)}
|
||||
anchorRef={menuRef}
|
||||
position="bottom-left"
|
||||
offset={{ x: -4, y: 4 }}
|
||||
|
||||
Reference in New Issue
Block a user