feat: add toggle to show/hide chat title in browser tab
This commit introduces a new setting in the Interface settings that allows users to control whether the chat title is used as the browser's tab title. The following changes were made: - Added `useChatTitleAsTabTitle` to the `Settings` type in `src/lib/stores/index.ts`. - Added a toggle switch in `src/lib/components/chat/Settings/Interface.svelte` to manage this new setting. - Updated `src/lib/components/chat/Chat.svelte` to conditionally set the document title based on the `useChatTitleAsTabTitle` setting.
This commit is contained in:
@@ -2230,7 +2230,7 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
{$chatTitle
|
||||
{$settings.useChatTitleAsTabTitle !== false && $chatTitle
|
||||
? `${$chatTitle.length > 30 ? `${$chatTitle.slice(0, 30)}...` : $chatTitle} • ${$WEBUI_NAME}`
|
||||
: `${$WEBUI_NAME}`}
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user