Skip to content

Amount regex misses commas and subject-only amounts #8

Description

@royalpinto007

Problem

The amount regex misses commas ($1,200 captures "1" → resolves a $1,200 request as $1) and only scans the body, missing subject-stated amounts.

Where

lib/agent.ts (/\$\s?(\d+(?:\.\d{1,2})?)/ + parseFloat, body-only scan).

Acceptance

Add a failing test first asserting triage("x", "refund $1,200 please") yields refundAmount 1200 and subject-stated amounts are picked up. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions