trae: the README's check-in outcomes and the 9074 test name say what the code does
#178's README called 9095 done and 9074 failed. The code answers both as ineligible, the same as magpie's built-in check-in, so that 9074 isn't asked again that day. The test asserting ineligible was named "is failed". Docs and a test name only, so no version bump. bun test packages/trae/native-checkin.test.mjs gives 9 pass, and check.mjs trae is ok.
This commit is contained in:
@@ -283,9 +283,11 @@ Trae CN gives credits for a daily check-in (每日签到); Trae Global has no
|
||||
such page, so this is CN only. magpie can press it
|
||||
once a day for each account (Settings, or the switch on the usage card),
|
||||
through `auth.checkin`: `claimed` when Trae grants the credits, `done`
|
||||
when the status or Trae's 9095 says this device has already claimed,
|
||||
`inactive` when the page is disabled, and `failed` for a turned-away
|
||||
sign-in or Trae's 9074 busy answer.
|
||||
when the status says today's is in already, `inactive` when the page is
|
||||
disabled, `ineligible` when the claim answers 9095 (this device has
|
||||
checked in today) or 9074 (to be done in Trae CN's own app; not asked
|
||||
again that day), and `failed` for a turned-away sign-in or any other
|
||||
answer, which is tried again later that day.
|
||||
It asks Trae CN's own pages through
|
||||
this plugin's fetch, which sends them as the account, as Trae CN's IDE
|
||||
(3.3.104) sends them: its Cloud-IDE-JWT (renewed first when near its
|
||||
|
||||
@@ -46,7 +46,7 @@ test("the device's already-checked answer is ineligible", async () => {
|
||||
expect(await checkin()).toEqual({ outcome: "ineligible", message: "this device has checked in today" })
|
||||
})
|
||||
|
||||
test("Trae's busy answer is failed without another device", async () => {
|
||||
test("Trae's 9074 on the claim is the day's answer, on the account's own device", async () => {
|
||||
f = fakeTrae()
|
||||
f.route("POST " + STATUS, () => json({ code: 0, enable: true, checked_in: false }))
|
||||
f.route("POST " + CLAIM, () => json({ code: 9074, message: "当前参与用户太多" }))
|
||||
|
||||
Reference in New Issue
Block a user