u
This commit is contained in:
@@ -26,6 +26,8 @@ import { createWebSearchTool } from '../tools/web-search.js';
|
||||
import { createUrlGetTool } from '../tools/url-get.js';
|
||||
import { createPdfReadTool } from '../tools/pdf-read.js';
|
||||
import { createSearchArticlesTool } from '../tools/search-articles.js';
|
||||
import { createEanChecksumTool } from '../tools/ean-checksum.js';
|
||||
import { createNetGrossCalcTool } from '../tools/net-gross-calc.js';
|
||||
import { resolveOpenRouterKey, resolveDefaultModel, resolveModelReasoning, RETIRED_MODELS, hasConfiguredOpenRouterKey } from '../tools/llm-key.js';
|
||||
|
||||
const KEEP_ALIVE_MS = 20_000;
|
||||
@@ -127,7 +129,9 @@ async function buildSystemPrompt(vfsRoot, googleAuthId) {
|
||||
'13. rm: Delete single VFS file (used to delete SKILL files or specific artifacts).',
|
||||
'14. apisuggestionsorissues: Report missing API endpoints, bugs, or issues for triage.',
|
||||
'15. search_articles: Search articles across name, brand, EAN, SKU, and supplier SKU. Returns window of full articles (default 3, max 20), offset, and total count.',
|
||||
'16. edit_image: Generate or edit images using the configured company image model (modelslugimage). Supports attachments (low/high quality), size tiers (1K/2K/4K), and aspect ratios (1:1/4:3/3:4). Writes output to VFS.',
|
||||
'16. edit_image: Generate or edit images using the configured company image model (modelslugimage). Supports attachments (low/high quality), size tiers (1K/2K/4K), and aspect ratios (1:1/4:3/3:4). Writes output to VFS (always AVIF format).',
|
||||
'17. ean_checksum: Validate EAN/GTIN/UPC barcode check digits or calculate missing check digit for barcodes (EAN-13, EAN-8, UPC-A, GTIN-14).',
|
||||
'18. net_gross_calc: Convert between net and gross prices with tax/VAT rate (default 19%). Provides 2-decimal display values and high-precision net prices for API article creation.',
|
||||
'',
|
||||
'VIRTUAL FILESYSTEM:',
|
||||
'- Persistent per-company VFS. Paths are root-relative forward-slash (e.g. "labels/sheet1.png").',
|
||||
@@ -150,7 +154,7 @@ async function buildSystemPrompt(vfsRoot, googleAuthId) {
|
||||
'- `image/` is READ-ONLY database storage. Write generated images elsewhere (e.g. "images/…").',
|
||||
'',
|
||||
'OPERATING GUIDELINES:',
|
||||
'- GROSS vs NET PRICES: User prices are almost always GROSS (incl. VAT); API requires NET. Formula: `net = gross / (1 + taxRate / 100)`. Compute in javascript_execute with high precision (4–6 decimals) to prevent rounding error.',
|
||||
'- GROSS vs NET PRICES: User prices are almost always GROSS (incl. VAT); API requires NET. Use net_gross_calc to compute high-precision (4–6 decimals) NET prices for API requests: `net = gross / (1 + taxRate / 100)`.',
|
||||
'- DISPLAYING GENERATED IMAGES: Inline markdown images supported. Embed written VFS image paths: ``. Other files (PDF, JSON, CSV) do not render inline; provide download links.',
|
||||
'- LABEL TEMPLATES (/labeltemplate): Must use Dashback JSON schema `{ "objects": [ ... ] }`. Do NOT use ZPL.',
|
||||
'- Always Format output with markdown and emoji.',
|
||||
@@ -878,6 +882,8 @@ export class ConversationManager {
|
||||
createResetVfsTool({ googleAuthId }),
|
||||
createApiSuggestionsOrIssuesTool({ googleAuthId, companyId: this.companyId }),
|
||||
createSearchArticlesTool({ googleAuthId, companyId: this.companyId }),
|
||||
createEanChecksumTool(),
|
||||
createNetGrossCalcTool(),
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user