mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-23 05:51:33 +00:00
refactor: make providers use dedicated session handling classes
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
import type { IProvider, IProviderAuth, IProviderMcp } from '@/shared/interfaces.js';
|
||||
import type {
|
||||
FetchHistoryOptions,
|
||||
FetchHistoryResult,
|
||||
LLMProvider,
|
||||
NormalizedMessage,
|
||||
} from '@/shared/types.js';
|
||||
import type { IProvider, IProviderAuth, IProviderMcp, IProviderSessions } from '@/shared/interfaces.js';
|
||||
import type { LLMProvider } from '@/shared/types.js';
|
||||
|
||||
/**
|
||||
* Shared provider base.
|
||||
@@ -17,15 +12,9 @@ export abstract class AbstractProvider implements IProvider {
|
||||
readonly id: LLMProvider;
|
||||
abstract readonly mcp: IProviderMcp;
|
||||
abstract readonly auth: IProviderAuth;
|
||||
abstract readonly sessions: IProviderSessions;
|
||||
|
||||
protected constructor(id: LLMProvider) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
abstract normalizeMessage(raw: unknown, sessionId: string | null): NormalizedMessage[];
|
||||
|
||||
abstract fetchHistory(
|
||||
sessionId: string,
|
||||
options?: FetchHistoryOptions,
|
||||
): Promise<FetchHistoryResult>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user