@@ -55,7 +55,7 @@ const INSTRUCTIONS = `You are the Dspread Documentation Assistant.
5555## CONVERSATION FLOW — follow this order every time.
5656
5757### Step 1 — Identify the user's product
58- Before giving integration advice, ALWAYS ask or confirm which product the user has .
58+ Before giving integration advice, ALWAYS identify the user's product type .
5959Use this classification:
6060
6161| Category | Terminal Models | Docs Section |
@@ -65,17 +65,15 @@ Use this classification:
6565| **Linux Terminal** | D30-linux, QPOS-linux (Linux-based POS) | Linux Terminals |
6666| **Cloud Speaker** | DS10, DS50, DS200 (audio payment notification) | Cloud Speaker |
6767
68- If the user mentions a specific model (e.g. "D60", "QPOS mini", "CR100", "DS50"), map it
69- to the right category and proceed.
68+ IMPORTANT: Users often start by clicking a product category from the suggestion buttons shown in the welcome screen. When the user's FIRST message matches a product category (e.g. "📱 Smart POS" or "I'm using a Smart POS terminal"), IMMEDIATELY:
69+ 1. Acknowledge their product choice
70+ 2. Call the **selectProductType** action to show the interactive product selector card for visual confirmation
71+ 3. Then navigate to the relevant starting page and provide an overview
7072
71- If the user's question is ambiguous or does not mention a model, ask:
72- "Could you tell me which terminal model you are using? For example:
73- - **Smart POS**: D20, D30, D50, D60, D70, D80, D80K
74- - **Mobile Reader (mPOS)**: QPOS mini, QPOS Cute, CR100, QPOS Plus pinpad
75- - **Linux Terminal**: D30-linux, QPOS-linux
76- - **Cloud Speaker**: DS10, DS50, DS200
73+ If the user mentions a specific model (e.g. "D60", "QPOS mini", "CR100", "DS50"), map it
74+ to the right category and proceed directly — no need to call selectProductType.
7775
78- This helps me give you the most relevant documentation."
76+ If the user's question is ambiguous or does not mention a model, call **selectProductType** to show the interactive product picker card.
7977
8078### Step 2 — Give targeted advice
8179Once the product type is known:
@@ -513,12 +511,40 @@ ${relatedSuggestions}
513511Make sure each suggestion is a natural question a developer would ask while reading this specific page.` ;
514512 } , [ currentPage , currentPageHeadings ] ) ;
515513
516- // ─ Contextual suggestions — dynamically generated per page ───────────
514+ // ─ Welcome suggestions — static product categories (before first message) ─
515+ useCopilotChatSuggestions ( {
516+ suggestions : [
517+ {
518+ title : "📱 Smart POS (Android)" ,
519+ message : "I'm using a Smart POS terminal (D20, D30, D50, D60, D70, D80, D80K). Help me get started with Android SDK integration." ,
520+ className : "welcome-product-suggestion welcome-smartpos" ,
521+ } ,
522+ {
523+ title : "📲 mPOS / Mobile Reader" ,
524+ message : "I'm using an mPOS mobile reader (QPOS mini, QPOS Cute, CR100, QPOS Plus). Help me connect it to my app." ,
525+ className : "welcome-product-suggestion welcome-mpos" ,
526+ } ,
527+ {
528+ title : "🐧 Linux Terminal" ,
529+ message : "I'm using a Linux terminal (D30-linux, QPOS-linux). Help me set up the Linux SDK." ,
530+ className : "welcome-product-suggestion welcome-linux" ,
531+ } ,
532+ {
533+ title : "🔊 Cloud Speaker" ,
534+ message : "I'm using a Cloud Speaker (DS10, DS50, DS200). Help me set up audio payment notifications." ,
535+ className : "welcome-product-suggestion welcome-cloudspeaker" ,
536+ } ,
537+ ] ,
538+ available : "before-first-message" ,
539+ } ) ;
540+
541+ // ─ Contextual suggestions — dynamically generated per page (after 1st msg) ─
517542 useCopilotChatSuggestions (
518543 {
519544 instructions : suggestionInstructions ,
520545 minSuggestions : 3 ,
521546 maxSuggestions : 5 ,
547+ available : "after-first-message" ,
522548 } ,
523549 [ currentPath ] ,
524550 ) ;
@@ -531,12 +557,7 @@ Make sure each suggestion is a natural question a developer would ask while read
531557 title : "Dspread Assistant" ,
532558 initial :
533559 "Welcome! I'm your Dspread documentation assistant. 👋\n\n" +
534- "To help you best, could you tell me which terminal you're working with?\n\n" +
535- "• **Smart POS** — D20, D30, D50, D60, D70, D80, D80K\n" +
536- "• **Mobile Reader (mPOS)** — QPOS mini, QPOS Cute, CR100, QPOS Plus\n" +
537- "• **Linux Terminal** — D30-linux, QPOS-linux\n" +
538- "• **Cloud Speaker** — DS10, DS50, DS200\n\n" +
539- "Or just ask any question and I'll guide you!" ,
560+ "Choose your product type below to get started, or ask any question directly!" ,
540561 } }
541562 defaultOpen = { true }
542563 clickOutsideToClose = { false }
0 commit comments