Enable more biome lints and fix things

This commit is contained in:
Mario Zechner 2025-12-21 22:56:20 +01:00
parent 9c18439c4d
commit d5fd685901
57 changed files with 151 additions and 199 deletions

View file

@ -110,7 +110,7 @@ export const streamOpenAIResponses: StreamFunction<"openai-responses"> = (
currentItem = item;
currentBlock = {
type: "toolCall",
id: item.call_id + "|" + item.id,
id: `${item.call_id}|${item.id}`,
name: item.name,
arguments: {},
partialJson: item.arguments || "",
@ -251,7 +251,7 @@ export const streamOpenAIResponses: StreamFunction<"openai-responses"> = (
} else if (item.type === "function_call") {
const toolCall: ToolCall = {
type: "toolCall",
id: item.call_id + "|" + item.id,
id: `${item.call_id}|${item.id}`,
name: item.name,
arguments: JSON.parse(item.arguments),
};
@ -462,9 +462,9 @@ function convertMessages(model: Model<"openai-responses">, context: Context): Re
// OpenAI requires id to be max 64 characters
let msgId = textBlock.textSignature;
if (!msgId) {
msgId = "msg_" + msgIndex;
msgId = `msg_${msgIndex}`;
} else if (msgId.length > 64) {
msgId = "msg_" + shortHash(msgId);
msgId = `msg_${shortHash(msgId)}`;
}
output.push({
type: "message",