|
11 | 11 | (deftest default-initialize-and-shutdown |
12 | 12 | (eca/start-process!) |
13 | 13 |
|
14 | | - (testing "initialize request with default config" |
15 | | - (is (match? |
16 | | - {:models ["anthropic/claude-3-5-haiku-20241022" |
17 | | - "anthropic/claude-opus-4-1-20250805" |
18 | | - "anthropic/claude-opus-4-20250514" |
19 | | - "anthropic/claude-sonnet-4-20250514" |
20 | | - "github-copilot/claude-sonnet-4" |
21 | | - "github-copilot/gemini-2.5-pro" |
22 | | - "github-copilot/gpt-4.1" |
23 | | - "github-copilot/gpt-5" |
24 | | - "github-copilot/gpt-5-mini" |
25 | | - "openai/gpt-4.1" |
26 | | - "openai/gpt-5" |
27 | | - "openai/gpt-5-mini" |
28 | | - "openai/gpt-5-nano" |
29 | | - "openai/o3" |
30 | | - "openai/o4-mini"] |
31 | | - :chatDefaultModel "anthropic/claude-sonnet-4-20250514" |
32 | | - :chatBehaviors ["agent" "plan"] |
33 | | - :chatDefaultBehavior "plan" |
34 | | - :chatWelcomeMessage "Welcome to ECA!\n\nType '/' for commands\n\n"} |
35 | | - (eca/request! (fixture/initialize-request |
36 | | - {:initializationOptions (merge fixture/default-init-options |
37 | | - {:chat {:defaultBehavior "plan"}})}))))) |
| 14 | + (let [models ["anthropic/claude-3-5-haiku-20241022" |
| 15 | + "anthropic/claude-opus-4-1-20250805" |
| 16 | + "anthropic/claude-opus-4-20250514" |
| 17 | + "anthropic/claude-sonnet-4-20250514" |
| 18 | + "github-copilot/claude-sonnet-4" |
| 19 | + "github-copilot/gemini-2.5-pro" |
| 20 | + "github-copilot/gpt-4.1" |
| 21 | + "github-copilot/gpt-5" |
| 22 | + "github-copilot/gpt-5-mini" |
| 23 | + "openai/gpt-4.1" |
| 24 | + "openai/gpt-5" |
| 25 | + "openai/gpt-5-mini" |
| 26 | + "openai/gpt-5-nano" |
| 27 | + "openai/o3" |
| 28 | + "openai/o4-mini"]] |
| 29 | + (testing "initialize request with default config" |
| 30 | + (is (match? |
| 31 | + {:models models |
| 32 | + :chatDefaultModel "anthropic/claude-sonnet-4-20250514" |
| 33 | + :chatBehaviors ["agent" "plan"] |
| 34 | + :chatDefaultBehavior "plan" |
| 35 | + :chatWelcomeMessage "Welcome to ECA!\n\nType '/' for commands\n\n"} |
| 36 | + (eca/request! (fixture/initialize-request |
| 37 | + {:initializationOptions (merge fixture/default-init-options |
| 38 | + {:chat {:defaultBehavior "plan"}})}))))) |
| 39 | + |
| 40 | + (testing "initialized notification" |
| 41 | + (eca/notify! (fixture/initialized-notification))) |
38 | 42 |
|
39 | | - (testing "initialized notification" |
40 | | - (eca/notify! (fixture/initialized-notification))) |
| 43 | + (testing "config updated" |
| 44 | + (is (match? |
| 45 | + {:chat {:models models |
| 46 | + :defaultModel "anthropic/claude-sonnet-4-20250514" |
| 47 | + :behaviors ["agent" "plan"] |
| 48 | + :defaultBehavior "plan" |
| 49 | + :welcomeMessage "Welcome to ECA!\n\nType '/' for commands\n\n"}} |
| 50 | + (eca/client-awaits-server-notification :config/updated))))) |
41 | 51 |
|
42 | 52 | (testing "Native tools updated" |
43 | 53 | (is (match? |
|
50 | 60 | (testing "shutdown request" |
51 | 61 | (is (match? |
52 | 62 | nil |
53 | | - (eca/request! (fixture/shutdown-request))))) |
| 63 | + (eca/request! (fixture/shutdown-request)))) |
54 | 64 |
|
55 | | - (testing "exit notification" |
56 | | - (eca/notify! (fixture/exit-notification)))) |
| 65 | + (testing "exit notification" |
| 66 | + (eca/notify! (fixture/exit-notification))))) |
57 | 67 |
|
58 | 68 | (deftest initialize-with-custom-providers |
59 | 69 | (eca/start-process!) |
|
0 commit comments