mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Update layout and rendering of share page for hidden agent
This commit is contained in:
@@ -79,7 +79,8 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="flex flex-row h-full w-full">
|
||||||
|
<div className="flex flex-col h-full w-full">
|
||||||
<div className={false ? styles.chatBody : styles.chatBodyFull}>
|
<div className={false ? styles.chatBody : styles.chatBodyFull}>
|
||||||
<ChatHistory
|
<ChatHistory
|
||||||
publicConversationSlug={props.publicConversationSlug}
|
publicConversationSlug={props.publicConversationSlug}
|
||||||
@@ -92,7 +93,7 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`${styles.inputBox} p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ${chatHistoryCustomClassName} mr-auto ml-auto`}
|
className={`${styles.inputBox} p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ${chatHistoryCustomClassName} mr-auto ml-auto mt-auto`}
|
||||||
>
|
>
|
||||||
<ChatInputArea
|
<ChatInputArea
|
||||||
isLoggedIn={props.isLoggedIn}
|
isLoggedIn={props.isLoggedIn}
|
||||||
@@ -104,11 +105,12 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
|||||||
agentColor={agentMetadata?.color}
|
agentColor={agentMetadata?.color}
|
||||||
isMobileWidth={props.isMobileWidth}
|
isMobileWidth={props.isMobileWidth}
|
||||||
setUploadedFiles={props.setUploadedFiles}
|
setUploadedFiles={props.setUploadedFiles}
|
||||||
setTriggeredAbort={() => {}}
|
setTriggeredAbort={() => { }}
|
||||||
ref={chatInputRef}
|
ref={chatInputRef}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ div.inputBox:focus {
|
|||||||
div.chatBodyFull {
|
div.chatBodyFull {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.inputBox {
|
button.inputBox {
|
||||||
|
|||||||
@@ -280,7 +280,19 @@ def get_shared_chat(
|
|||||||
|
|
||||||
agent_metadata = None
|
agent_metadata = None
|
||||||
if conversation.agent:
|
if conversation.agent:
|
||||||
if conversation.agent.privacy_level == Agent.PrivacyLevel.PRIVATE:
|
if conversation.agent.privacy_level == Agent.PrivacyLevel.PRIVATE and conversation.agent.creator != user:
|
||||||
|
if conversation.agent.is_hidden:
|
||||||
|
default_agent = AgentAdapters.get_default_agent()
|
||||||
|
agent_metadata = {
|
||||||
|
"slug": default_agent.slug,
|
||||||
|
"name": default_agent.name,
|
||||||
|
"is_creator": False,
|
||||||
|
"color": default_agent.style_color,
|
||||||
|
"icon": default_agent.style_icon,
|
||||||
|
"persona": default_agent.personality,
|
||||||
|
"is_hidden": default_agent.is_hidden,
|
||||||
|
}
|
||||||
|
else:
|
||||||
conversation.agent = None
|
conversation.agent = None
|
||||||
else:
|
else:
|
||||||
agent_metadata = {
|
agent_metadata = {
|
||||||
|
|||||||
Reference in New Issue
Block a user