| 1 | package control |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "reasonix/internal/agent" |
| 7 | ) |
| 8 | |
| 9 | func TestIsSyntheticUserMessageHostRecovery(t *testing.T) { |
| 10 | cases := []struct { |
| 11 | name string |
| 12 | input string |
| 13 | }{ |
| 14 | {name: "plain guidance", input: agent.HostRecoveryGuidanceToolFailedPrefix + ", continue unrelated work automatically."}, |
| 15 | {name: "persisted steer", input: agent.MidTurnSteerPrefix + "\n" + agent.HostRecoveryGuidanceToolFailedPrefix + ", continue unrelated work automatically."}, |
| 16 | } |
| 17 | for _, tc := range cases { |
| 18 | if !IsSyntheticUserMessage(tc.input) { |
| 19 | t.Errorf("%s: IsSyntheticUserMessage() = false, want true", tc.name) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 |