Skip to content

Commit c889454

Browse files
Sync public snapshot from freebuff-private
Source: CodebuffAI/freebuff-private@5da97db00e920fae5f2f79911d451fa23ea7f915
1 parent 9f5e2bd commit c889454

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

bun.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/src/constants/freebuff-models.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,24 @@ export function freebuffWithdrawnModelAvailabilityLabel(): string {
22022202
return `no longer offered in free mode — we recommend ${replacement}`
22032203
}
22042204

2205+
/**
2206+
* What a client that understands `updateRequired` says: the model is fine,
2207+
* the build is not, and updating costs nothing extra.
2208+
*/
2209+
export function freebuffUpdateRequiredModelMessage(id: string): string {
2210+
const model = SUPPORTED_FREEBUFF_MODELS.find((m) => m.id === id)
2211+
const name = model?.displayName ?? id
2212+
return `Update Freebuff Desktop to keep using ${name}. This version can't resume your purchased time — the model itself is fine, and updating won't charge you again.`
2213+
}
2214+
2215+
/** The same fact shaped to sit inside "<model> isn't available right now (…)",
2216+
* which is the only sentence a binary that predates `updateRequired` can
2217+
* build. Scopes the unavailability to the client version, so the reader is
2218+
* not told the model is down. */
2219+
export function freebuffUpdateRequiredAvailabilityLabel(): string {
2220+
return 'only on this version of Freebuff Desktop — update it to resume your purchased time without another charge'
2221+
}
2222+
22052223
/** Suffix-tolerant like the other model predicates, so a dated provider
22062224
* snapshot of a paused model cannot slip past the pause. */
22072225
export function isFreebuffPausedFreeModelId(

common/src/types/freebuff-session.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,19 @@ export type FreebuffSessionAdmissionResponse = (
876876
* the field.
877877
*/
878878
withdrawn?: boolean
879+
/**
880+
* The MODEL is fine; this CLIENT BUILD cannot resume a purchased hour,
881+
* and the server refused rather than charge the hour again. Set only on
882+
* the Desktop multi-session path, for a binary too old to rotate a
883+
* purchase claim.
884+
*
885+
* Older clients ignore it and still render `availableHours`, which is
886+
* worded so the sentence they build around it does not blame the model.
887+
* The refusal it replaces read "<model> isn't available right now
888+
* (Update Freebuff Desktop …)", which sent a user off the model that was
889+
* working onto whatever was not.
890+
*/
891+
updateRequired?: boolean
879892
}
880893
| {
881894
/** Account is banned. Returned from every endpoint so banned bots can't

0 commit comments

Comments
 (0)