Conversation
Merge c00d361 left compat.go with an unbalanced brace and a duplicated block, tools.go without the closing brace of responseToolNames, and the namespace qualification in translateResponsesToolChoice unreachable after the function case returned early. main does not compile without this. Restore the union of b415dd0 and 66b2ffb: qualify the namespace inside the function case and keep the custom case on EncodeCustomToolName.
trae.Client gains DailyCheckin and Keepalive, plus AlreadyCheckedInError so a day already claimed is recorded as already instead of writing chat cooldown. The status leg runs first, the claim body is literal {} and the floating grant size is read back from the response rather than assumed.
accounts.Manager replaces its WorkBuddy-only ops field with a per-provider maintainer registry. SupportsCheckin derives from that registry, so the API layer and the maintenance loop stop hardcoding a provider name. The existing workbuddy_auto_checkin and workbuddy_checkin_time columns are reused as the account-level opt-in and time, so no new SQLite migration is needed.
Console shows the check-in toggle, the check-in-now action and the history button for every provider with registered check-in ops.
The UG checkin endpoint keys its per-device daily limit on X-Device-Id and answers a bare hex id with code 9074, whose message reads as a rate limit. Every account was therefore unable to check in while the Trae client, which sends aha-<hex>, succeeded. Normalise the stored id in SetUgHeaders so existing credentials work without a re-login, and keep distinct ids distinct so each account still maps to its own device.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up the Trae CN daily credit check-in. The client already carried the two call sites but nothing ever called them.
What this adds
trae.Client.DailyCheckin/Keepalivedrive the existingcheckin_credits/statusandcheckin_credits/claimendpoints.CheckinStatus/CheckinClaimwere already in the tree, unused. The status leg runs first, so a day already claimed is recorded asalreadyinstead of firing a second request.accounts.Managerreplaces its WorkBuddy-only ops field with a per-provider maintainer registry.SupportsCheckinnow derives from that registry, so the HTTP layer and the maintenance loop stop hardcoding a provider name.workbuddy_auto_checkin/workbuddy_checkin_timecolumns are reused as the account-level opt-in and time. No new SQLite migration.Two fixes that ride along
Device id shape. The UG check-in backend keys its per-device daily limit on
X-Device-Idand answers a bare hex id with9074 当前参与用户太多(the message reads as a rate limit, but it is a device-identity rejection). Every account failed to check in while the Trae client, which sendsaha-<hex>, succeeded from the same host and the same minute.SetUgHeadersnow normalises the stored id to that shape, so existing credentials work without a re-login, and each account still maps to its own device.Broken merge on main.
c00d361leftinternal/translate/compat.gowith an unbalanced brace plus a duplicated block,tools.gowithout the closing brace ofresponseToolNames, and the namespace qualification intranslateResponsesToolChoiceunreachable after itscase "function"returned early.maindoes not compile without the first commit here, so this branch carries that minimal repair (union ofb415dd0and66b2ffb). Drop it if you have since fixed it another way.Verification
go build ./...,go vet ./...,go test ./...pass.9074on every claim, the same id prefixed withaha-returns{"code":0,"message":"success"}and the account flips tochecked_in: true.cd frontend && npm run sync.