mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 19:40:34 +00:00
b64da26651
Adds an in-app assistant that reads and plans the open trip. Users connect their own provider (Sign in with ChatGPT, or an Anthropic, OpenAI, Gemini or OpenRouter key) or use the one the admin set up, including a custom OpenAI-compatible server. It is an addon and only shows while a connection is usable. The chat runs on the existing MCP tools, pinned to the trip. Every change is held as a change card the user applies or discards, and applied changes can be undone. On the desktop it is a floating window that can be moved and resized; on the phone it is fullscreen. Search results show as place cards that can go onto a day, weather lookups as a strip, proposed places as ghost markers on the map with a before/after switch, and an answer can be shared into the trip chat. Booking files can be dropped in and are read into change cards.
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
/**
|
|
* createZodDto wrappers over the @trek/shared assistant contracts, so the
|
|
* global ZodValidationPipe validates the bodies by metatype and the shared
|
|
* schemas stay the one source of truth.
|
|
*/
|
|
import {
|
|
assistantAddFoundPlaceRequestSchema,
|
|
assistantAttachmentRequestSchema,
|
|
assistantChatRequestSchema,
|
|
assistantDecisionsRequestSchema,
|
|
assistantShareRequestSchema,
|
|
assistantStopRequestSchema,
|
|
assistantUndoRequestSchema,
|
|
} from '@trek/shared';
|
|
|
|
import { createZodDto } from 'nestjs-zod';
|
|
|
|
export class AssistantAddFoundPlaceDto extends createZodDto(assistantAddFoundPlaceRequestSchema) {}
|
|
export class AssistantAttachmentDto extends createZodDto(assistantAttachmentRequestSchema) {}
|
|
export class AssistantChatDto extends createZodDto(assistantChatRequestSchema) {}
|
|
export class AssistantDecisionsDto extends createZodDto(assistantDecisionsRequestSchema) {}
|
|
export class AssistantShareDto extends createZodDto(assistantShareRequestSchema) {}
|
|
export class AssistantStopDto extends createZodDto(assistantStopRequestSchema) {}
|
|
export class AssistantUndoDto extends createZodDto(assistantUndoRequestSchema) {}
|