Skip to content

feat: allow configurable abort/stop triggers instead of hardcoded multilingual keywords #26113

@steamb23

Description

@steamb23

Background

PR #25103 added multilingual abort trigger support by expanding the hardcoded ABORT_TRIGGERS Set with ES/FR/ZH/HI/AR/JP/DE/PT/RU keywords.

While this is a great step forward, I think the underlying approach has a scalability problem.

Problem

The current design hardcodes stop keywords into ABORT_TRIGGERS:

ABORT_TRIGGERS = new Set([
  "stop", "abort", "please stop",
  "停止", "やめて", "стоп", "arrête", ...
])

This approach doesn't scale well:

Proposed Solution

Expose a config option to let users define additional abort triggers:

{
  "autoReply": {
    "abort": {
      "extraTriggers": [
        "그만",
        "멈춰",
        "중단해",
        "custom-stop-phrase"
      ]
    }
  }
}

This way:

  • Core multilingual coverage can still exist in the hardcoded Set as a baseline
  • Users can extend for their own language or workflow without waiting for a PR
  • The codebase stops growing indefinitely

Notes

  • The normalization pipeline (normalizeAbortTriggerText) already handles trim/lowercase/punctuation stripping, so extra triggers would slot in cleanly
  • This doesn't replace the existing hardcoded set — it augments it

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions