mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 11:40:39 +09:00
14 lines
579 B
TypeScript
14 lines
579 B
TypeScript
|
|
import type { CLIAdapterModule } from "./types.js";
|
||
|
|
import { claudeLocalCLIAdapter } from "./claude-local/index.js";
|
||
|
|
import { codexLocalCLIAdapter } from "./codex-local/index.js";
|
||
|
|
import { processCLIAdapter } from "./process/index.js";
|
||
|
|
import { httpCLIAdapter } from "./http/index.js";
|
||
|
|
|
||
|
|
const adaptersByType = new Map<string, CLIAdapterModule>(
|
||
|
|
[claudeLocalCLIAdapter, codexLocalCLIAdapter, processCLIAdapter, httpCLIAdapter].map((a) => [a.type, a]),
|
||
|
|
);
|
||
|
|
|
||
|
|
export function getCLIAdapter(type: string): CLIAdapterModule {
|
||
|
|
return adaptersByType.get(type) ?? processCLIAdapter;
|
||
|
|
}
|