fde6503bdf
Memind CI / Test, build, and release guards (push) Has been cancelled
Enable optional SEO/GEO injection and discovery routes for confirmed public pages while keeping private pages noindex. Add premium page template skills, portal catalog API, template shop UI, and Baidu push gated by memind_adm config. Co-authored-by: Cursor <cursoragent@cursor.com>
56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
import {
|
|
applyPageTemplatePrefill,
|
|
buildChatSkillPrompt,
|
|
CHAT_SKILL_DEFINITIONS,
|
|
filterChatSkills as filterChatSkillDefinitions,
|
|
isPageTemplateChatSkillId,
|
|
mergeChatSkillPromptWithInput,
|
|
} from '../../chat-skills.mjs';
|
|
import { buildPublishSkillPrompt, PUBLISH_SKILL_NAME } from './publishSkill';
|
|
|
|
export type ChatSkillIconId =
|
|
| 'spark'
|
|
| 'page'
|
|
| 'search'
|
|
| 'web'
|
|
| 'form'
|
|
| 'table'
|
|
| 'summary'
|
|
| 'analyze';
|
|
|
|
export type ChatSkillOption = {
|
|
id: string;
|
|
label: string;
|
|
icon: ChatSkillIconId;
|
|
skillName?: string;
|
|
buildPrompt: (skillName?: string) => string;
|
|
requiresPublish?: boolean;
|
|
requiresSkill?: string;
|
|
prefillOnly?: boolean;
|
|
};
|
|
|
|
export const CHAT_SKILL_OPTIONS: ChatSkillOption[] = CHAT_SKILL_DEFINITIONS.map((def) => ({
|
|
id: def.id,
|
|
label: def.label,
|
|
icon: def.icon,
|
|
skillName: def.skillName,
|
|
requiresPublish: def.requiresPublish,
|
|
requiresSkill: def.requiresSkill,
|
|
prefillOnly: def.prefillOnly,
|
|
buildPrompt: (skillName) => buildChatSkillPrompt(def.promptKey, skillName ?? def.skillName),
|
|
}));
|
|
|
|
export function filterChatSkills(
|
|
options: ChatSkillOption[],
|
|
ctx: { grantedSkills?: string[]; canPublish: boolean },
|
|
): ChatSkillOption[] {
|
|
return filterChatSkillDefinitions(options, ctx);
|
|
}
|
|
|
|
export { buildPublishSkillPrompt, PUBLISH_SKILL_NAME };
|
|
export {
|
|
applyPageTemplatePrefill,
|
|
isPageTemplateChatSkillId,
|
|
mergeChatSkillPromptWithInput,
|
|
};
|