Add UI to trips
This commit is contained in:
@@ -146,6 +146,21 @@ export const c2api = {
|
||||
request<import("@/lib/types").TripEvent>(`/trips/${tripId}/events`, { method: "POST", body: JSON.stringify(body) }),
|
||||
deleteTripEvent: (tripId: string, eventId: string) =>
|
||||
request(`/trips/${tripId}/events/${eventId}`, { method: "DELETE" }),
|
||||
tripChat: (tripId: string, message: string, history: { role: string; content: string }[]) =>
|
||||
request<{ reply: string; suggestions: import("@/lib/types").TripEvent[] }>(
|
||||
`/trips/${tripId}/chat`,
|
||||
{ method: "POST", body: JSON.stringify({ message, history }) }
|
||||
),
|
||||
|
||||
// Places
|
||||
searchPlaces: (query: string, near: string) =>
|
||||
request<import("@/lib/types").PlaceResult[]>(
|
||||
`/places/search?${new URLSearchParams({ query, near }).toString()}`
|
||||
),
|
||||
getDirections: (origin: string, destination: string) =>
|
||||
request<{ duration_text: string | null; duration_seconds: number | null; distance_text: string | null }>(
|
||||
`/places/directions?${new URLSearchParams({ origin, destination }).toString()}`
|
||||
),
|
||||
|
||||
// Per-system AI flag overrides
|
||||
setSystemAiFlags: (systemId: string, flags: { stt_enabled?: boolean | null; correlation_enabled?: boolean | null }) =>
|
||||
|
||||
Reference in New Issue
Block a user