nuxt-llms 0.1.1 → 0.1.2
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.
package/dist/module.json
CHANGED
|
@@ -19,7 +19,7 @@ export default eventHandler(async (event) => {
|
|
|
19
19
|
}
|
|
20
20
|
document.push(
|
|
21
21
|
section.links?.map((link) => {
|
|
22
|
-
return `- [${link.title}](${link.href}): ${link.description}`;
|
|
22
|
+
return link.description ? `- [${link.title}](${link.href}): ${link.description}` : `- [${link.title}](${link.href})`;
|
|
23
23
|
}).join("\n") || ""
|
|
24
24
|
);
|
|
25
25
|
}
|
|
@@ -2,7 +2,11 @@ import { createHooks } from "hookable";
|
|
|
2
2
|
import { useNitroApp } from "#imports";
|
|
3
3
|
export const llmsHooks = createHooks();
|
|
4
4
|
llmsHooks.beforeEach(() => {
|
|
5
|
-
|
|
5
|
+
const hooks = Object.values(llmsHooks._hooks || {});
|
|
6
|
+
const hasRegisteredHook = hooks.some((hooksList) => Array.isArray(hooksList) && hooksList.length > 0);
|
|
7
|
+
if (hasRegisteredHook) {
|
|
8
|
+
console.warn("[nuxt-llms] `llmsHooks` are deprecated and will be removed in future versions. Use `useNitroApp().hooks.hook('llms:generate', (event, options) => {})` instead");
|
|
9
|
+
}
|
|
6
10
|
});
|
|
7
11
|
export function onLLMsGenerate(cb) {
|
|
8
12
|
return useNitroApp().hooks.hook("llms:generate", cb);
|