18 lines
466 B
TypeScript
18 lines
466 B
TypeScript
export type MentionReferenceEventDetail = {
|
|
threadId: string;
|
|
filename: string;
|
|
path?: string;
|
|
ref_source: "artifact" | "upload";
|
|
};
|
|
|
|
export const MENTION_REFERENCE_EVENT = "deerflow:mention-reference";
|
|
|
|
export function dispatchMentionReference(detail: MentionReferenceEventDetail) {
|
|
if (typeof window === "undefined") return;
|
|
window.dispatchEvent(
|
|
new CustomEvent<MentionReferenceEventDetail>(MENTION_REFERENCE_EVENT, {
|
|
detail,
|
|
}),
|
|
);
|
|
}
|