Skip to content

Comments

feat(telegram): parse location and venue messages#194

Closed
nachoiacovino wants to merge 1 commit intoopenclaw:mainfrom
nachoiacovino:feat/telegram-location-parsing
Closed

feat(telegram): parse location and venue messages#194
nachoiacovino wants to merge 1 commit intoopenclaw:mainfrom
nachoiacovino:feat/telegram-location-parsing

Conversation

@nachoiacovino
Copy link
Contributor

@nachoiacovino nachoiacovino commented Jan 4, 2026

Summary

Parse Telegram location shares and venue messages so the agent can see them.

Changes

  • Add formatLocationMessage() to convert location/venue shares to text
  • Add extractLocationData() for structured location access in ctxPayload
  • Handle both raw location pins and venue shares (places with names)
  • Include location in reply-to context for quoted messages

How it works

Location messages now appear as:

  • [Location: 48.858844, 2.294351 ±12m] for raw pins
  • [Venue: Eiffel Tower - Champ de Mars, Paris (48.858844, 2.294351)] for places

ctxPayload includes new fields:

  • LocationLat, LocationLon, LocationAccuracy
  • VenueName, VenueAddress

Use case

Enables location-aware skills like restaurant finders - user can share their location and the agent knows where they are without needing a paired iOS/Android node.

Testing

Tested live with Telegram location shares ✅

- Add TelegramLocation, TelegramVenue, and TelegramMessageWithLocation types
- Add formatLocationMessage() to convert location/venue shares to text
- Add extractLocationData() for structured location access in ctxPayload
- Handle both raw location pins and venue shares (places with names)
- Include location in reply-to context for quoted messages

Location messages now appear as:
- [Location: lat, lon ±accuracy] for raw pins
- [Venue: Name - Address (lat, lon)] for places

ctxPayload includes LocationLat, LocationLon, LocationAccuracy,
VenueName, and VenueAddress fields for programmatic access.
@nachoiacovino nachoiacovino force-pushed the feat/telegram-location-parsing branch from 6381b2c to 56f7867 Compare January 4, 2026 21:02
@steipete
Copy link
Contributor

steipete commented Jan 6, 2026

Hi Nacho, that's a great PR, thanks!

@steipete
Copy link
Contributor

steipete commented Jan 6, 2026

Thanks @nachoiacovino! I merged this manually due to conflicts; the commit is in main as 255e77f. Really appreciate the contribution.

@steipete steipete closed this Jan 6, 2026
@nachoiacovino nachoiacovino deleted the feat/telegram-location-parsing branch January 6, 2026 15:39
@nachoiacovino
Copy link
Contributor Author

Thanks @nachoiacovino! I merged this manually due to conflicts; the commit is in main as 255e77f. Really appreciate the contribution.

awesome! thank you so much!

dgarson added a commit to dgarson/clawdbot that referenced this pull request Feb 7, 2026
* feat: work queue overhaul

* Web: add agents dashboard

* Web: add core files editor

* UI: add agent skills, channels, and cron tabs

* Build: prepare vercel ai agent

* feat: work queue CLI commands, graph view

* Web: add full web dev script

* Update a2ui bundle

* Work Queue: implement schema migration system with Umzug

Adds proper database schema migration support to work queue backend using
Umzug migration library. This fixes the "no such column: workstream" error
that occurred when the gateway started with an existing database.

Changes:
- Add umzug dependency for schema migrations
- Create migrations directory with two migrations:
  - 001_baseline.ts: Initial schema (work_queues + work_items)
  - 002_workstream_and_tracking.ts: Workstream and execution tracking
- Update SqliteWorkQueueBackend to run migrations on initialization
- Remove old ensureSchema() and migrateSchema() methods
- Add comprehensive migration tests for all scenarios

The migration system:
- Tracks migration history in umzug_migrations table
- Runs pending migrations automatically on initialization
- Is idempotent (safe to run multiple times)
- Provides a foundation for future schema changes

All tests passing (7/7). Fixes startup errors with existing databases.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants