@windrun-huaiin/third-ui 5.7.0 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3074,7 +3074,7 @@ import { useCopyButton } from "fumadocs-ui/utils/use-copy-button";
3074
3074
  import Link4 from "fumadocs-core/link";
3075
3075
  import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
3076
3076
  var cache = /* @__PURE__ */ new Map();
3077
- function LLMCopyButton({ llmApiUrl } = {}) {
3077
+ function LLMCopyButton({ llmApiUrl, sourceKey } = {}) {
3078
3078
  const [isLoading, setLoading] = useState3(false);
3079
3079
  const params = useParams();
3080
3080
  const locale = params.locale;
@@ -3083,7 +3083,10 @@ function LLMCopyButton({ llmApiUrl } = {}) {
3083
3083
  setLoading(true);
3084
3084
  const path = slug && Array.isArray(slug) ? slug.join("/") : "";
3085
3085
  const apiPrefix = llmApiUrl || "/api/llm-content";
3086
- const apiUrl = `${apiPrefix}?locale=${encodeURIComponent(locale)}&path=${encodeURIComponent(path)}`;
3086
+ let apiUrl = `${apiPrefix}?locale=${encodeURIComponent(locale)}&path=${encodeURIComponent(path)}`;
3087
+ if (sourceKey) {
3088
+ apiUrl += `&sourceKey=${encodeURIComponent(sourceKey)}`;
3089
+ }
3087
3090
  console.log("Fetching LLM content from:", apiUrl);
3088
3091
  let content;
3089
3092
  try {