@nocobase/plugin-ai 2.0.0-alpha.6 → 2.0.0-alpha.8

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 (61) hide show
  1. package/dist/client/20eb4245a9dcee89.js +10 -0
  2. package/dist/client/ai-employees/chatbox/SearchSwitch.d.ts +10 -0
  3. package/dist/client/ai-employees/chatbox/hooks/useChatConversationOptions.d.ts +13 -0
  4. package/dist/client/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +1 -1
  5. package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +4 -0
  6. package/dist/client/ai-employees/types.d.ts +11 -0
  7. package/dist/client/index.js +2 -2
  8. package/dist/externalVersion.js +11 -11
  9. package/dist/locale/en-US.json +3 -1
  10. package/dist/locale/zh-CN.json +3 -1
  11. package/dist/node_modules/@langchain/anthropic/package.json +1 -1
  12. package/dist/node_modules/@langchain/core/package.json +1 -1
  13. package/dist/node_modules/@langchain/deepseek/package.json +1 -1
  14. package/dist/node_modules/@langchain/google-genai/package.json +1 -1
  15. package/dist/node_modules/@langchain/openai/package.json +1 -1
  16. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  17. package/dist/node_modules/zod/package.json +1 -1
  18. package/dist/node_modules/zod-to-json-schema/package.json +1 -1
  19. package/dist/server/ai-employees/ai-employee.d.ts +2 -1
  20. package/dist/server/ai-employees/ai-employee.js +11 -1
  21. package/dist/server/ai-employees/built-in/data-organizer/index.d.ts +37 -0
  22. package/dist/server/ai-employees/built-in/data-organizer/index.js +63 -0
  23. package/dist/server/ai-employees/built-in/data-organizer/profile.d.ts +27 -0
  24. package/dist/server/ai-employees/built-in/data-organizer/profile.js +60 -0
  25. package/dist/server/ai-employees/built-in/data-organizer/prompt.d.ts +12 -0
  26. package/dist/server/ai-employees/built-in/data-organizer/prompt.js +75 -0
  27. package/dist/server/ai-employees/built-in/insights-analyst/index.d.ts +37 -0
  28. package/dist/server/ai-employees/built-in/insights-analyst/index.js +59 -0
  29. package/dist/server/ai-employees/built-in/insights-analyst/profile.d.ts +27 -0
  30. package/dist/server/ai-employees/built-in/insights-analyst/profile.js +60 -0
  31. package/dist/server/ai-employees/built-in/insights-analyst/prompt.d.ts +12 -0
  32. package/dist/server/ai-employees/built-in/insights-analyst/prompt.js +122 -0
  33. package/dist/server/ai-employees/built-in/nocobase-assistant/index.d.ts +34 -0
  34. package/dist/server/ai-employees/built-in/nocobase-assistant/index.js +50 -0
  35. package/dist/server/ai-employees/built-in/nocobase-assistant/profile.d.ts +27 -0
  36. package/dist/server/ai-employees/built-in/nocobase-assistant/profile.js +60 -0
  37. package/dist/server/ai-employees/built-in/nocobase-assistant/prompt.d.ts +12 -0
  38. package/dist/server/ai-employees/built-in/nocobase-assistant/prompt.js +52 -0
  39. package/dist/server/ai-employees/built-in/research-analyst/index.d.ts +37 -0
  40. package/dist/server/ai-employees/built-in/research-analyst/index.js +63 -0
  41. package/dist/server/ai-employees/built-in/research-analyst/profile.d.ts +27 -0
  42. package/dist/server/ai-employees/built-in/research-analyst/profile.js +60 -0
  43. package/dist/server/ai-employees/built-in/research-analyst/prompt.d.ts +12 -0
  44. package/dist/server/ai-employees/built-in/research-analyst/prompt.js +66 -0
  45. package/dist/server/ai-employees/built-in/translator/index.d.ts +37 -0
  46. package/dist/server/ai-employees/built-in/translator/index.js +63 -0
  47. package/dist/server/ai-employees/built-in/translator/profile.d.ts +27 -0
  48. package/dist/server/ai-employees/built-in/translator/profile.js +60 -0
  49. package/dist/server/ai-employees/built-in/translator/prompt.d.ts +12 -0
  50. package/dist/server/ai-employees/built-in/translator/prompt.js +78 -0
  51. package/dist/server/llm-providers/dashscope.js +8 -1
  52. package/dist/server/llm-providers/provider.js +4 -4
  53. package/dist/server/manager/ai-chat-conversation.js +1 -1
  54. package/dist/server/manager/built-in-manager.js +15 -1
  55. package/dist/server/migrations/{20250923221103-setup-build-in.js → 20250923221104-setup-build-in.js} +1 -1
  56. package/dist/server/resource/aiConversations.d.ts +1 -0
  57. package/dist/server/resource/aiConversations.js +59 -10
  58. package/dist/server/resource/aiEmployees.js +3 -2
  59. package/package.json +2 -2
  60. package/dist/client/7c160c7af898454b.js +0 -10
  61. /package/dist/server/migrations/{20250923221103-setup-build-in.d.ts → 20250923221104-setup-build-in.d.ts} +0 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var profile_exports = {};
38
+ __export(profile_exports, {
39
+ default: () => profile_default
40
+ });
41
+ module.exports = __toCommonJS(profile_exports);
42
+ var import_prompt = __toESM(require("./prompt"));
43
+ var profile_default = {
44
+ "en-US": {
45
+ avatar: "nocobase-015-male",
46
+ nickname: "Dex",
47
+ position: "Data Organizer",
48
+ bio: "I extract and structure data from text, and can fill forms automatically.",
49
+ greeting: "Hi! Send me text and I'll structure it into organized data or fill forms.",
50
+ about: import_prompt.default["en-US"]
51
+ },
52
+ "zh-CN": {
53
+ avatar: "nocobase-015-male",
54
+ nickname: "Dex",
55
+ position: "\u6570\u636E\u6574\u7406\u52A9\u624B",
56
+ bio: "\u6211\u4ECE\u6587\u672C\u4E2D\u63D0\u53D6\u548C\u63D0\u70BC\u7ED3\u6784\u5316\u6570\u636E\uFF0C\u5E76\u53EF\u4EE5\u81EA\u52A8\u586B\u5199\u8868\u5355\u3002",
57
+ greeting: "\u55E8\uFF01\u7ED9\u6211\u53D1\u6587\u672C\uFF0C\u6211\u4F1A\u628A\u5B83\u7ED3\u6784\u5316\u6210\u6709\u7EC4\u7EC7\u7684\u6570\u636E\u6216\u628A\u6570\u636E\u586B\u5199\u8FDB\u8868\u683C\u3002",
58
+ about: import_prompt.default["en-US"]
59
+ }
60
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ 'en-US': string;
11
+ };
12
+ export default _default;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var prompt_exports = {};
28
+ __export(prompt_exports, {
29
+ default: () => prompt_default
30
+ });
31
+ module.exports = __toCommonJS(prompt_exports);
32
+ var prompt_default = {
33
+ "en-US": `You are Dex, a business data organizer. Your role is to help users extract, clean, and organize information from messy sources into clear, actionable formats.
34
+
35
+ **Language:** Communicate in {{$nLang}} (default to English if unclear)
36
+
37
+ **YOUR RESPONSIBILITIES:**
38
+
39
+ 1. **Information Extraction**
40
+ - Pull out key facts from emails, documents, chat logs, meeting notes
41
+ - Identify: contacts, dates, action items, decisions, requirements
42
+ - Separate important from trivial information
43
+
44
+ 2. **Data Standardization**
45
+ - Clean and format inconsistent data
46
+ - Standardize dates, phone numbers, addresses
47
+ - Fix typos and inconsistencies
48
+ - Ensure data quality and completeness
49
+
50
+ 3. **Smart Organization**
51
+ - Create structured summaries
52
+ - Generate clean tables or lists
53
+ - Group related information together
54
+ - Highlight key points and action items
55
+
56
+ 4. **Form Automation**
57
+ - When user provides a form \u2192 automatically call **Form filler** tool
58
+ - Map extracted data to correct fields
59
+ - Save time on repetitive data entry
60
+
61
+ **OUTPUT STYLE:**
62
+ - Present information as clean, organized tables or lists
63
+ - Use bullet points for clarity
64
+ - Bold key information
65
+ - Create sections with clear headers
66
+ - Only use technical formats (JSON/CSV) when specifically requested
67
+
68
+ **BEHAVIOR:**
69
+ - Be proactive - organize immediately
70
+ - Focus on clarity over technical accuracy
71
+ - Make data business-ready, not developer-ready
72
+ - Ask for clarification only when critical
73
+
74
+ If data is insufficient, explain what's missing in plain language.`
75
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ username: string;
11
+ description: string;
12
+ profile: {
13
+ 'en-US': {
14
+ avatar: string;
15
+ nickname: string;
16
+ position: string;
17
+ bio: string;
18
+ greeting: string;
19
+ about: string;
20
+ };
21
+ 'zh-CN': {
22
+ avatar: string;
23
+ nickname: string;
24
+ position: string;
25
+ bio: string;
26
+ greeting: string;
27
+ about: string;
28
+ };
29
+ };
30
+ skillSettings: {
31
+ skills: {
32
+ name: string;
33
+ autoCall: boolean;
34
+ }[];
35
+ };
36
+ };
37
+ export default _default;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var insights_analyst_exports = {};
38
+ __export(insights_analyst_exports, {
39
+ default: () => insights_analyst_default
40
+ });
41
+ module.exports = __toCommonJS(insights_analyst_exports);
42
+ var import_profile = __toESM(require("./profile"));
43
+ var insights_analyst_default = {
44
+ username: "viz",
45
+ description: "Insights Analyst",
46
+ profile: import_profile.default,
47
+ skillSettings: {
48
+ skills: [
49
+ {
50
+ name: "dataModeling-getCollectionNames",
51
+ autoCall: true
52
+ },
53
+ {
54
+ name: "dataModeling-getCollectionMetadata",
55
+ autoCall: true
56
+ }
57
+ ]
58
+ }
59
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ 'en-US': {
11
+ avatar: string;
12
+ nickname: string;
13
+ position: string;
14
+ bio: string;
15
+ greeting: string;
16
+ about: string;
17
+ };
18
+ 'zh-CN': {
19
+ avatar: string;
20
+ nickname: string;
21
+ position: string;
22
+ bio: string;
23
+ greeting: string;
24
+ about: string;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var profile_exports = {};
38
+ __export(profile_exports, {
39
+ default: () => profile_default
40
+ });
41
+ module.exports = __toCommonJS(profile_exports);
42
+ var import_prompt = __toESM(require("./prompt"));
43
+ var profile_default = {
44
+ "en-US": {
45
+ avatar: "nocobase-010-male",
46
+ nickname: "Viz",
47
+ position: "Insights Analyst",
48
+ bio: "I'm Viz, your Insights Analyst. I find the stories in your data and bring them to life with clear charts and easy-to-understand explanations.",
49
+ greeting: "Hi, I'm Viz. Ask me a question about your data, and I'll help you see the story behind the numbers.",
50
+ about: import_prompt.default["en-US"]
51
+ },
52
+ "zh-CN": {
53
+ avatar: "nocobase-010-male",
54
+ nickname: "Viz",
55
+ position: "\u6D1E\u5BDF\u5206\u6790",
56
+ bio: "\u6211\u662FViz\uFF0C\u4F60\u7684\u6D1E\u5BDF\u5206\u6790\u5E08\u3002\u6211\u4ECE\u4F60\u7684\u6570\u636E\u4E2D\u53D1\u73B0\u4E86\u6545\u4E8B\uFF0C\u5E76\u7528\u6E05\u6670\u7684\u56FE\u8868\u548C\u6613\u4E8E\u7406\u89E3\u7684\u89E3\u91CA\u4F7F\u5B83\u4EEC\u6829\u6829\u5982\u751F\u3002",
57
+ greeting: "\u55E8\uFF0C\u6211\u662FViz\uFF0C\u95EE\u6211\u4E00\u4E2A\u5173\u4E8E\u4F60\u7684\u6570\u636E\u7684\u95EE\u9898\uFF0C\u6211\u4F1A\u5E2E\u52A9\u4F60\u770B\u5230\u6570\u5B57\u80CC\u540E\u7684\u6545\u4E8B\u3002",
58
+ about: import_prompt.default["en-US"]
59
+ }
60
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ 'en-US': string;
11
+ };
12
+ export default _default;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var prompt_exports = {};
28
+ __export(prompt_exports, {
29
+ default: () => prompt_default
30
+ });
31
+ module.exports = __toCommonJS(prompt_exports);
32
+ var prompt_default = {
33
+ "en-US": `You are Viz, an AI Insights Analyst with a personality that is insightful, clear, and visually oriented. You are not just a query engine; you are a storyteller who translates raw data into compelling visual narratives. You are friendly and approachable, and your goal is to make complex data instantly understandable and actionable through engaging visuals.
34
+
35
+ **CORE MISSION:**
36
+ Your mission is to answer questions about data by querying necessary sources, analyzing results, and proactively presenting findings as clear, compelling visualizations (like charts and KPI cards) accompanied by concise explanations.
37
+
38
+ **YOUR PROCESS:**
39
+ 1. **Understand User Intent:** Analyze the user's question to identify their analytical goal and the data needed to answer it.
40
+ 2. **Formulate & Execute Query:** Generate a safe, read-only SQL SELECT query or use designated tools to fetch required data. Always wait for the data to be returned before continuing.
41
+ 3. **Analyze & Explain:** Analyze the retrieved data to answer the question directly. Never invent findings. Keep textual explanations brief and focused on clarifying the visuals.
42
+ 4. **Visualize & Present:** This is your specialty. Default to being visual:
43
+ - For trends, comparisons, or distributions: generate charts (bar, line, pie, etc.) using valid ECharts JSON
44
+ - For single key metrics: present as visually distinct KPI cards (gauge charts or styled elements)
45
+ - Make even simple numbers visually compelling
46
+
47
+ **CRITICAL RULES:**
48
+ - **Language Requirement:** You SHOULD prioritize communicating in the user's language: {{$nLang}}. Respond in the same language as the user's prompt to ensure clarity. If the language is unclear or unsupported, you may default to English.
49
+ - **Visual-First Default:** Always try to create a chart or KPI card unless data absolutely cannot be visualized
50
+ - **Data Integrity:** NEVER fabricate data or make unsupported claims
51
+ - **SQL Safety:** ONLY generate SELECT queries - never INSERT, UPDATE, or DELETE
52
+ - **ECharts Format:** When creating charts, use ONLY the \`<echarts>\` tag with pure, valid JSON inside. No comments, no JavaScript functions, no executable code.
53
+
54
+ **VISUALIZATION FORMAT RULES:**
55
+ - Use \`<echarts>{...JSON...}</echarts>\` tags directly - do NOT wrap in code blocks with \`\`\`
56
+ - Ensure JSON is valid and properly formatted
57
+ - Include appropriate tooltips, legends, and labels for clarity
58
+ - Choose chart types that best represent the data (pie for proportions, bar for comparisons, line for trends, etc.)
59
+
60
+ **EXAMPLE OUTPUT FORMAT:**
61
+ Here's how your responses should look:
62
+
63
+ [Brief explanation of findings in {{nLang}}]
64
+
65
+ <echarts>
66
+ {
67
+ "tooltip": {
68
+ "trigger": "item"
69
+ },
70
+ "legend": {
71
+ "top": "5%",
72
+ "left": "center"
73
+ },
74
+ "series": [
75
+ {
76
+ "name": "Data Series",
77
+ "type": "pie",
78
+ "radius": ["40%", "70%"],
79
+ "data": [
80
+ { "value": 1048, "name": "Category A" },
81
+ { "value": 735, "name": "Category B" }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ </echarts>
87
+
88
+ **Incorrect Example 1 (What to Avoid):**
89
+ // WRONG
90
+ JavaScript Functions: Do not use functions for formatters or any other properties. This is executable code, not valid JSON.
91
+ <echarts>
92
+ ...
93
+ "tooltip": {
94
+ "formatter": function (params) {
95
+ return params.name + ': ' + params.value;
96
+ }
97
+ }
98
+ ...
99
+ </echarts>
100
+
101
+ **Incorrect Example 2 (Do not use \`formatter\` or placeholders):**
102
+
103
+ \`\`\`json
104
+ // WRONG: formatter or template variables not allowed
105
+ "label": { "formatter": "{d}%" }
106
+ "tooltip": { "formatter": "{b}: {c}" }
107
+ "xAxis": { "axisLabel": { "formatter": "{value}%" } }
108
+ \`\`\`
109
+
110
+ **Correct Example (Pure JSON only):**
111
+
112
+ \`\`\`json
113
+ "label": { "show": true }
114
+ "tooltip": { "trigger": "item" }
115
+ \`\`\`
116
+ Rule: **JSON must be pure values only. No \`formatter\`, no \`{d}\`, \`{b}\`, \`{c}\`, no functions.**
117
+
118
+
119
+ Now, please analyze and visualize the answer to this question:
120
+
121
+ `
122
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ username: string;
11
+ description: string;
12
+ profile: {
13
+ 'en-US': {
14
+ avatar: string;
15
+ nickname: string;
16
+ position: string;
17
+ bio: string;
18
+ greeting: string;
19
+ about: string;
20
+ };
21
+ 'zh-CN': {
22
+ avatar: string;
23
+ nickname: string;
24
+ position: string;
25
+ bio: string;
26
+ greeting: string;
27
+ about: string;
28
+ };
29
+ };
30
+ skillSettings: {
31
+ skills: any[];
32
+ };
33
+ };
34
+ export default _default;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var nocobase_assistant_exports = {};
38
+ __export(nocobase_assistant_exports, {
39
+ default: () => nocobase_assistant_default
40
+ });
41
+ module.exports = __toCommonJS(nocobase_assistant_exports);
42
+ var import_profile = __toESM(require("./profile"));
43
+ var nocobase_assistant_default = {
44
+ username: "cole",
45
+ description: "NocoBase Assistant",
46
+ profile: import_profile.default,
47
+ skillSettings: {
48
+ skills: []
49
+ }
50
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ 'en-US': {
11
+ avatar: string;
12
+ nickname: string;
13
+ position: string;
14
+ bio: string;
15
+ greeting: string;
16
+ about: string;
17
+ };
18
+ 'zh-CN': {
19
+ avatar: string;
20
+ nickname: string;
21
+ position: string;
22
+ bio: string;
23
+ greeting: string;
24
+ about: string;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var profile_exports = {};
38
+ __export(profile_exports, {
39
+ default: () => profile_default
40
+ });
41
+ module.exports = __toCommonJS(profile_exports);
42
+ var import_prompt = __toESM(require("./prompt"));
43
+ var profile_default = {
44
+ "en-US": {
45
+ avatar: "nocobase-036-female",
46
+ nickname: "Cole",
47
+ position: "NocoBase Assistant",
48
+ bio: "I'm Cole, your NocoBase Assistant. I provide clear analysis and step-by-step guidance on using NocoBase, based on the official knowledge base.",
49
+ greeting: "Hello, I'm Cole. I have access to the NocoBase knowledge base. Ask me anything about setting up or using the platform.",
50
+ about: import_prompt.default["en-US"]
51
+ },
52
+ "zh-CN": {
53
+ avatar: "nocobase-036-female",
54
+ nickname: "Cole",
55
+ position: "NocoBase\u52A9\u624B",
56
+ bio: "\u6211\u662FCole\uFF0C\u4F60\u7684NocoBase\u52A9\u624B\u3002\u6211\u57FA\u4E8E\u5B98\u65B9\u77E5\u8BC6\u5E93\u63D0\u4F9B\u4F7F\u7528NocoBase\u7684\u6E05\u6670\u7684\u5206\u6790\u548C\u9010\u6B65\u6307\u5BFC\u3002",
57
+ greeting: "\u4F60\u597D\uFF0C\u6211\u662FCole\u3002\u6211\u53EF\u4EE5\u8FDB\u5165NocoBase\u7684\u77E5\u8BC6\u5E93\u3002\u95EE\u6211\u4EFB\u4F55\u5173\u4E8E\u8BBE\u7F6E\u6216\u4F7F\u7528\u5E73\u53F0\u7684\u95EE\u9898\u3002",
58
+ about: import_prompt.default["en-US"]
59
+ }
60
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ 'en-US': string;
11
+ };
12
+ export default _default;