Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions src/handlers/handler-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@
* @author Cline
*/

import { handleGeocode } from "./core/geocoding.js";
import { handleRoutes } from "./core/routing.js";
// Core handlers
import { handleGeocode, handleReverseGeocode } from "./core/geocoding.js";
import { handlePlaceSearch, handlePlaceDetails } from "./core/places.js";
import { handleDistanceMatrix, handleDirections, handleRoutes } from "./core/routing.js";
import { handleElevation } from "./core/elevation.js";

Comment thread
bivex marked this conversation as resolved.
// Environmental handlers
import { handleWeather } from "./environmental/weather.js";
import { handleAirQuality } from "./environmental/air-quality.js";
import { handleSolar } from "./environmental/solar.js";
import { handlePollen } from "./environmental/pollen.js";

// Visual handlers
import { handleStreetView } from "./visual/street-view.js";
import { handleStaticMap } from "./visual/static-maps.js";

// ====================================
Expand All @@ -25,9 +36,23 @@ export type HandlerFunction = (...args: any[]) => Promise<any>;
* Maps tool names to their respective handler functions
*/
export const HANDLER_MAP: Record<string, HandlerFunction> = {
// Core Google Maps Tools
"maps_geocode": handleGeocode,
"maps_reverse_geocode": handleReverseGeocode,
"maps_search_places": handlePlaceSearch,
"maps_place_details": handlePlaceDetails,
"maps_distance_matrix": handleDistanceMatrix,
"maps_directions": handleDirections,
"maps_elevation": handleElevation,
"maps_routes": handleRoutes,

// Environmental Data Tools
"maps_weather": handleWeather,
"maps_static_map": handleStaticMap,
// Continue adding all other tool-handler mappings here
"maps_air_quality": handleAirQuality,
"maps_solar": handleSolar,
"maps_pollen": handlePollen,

// Visual Google Maps Tools
"maps_street_view": handleStreetView,
"maps_static_map": handleStaticMap,
};