Update TOOLS.md (claude-agent docs), KB index, tehnici pauza, coaching seara, email tool

This commit is contained in:
Echo
2026-02-02 21:10:02 +00:00
parent 84701a062e
commit df5c182f78
5 changed files with 108 additions and 22 deletions

View File

@@ -46,6 +46,7 @@ def send_email(to_email: str, subject: str, body: str, html: bool = False) -> di
msg["Subject"] = Header(subject, 'utf-8')
msg["From"] = formataddr((FROM_NAME, SMTP_USER))
msg["To"] = to_email
msg["Reply-To"] = "echo@romfast.ro"
# Attach body
if html:
@@ -74,7 +75,10 @@ if __name__ == "__main__":
body = sys.argv[3]
# Auto-detect HTML or use --html flag
is_html = "--html" in sys.argv or body.strip().startswith("<!DOCTYPE") or body.strip().startswith("<html")
# Check for common HTML patterns, not just doctype/html tags
body_lower = body.strip().lower()
has_html_tags = any(tag in body_lower for tag in ['<html', '<!doctype', '<div', '<p>', '<br', '<table', '<h1', '<h2', '<h3', '<span', '<style'])
is_html = "--html" in sys.argv or has_html_tags
result = send_email(to, subject, body, html=is_html)