feat(share): Add history title to share modal
Adds the title of the current chat history to the share modal. This makes it easier for users to share their conversations with others, as the title provides context for the conversation. The title is fetched from the database and displayed in the share modal.
This commit is contained in:
@@ -46,6 +46,7 @@ export const Header: React.FC<Props> = ({
|
||||
setSelectedSystemPrompt,
|
||||
messages,
|
||||
streaming,
|
||||
historyId
|
||||
} = useMessageOption()
|
||||
const {
|
||||
data: models,
|
||||
@@ -205,7 +206,9 @@ export const Header: React.FC<Props> = ({
|
||||
{pathname === "/" &&
|
||||
messages.length > 0 &&
|
||||
!streaming &&
|
||||
shareModeEnabled && <ShareBtn messages={messages} />}
|
||||
shareModeEnabled && <ShareBtn
|
||||
historyId={historyId}
|
||||
messages={messages} />}
|
||||
<Tooltip title={t("githubRepository")}>
|
||||
<a
|
||||
href="https://github.com/n4ze3m/page-assist"
|
||||
|
||||
Reference in New Issue
Block a user