mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
14 lines
527 B
TypeScript
14 lines
527 B
TypeScript
|
|
import type { UIAdapterModule } from "./types";
|
||
|
|
import { claudeLocalUIAdapter } from "./claude-local";
|
||
|
|
import { codexLocalUIAdapter } from "./codex-local";
|
||
|
|
import { processUIAdapter } from "./process";
|
||
|
|
import { httpUIAdapter } from "./http";
|
||
|
|
|
||
|
|
const adaptersByType = new Map<string, UIAdapterModule>(
|
||
|
|
[claudeLocalUIAdapter, codexLocalUIAdapter, processUIAdapter, httpUIAdapter].map((a) => [a.type, a]),
|
||
|
|
);
|
||
|
|
|
||
|
|
export function getUIAdapter(type: string): UIAdapterModule {
|
||
|
|
return adaptersByType.get(type) ?? processUIAdapter;
|
||
|
|
}
|