mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
feat(ai): route copilot claude via anthropic messages api
This commit is contained in:
parent
cf1353b8e7
commit
0a132a30a1
9 changed files with 196 additions and 76 deletions
|
|
@ -75,6 +75,17 @@ describe("inferCopilotInitiator", () => {
|
|||
];
|
||||
expect(inferCopilotInitiator(messages)).toBe("agent");
|
||||
});
|
||||
|
||||
it("returns 'agent' for any non-user role (e.g. 'tool' in OpenAI format)", () => {
|
||||
const messages: unknown[] = [
|
||||
{
|
||||
role: "tool",
|
||||
tool_call_id: "call_abc123",
|
||||
content: "tool output",
|
||||
},
|
||||
];
|
||||
expect(inferCopilotInitiator(messages)).toBe("agent");
|
||||
});
|
||||
});
|
||||
|
||||
describe("hasCopilotVisionInput", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue