Skip to content

Commit

Permalink
revert to previous doc select logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodanswer committed Nov 22, 2024
1 parent 5dc07d4 commit 2c7c9fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions web/src/app/chat/ChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,10 @@ export function ChatPage({
const newCompleteMessageMap = new Map(
messageMap
);
console.log(
"newCompleteMessageMap",
newCompleteMessageMap
);
newCompleteMessageMap.get(
message.parentMessageId!
)!.latestChildMessageId = messageId;
Expand Down Expand Up @@ -2461,7 +2465,6 @@ export function ChatPage({
textAreaRef={textAreaRef}
chatSessionId={chatSessionIdRef.current!}
/>

{enterpriseSettings &&
enterpriseSettings.custom_lower_disclaimer_content && (
<div className="mobile:hidden mt-4 flex items-center justify-center relative w-[95%] mx-auto">
Expand All @@ -2474,7 +2477,6 @@ export function ChatPage({
</div>
</div>
)}

{enterpriseSettings &&
enterpriseSettings.use_custom_logotype && (
<div className="hidden lg:block absolute right-0 bottom-0">
Expand Down
3 changes: 2 additions & 1 deletion web/src/app/chat/documentSidebar/DocumentSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export const DocumentSidebar = forwardRef<HTMLDivElement, DocumentSidebarProps>(
<div className="pb-6 flex-initial overflow-y-hidden flex flex-col h-screen">
{popup}
<div className="pl-3 mx-2 pr-6 mt-3 flex text-text-800 flex-col text-2xl text-emphasis flex font-semibold">
{dedupedDocuments.length} Documents
{dedupedDocuments.length} Document
{dedupedDocuments.length > 1 ? "s" : ""}
<p className="text-sm font-semibold flex flex-wrap gap-x-2 text-text-600 mt-1">
Select to add to continuous context
<a
Expand Down
5 changes: 3 additions & 2 deletions web/src/app/chat/message/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,10 @@ export const AIMessage = ({
))}
<div
onClick={() => {
if (toggleDocumentSelection) {
toggleDocumentSelection();
if (messageId) {
onMessageSelection?.(messageId);
}
toggleDocumentSelection?.();
}}
key={-1}
className="cursor-pointer w-[200px] rounded-lg flex-none transition-all duration-500 hover:bg-background-125 bg-text-100 px-4 py-2 border-b"
Expand Down

0 comments on commit 2c7c9fb

Please sign in to comment.