import React from 'react'; import type { MarkdownEditorInstance } from '../../MarkdownEditor'; import type { ComposerSlashChip } from '../../MarkdownEditor/editor/elements/ComposerChip/types'; import type { MarkdownInputFieldProps } from '../types/MarkdownInputFieldProps'; interface UseSendGateParams { props: Pick; markdownEditorRef: React.MutableRefObject; } export interface SendGateResult { /** * 发送前 gate 检查。 * 返回 true = 拦截(存在未配置 chip 且宿主未允许直接发送)。 */ shouldBlockSend: () => boolean; /** 当前未配置的 slash chip 列表(gate 拦截时宿主可用于提示) */ getUnconfiguredChips: () => ComposerSlashChip[]; } /** * 发送前 gate(对齐 dtcoder-ide guiSlashSendGate)。 * * 输入内容中存在「未配置参数」的结构化 slash chip 时阻止发送, * 交由宿主通过 onSlashChipGate 回调提示用户配置(如打开配置浮层)。 * 未启用 composerChips 或未传 onSlashChipGate 时 gate 不生效。 */ export declare const useSendGate: ({ props, markdownEditorRef, }: UseSendGateParams) => SendGateResult; export {};