summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/prompts_more_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-07 11:27:43 +0300
committerPaul Buetow <paul@buetow.org>2025-09-07 11:27:43 +0300
commit0d424adfc64da1c61296c66a99162ec68cc4f8d0 (patch)
tree2aaaad9e6c5c1886809d213a4bf4f0fe8a5bc3c8 /internal/hexaiaction/prompts_more_test.go
parent8889949ad3851bfbf36ff5b73128286d67c88201 (diff)
hexai-action: integrate tmux orchestration; add internal/tmux; tests+docs; bump version to v0.7.0v0.7.0
Diffstat (limited to 'internal/hexaiaction/prompts_more_test.go')
-rw-r--r--internal/hexaiaction/prompts_more_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/hexaiaction/prompts_more_test.go b/internal/hexaiaction/prompts_more_test.go
new file mode 100644
index 0000000..62abc97
--- /dev/null
+++ b/internal/hexaiaction/prompts_more_test.go
@@ -0,0 +1,19 @@
+package hexaiaction
+
+import (
+ "context"
+ "strings"
+ "testing"
+
+ "codeberg.org/snonux/hexai/internal/llm"
+)
+
+type simpleDoer struct{ s string }
+
+func (d simpleDoer) Chat(_ context.Context, _ []llm.Message, _ ...llm.RequestOption) (string, error) { return d.s, nil }
+
+func TestRunOnce_StripsFences(t *testing.T) {
+ got, err := runOnce(context.Background(), simpleDoer{"```\nok\n```"}, "SYS", "USER")
+ if err != nil { t.Fatalf("runOnce: %v", err) }
+ if strings.TrimSpace(got) != "ok" { t.Fatalf("got %q", got) }
+}