Name: [ADD] viin_ai_helpdesk, viin_ai_crm: Phase 4 AI connectors (helpdesk seed + CRM advisory tools)

State: Killed

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #66

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 2861e1bdc2dae0553c492de364c6cd264e4a6efd

Description:

                                            [IMP] viin_ai_agent, viin_ai_crm, viin_ai_helpdesk: strip HTML from AI tool payloads

Connector tools fed raw Html-field values (lead/ticket description,
activity note, message body) straight into the payload the LLM reads -
HTML tags are token noise and can confuse the model.

- viin_ai_agent: add _tool_plain_text on ir.actions.server, a sibling of
  _tool_result that runs a value through html2plaintext ('' for falsy),
  callable from a server-action code body (safe_eval). Mirrors the
  existing viin_ai_chat plain-text helper; no viin_brain coupling.
- viin_ai_crm: strip crm.lead.description and mail.activity.note.
- viin_ai_helpdesk: strip viin.helpdesk.ticket.description and
  mail.message.body (strip first, then truncate so the cap applies to
  plain text).
- Surveyed the other connectors (account/sale/sale_crm/stock) and the
  AI/Brain tool surface: no other tool returns a raw Html field
  (Brain already returns the content_plain T1 representation).
- Tests: red-green behaviour tests assert the payload value carries no
  '<' and preserves the readable text, driven through a real
  ir.actions.server.run() as the tool's low-privilege group.
- docs: note the _tool_plain_text sibling next to _tool_result in
  ai/architecture.md so future connectors strip Html-field values.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: Not finished