-
Notifications
You must be signed in to change notification settings - Fork 366
fix: include effective token count in noop and detection comment footers #25941
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,12 +208,28 @@ function _resetCache() { | |
| _parsedMultipliers = undefined; | ||
| } | ||
|
|
||
| /** | ||
| * Read effective tokens from the GH_AW_EFFECTIVE_TOKENS environment variable and return | ||
| * a pre-formatted suffix string suitable for appending to footer text. | ||
| * Returns "" when the variable is absent or the parsed value is not a positive integer. | ||
| * @returns {string} Suffix string, e.g. " · ● 12.5K" or "" | ||
| */ | ||
| function getEffectiveTokensSuffix() { | ||
| const raw = process.env.GH_AW_EFFECTIVE_TOKENS; | ||
| const parsed = raw ? parseInt(raw, 10) : NaN; | ||
| if (!isNaN(parsed) && parsed > 0) { | ||
| return ` · ● ${formatET(parsed)}`; | ||
| } | ||
| return ""; | ||
|
Comment on lines
+217
to
+223
|
||
| } | ||
|
|
||
| module.exports = { | ||
| defaultTokenClassWeights, | ||
| getTokenClassWeights, | ||
| getModelMultiplier, | ||
| computeBaseWeightedTokens, | ||
| computeEffectiveTokens, | ||
| formatET, | ||
| getEffectiveTokensSuffix, | ||
| _resetCache, | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow job changes
runs-onfromubuntu-slimtoubuntu-latest, but the PR description is focused on comment footers/effective token suffixes and doesn't mention a runner change. If this is intentional (e.g.,ubuntu-slimis deprecated/unsupported for this job), please document the rationale in the PR description; otherwise consider reverting to keep runner usage consistent with the rest of the workflow.