tigerbase-chatbot 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/dist/ChatbotPopup.js +11 -5
  2. package/package.json +55 -55
@@ -42,11 +42,15 @@ const ChatbotPopup = () => {
42
42
  throw new Error("Google GenAI key not set");
43
43
  }
44
44
  const genAI = new GoogleGenerativeAI(genAIKey);
45
- const baseSystemInstruction = `You are a helpful assistant for product management. Always respond in ${effectiveLang === "ar" ? "Arabic" : "English"}. ${cfg.customPrompt || ""}
45
+ const baseSystemInstruction = `You are a helpful assistant. Always respond in ${effectiveLang === "ar" ? "Arabic" : "English"}.
46
46
  When user asks for product information with an ID, use the get-product-info tool and pass the ID in the arguments.
47
47
  When user asks to list products, use the list-products tool.
48
- When user asks to add a product, use the add-product tool with name, price, and description.`;
49
- const systemInstruction = remoteConfig?.systemInstruction || baseSystemInstruction;
48
+ When user asks to add a product, use the add-product tool with name, price, and description.
49
+
50
+ IMPORTANT: If specific information (regulations, data, etc.) is provided in the context below, prioritize it over your general knowledge.`;
51
+ const systemInstruction = remoteConfig?.systemInstruction
52
+ ? `${remoteConfig.systemInstruction}\n\n${baseSystemInstruction}`
53
+ : baseSystemInstruction;
50
54
  const model = genAI.getGenerativeModel({
51
55
  model: "gemini-2.5-flash",
52
56
  systemInstruction,
@@ -87,8 +91,10 @@ const ChatbotPopup = () => {
87
91
  console.error("Failed to fetch chatbot config:", error);
88
92
  }
89
93
  };
90
- fetchConfig();
91
- }, [MCP_URL, cfg.apiKey]);
94
+ if (isOpen) {
95
+ fetchConfig();
96
+ }
97
+ }, [MCP_URL, cfg.apiKey, isOpen]);
92
98
  // Auto delete chats
93
99
  useEffect(() => {
94
100
  if (cfg.autoDeleteChats) {
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "tigerbase-chatbot",
3
- "version": "1.0.3",
4
- "description": "TigerBase Chatbot Client - AI-powered chatbot for product management",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "build": "tsc",
10
- "prepublishOnly": "npm run build"
11
- },
12
- "dependencies": {
13
- "@google/generative-ai": "^0.21.0",
14
- "@radix-ui/react-dialog": "^1.1.15",
15
- "@radix-ui/react-scroll-area": "^1.0.5",
16
- "@radix-ui/react-slot": "^1.2.3",
17
- "class-variance-authority": "^0.7.1",
18
- "clsx": "^2.0.0",
19
- "lucide-react": "^0.441.0",
20
- "react-toastify": "^10.0.6",
21
- "tailwind-merge": "^2.3.0"
22
- },
23
- "devDependencies": {
24
- "@types/node": "^20.14.2",
25
- "@types/react": "^18.3.3",
26
- "@types/react-dom": "^18.3.0",
27
- "typescript": "^5.5.4"
28
- },
29
- "peerDependencies": {
30
- "react": "^18.2.0 || ^19.0.0",
31
- "react-dom": "^18.2.0 || ^19.0.0"
32
- },
33
- "author": "SolomDev00",
34
- "license": "MIT",
35
- "repository": {
36
- "type": "git",
37
- "url": "git+https://github.com/SolomDev00/Tigerbase.git"
38
- },
39
- "homepage": "https://tigerbase.cloud",
40
- "files": [
41
- "dist"
42
- ],
43
- "keywords": [
44
- "tigerbase",
45
- "chatbot",
46
- "react",
47
- "ai",
48
- "gemini",
49
- "product-management",
50
- "mcp"
51
- ],
52
- "publishConfig": {
53
- "access": "public"
54
- }
55
- }
1
+ {
2
+ "name": "tigerbase-chatbot",
3
+ "version": "1.0.4",
4
+ "description": "TigerBase Chatbot Client - AI-powered chatbot for product management",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "prepublishOnly": "npm run build"
11
+ },
12
+ "dependencies": {
13
+ "@google/generative-ai": "^0.21.0",
14
+ "@radix-ui/react-dialog": "^1.1.15",
15
+ "@radix-ui/react-scroll-area": "^1.0.5",
16
+ "@radix-ui/react-slot": "^1.2.3",
17
+ "class-variance-authority": "^0.7.1",
18
+ "clsx": "^2.0.0",
19
+ "lucide-react": "^0.441.0",
20
+ "react-toastify": "^10.0.6",
21
+ "tailwind-merge": "^2.3.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^20.14.2",
25
+ "@types/react": "^18.3.3",
26
+ "@types/react-dom": "^18.3.0",
27
+ "typescript": "^5.5.4"
28
+ },
29
+ "peerDependencies": {
30
+ "react": "^18.2.0 || ^19.0.0",
31
+ "react-dom": "^18.2.0 || ^19.0.0"
32
+ },
33
+ "author": "SolomDev00",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/SolomDev00/Tigerbase.git"
38
+ },
39
+ "homepage": "https://tigerbase.cloud",
40
+ "files": [
41
+ "dist"
42
+ ],
43
+ "keywords": [
44
+ "tigerbase",
45
+ "chatbot",
46
+ "react",
47
+ "ai",
48
+ "gemini",
49
+ "product-management",
50
+ "mcp"
51
+ ],
52
+ "publishConfig": {
53
+ "access": "public"
54
+ }
55
+ }