mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 00:28:29 +00:00
This commit is contained in:
parent
0dbfb6bc0b
commit
98d66e9a8b
2 changed files with 4 additions and 6 deletions
|
|
@ -63,8 +63,7 @@ export function convertTool(mcpTool: MCPToolDef, client: Client, timeout?: numbe
|
|||
timeout,
|
||||
},
|
||||
)
|
||||
if (result.isError)
|
||||
throw new Error(formatToolErrorContent(result.content))
|
||||
if (result.isError) throw new Error(formatToolErrorContent(result.content))
|
||||
if (result.structuredContent === undefined || result.structuredContent === null) return result
|
||||
return {
|
||||
...result,
|
||||
|
|
|
|||
|
|
@ -382,10 +382,9 @@ function buildUsagePoints(
|
|||
|
||||
function buildLeaderboard(rows: StatMetricRow[], product: UsageProduct, rankWindow: DateWindow) {
|
||||
const previous = new Map(
|
||||
aggregateByModelName(rowsForProduct(rows, product, rankWindow.previousStart, rankWindow.previousEnd)).map((item) => [
|
||||
item.model,
|
||||
item.totalTokens,
|
||||
]),
|
||||
aggregateByModelName(rowsForProduct(rows, product, rankWindow.previousStart, rankWindow.previousEnd)).map(
|
||||
(item) => [item.model, item.totalTokens],
|
||||
),
|
||||
)
|
||||
|
||||
return aggregateByModelName(rowsForProduct(rows, product, rankWindow.start, rankWindow.end))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue