"use client"; import { useMemo, useState } from "react"; import { useStore } from "@/lib/store"; import { useT } from "@/lib/i18n"; import { useTemplates, fetchTemplateExample, scenarioLabelKey, type TemplateDef, } from "@/lib/templates"; /** * Samples gallery — rendered on the "示例" tab in the editor pane. The list * comes from `/api/templates` filtered to skills that ship a pre-rendered * `example.html` (so every card has something to preview). Each card uses * `