Skip to content

Commit 9097411

Browse files
authored
Merge pull request #181 from salesforcecli/wr/conversationHistoryInterview
fix: add boilerplate conversation history prompt and values W-19158358
2 parents 27bf290 + 169cf55 commit 9097411

3 files changed

Lines changed: 43 additions & 27 deletions

File tree

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"@inquirer/core": "^10.1.6",
99
"@inquirer/prompts": "^7.2.0",
1010
"@oclif/core": "^4",
11-
"@oclif/multi-stage-output": "^0.8.17",
12-
"@salesforce/agents": "0.15.3",
13-
"@salesforce/core": "^8.18.3",
11+
"@oclif/multi-stage-output": "^0.8.20",
12+
"@salesforce/agents": "^0.16.0",
13+
"@salesforce/core": "^8.18.5",
1414
"@salesforce/kit": "^3.2.3",
15-
"@salesforce/sf-plugins-core": "^12.2.0",
16-
"@salesforce/source-deploy-retrieve": "^12.21.4",
17-
"@salesforce/types": "^1.3.0",
15+
"@salesforce/sf-plugins-core": "^12.2.3",
16+
"@salesforce/source-deploy-retrieve": "^12.22.1",
17+
"@salesforce/types": "^1.4.0",
1818
"ansis": "^3.3.2",
1919
"fast-xml-parser": "^4.5.1",
2020
"ink": "5.0.1",
2121
"ink-text-input": "^6.0.0",
2222
"inquirer-autocomplete-standalone": "^0.8.1",
2323
"react": "^18.3.1",
24-
"yaml": "^2.7.0"
24+
"yaml": "^2.8.0"
2525
},
2626
"devDependencies": {
2727
"@oclif/plugin-command-snapshot": "^5.2.19",

src/commands/agent/generate/test-spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type TestCase = {
2626
expectedActions: string[];
2727
expectedTopic: string;
2828
expectedOutcome: string;
29+
conversationHistory?: Array<{ role: 'user'; message: string } | { role: 'agent'; message: string; topic: string }>;
2930
customEvaluations?: Array<{
3031
label: string;
3132
name: string;
@@ -117,12 +118,27 @@ async function promptForTestCase(genAiPlugins: Record<string, string>, genAiFunc
117118

118119
const customEvaluations = await promptForCustomEvaluations();
119120

121+
const conversationHistory = (await confirm({
122+
message: 'Do you want to generate a boilerplate conversation history',
123+
theme,
124+
}))
125+
? ([
126+
{ role: 'user', message: 'example user message' },
127+
{
128+
role: 'agent',
129+
message: 'example agent message',
130+
topic: 'Example_agent_topic',
131+
},
132+
] as NonNullable<TestCase['conversationHistory']>)
133+
: [];
134+
120135
return {
121136
utterance,
122137
expectedTopic,
123138
expectedActions,
124139
expectedOutcome,
125140
customEvaluations,
141+
conversationHistory,
126142
};
127143
}
128144

yarn.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,10 +1351,10 @@
13511351
wordwrap "^1.0.0"
13521352
wrap-ansi "^7.0.0"
13531353

1354-
"@oclif/multi-stage-output@^0.8.17":
1355-
version "0.8.19"
1356-
resolved "https://registry.yarnpkg.com/@oclif/multi-stage-output/-/multi-stage-output-0.8.19.tgz#ebc887e95366534c4fec740bf6420bd324862145"
1357-
integrity sha512-OkfYIbZ0vaMotUWR8HLm6eA9s+j2pn3KR+p42XeEkFlmrxOxVmomyJrNW+TgWnjMqQZsQYG6m2JVn4HCmzHt3w==
1354+
"@oclif/multi-stage-output@^0.8.20":
1355+
version "0.8.20"
1356+
resolved "https://registry.yarnpkg.com/@oclif/multi-stage-output/-/multi-stage-output-0.8.20.tgz#193cef3d9fe323aa85909219ae84bca7fff9f666"
1357+
integrity sha512-XrzuZ9aNjv+RSc0MsjtnX2nR3w9tJSNfBBg6uoOHZkWndPuPeS70gTseTt2dQJDHQE2ygNuDSPMQBf71bNoVuA==
13581358
dependencies:
13591359
"@oclif/core" "^4"
13601360
"@types/react" "^18.3.12"
@@ -1462,18 +1462,18 @@
14621462
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
14631463
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==
14641464

1465-
"@salesforce/agents@0.15.3":
1466-
version "0.15.3"
1467-
resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.15.3.tgz#1a0936e6908e36459dcee1471fda13b3d560b5d1"
1468-
integrity sha512-M/wMK9ok2ytzf6ZV9DiQG+LKMoaXtoXheZKsxJVYJOxLcCL4SSy5IQNtXdqGbZ23TzbWdSBrp73WffIGWkD4Jw==
1465+
"@salesforce/agents@^0.16.0":
1466+
version "0.16.0"
1467+
resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.16.0.tgz#631d11b0b69808c68500bfb82019c19b23c2779c"
1468+
integrity sha512-FS6Mr8a3+MIZ1yciE/6AnLAhSwPivwT3e/ZTQVuvWMZUMT7Z4TuIqVFijN/r76YdprN/lFGM8KNLpIplNX7tjw==
14691469
dependencies:
1470-
"@salesforce/core" "^8.10.3"
1470+
"@salesforce/core" "^8.18.5"
14711471
"@salesforce/kit" "^3.2.3"
1472-
"@salesforce/source-deploy-retrieve" "^12.19.5"
1473-
"@salesforce/types" "^1.3.0"
1472+
"@salesforce/source-deploy-retrieve" "^12.22.1"
1473+
"@salesforce/types" "^1.4.0"
14741474
fast-xml-parser "^4.5.3"
14751475
nock "^13.5.6"
1476-
yaml "^2.7.1"
1476+
yaml "^2.8.0"
14771477

14781478
"@salesforce/cli-plugins-testkit@^5.3.35":
14791479
version "5.3.39"
@@ -1491,7 +1491,7 @@
14911491
strip-ansi "6.0.1"
14921492
ts-retry-promise "^0.8.1"
14931493

1494-
"@salesforce/core@^8.10.3", "@salesforce/core@^8.14.0", "@salesforce/core@^8.15.0", "@salesforce/core@^8.18.1", "@salesforce/core@^8.18.3", "@salesforce/core@^8.5.1", "@salesforce/core@^8.8.0":
1494+
"@salesforce/core@^8.14.0", "@salesforce/core@^8.15.0", "@salesforce/core@^8.18.1", "@salesforce/core@^8.18.5", "@salesforce/core@^8.5.1", "@salesforce/core@^8.8.0":
14951495
version "8.18.5"
14961496
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.18.5.tgz#8205f3b1ee9ef63740128bef81cc32213a76296a"
14971497
integrity sha512-zQSIjo0L0ddcZbj3Oxxig2J6aYL5H5FY45TpXAXpjGe0UPWNxXkU2mrcDfs9OSn0MhM3uMj4fUIM1a158/3Lug==
@@ -1601,7 +1601,7 @@
16011601
string-width "^7.2.0"
16021602
terminal-link "^3.0.0"
16031603

1604-
"@salesforce/sf-plugins-core@^12.2.0":
1604+
"@salesforce/sf-plugins-core@^12.2.3":
16051605
version "12.2.3"
16061606
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.2.3.tgz#f4ec67b15b9a86d6d18437061cf73e09fe0f68ea"
16071607
integrity sha512-mkBt57rD/987g4eT/XfJN469aEzLjskbgif+beLWocIkNXn70jMvX/RYRTAAkGRhixHHgYj+nY7kHI41rqKZ8w==
@@ -1617,10 +1617,10 @@
16171617
cli-progress "^3.12.0"
16181618
terminal-link "^3.0.0"
16191619

1620-
"@salesforce/source-deploy-retrieve@^12.19.5", "@salesforce/source-deploy-retrieve@^12.21.4":
1621-
version "12.22.0"
1622-
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.22.0.tgz#4993bff177ac7fe421af93e30dabb8a57b23a1de"
1623-
integrity sha512-tfBgeiQ7uypXogv//S0QIU05fstKHryNGj5I4p2FhlP7Lv93G27ACxyaK2yGtRsHEqNx5yMz81vbyLoqhPmLTQ==
1620+
"@salesforce/source-deploy-retrieve@^12.22.1":
1621+
version "12.22.1"
1622+
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.22.1.tgz#f1191e0a08836a5ae7067440f95e82c894072078"
1623+
integrity sha512-YJDjXYuaBPWcNJettIZB/RWL8lS5J7cfmK05H/0S8CKLNc2E4a1nP2JH805SV6hYPTWhBtgFczEurfL5G7NEhw==
16241624
dependencies:
16251625
"@salesforce/core" "^8.18.1"
16261626
"@salesforce/kit" "^3.2.3"
@@ -1643,7 +1643,7 @@
16431643
resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-2.0.12.tgz#60420622812a7ec7e46d220667bc29b42dc247ff"
16441644
integrity sha512-BIJyduJC18Kc8z+arUm5AZ9VkPRyw1KKAm+Tk+9LT99eOzhNilyfKzhZ4t+tG2lIGgnJpmytZfVDZ0e2kFul8g==
16451645

1646-
"@salesforce/types@^1.3.0":
1646+
"@salesforce/types@^1.3.0", "@salesforce/types@^1.4.0":
16471647
version "1.4.0"
16481648
resolved "https://registry.yarnpkg.com/@salesforce/types/-/types-1.4.0.tgz#a8b8baa0b7cc9cb6718379464d9bc9e4ab834e9e"
16491649
integrity sha512-WpXzQd+JglQrwUs05ePGa1/vFFn1s7rymw2ltBbFj2Z0p/ez1ft6J39ILVlteS/mGca47Ce8JN+u3USVxfxkKA==
@@ -8864,7 +8864,7 @@ yallist@^4.0.0:
88648864
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
88658865
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
88668866

8867-
yaml@^2.5.1, yaml@^2.7.0, yaml@^2.7.1:
8867+
yaml@^2.5.1, yaml@^2.7.1, yaml@^2.8.0:
88688868
version "2.8.0"
88698869
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.0.tgz#15f8c9866211bdc2d3781a0890e44d4fa1a5fff6"
88708870
integrity sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==

0 commit comments

Comments
 (0)