16 lines
677 B
TypeScript
16 lines
677 B
TypeScript
import type { UIAdapterModule } from "./types";
|
|
import { claudeLocalUIAdapter } from "./claude-local";
|
|
import { codexLocalUIAdapter } from "./codex-local";
|
|
import { openCodeLocalUIAdapter } from "./opencode-local";
|
|
import { openClawUIAdapter } from "./openclaw";
|
|
import { processUIAdapter } from "./process";
|
|
import { httpUIAdapter } from "./http";
|
|
|
|
const adaptersByType = new Map<string, UIAdapterModule>(
|
|
[claudeLocalUIAdapter, codexLocalUIAdapter, openCodeLocalUIAdapter, openClawUIAdapter, processUIAdapter, httpUIAdapter].map((a) => [a.type, a]),
|
|
);
|
|
|
|
export function getUIAdapter(type: string): UIAdapterModule {
|
|
return adaptersByType.get(type) ?? processUIAdapter;
|
|
}
|