mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 00:03:00 +00:00
Enable more biome lints and fix things
This commit is contained in:
parent
9c18439c4d
commit
d5fd685901
57 changed files with 151 additions and 199 deletions
|
|
@ -343,7 +343,7 @@ function extractTextFromElement(element: any): string {
|
|||
}
|
||||
}
|
||||
if (tableTexts.length > 0) {
|
||||
text = "\n[Table]\n" + tableTexts.join("\n") + "\n[/Table]\n";
|
||||
text = `\n[Table]\n${tableTexts.join("\n")}\n[/Table]\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ async function processPptx(arrayBuffer: ArrayBuffer, fileName: string): Promise<
|
|||
.filter((t) => t.trim());
|
||||
|
||||
if (slideTexts.length > 0) {
|
||||
extractedText += "\n" + slideTexts.join("\n");
|
||||
extractedText += `\n${slideTexts.join("\n")}`;
|
||||
}
|
||||
extractedText += "\n</slide>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ export function formatUsage(usage: Usage) {
|
|||
|
||||
export function formatTokenCount(count: number): string {
|
||||
if (count < 1000) return count.toString();
|
||||
if (count < 10000) return (count / 1000).toFixed(1) + "k";
|
||||
return Math.round(count / 1000) + "k";
|
||||
if (count < 10000) return `${(count / 1000).toFixed(1)}k`;
|
||||
return `${Math.round(count / 1000)}k`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue