fix: revert "[app-server] fix account/read response annotation (#5642)" #5796
+13
−31
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.
Revert #5642 because this generates:
But
Accountis unknown.The unique use of
#[ts(export)]onGetAccountResponseis also suspicious as are the changes tocodex-rs/app-server-protocol/src/export.rssince the existing system has worked fine for quite some time.Though a pure backout of #5642 puts things in a state where, as the PR noted, the following does not work:
So in addition to the backout, this PR adds:
and changes
GetAccount.responseas follows:making it consistent with other types.
With this change, I verified that both of the following work:
The generated TypeScript is as follows:
and
Though while the inconsistency between
"type": "ApiKey"and"type": "chatgpt"is quite concerning, I'm not sure if that format is ever written to disk in any case, but @owenlin0, I would recommend looking into that.Also, it appears that the types in
codex-rs/protocol/src/account.rsare used exclusively by theapp-server-protocolcrate, so perhaps they should just be moved there?