mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Prefix Khoj page breadcrumbs to chat page title for orientation
Allows tab search by looking at standard prefix. Still allows page title based identification of different Khoj chat sessions
This commit is contained in:
parent
6a9865ace7
commit
5541bc09c8
1 changed files with 3 additions and 2 deletions
|
@ -103,9 +103,10 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Chat() {
|
export default function Chat() {
|
||||||
|
const defaultTitle = 'Khoj AI - Chat';
|
||||||
const [chatOptionsData, setChatOptionsData] = useState<ChatOptions | null>(null);
|
const [chatOptionsData, setChatOptionsData] = useState<ChatOptions | null>(null);
|
||||||
const [isLoading, setLoading] = useState(true);
|
const [isLoading, setLoading] = useState(true);
|
||||||
const [title, setTitle] = useState('Khoj AI - Chat');
|
const [title, setTitle] = useState(defaultTitle);
|
||||||
const [conversationId, setConversationID] = useState<string | null>(null);
|
const [conversationId, setConversationID] = useState<string | null>(null);
|
||||||
const [messages, setMessages] = useState<StreamMessage[]>([]);
|
const [messages, setMessages] = useState<StreamMessage[]>([]);
|
||||||
const [queryToProcess, setQueryToProcess] = useState<string>('');
|
const [queryToProcess, setQueryToProcess] = useState<string>('');
|
||||||
|
@ -232,7 +233,7 @@ export default function Chat() {
|
||||||
return (
|
return (
|
||||||
<div className={styles.main + " " + styles.chatLayout}>
|
<div className={styles.main + " " + styles.chatLayout}>
|
||||||
<title>
|
<title>
|
||||||
{title}
|
{`${defaultTitle}${(!!title && title !== defaultTitle)? `: ${title}` : ''}`}
|
||||||
</title>
|
</title>
|
||||||
{
|
{
|
||||||
!isMobileWidth &&
|
!isMobileWidth &&
|
||||||
|
|
Loading…
Reference in a new issue