Files
OmniRoute/test-kiro.ts
diegosouzapw 0024d20e28 fix(settings): include usage and budget records in json backups
Export and restore usage history, domain cost history, and domain
budget data so analytics and budget state survive settings transfers.

Also adjust cost overview fallbacks to rank by request volume when
cost data is unavailable, count conversationState entries in chat
request logging, and align e2e coverage with the proxy settings route.
2026-05-04 16:28:47 -03:00

18 lines
705 B
TypeScript

import { buildKiroPayload } from "./open-sse/translator/request/openai-to-kiro.js";
const messages = [];
for (let i = 0; i < 2; i++) {
messages.push({ role: "user", content: `user ${i}` });
messages.push({ role: "assistant", content: `assistant ${i}` });
}
messages.push({ role: "user", content: "use tool" });
messages.push({
role: "assistant",
tool_calls: [{ id: "call_1", function: { name: "test", arguments: "{}" } }],
});
messages.push({ role: "tool", tool_call_id: "call_1", content: "ok" });
messages.push({ role: "user", content: "last user" });
const payload = buildKiroPayload("kr/claude-sonnet-4.5", { messages, tools: [] }, false, {});
console.log(JSON.stringify(payload, null, 2));