Skip to content

Commit 28b36e3

Browse files
authored
fix(wire): fix wire approval request not responding (#616)
Signed-off-by: Richard Chien <stdrc@outlook.com>
1 parent 3997cac commit 28b36e3

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Only write entries that are worth mentioning to users.
1515
- Config: Add `default_thinking` config option (need to run `/model` to select thinking mode after upgrade)
1616
- LLM: Add `always_thinking` capability for models that always use thinking mode
1717
- CLI: Rename `--command`/`-c` to `--prompt`/`-p`, keep `--command`/`-c` as alias, remove `--query`/`-q`
18+
- Wire: Fix approval requests not responding properly in Wire mode
1819

1920
## 0.76 (2026-01-12)
2021

docs/en/release-notes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This page documents the changes in each Kimi CLI release.
88
- Config: Add `default_thinking` config option (need to run `/model` to select thinking mode after upgrade)
99
- LLM: Add `always_thinking` capability for models that always use thinking mode
1010
- CLI: Rename `--command`/`-c` to `--prompt`/`-p`, keep `--command`/`-c` as alias, remove `--query`/`-q`
11+
- Wire: Fix approval requests not responding properly in Wire mode
1112

1213
## 0.76 (2026-01-12)
1314

docs/zh/release-notes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Config:添加 `default_thinking` 配置项(升级后需运行 `/model` 选择 Thinking 模式)
99
- LLM:为始终使用 Thinking 模式的模型添加 `always_thinking` 能力
1010
- CLI:将 `--command`/`-c` 重命名为 `--prompt`/`-p`,保留 `--command`/`-c` 作为别名,移除 `--query`/`-q`
11+
- Wire:修复 Wire 模式下审批请求无法正常响应的问题
1112

1213
## 0.76 (2026-01-12)
1314

src/kimi_cli/wire/types.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,17 @@ def _validate_event(cls, value: Any) -> Event:
124124
return event
125125

126126

127+
type ApprovalResponseKind = Literal["approve", "approve_for_session", "reject"]
128+
129+
127130
class ApprovalRequestResolved(BaseModel):
128131
"""
129132
Indicates that an approval request has been resolved.
130133
"""
131134

132135
request_id: str
133136
"""The ID of the resolved approval request."""
134-
response: ApprovalRequest.Response
137+
response: ApprovalResponseKind
135138
"""The response to the approval request."""
136139

137140

@@ -148,7 +151,7 @@ class ApprovalRequest(BaseModel):
148151
display: list[DisplayBlock] = Field(default_factory=list[DisplayBlock])
149152
"""Defaults to an empty list for backwards-compatible wire.jsonl loading."""
150153

151-
type Response = Literal["approve", "approve_for_session", "reject"]
154+
type Response = ApprovalResponseKind
152155

153156
# Note that the above fields are just a copy of `kimi_cli.soul.approval.Request`, but
154157
# we cannot directly use that class here because we want to avoid dependency from Wire

0 commit comments

Comments
 (0)