From 8ea3d57199aae5f5775907836fd88ea450db557c Mon Sep 17 00:00:00 2001 From: weilirs Date: Thu, 14 Nov 2024 21:17:56 +0800 Subject: [PATCH] fix: adjust autocomplete menu's position --- electron/main/filesystem/ipcHandlers.ts | 8 ++++++- src/components/Chat/ChatInput.tsx | 14 +++++++++---- src/components/Chat/ChatSidebar.tsx | 1 + src/components/Chat/FileAutocomplete.tsx | 6 +++++- .../Chat/MessageComponents/ChatSources.tsx | 2 +- src/components/Chat/index.tsx | 21 ++++++++++--------- .../LLMSettings/DefaultLLMSelector.tsx | 1 + 7 files changed, 36 insertions(+), 17 deletions(-) diff --git a/electron/main/filesystem/ipcHandlers.ts b/electron/main/filesystem/ipcHandlers.ts index 006c608c..4c6f7d89 100644 --- a/electron/main/filesystem/ipcHandlers.ts +++ b/electron/main/filesystem/ipcHandlers.ts @@ -8,7 +8,13 @@ import WindowsManager from '../common/windowManager' import { StoreSchema } from '../electron-store/storeConfig' import { handleFileRename, updateFileInTable } from '../vector-database/tableHelperFunctions' -import { GetFilesInfoTree, createFileRecursive, isHidden, GetFilesInfoListForListOfPaths } from './filesystem' +import { + GetFilesInfoTree, + createFileRecursive, + isHidden, + GetFilesInfoListForListOfPaths, + searchFiles, +} from './filesystem' import { FileInfoTree, WriteFileProps, RenameFileProps, FileInfoWithContent } from './types' const registerFileHandlers = (store: Store, _windowsManager: WindowsManager) => { diff --git a/src/components/Chat/ChatInput.tsx b/src/components/Chat/ChatInput.tsx index d23953e5..3d22bc00 100644 --- a/src/components/Chat/ChatInput.tsx +++ b/src/components/Chat/ChatInput.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef } from 'react' +import React, { useRef, useState } from 'react' import { PiPaperPlaneRight } from 'react-icons/pi' import FileAutocomplete from './FileAutocomplete' import { AgentConfig, LoadingState } from '../../lib/llm/types' @@ -131,7 +131,7 @@ const ChatInput: React.FC = ({ return (
-
+
{/* */}