mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 13:01:41 +00:00
refactor: dedupe agent and browser cli helpers
This commit is contained in:
@@ -74,3 +74,10 @@ export function makeGeminiCliAssistantMessage(model: string, content: unknown) {
|
||||
timestamp: 0,
|
||||
};
|
||||
}
|
||||
|
||||
export function expectConvertedRoles(contents: Array<{ role?: string }>, expectedRoles: string[]) {
|
||||
expect(contents).toHaveLength(expectedRoles.length);
|
||||
for (const [index, role] of expectedRoles.entries()) {
|
||||
expect(contents[index]?.role).toBe(role);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user