Skip to content

Commit ced853c

Browse files
committed
Add OpenCode integration test to pre-commit
1 parent 8423a42 commit ced853c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pre-commit.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ if ! echo "$STREAM_RESPONSE" | grep -q "chat.completion.chunk"; then
7575
fi
7676
echo "Streaming tool call: OK"
7777

78+
# Test OpenCode integration
79+
echo ""
80+
echo "Testing OpenCode integration..."
81+
OPENCODE_OUTPUT=$(timeout 30 opencode run --model localcode-afm/afm "echo hello" 2>&1 || true)
82+
83+
if ! echo "$OPENCODE_OUTPUT" | grep -q "permission requested"; then
84+
echo "FAILED: OpenCode not showing approval UI"
85+
echo "Output: $OPENCODE_OUTPUT"
86+
exit 1
87+
fi
88+
echo "OpenCode integration: OK"
89+
7890
echo ""
7991
echo "All checks passed!"
8092
echo ""

0 commit comments

Comments
 (0)