style(usage): show reasoning effort under the model name

Drop the separate reasoning-effort column from request details and render the raw effort, or auto, directly beneath the model name. Include it in the model tooltip, reset saved layouts that still use the old default column, and keep the field in CSV export.
This commit is contained in:
lzt404 committed 2026-10-06 01:22:41 +08:00
1 parent 56a88ccb6f
commit 6e34850780
22 files changed
+1130 -384

No files matched your search

+10 -8
View File
@@ -35,13 +35,13 @@ function componentFiles(directory: string): string[] {
}
describe('UI localization boundaries', () => {
it('preserves the raw reasoning effort in usage text and tooltips', () => {
it('preserves the raw reasoning effort under the usage model name', () => {
const file = join(sourceRoot, 'pages', 'UsageEventsView.tsx');
const source = ts.createSourceFile(file, readFileSync(file, 'utf8'), ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
let effortCase: ts.CaseClause | undefined;
let modelCase: ts.CaseClause | undefined;
const visit = (node: ts.Node) => {
if (ts.isCaseClause(node) && ts.isStringLiteral(node.expression) && node.expression.text === 'effort') {
effortCase = node;
if (ts.isCaseClause(node) && ts.isStringLiteral(node.expression) && node.expression.text === 'model') {
modelCase = node;
} else {
ts.forEachChild(node, visit);
}
@@ -60,10 +60,12 @@ describe('UI localization boundaries', () => {
}
ts.forEachChild(node, inspectEffort);
};
expect(effortCase).toBeDefined();
if (effortCase) inspectEffort(effortCase);
expect(displayedExpressions).toContain("record.reasoning_effort || 'auto'");
expect(titleExpressions).toContain("{record.reasoning_effort || 'auto'}");
expect(modelCase).toBeDefined();
if (modelCase) inspectEffort(modelCase);
expect(displayedExpressions).toContain('effort');
expect(titleExpressions).toContain('{effort}');
expect(source.getText()).toContain("const effort = record.reasoning_effort || 'auto'");
expect(source.getText()).not.toContain("case 'effort'");
});
it('routes visible prose and accessibility labels through translations', () => {