fix: miscellaneous quick fixes from CodeRabbit review
- log_info_generate.go: add nil guard in InjectTieredBillingInfo - billing_expr_request.go: merge headers instead of replacing - go.mod: remove incorrect // indirect on expr-lang/expr - ToolPriceSettings.jsx: add null check in syncToVisual - tool_billing.go: fix PricePer1K for image_generation (per-call, not per-1K) - utils.jsx: add minute() to time condition regex - useUsageLogsData.jsx: pass displayMode to renderTieredModelPrice - AGENTS.md, CLAUDE.md: fix Rule 6/7 ordering - relay-gemini.go: add TEXT modality case in CandidatesTokensDetails
This commit is contained in:
Vendored
+1
-1
@@ -915,7 +915,7 @@ export const formatDynamicPriceSummary = (billingExpr, t, groupRatio = 1) => {
|
||||
|
||||
const varLabels = BILLING_VARS.map((v) => [v.key, v.label]);
|
||||
|
||||
const hasTimeCondition = /\b(?:hour|weekday|month|day)\(/.test(exprBody);
|
||||
const hasTimeCondition = /\b(?:hour|minute|weekday|month|day)\(/.test(exprBody);
|
||||
const hasRequestCondition = /\b(?:param|header)\(/.test(exprBody);
|
||||
|
||||
const tags = [];
|
||||
|
||||
@@ -504,6 +504,7 @@ export const useLogsData = () => {
|
||||
...other,
|
||||
prompt_tokens: logs[i].prompt_tokens,
|
||||
completion_tokens: logs[i].completion_tokens,
|
||||
displayMode: billingDisplayMode,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export default function ToolPriceSettings({ options }) {
|
||||
setJsonText(text);
|
||||
try {
|
||||
const parsed = JSON.parse(text);
|
||||
if (typeof parsed !== 'object' || Array.isArray(parsed)) {
|
||||
if (typeof parsed !== 'object' || Array.isArray(parsed) || parsed === null) {
|
||||
setJsonError(t('JSON 必须是对象'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user