Commit Graph

6 Commits

Author SHA1 Message Date
891df5e82b fix: simplify webhook test by removing unused fixtures and mocks 2026-06-18 16:26:37 -05:00
761253a056 fix: webhook test modernization and production bug fix
- Fix production bug in send_whatsapp_message: access 'instance_url' instead
  of 'server_url' to match SendMessageScheme TypedDict definition
- Update webhook test to use test_app with in-memory dependencies
- Mock send_whatsapp_message to avoid real HTTP calls in tests
- Add assertions to verify correct parameters passed to send_whatsapp_message

Bug: send_whatsapp_message accessed request_data['server_url'] but
SendMessageScheme defines field as 'instance_url', causing KeyError when
webhook tries to send WhatsApp messages.
2026-06-10 16:30:28 -05:00
30345538f7 fix: add MCP result validation, improve agent error handling and state management
- Add `_extract_mcp_content_text()` helper in naliia_tools.py to safely
  extract text from MCP results, preventing IndexError on empty content
- Replace all direct `result.content[0].text` accesses with safe helper
- Improve customer identification with preservation of existing state
- Add proper JSON parsing with fallback and error handling
- Simplify webhook state management (use agent's checkpointer internally)
- Update system prompt to remove check_mcp_connection tool reference
- Fix tests to use async mocks and correct expected values
2026-03-19 21:11:28 -05:00
6fc6338413 fix: PEP8 Style 2026-03-04 16:20:56 -05:00
da2c2a1528 feat: Implement MemorySaver 2026-02-27 00:47:16 -05:00
42dc2099d2 feat: Add chat webhook 2026-02-24 23:13:09 -05:00