Add UI to trips
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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 }) =>
|
||||
|
||||
@@ -103,15 +103,27 @@ export interface TripEvent {
|
||||
trip_id: string;
|
||||
title: string;
|
||||
date: string;
|
||||
time: string | null;
|
||||
start_time: string | null;
|
||||
end_time: string | null;
|
||||
location: string;
|
||||
location_inherited: boolean;
|
||||
maps_link: string | null;
|
||||
place_id: string | null;
|
||||
notes: string | null;
|
||||
attendees: Record<string, string>;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface PlaceResult {
|
||||
name: string;
|
||||
address: string;
|
||||
place_id: string;
|
||||
lat: number;
|
||||
lng: number;
|
||||
maps_link: string;
|
||||
rating?: number;
|
||||
}
|
||||
|
||||
export interface TripRecord {
|
||||
trip_id: string;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user