Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat:<RequestLogsRow /> cached tokens output#20974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jakehwll wants to merge6 commits intomain
base:main
Choose a base branch
Loading
fromjakehwll/requestlogsrow-cached-tokens

Conversation

@jakehwll
Copy link
Contributor

@jakehwlljakehwll commentedNov 28, 2025
edited
Loading

This pull-request traverses thetoken_usages.metadata[...] fields and merges them into a single consumable object so that we're able discern information about the metadata within the token usages at a glance. Its not the be-all end-all implementation of this feature but its a stepping stone in order to render more useful data to the frontend.

These are currently mergable because they only containnumber based fields. When it encounters something within the object that can't be merged (minus empty objects{}) it will simply return them as an array.

Preview

CleanShot 2025-11-28 at 15 30 09@2x

Logic breakdown

CleanShot 2025-11-28 at 15 11 13@2x

Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks fine to me, needs some tests please.
Someone from the FE squad will have to give the final review, though.

jakehwll reacted with heart emoji
Object.keys(obj).sort().join(","),
);
// If the keys are different, just instantly return the objects
if(newSet(keySets).size>1)returnnonEmptyObjects;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We can still merge the fields which are common, no?

<divclassName="flex flex-col gap-2">
<div>Token Usage Metadata</div>
<divclassName="bg-surface-secondary rounded-md p-4">
<pre>{JSON.stringify(tokenUsagesMetadata,null,2)}</pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not really what we discussed, but probably ok for now.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dannykoppingdannykoppingdannykopping left review comments

At least 1 approving review is required to merge this pull request.

Assignees

@jakehwlljakehwll

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jakehwll@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp