Skip to content

feat(chat): the Maple bot in Hazel - #2016

Merged
Makisuo merged 5 commits into
mainfrom
feat/hazel-chat-connector
Oct 31, 2026
Merged

Makisuo merged 5 commits into
mainfrom
feat/hazel-chat-connector

fix(chat): keep the first line's indentation when the Hazel mention s…

a541f93
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 31, 2026 in 33s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 5 defects.
no findings · tests covered · risk medium · 5 defects fixed in earlier rounds

The last commit reworks stripMention so a Hazel mention is removed without collapsing the message's line breaks or the indentation of the line beneath it, with a test for both shapes. The change is safe to merge; the rest of the connector was reviewed at 35bba6e.

  • stripMention joins split parts with a space only between words, never at a line edge
  • Leading blank lines are dropped with trimEnd(), keeping the first content line's indentation

Before merge

Fixed since the last review

  • ✅ F6 · stripMention's .trim() drops the indentation of an indented first line

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/chat-platform/src/connectors/hazel/install.ts 2.9k POST 1.8k/day, 3.0% err
POST 1.1k/day, 0.1% err
Telemetry this change adds and removes (5)
  • ➕ span name Hazel.request · packages/chat-platform/src/connectors/hazel/install.ts:41
  • ➕ span name Hazel.post · packages/chat-platform/src/connectors/hazel/outbound.ts:218
  • ➕ span name Hazel.openThread · packages/chat-platform/src/connectors/hazel/outbound.ts:233
  • ➕ span name Hazel.whisper · packages/chat-platform/src/connectors/hazel/outbound.ts:285
  • ➕ span name Hazel.history · packages/chat-platform/src/connectors/hazel/outbound.ts:314
What was checked
  • Ran stripMention at head on 13 shapes: indentation, \r\n, multiple and empty mentions behave as described
  • git diff 35bba6e..head over the Hazel connector: only stripMention and one new test changed
  • mentionOf has one other caller, outbound.ts:296, which is unaffected by the strip change

a541f93 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.