Skip to content

Commit fcf6662

Browse files
fix: add genAiFunction bundle type W-17750901 (#1499)
* fix: add genAiFunction bundle type * test: add UT * test: add snapshot files
1 parent b88281c commit fcf6662

File tree

14 files changed

+317
-0
lines changed

14 files changed

+317
-0
lines changed

src/utils/filePathGenerator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export const filePathsFromMetadataComponent = (
118118
['WaveTemplateBundle', [join(packageDirWithTypeDir, `${fullName}${sep}template-info.json`)]],
119119
['LightningComponentBundle', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.js${META_XML_SUFFIX}`)]],
120120
['AuraDefinitionBundle', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.cmp${META_XML_SUFFIX}`)]],
121+
['GenAiFunction', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.genAiFunction${META_XML_SUFFIX}`)]],
121122
[
122123
'AppFrameworkTemplateBundle',
123124
[
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description>
4+
<invocationTarget>knowledgeSearch</invocationTarget>
5+
<invocationTargetType>standardInvocableAction</invocationTargetType>
6+
<isConfirmationRequired>false</isConfirmationRequired>
7+
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel>
8+
</GenAiFunction>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"required": ["query"],
3+
"unevaluatedProperties": false,
4+
"properties": {
5+
"query": {
6+
"title": "Query",
7+
"description": "Required. A string created by generative AI to be used in the knowledge article search.",
8+
"const": "",
9+
"lightning:type": "lightning__textType",
10+
"lightning:isPII": false,
11+
"copilotAction:isUserInput": true
12+
},
13+
"citationsUrl": {
14+
"title": "Citations Url",
15+
"description": "The URL to use for citations for custom Agents.",
16+
"const": "",
17+
"lightning:type": "lightning__textType",
18+
"lightning:isPII": false,
19+
"copilotAction:isUserInput": true
20+
},
21+
"ragFeatureConfigId": {
22+
"title": "RAG Feature Configuration Id",
23+
"description": "The RAG Feature ID to use for grounding this copilot action invocation.",
24+
"const": "",
25+
"lightning:type": "lightning__textType",
26+
"lightning:isPII": false,
27+
"copilotAction:isUserInput": true
28+
},
29+
"citationsEnabled": {
30+
"title": "Citations Enabled",
31+
"description": "Whether or not citations are enabled.",
32+
"const": false,
33+
"lightning:type": "lightning__booleanType",
34+
"lightning:isPII": false,
35+
"copilotAction:isUserInput": true
36+
},
37+
"mode": {
38+
"title": "The mode to run in.",
39+
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.",
40+
"lightning:type": "lightning__textType",
41+
"lightning:isPII": false,
42+
"copilotAction:isUserInput": false
43+
},
44+
"retrieverMode": {
45+
"title": "The retriever mode to use.",
46+
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration",
47+
"lightning:type": "lightning__textType",
48+
"lightning:isPII": false,
49+
"copilotAction:isUserInput": false
50+
}
51+
},
52+
"lightning:type": "lightning__objectType"
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"unevaluatedProperties": false,
3+
"properties": {
4+
"knowledgeSummary": {
5+
"title": "Knowledge Summary",
6+
"description": "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.",
7+
"lightning:type": "lightning__richTextType",
8+
"lightning:isPII": false,
9+
"copilotAction:isDisplayable": true,
10+
"copilotAction:isUsedByPlanner": true
11+
}
12+
},
13+
"lightning:type": "lightning__objectType"
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<types>
4+
<members>force-app</members>
5+
<name>GenAiFunction</name>
6+
</types>
7+
<version>59.0</version>
8+
</Package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description>
4+
<invocationTarget>knowledgeSearch</invocationTarget>
5+
<invocationTargetType>standardInvocableAction</invocationTargetType>
6+
<isConfirmationRequired>false</isConfirmationRequired>
7+
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel>
8+
</GenAiFunction>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"required": ["query"],
3+
"unevaluatedProperties": false,
4+
"properties": {
5+
"query": {
6+
"title": "Query",
7+
"description": "Required. A string created by generative AI to be used in the knowledge article search.",
8+
"const": "",
9+
"lightning:type": "lightning__textType",
10+
"lightning:isPII": false,
11+
"copilotAction:isUserInput": true
12+
},
13+
"citationsUrl": {
14+
"title": "Citations Url",
15+
"description": "The URL to use for citations for custom Agents.",
16+
"const": "",
17+
"lightning:type": "lightning__textType",
18+
"lightning:isPII": false,
19+
"copilotAction:isUserInput": true
20+
},
21+
"ragFeatureConfigId": {
22+
"title": "RAG Feature Configuration Id",
23+
"description": "The RAG Feature ID to use for grounding this copilot action invocation.",
24+
"const": "",
25+
"lightning:type": "lightning__textType",
26+
"lightning:isPII": false,
27+
"copilotAction:isUserInput": true
28+
},
29+
"citationsEnabled": {
30+
"title": "Citations Enabled",
31+
"description": "Whether or not citations are enabled.",
32+
"const": false,
33+
"lightning:type": "lightning__booleanType",
34+
"lightning:isPII": false,
35+
"copilotAction:isUserInput": true
36+
},
37+
"mode": {
38+
"title": "The mode to run in.",
39+
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.",
40+
"lightning:type": "lightning__textType",
41+
"lightning:isPII": false,
42+
"copilotAction:isUserInput": false
43+
},
44+
"retrieverMode": {
45+
"title": "The retriever mode to use.",
46+
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration",
47+
"lightning:type": "lightning__textType",
48+
"lightning:isPII": false,
49+
"copilotAction:isUserInput": false
50+
}
51+
},
52+
"lightning:type": "lightning__objectType"
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"unevaluatedProperties": false,
3+
"properties": {
4+
"knowledgeSummary": {
5+
"title": "Knowledge Summary",
6+
"description": "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.",
7+
"lightning:type": "lightning__richTextType",
8+
"lightning:isPII": false,
9+
"copilotAction:isDisplayable": true,
10+
"copilotAction:isUsedByPlanner": true
11+
}
12+
},
13+
"lightning:type": "lightning__objectType"
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description>
4+
<invocationTarget>knowledgeSearch</invocationTarget>
5+
<invocationTargetType>standardInvocableAction</invocationTargetType>
6+
<isConfirmationRequired>false</isConfirmationRequired>
7+
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel>
8+
</GenAiFunction>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"required": ["query"],
3+
"unevaluatedProperties": false,
4+
"properties": {
5+
"query": {
6+
"title": "Query",
7+
"description": "Required. A string created by generative AI to be used in the knowledge article search.",
8+
"const": "",
9+
"lightning:type": "lightning__textType",
10+
"lightning:isPII": false,
11+
"copilotAction:isUserInput": true
12+
},
13+
"citationsUrl": {
14+
"title": "Citations Url",
15+
"description": "The URL to use for citations for custom Agents.",
16+
"const": "",
17+
"lightning:type": "lightning__textType",
18+
"lightning:isPII": false,
19+
"copilotAction:isUserInput": true
20+
},
21+
"ragFeatureConfigId": {
22+
"title": "RAG Feature Configuration Id",
23+
"description": "The RAG Feature ID to use for grounding this copilot action invocation.",
24+
"const": "",
25+
"lightning:type": "lightning__textType",
26+
"lightning:isPII": false,
27+
"copilotAction:isUserInput": true
28+
},
29+
"citationsEnabled": {
30+
"title": "Citations Enabled",
31+
"description": "Whether or not citations are enabled.",
32+
"const": false,
33+
"lightning:type": "lightning__booleanType",
34+
"lightning:isPII": false,
35+
"copilotAction:isUserInput": true
36+
},
37+
"mode": {
38+
"title": "The mode to run in.",
39+
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.",
40+
"lightning:type": "lightning__textType",
41+
"lightning:isPII": false,
42+
"copilotAction:isUserInput": false
43+
},
44+
"retrieverMode": {
45+
"title": "The retriever mode to use.",
46+
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration",
47+
"lightning:type": "lightning__textType",
48+
"lightning:isPII": false,
49+
"copilotAction:isUserInput": false
50+
}
51+
},
52+
"lightning:type": "lightning__objectType"
53+
}

0 commit comments

Comments
 (0)