ai-site-pilot 0.5.2 → 0.5.4
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/CLAUDE.md +15 -1
- package/package.json +1 -2
package/CLAUDE.md
CHANGED
|
@@ -46,6 +46,20 @@ export const SITE_INFO = {
|
|
|
46
46
|
// app/api/chat/route.ts - Imports from the SAME source
|
|
47
47
|
import { CLASSES, TEACHERS, SITE_INFO } from '@/lib/data';
|
|
48
48
|
import { createHandler } from 'ai-site-pilot/api';
|
|
49
|
+
import { defineTool } from 'ai-site-pilot/tools';
|
|
50
|
+
|
|
51
|
+
// Define tools (plain objects work too, defineTool just adds type safety)
|
|
52
|
+
const navigateTool = defineTool({
|
|
53
|
+
name: 'navigate_to_section',
|
|
54
|
+
description: 'Navigate to a section of the page',
|
|
55
|
+
parameters: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
section: { type: 'string', enum: ['home', 'classes', 'teachers', 'contact'] },
|
|
59
|
+
},
|
|
60
|
+
required: ['section'],
|
|
61
|
+
},
|
|
62
|
+
});
|
|
49
63
|
|
|
50
64
|
export const POST = createHandler({
|
|
51
65
|
siteContent: {
|
|
@@ -59,7 +73,7 @@ export const POST = createHandler({
|
|
|
59
73
|
phone: SITE_INFO.phone,
|
|
60
74
|
},
|
|
61
75
|
},
|
|
62
|
-
tools,
|
|
76
|
+
tools: [navigateTool],
|
|
63
77
|
});
|
|
64
78
|
```
|
|
65
79
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-site-pilot",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "AI chat widget that can control and navigate your website. Works with any AI model via OpenRouter.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"ai-site-pilot": "^0.4.3",
|
|
75
74
|
"framer-motion": "^11.0.0",
|
|
76
75
|
"lucide-react": "^0.400.0",
|
|
77
76
|
"react-markdown": "^9.0.0"
|