mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 09:20:22 +00:00
refactor(providers): add family replay and tool hooks
This commit is contained in:
@@ -158,3 +158,20 @@ export function inspectGeminiToolSchemas(
|
||||
return [{ toolName: tool.name, toolIndex, violations }];
|
||||
});
|
||||
}
|
||||
|
||||
export type ProviderToolCompatFamily = "gemini";
|
||||
|
||||
export function buildProviderToolCompatFamilyHooks(family: ProviderToolCompatFamily): {
|
||||
normalizeToolSchemas: (ctx: ProviderNormalizeToolSchemasContext) => AnyAgentTool[];
|
||||
inspectToolSchemas: (
|
||||
ctx: ProviderNormalizeToolSchemasContext,
|
||||
) => ProviderToolSchemaDiagnostic[];
|
||||
} {
|
||||
switch (family) {
|
||||
case "gemini":
|
||||
return {
|
||||
normalizeToolSchemas: normalizeGeminiToolSchemas,
|
||||
inspectToolSchemas: inspectGeminiToolSchemas,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user