@emseepea/create-react-ui-server 0.0.6 → 0.0.7
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.
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
import test from "node:test";
|
|
2
2
|
import {
|
|
3
|
+
assertNoToolCalls,
|
|
3
4
|
assertResponseContains,
|
|
4
5
|
assertResponseMeaning,
|
|
5
6
|
assertToolCalls,
|
|
6
7
|
createConversation,
|
|
7
8
|
} from "@emseepea/testing/semantic";
|
|
8
9
|
|
|
9
|
-
test("
|
|
10
|
+
test("understands an all-varieties React UI preview", async (t) => {
|
|
10
11
|
const chat = await createConversation(t, {
|
|
11
12
|
server: new URL("../dist/server.js", import.meta.url),
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
// This variant covers all-variety filtering and omitted tips. One exact
|
|
16
|
+
// follow-up checks memory while keeping the suite to one costly judge.
|
|
13
17
|
const response = await chat.send(
|
|
14
|
-
"Preview a plan titled
|
|
18
|
+
"Preview a plan titled All pea plan for all pea types, without growing tips. " +
|
|
15
19
|
"Summarize the matches and say whether anything was sent, stored, or changed.",
|
|
16
20
|
);
|
|
17
21
|
|
|
18
22
|
assertToolCalls(response, [{
|
|
19
23
|
name: "preview-planting-plan",
|
|
20
|
-
arguments: { title: "
|
|
24
|
+
arguments: { title: "All pea plan", peaType: "all", includeTips: false },
|
|
21
25
|
}]);
|
|
22
|
-
assertResponseContains(response, "
|
|
26
|
+
assertResponseContains(response, "Harbour Gem");
|
|
23
27
|
await assertResponseMeaning(response, {
|
|
24
28
|
expected:
|
|
25
|
-
"The preview contains Highland Snap and Meadow Sweet
|
|
26
|
-
"
|
|
29
|
+
"The preview contains Harbour Gem, Highland Snap, and Meadow Sweet without " +
|
|
30
|
+
"growing tips. It is preview-only, sent and stored no report, and changed no " +
|
|
31
|
+
"external data.",
|
|
27
32
|
});
|
|
33
|
+
|
|
34
|
+
const followUp = await chat.send(
|
|
35
|
+
"How many varieties were in that preview? Reply with the numeral only.",
|
|
36
|
+
);
|
|
37
|
+
assertNoToolCalls(followUp);
|
|
38
|
+
assertResponseContains(followUp, "3");
|
|
28
39
|
});
|