fix(chat): 发送后切会话不再误标未读,管理端撤回实时同步到对话页

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 03:54:58 +08:00
parent 1f4e72550a
commit cda5fad2e5
7 changed files with 476 additions and 41 deletions

View File

@@ -0,0 +1,20 @@
"use client";
import { createContext, useContext } from "react";
const PostLinkCtx = createContext(true);
/** 帖内 Markdown 外链是否新标签打开(来自公开站点设置) */
export default function PostLinkProvider({
openInNewTab,
children,
}: {
openInNewTab: boolean;
children: React.ReactNode;
}) {
return <PostLinkCtx.Provider value={openInNewTab}>{children}</PostLinkCtx.Provider>;
}
export function usePostLinkNewTab() {
return useContext(PostLinkCtx);
}