Update carousels, card hover, and IranBay branding.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
import { apiRequest } from "@/lib/meshkee-api";
|
||||
|
||||
export type BusinessProfileAiField = "about" | "vision";
|
||||
|
||||
export async function fillBusinessProfileFieldByAi(
|
||||
businessId: string,
|
||||
body: {
|
||||
field: BusinessProfileAiField;
|
||||
prompt: string;
|
||||
nameEn?: string;
|
||||
nameFa?: string;
|
||||
categories?: string;
|
||||
},
|
||||
) {
|
||||
return apiRequest<{
|
||||
field: BusinessProfileAiField;
|
||||
text?: string;
|
||||
html?: string;
|
||||
}>(`/businesses/${businessId}/profile/ai-fill`, {
|
||||
method: "POST",
|
||||
auth: true,
|
||||
body,
|
||||
});
|
||||
}
|
||||
|
||||
export function buildBusinessAboutAiPrompt(ctx: {
|
||||
nameEn: string;
|
||||
nameFa: string;
|
||||
categories: string;
|
||||
}) {
|
||||
const nameEn = ctx.nameEn || "—";
|
||||
const nameFa = ctx.nameFa || "—";
|
||||
const categories = ctx.categories || "—";
|
||||
|
||||
return `Write a short professional business abstract (1–4 sentences).
|
||||
|
||||
Business name (EN): ${nameEn}
|
||||
Business name (FA): ${nameFa}
|
||||
Categories: ${categories}
|
||||
|
||||
Requirements:
|
||||
- Explain what the business does and who it serves.
|
||||
- Keep an informative, specialist tone — not advertising.
|
||||
- Avoid sales CTAs, discounts, and vague praise.
|
||||
- Write in Persian (Farsi).
|
||||
- Plain text only (no HTML, no markdown).`;
|
||||
}
|
||||
|
||||
export function buildBusinessVisionAiPrompt(ctx: {
|
||||
nameEn: string;
|
||||
nameFa: string;
|
||||
categories: string;
|
||||
}) {
|
||||
const nameEn = ctx.nameEn || "—";
|
||||
const nameFa = ctx.nameFa || "—";
|
||||
const categories = ctx.categories || "—";
|
||||
|
||||
return `Write a business profile description as HTML for an advanced rich-text editor.
|
||||
|
||||
Business name (EN): ${nameEn}
|
||||
Business name (FA): ${nameFa}
|
||||
Categories: ${categories}
|
||||
|
||||
Suggested structure:
|
||||
1) What the company is
|
||||
2) Main products / services / strengths
|
||||
3) Typical customers or markets
|
||||
4) Optional bullet list of key points
|
||||
|
||||
Requirements:
|
||||
- Informative, professional tone — not marketing slogans.
|
||||
- Avoid CTAs, discounts, and vague claims.
|
||||
- 2–5 short paragraphs in Persian (Farsi).
|
||||
- Return raw HTML using only <p>, <ul>, <li>, <strong>, and <em>.
|
||||
- No markdown, no code fences, no escaped entities.`;
|
||||
}
|
||||
Reference in New Issue
Block a user