Files
TREK/server/src/nest/llm-parse/shared-ai-connection.interface.ts
T
Maurice 123e27643d feat(assistant): one AI tile for assistant, parsing and MCP, a planner-aware chat
The three AI addons share one tile in the integration column; a dialog holds
the connection, the assistant's limits and AI parsing, which now reads with
the assistant's connection unless an install keeps its own. Existing parsing
configs stay where they are and keep winning.

The chat sees the map on screen, offers next questions under an answer,
shows its live step in the window head, previews waiting changes inside the
day list, checks whether a day still works, folds a multi-day plan into a
week grid, keeps per-trip notes and can estimate costs. An empty or cut-off
answer gets one push instead of ending silently, and the assistant's own
step and size limits are raised.
2026-10-22 21:30:26 +00:00

20 lines
962 B
TypeScript

import type { ResolvedLlmConfig } from './llm-config';
/**
* The AI connection the assistant runs on, offered to AI parsing so an
* instance sets up one provider for both. Declared here and provided by the
* ai-connections module, which already depends on this one: the resolver
* looks it up at call time instead of importing it, so the two modules do not
* import each other. Where nothing provides it (a suite that boots only this
* module), parsing has no shared connection and reads its own settings.
*/
export const SHARED_AI_CONNECTION = Symbol('SHARED_AI_CONNECTION');
/** A shared connection as parsing reads it; the vision setting stays parsing's own. */
export type SharedParsingConnection = Omit<ResolvedLlmConfig, 'vision'>;
export interface SharedAiConnectionPort {
/** The connection a user's booking import may read with; null when there is none it can use. */
forParsing(userId: number): Promise<SharedParsingConnection | null>;
}