Repository navigation
feat(kap-server): take turn_number in the file-history queries - #4788
Conversation
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e6f97515a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Requirement or Bug
文件历史接口(
GET /sessions/{id}/file-history/changes、/content)用查询参数turn_id传一个整数,也就是这一轮的turn_number。但在对话接口里,turn_id是轮的字符串 id(如t_ab12…),同一个名字有两种含义。客户端迁到新的对话结构时,很容易把字符串turn_id或ordinal传进来,而ordinal从 0 开始、包含 system 轮、撤销后还会复用。传错不会报错,只会悄悄读到别的轮的文件变更。这个 PR 把参数名改成和对话里
Turn.turn_number一致的turn_number,旧名字turn_id暂时继续接受。Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
turn_id标注为 deprecated alias。路由代码只认turn_number。turn_id,直接改名会让文件历史在客户端更新之前失效。客户端会在 code-app bump 子模块时切到turn_number,之后再单独删掉别名。Behavior Changes and Affected Users
?turn_number=Nturn_id返回 40001?turn_id=Nturn_number为准turn_number is required受影响模块:
packages/kap-server的文件历史协议与路由。apiSurface快照只记录路径,没有变化。测试(
test/fileHistory.test.ts):turn_number。turn_id在两个接口上仍可用;两个都不传时返回 40001。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset. 不写:用户看不到变化,旧参数照常可用。gen-docsskill, or this PR needs no doc update. 文档里本来就写的是turn_number。