Skip to content

feat(places-near-me): add Places near me tool and flow action - #1601

Merged
hoangle398 merged 4 commits into
mainfrom
feat/places-near-me
Oct 31, 2026
Merged

hoangle398 merged 4 commits into
mainfrom
feat/places-near-me

Conversation

@hoangle398

Copy link
Copy Markdown
Contributor

Summary

  • New Places near me tool: workspaces manage business locations (name and coordinates, with a Google Maps preview) grouped into ranked categories. The page has Locations and Categories tabs.
  • New PlaceCategory and PlaceLocation tables (migration 20261029013513_add_places_near_me). Deleting a category keeps its locations; they just become uncategorized.
  • Public API for every operation behind a new places workspace-token scope, plus CLI docs. The UI and the API call the same services in packages/business/src/place-near-me.
  • New Find places near me flow action. It reads the contact's most recent lat,lng from the location custom fields collected earlier in the flow, finds the nearest place (optionally within one category), and sends it as a WhatsApp location message.
  • Shared changes:
    • parseCoordinatePair moved to @chatbotx.io/utils/coordinates.
    • New contactCustomFieldService.listValuesByKeys.
    • The CLI now parses numeric body flags as numbers.
    • RankSelectField gains a currentRank prop.

Migration

Adds the two tables and their indexes. Run pnpm --filter @chatbotx.io/database db:migrate.

Validation

  • pnpm lint
  • pnpm turbo check-types
  • Ran the Places-near-me tests in builder, business and utils, plus the getUserData validator tests: all pass. I didn't run the full pnpm test suite.

@github-actions github-actions Bot added the feature New feature or request label Oct 30, 2026
- PlaceCategory and PlaceLocation tables with category/location services
- Public API (places scope) for place categories and locations, plus CLI docs
- Server actions and tool page with locations and categories tabs
- Find nearest place location from a contact's latest location custom fields
- Worker handler and flow builder "Find places near me" action
setValues skips writing an unchanged value, so updatedAt stayed stale and
Find places near me could pick an older location from another field. Get
User Data (Location) now passes touchUnchanged to refresh updatedAt without
emitting a change event.
@hoangle398
hoangle398 merged commit 3023dd9 into main Oct 31, 2026
14 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
* feat(places-near-me): add Places near me tool and flow action

- PlaceCategory and PlaceLocation tables with category/location services
- Public API (places scope) for place categories and locations, plus CLI docs
- Server actions and tool page with locations and categories tabs
- Find nearest place location from a contact's latest location custom fields
- Worker handler and flow builder "Find places near me" action

* fix(places-near-me): rank a re-shared identical location as newest

setValues skips writing an unchanged value, so updatedAt stayed stale and
Find places near me could pick an older location from another field. Get
User Data (Location) now passes touchUnchanged to refresh updatedAt without
emitting a change event.

* fix(places-near-me): clarify the location must be collected in the same flow

* docs: remove completed superpowers plans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant