mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
Fix force search when selecting docs to chat with + fix selected document de-selection on chat switch
This commit is contained in:
parent
7d11f5ffb8
commit
4629df06ef
@ -84,10 +84,7 @@ export const Chat = ({
|
||||
textareaRef.current?.focus();
|
||||
|
||||
// only clear things if we're going from one chat session to another
|
||||
if (
|
||||
existingChatSessionId !== null &&
|
||||
existingChatSessionId !== chatSessionId
|
||||
) {
|
||||
if (chatSessionId !== null && existingChatSessionId !== chatSessionId) {
|
||||
// de-select documents
|
||||
clearSelectedDocuments();
|
||||
// reset all filters
|
||||
|
@ -14,6 +14,7 @@ import { SearchSummary, ShowHideDocsButton } from "./SearchSummary";
|
||||
import { SourceIcon } from "@/components/SourceIcon";
|
||||
import { ThreeDots } from "react-loader-spinner";
|
||||
import { SkippedSearch } from "./SkippedSearch";
|
||||
import { SelectedDocuments } from "../modifiers/SelectedDocuments";
|
||||
|
||||
export const Hoverable: React.FC<{
|
||||
children: JSX.Element;
|
||||
@ -99,11 +100,14 @@ export const AIMessage = ({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{handleForceSearch && content && query === undefined && (
|
||||
<div className="my-1">
|
||||
<SkippedSearch handleForceSearch={handleForceSearch} />
|
||||
</div>
|
||||
)}
|
||||
{handleForceSearch &&
|
||||
content &&
|
||||
query === undefined &&
|
||||
!hasDocs && (
|
||||
<div className="my-1">
|
||||
<SkippedSearch handleForceSearch={handleForceSearch} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{content ? (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user