Skip to content

The agent that grows with you

fix(desktop): mask typographic double quotes too and document quoted stop words

teknium14f0ced3e5fd1
diff --git a/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts b/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts
index 790fae95adc..598622004f7 100644
--- a/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts
+++ b/apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts
@@ -1092,7 +1092,7 @@ describe('member holds (#93129)', () => {
// #117040: proximity is measured on what the user directs at the room, not
// on content they quote or paste. A stop word inside a fenced block, inline
- // code span, straight-quoted span or blockquote line is content — reporting
+ // code span, quoted span (straight or typographic) or blockquote line is content — reporting
// or debugging a hold must not re-hold the addressed member.
it('holds nobody when the stop word sits inside quoted or pasted content', async () => {
const { rounds } = await loadRoom()
@@ -1101,6 +1101,7 @@ describe('member holds (#93129)', () => {
'```text\nstop @impl\n```',
'The log printed `@impl pause` here',
'Why did "pause @impl" hold the bot?',
+ 'Why did “pause @impl” hold the bot?',
// A cut-short paste leaves the fence unclosed; the rest is still content.
'look what the docs say:\n```js\nstop @impl\n',
'> stop @impl'
diff --git a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts b/apps/desktop/src/plugins/hermes-bots/group-rounds.ts
index 50f4a0d9271..05cae2f02ec 100644
--- a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts
+++ b/apps/desktop/src/plugins/hermes-bots/group-rounds.ts
@@ -304,7 +304,9 @@ function maskQuotedAndCodeSpans(value: string): string {
continue
}
- kept.push(line.replace(/`[^`\n]*`/g, mentionsOnly).replace(/"[^"\n]*"/g, mentionsOnly))
+ // Typographic quotes too: macOS smart-quote substitution rewrites the
+ // straight ones as the user types into the composer.
+ kept.push(line.replace(/`[^`\n]*`/g, mentionsOnly).replace(/["“”][^"“”\n]*["“”]/g, mentionsOnly))
}
return kept.join('\n')
diff --git a/website/docs/user-guide/bot-mode.md b/website/docs/user-guide/bot-mode.md
index c5657e979d7..8d191905156 100644
--- a/website/docs/user-guide/bot-mode.md
+++ b/website/docs/user-guide/bot-mode.md
@@ -106,7 +106,8 @@ word sits next to its @mention (`stop @bot`, `@bot please pause`); the same word
elsewhere in the sentence is read as ordinary prose, so a German `halt` no longer
silences the bot it was sent to — but such a message does not release a held
member either (`@bot please just stop now` never wakes it; repeat the stop next
-to the mention to hold it). A member that is visibly still working keeps its turn for up to three
+to the mention to hold it). Stop words inside fenced code, inline code, quotes or
+blockquote lines are content, not directives, and never hold anyone. A member that is visibly still working keeps its turn for up to three
hours (a member that stops reporting work expires after three minutes of silence regardless); a quiet
room then watches timed-out members for another three hours after the foreground wait ends, and this
observation window does not extend the turn itself.