mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 10:01:21 +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
|
|
@ -27,7 +27,7 @@ function formatContext(ctx: LogContext): string {
|
|||
|
||||
function truncate(text: string, maxLen: number): string {
|
||||
if (text.length <= maxLen) return text;
|
||||
return text.substring(0, maxLen) + `\n(truncated at ${maxLen} chars)`;
|
||||
return `${text.substring(0, maxLen)}\n(truncated at ${maxLen} chars)`;
|
||||
}
|
||||
|
||||
function formatToolArgs(args: Record<string, unknown>): string {
|
||||
|
|
@ -200,9 +200,9 @@ export function logUsageSummary(
|
|||
): string {
|
||||
const formatTokens = (count: number): string => {
|
||||
if (count < 1000) return count.toString();
|
||||
if (count < 10000) return (count / 1000).toFixed(1) + "k";
|
||||
if (count < 1000000) return Math.round(count / 1000) + "k";
|
||||
return (count / 1000000).toFixed(1) + "M";
|
||||
if (count < 10000) return `${(count / 1000).toFixed(1)}k`;
|
||||
if (count < 1000000) return `${Math.round(count / 1000)}k`;
|
||||
return `${(count / 1000000).toFixed(1)}M`;
|
||||
};
|
||||
|
||||
const lines: string[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue