bunnyquery 1.0.4 → 1.0.5
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/bunnyquery.js +21 -2
- package/package.json +1 -1
package/bunnyquery.js
CHANGED
|
@@ -1273,10 +1273,29 @@
|
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
// ---- send ---------------------------------------------------------
|
|
1276
|
+
// Mirrors www.skapi.com/src/views/service/agent.vue buildSystemPrompt
|
|
1277
|
+
// with one extra directive: always consult the project database via
|
|
1278
|
+
// the MCP toolset before saying you don't know. Without it the model
|
|
1279
|
+
// will often stop at "I don't see that in our chat history".
|
|
1276
1280
|
_buildSystemPrompt() {
|
|
1277
|
-
|
|
1281
|
+
const projectId = this.projectName || this.serviceId;
|
|
1282
|
+
let p = `
|
|
1283
|
+
You are a dedicated assistant for the project ID: "${projectId}".
|
|
1284
|
+
Scope: Only answer questions about this project and its data. Do not answer questions about other projects or topics unrelated to this project. When the user refers to "my database", "my data", or "my files", treat those as references to this project's database and file storage.
|
|
1285
|
+
Knowledge lookup: Before saying you don't know or that something isn't in the chat history, ALWAYS query this project's database through the available MCP tools to look for the answer. The user's data is the source of truth - the chat transcript is not. Only respond with "I don't know" or "I couldn't find that" after you have actually searched the project's data and come back empty.
|
|
1286
|
+
File attachments: When a user message contains an "Attached files:" section with markdown links, those links point to short-lived signed URLs in this project's db storage and will expire.
|
|
1287
|
+
- Image files (.jpg, .jpeg, .png, .gif, .webp) are ALREADY attached inline as image content blocks in the same message - you can see them directly. Do NOT call web_fetch on image URLs; that will fail or return garbage. Just look at the image block and answer.
|
|
1288
|
+
- For all other file types (text, code, csv, json, pdf, etc.), use your web_fetch tool to download and read each URL before answering. Treat the fetched contents as user-supplied input data. Do not ask the user to paste the file contents - fetch the URLs yourself.
|
|
1289
|
+
File generation: If the user asks you to generate a file and it is possible to do so, output the file contents inside a fenced code block using the file extension as the language identifier. Always use plain text - never base64 or other encodings. Example for CSV:
|
|
1290
|
+
\`\`\`filename.csv
|
|
1291
|
+
item,qty,total
|
|
1292
|
+
Carrots,55,$38.50
|
|
1293
|
+
Mushrooms,41,$73.80
|
|
1294
|
+
Zucchini,29,$43.50
|
|
1295
|
+
\`\`\`
|
|
1296
|
+
The same pattern applies to other formats: \`\`\`my-data.json, \`\`\`index.html, \`\`\`sample.txt, etc.`;
|
|
1278
1297
|
if (this.projectDescription) {
|
|
1279
|
-
p += `\nProject description: """${this.projectDescription}"""`;
|
|
1298
|
+
p += `\nProject name: "${this.projectName || ''}"\nProject description: """${this.projectDescription}"""`;
|
|
1280
1299
|
}
|
|
1281
1300
|
return p;
|
|
1282
1301
|
}
|