|
15 | 15 | {:name "rule2" :content "Second rule"}] |
16 | 16 | fake-repo-map (delay "TREE") |
17 | 17 | behavior "agent" |
18 | | - result (prompt/build-chat-instructions refined-contexts rules fake-repo-map behavior {} (h/db))] |
| 18 | + config {} |
| 19 | + result (prompt/build-chat-instructions refined-contexts rules fake-repo-map behavior config (h/db))] |
19 | 20 | (is (string/includes? result "You are ECA")) |
20 | 21 | (is (string/includes? result "<rules description=\"Rules defined by user\">")) |
21 | 22 | (is (string/includes? result "<rule name=\"rule1\">First rule</rule>")) |
22 | 23 | (is (string/includes? result "<rule name=\"rule2\">Second rule</rule>")) |
23 | | - (is (string/includes? result "<contexts description=\"User-Provided Snippet. This content is current and accurate. Treat this as sufficient context for answering the query.\">")) |
| 24 | + (is (string/includes? result "<contexts description=\"User-Provided. This content is current and accurate. Treat this as sufficient context for answering the query.\">")) |
24 | 25 | (is (string/includes? result "<file path=\"foo.clj\">(ns foo)</file>")) |
25 | 26 | (is (string/includes? result "<file line-start=1 line-end=1 path=\"bar.clj\">(def a 1)</file>")) |
26 | 27 | (is (string/includes? result "<repoMap description=\"Workspaces structure in a tree view, spaces represent file hierarchy\" >TREE</repoMap>")) |
|
36 | 37 | {:name "rule2" :content "Second rule"}] |
37 | 38 | fake-repo-map (delay "TREE") |
38 | 39 | behavior "plan" |
39 | | - result (prompt/build-chat-instructions refined-contexts rules fake-repo-map behavior {} (h/db))] |
| 40 | + config {} |
| 41 | + result (prompt/build-chat-instructions refined-contexts rules fake-repo-map behavior config (h/db))] |
40 | 42 | (is (string/includes? result "You are ECA")) |
41 | 43 | (is (string/includes? result "<rules description=\"Rules defined by user\">")) |
42 | 44 | (is (string/includes? result "<rule name=\"rule1\">First rule</rule>")) |
43 | 45 | (is (string/includes? result "<rule name=\"rule2\">Second rule</rule>")) |
44 | | - (is (string/includes? result "<contexts description=\"User-Provided Snippet. This content is current and accurate. Treat this as sufficient context for answering the query.\">")) |
45 | | - (is (string/includes? result "<file path=\"foo.clj\">(ns foo)</file>")) |
46 | | - (is (string/includes? result "<file line-start=1 line-end=1 path=\"bar.clj\">(def a 1)</file>")) |
47 | | - (is (string/includes? result "<repoMap description=\"Workspaces structure in a tree view, spaces represent file hierarchy\" >TREE</repoMap>")) |
48 | | - (is (string/includes? result "<resource uri=\"custom://my-resource\">some-cool-content</resource>")) |
49 | | - (is (string/includes? result "</contexts>")) |
50 | | - (is (string? result))))) |
| 46 | + (is (string/includes? result "<contexts description=\"User-Provided. This content is current and accurate. Treat this as sufficient context for answering the query.\">")) |
| 47 | + (is (string/includes? result "<file path=\"foo.clj\">(ns foo)</file>")) |
| 48 | + (is (string/includes? result "<file line-start=1 line-end=1 path=\"bar.clj\">(def a 1)</file>")) |
| 49 | + (is (string/includes? result "<repoMap description=\"Workspaces structure in a tree view, spaces represent file hierarchy\" >TREE</repoMap>")) |
| 50 | + (is (string/includes? result "<resource uri=\"custom://my-resource\">some-cool-content</resource>")) |
| 51 | + (is (string/includes? result "</contexts>")) |
| 52 | + (is (string? result))))) |
0 commit comments