klaude-code 2.5.3__py3-none-any.whl → 2.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- klaude_code/auth/__init__.py +10 -0
- klaude_code/auth/env.py +77 -0
- klaude_code/cli/auth_cmd.py +87 -8
- klaude_code/cli/config_cmd.py +5 -5
- klaude_code/cli/cost_cmd.py +159 -60
- klaude_code/cli/main.py +52 -61
- klaude_code/cli/self_update.py +7 -7
- klaude_code/config/builtin_config.py +23 -9
- klaude_code/config/config.py +19 -9
- klaude_code/core/turn.py +7 -8
- klaude_code/llm/google/client.py +12 -0
- klaude_code/llm/openai_compatible/stream.py +5 -1
- klaude_code/llm/openrouter/client.py +1 -0
- klaude_code/protocol/events.py +214 -0
- klaude_code/protocol/sub_agent/image_gen.py +0 -4
- klaude_code/session/session.py +51 -18
- klaude_code/tui/commands.py +0 -5
- klaude_code/tui/components/metadata.py +4 -5
- klaude_code/tui/components/sub_agent.py +6 -0
- klaude_code/tui/display.py +11 -1
- klaude_code/tui/input/completers.py +11 -7
- klaude_code/tui/machine.py +89 -55
- klaude_code/tui/renderer.py +1 -62
- {klaude_code-2.5.3.dist-info → klaude_code-2.6.0.dist-info}/METADATA +23 -31
- {klaude_code-2.5.3.dist-info → klaude_code-2.6.0.dist-info}/RECORD +27 -34
- klaude_code/cli/session_cmd.py +0 -87
- klaude_code/protocol/events/__init__.py +0 -63
- klaude_code/protocol/events/base.py +0 -18
- klaude_code/protocol/events/chat.py +0 -30
- klaude_code/protocol/events/lifecycle.py +0 -23
- klaude_code/protocol/events/metadata.py +0 -16
- klaude_code/protocol/events/streaming.py +0 -43
- klaude_code/protocol/events/system.py +0 -56
- klaude_code/protocol/events/tools.py +0 -27
- {klaude_code-2.5.3.dist-info → klaude_code-2.6.0.dist-info}/WHEEL +0 -0
- {klaude_code-2.5.3.dist-info → klaude_code-2.6.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: klaude-code
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
4
|
Summary: Minimal code agent CLI
|
|
5
5
|
Requires-Dist: anthropic>=0.66.0
|
|
6
6
|
Requires-Dist: chardet>=5.2.0
|
|
@@ -52,13 +52,10 @@ To update:
|
|
|
52
52
|
uv tool upgrade klaude-code
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Or use the built-in
|
|
55
|
+
Or use the built-in command:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
klaude update
|
|
59
58
|
klaude upgrade
|
|
60
|
-
klaude --version
|
|
61
|
-
|
|
62
59
|
```
|
|
63
60
|
|
|
64
61
|
## Usage
|
|
@@ -125,24 +122,34 @@ klaude list
|
|
|
125
122
|
|
|
126
123
|
Models from providers without a valid API key are shown as dimmed/unavailable.
|
|
127
124
|
|
|
128
|
-
####
|
|
125
|
+
#### Authentication
|
|
129
126
|
|
|
130
|
-
|
|
127
|
+
Use the auth command to configure API keys or login to subscription-based providers:
|
|
131
128
|
|
|
132
129
|
```bash
|
|
133
130
|
# Interactive provider selection
|
|
134
|
-
klaude login
|
|
135
|
-
|
|
136
|
-
#
|
|
137
|
-
klaude login
|
|
138
|
-
klaude login
|
|
131
|
+
klaude auth login
|
|
132
|
+
|
|
133
|
+
# Configure API keys
|
|
134
|
+
klaude auth login anthropic # Set ANTHROPIC_API_KEY
|
|
135
|
+
klaude auth login openai # Set OPENAI_API_KEY
|
|
136
|
+
klaude auth login google # Set GOOGLE_API_KEY
|
|
137
|
+
klaude auth login openrouter # Set OPENROUTER_API_KEY
|
|
138
|
+
klaude auth login deepseek # Set DEEPSEEK_API_KEY
|
|
139
|
+
klaude auth login moonshot # Set MOONSHOT_API_KEY
|
|
140
|
+
|
|
141
|
+
# OAuth login for subscription-based providers
|
|
142
|
+
klaude auth login claude # Claude Pro/Max subscription
|
|
143
|
+
klaude auth login codex # ChatGPT Pro subscription
|
|
139
144
|
```
|
|
140
145
|
|
|
141
|
-
|
|
146
|
+
API keys are stored in `~/.klaude/klaude-auth.json` and used as fallback when environment variables are not set.
|
|
147
|
+
|
|
148
|
+
To logout from OAuth providers:
|
|
142
149
|
|
|
143
150
|
```bash
|
|
144
|
-
klaude logout claude
|
|
145
|
-
klaude logout codex
|
|
151
|
+
klaude auth logout claude
|
|
152
|
+
klaude auth logout codex
|
|
146
153
|
```
|
|
147
154
|
|
|
148
155
|
#### Custom Configuration
|
|
@@ -152,7 +159,7 @@ User config file: `~/.klaude/klaude-config.yaml`
|
|
|
152
159
|
Open in editor:
|
|
153
160
|
|
|
154
161
|
```bash
|
|
155
|
-
klaude
|
|
162
|
+
klaude conf
|
|
156
163
|
```
|
|
157
164
|
|
|
158
165
|
##### Model Configuration
|
|
@@ -208,21 +215,6 @@ List configured providers and models:
|
|
|
208
215
|
klaude list
|
|
209
216
|
```
|
|
210
217
|
|
|
211
|
-
### Session Management
|
|
212
|
-
|
|
213
|
-
Clean up sessions with few messages:
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Remove sessions with fewer than 5 messages (default)
|
|
217
|
-
klaude session clean
|
|
218
|
-
|
|
219
|
-
# Remove sessions with fewer than 10 messages
|
|
220
|
-
klaude session clean --min 10
|
|
221
|
-
|
|
222
|
-
# Remove all sessions for the current project
|
|
223
|
-
klaude session clean-all
|
|
224
|
-
```
|
|
225
|
-
|
|
226
218
|
### Cost Tracking
|
|
227
219
|
|
|
228
220
|
View aggregated usage statistics across all sessions:
|
|
@@ -2,7 +2,7 @@ klaude_code/.DS_Store,sha256=cLWFbSgdN0bXEd3_tz93BJSposEPafUBqSr7t-3lPbA,6148
|
|
|
2
2
|
klaude_code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
klaude_code/app/__init__.py,sha256=7mgWpN9SFDqe8AW44bBn9M19nVsBcZURrsGB_8l2hrU,264
|
|
4
4
|
klaude_code/app/runtime.py,sha256=St5ZVo9snvc90R5fG4OojlWwtlRSB66AZAYfZD7AOCE,5982
|
|
5
|
-
klaude_code/auth/__init__.py,sha256=
|
|
5
|
+
klaude_code/auth/__init__.py,sha256=4Rlp-JkYkmYu38oifN79PNHyFU2WzzcDDp7pG0QmlAE,677
|
|
6
6
|
klaude_code/auth/base.py,sha256=ccH2sC0TWB5lPpGm4FSjCgnehwn9riYiXxHCh2iFJe0,3011
|
|
7
7
|
klaude_code/auth/claude/__init__.py,sha256=h1oyqEttDM5TAF6w1Stk6YXYMsbATjODCsi6GhU4zAA,218
|
|
8
8
|
klaude_code/auth/claude/exceptions.py,sha256=_3KbC6W7_gWpxTsSqI0Bxk5Q_v3Fad6dBjweEsoFun4,246
|
|
@@ -13,20 +13,20 @@ klaude_code/auth/codex/exceptions.py,sha256=TcAKPozsY3SCh_krTYFlJ8FU5jepgSTg-5UO
|
|
|
13
13
|
klaude_code/auth/codex/jwt_utils.py,sha256=tuaJKT4vAIGeaQjNzgNcHWGrYYSDrDeaQT9h4cw5Us8,1134
|
|
14
14
|
klaude_code/auth/codex/oauth.py,sha256=4hAGZ2Dv87NC3loEws7U5yNyPyIrryGm5YXY2FkHeyo,7840
|
|
15
15
|
klaude_code/auth/codex/token_manager.py,sha256=EiEdxEErh_mcnW8USWbvdbN91LK7nyk0PZJZGmdUTG8,1405
|
|
16
|
+
klaude_code/auth/env.py,sha256=-d0bJXJE-e2AY5JL82TpR6kkjbJCtyGdBzN-G6P4Be0,2398
|
|
16
17
|
klaude_code/cli/__init__.py,sha256=YzlAoWAr5rx5oe6B_4zPxRFS4QaZauuy1AFwampP5fg,45
|
|
17
|
-
klaude_code/cli/auth_cmd.py,sha256=
|
|
18
|
-
klaude_code/cli/config_cmd.py,sha256=
|
|
19
|
-
klaude_code/cli/cost_cmd.py,sha256=
|
|
18
|
+
klaude_code/cli/auth_cmd.py,sha256=DHY6TGCEOkrZJ-rNVTZ2vg0bS5DltUDiVD0BzBreqDs,8680
|
|
19
|
+
klaude_code/cli/config_cmd.py,sha256=7BmZpKeiO24mKKLKGO46WvSQzSaNwuZ3KtCV4GH-Yh0,3306
|
|
20
|
+
klaude_code/cli/cost_cmd.py,sha256=NNykvNxQn3QvFTe5FYM2RIRskZi97rrbKhAxC5o8Fag,17579
|
|
20
21
|
klaude_code/cli/debug.py,sha256=vEHOjObhrIHDAXk3q6cOgeW2NZxCx5AWM1rJ6FiJnVU,1901
|
|
21
22
|
klaude_code/cli/list_model.py,sha256=dzXwahAZZv8NHPD4pvOTLaTJTEWnCjS1B-K52n3OHOs,13603
|
|
22
|
-
klaude_code/cli/main.py,sha256=
|
|
23
|
-
klaude_code/cli/self_update.py,sha256=
|
|
24
|
-
klaude_code/cli/session_cmd.py,sha256=eZv6sx45bA1GDW_VA0_171-S4JBUB4jfW5tpOPako_g,2995
|
|
23
|
+
klaude_code/cli/main.py,sha256=maa6vgsAgxYVQGk8unhkqgxMTnmEoOmcA8K7TUPMnPs,9438
|
|
24
|
+
klaude_code/cli/self_update.py,sha256=1xdG9ifvRZQDSx6RAtSSgXmw9hZNXMLvqC2zu4bS-GY,2622
|
|
25
25
|
klaude_code/config/__init__.py,sha256=Qe1BeMekBfO2-Zd30x33lB70hdM1QQZGrp4DbWSQ-II,353
|
|
26
26
|
klaude_code/config/assets/__init__.py,sha256=uMUfmXT3I-gYiI-HVr1DrE60mx5cY1o8V7SYuGqOmvY,32
|
|
27
27
|
klaude_code/config/assets/builtin_config.yaml,sha256=iTD_GfQ2pgo_fYe_2vfs6nmEf-oABbWdF2wCXzW8yDY,7782
|
|
28
|
-
klaude_code/config/builtin_config.py,sha256=
|
|
29
|
-
klaude_code/config/config.py,sha256=
|
|
28
|
+
klaude_code/config/builtin_config.py,sha256=olAP0lRHMn4gCjCFu3K6l6rGqdRm0YMmgAdwqDOZp_w,2080
|
|
29
|
+
klaude_code/config/config.py,sha256=MinPsZH6h2MdmnJiX9F6VpaZHkKb1iG-zV90i6dJq1s,25665
|
|
30
30
|
klaude_code/config/model_matcher.py,sha256=3IlLU5h3NDh_bURbCW-PV027C3irG3hyitwj1cj99Ig,6179
|
|
31
31
|
klaude_code/config/sub_agent_model_helper.py,sha256=fI-OIZWFI4116qjalsZj2pIi0waPR1cXE-OKrVMFS6g,8064
|
|
32
32
|
klaude_code/config/thinking.py,sha256=RDWH8UYbeDoIKPXaCIcvVwPAh07Ntaq8w5Zn_fhm-Fk,9329
|
|
@@ -89,7 +89,7 @@ klaude_code/core/tool/web/web_fetch_tool.md,sha256=i0IwsZ6r9vAQeCpwDBtEGrWmHPzZk
|
|
|
89
89
|
klaude_code/core/tool/web/web_fetch_tool.py,sha256=jXbJTgpI_RvyXy5ac8qIrC-AKOUX1fJ3TpqXq_BfkS4,9596
|
|
90
90
|
klaude_code/core/tool/web/web_search_tool.md,sha256=l5gGPx-fXHFel1zLBljm8isy9pwEYXGrq5cFzzw1VBw,1135
|
|
91
91
|
klaude_code/core/tool/web/web_search_tool.py,sha256=ljkgXxP6L5nJnbYB_IOUtPUN9zA_h5hBD55lhNAja08,4293
|
|
92
|
-
klaude_code/core/turn.py,sha256=
|
|
92
|
+
klaude_code/core/turn.py,sha256=z_-0XvJsdN3omiCCQOY4wBlN7hwQ2T0fRJeY_dqLdHc,18509
|
|
93
93
|
klaude_code/llm/__init__.py,sha256=b4AsqnrMIs0a5qR_ti6rZcHwFzAReTwOW96EqozEoSo,287
|
|
94
94
|
klaude_code/llm/anthropic/__init__.py,sha256=PWETvaeNAAX3ue0ww1uRUIxTJG0RpWiutkn7MlwKxBs,67
|
|
95
95
|
klaude_code/llm/anthropic/client.py,sha256=RpYw4UQnhLzAsp6i-FU7cDW4deqngdAoQaTPGnCeO5U,17346
|
|
@@ -102,17 +102,17 @@ klaude_code/llm/client.py,sha256=2PRxcKBHRk7csw-swglsmLJfYUpbJn6tzNqMb5fJBvE,182
|
|
|
102
102
|
klaude_code/llm/codex/__init__.py,sha256=8vN2j2ezWB_UVpfqQ8ooStsBeLL5SY4SUMXOXdWiMaI,132
|
|
103
103
|
klaude_code/llm/codex/client.py,sha256=d2pDHKokQAaMfnWRoliBtTtjeyElQiPjSwNWyjW_PRs,5389
|
|
104
104
|
klaude_code/llm/google/__init__.py,sha256=tQtf_mh_mC3E4S9XAsnhS2JZXGRnYUsBKF0jpXZTvM0,61
|
|
105
|
-
klaude_code/llm/google/client.py,sha256=
|
|
105
|
+
klaude_code/llm/google/client.py,sha256=nBkAyB_LFtEpdFE8NmD64kEZI1Ft24P2U1_yAeYaEPw,21154
|
|
106
106
|
klaude_code/llm/google/input.py,sha256=ErbpSmmv8wOaxSO7b2KSZqPgKvRJo1m4deW-JTzN5CU,8798
|
|
107
107
|
klaude_code/llm/image.py,sha256=jt9FBPFhAIo48pauIEJMIhB9WuDt4wwNs9s3LiEsETE,4272
|
|
108
108
|
klaude_code/llm/input_common.py,sha256=-GnZ87BfzyGqXTP3WYflFOqbRcbKpJjE9mjIv8qKWsQ,6228
|
|
109
109
|
klaude_code/llm/openai_compatible/__init__.py,sha256=ACGpnki7k53mMcCl591aw99pm9jZOZk0ghr7atOfNps,81
|
|
110
110
|
klaude_code/llm/openai_compatible/client.py,sha256=9epE7B58UX-Rr8Zw62AwVv1uonajzcT2RLjreQTQ_PU,4683
|
|
111
111
|
klaude_code/llm/openai_compatible/input.py,sha256=VpgT2wbph6bFsB6OFWKnIdjE32W_gKA_p39T-xuJPrE,3217
|
|
112
|
-
klaude_code/llm/openai_compatible/stream.py,sha256=
|
|
112
|
+
klaude_code/llm/openai_compatible/stream.py,sha256=QBmhhQT7b1WjlDd8VfpNjbnbjxuao5cBa78vM8vxucQ,16057
|
|
113
113
|
klaude_code/llm/openai_compatible/tool_call_accumulator.py,sha256=quajimkUR1uSIPVXYsVNiQSTnOSVt7WuyZ23RyT7lJs,4906
|
|
114
114
|
klaude_code/llm/openrouter/__init__.py,sha256=_As8lHjwj6vapQhLorZttTpukk5ZiCdhFdGT38_ASPo,69
|
|
115
|
-
klaude_code/llm/openrouter/client.py,sha256=
|
|
115
|
+
klaude_code/llm/openrouter/client.py,sha256=P_mDQK4_i1MLF0jK4p_bKhh15ACXgw6Ie0rUrtbfsdM,5738
|
|
116
116
|
klaude_code/llm/openrouter/input.py,sha256=Z_Cf6TnMZ5KQNJ0E5IIDCKK2OWlzi8IW0S5A72BBGT0,6176
|
|
117
117
|
klaude_code/llm/openrouter/reasoning.py,sha256=u7ccfnGxJ4Ws8P3X5FW91d8HXie29JjeWz0hZ1r0oFg,3320
|
|
118
118
|
klaude_code/llm/partial_message.py,sha256=-sjlpV-et4ViBtBpdtihK5QBjAlwS47-mBpVbRQPP3s,142
|
|
@@ -125,14 +125,7 @@ klaude_code/llm/usage.py,sha256=L6w-DlZ3oF8lOR_SEudPBM9idzIy7__f5FZ4ZJ2smi8,5957
|
|
|
125
125
|
klaude_code/log.py,sha256=i9iVCmp4dxqxqH_7XPMVjZt8umiH1KPhRbX4Ao93mSM,11382
|
|
126
126
|
klaude_code/protocol/__init__.py,sha256=TTPnuyQ22RypoTGKdoiS7ZEgHzinuaRHUrauzHDh7Xo,246
|
|
127
127
|
klaude_code/protocol/commands.py,sha256=MfiUgN7r7VFGh0pel4nCRnk44F2Yzdcd7xqM-M369vY,771
|
|
128
|
-
klaude_code/protocol/events
|
|
129
|
-
klaude_code/protocol/events/base.py,sha256=QfqgksjA2Hj-ClmwKVeJ7QA6Z7YdzjswO1NfAVnPCoI,335
|
|
130
|
-
klaude_code/protocol/events/chat.py,sha256=mI_Ks5IIU1ZiywclQYxzhSsGA3ga7ACKShU6d9_KqSs,731
|
|
131
|
-
klaude_code/protocol/events/lifecycle.py,sha256=gykOiAvdxMrvZ9Jm2T_qlve6Iw70C23o2HRooR0rHg4,389
|
|
132
|
-
klaude_code/protocol/events/metadata.py,sha256=VcktYa6k51vIQ1H_KeOqQYCZkX0K9gaCQR1neOAOENs,313
|
|
133
|
-
klaude_code/protocol/events/streaming.py,sha256=U1plGQSTeGZa3E4fIxW_fHXJpuv_DSIBrmGh1l4Fm54,708
|
|
134
|
-
klaude_code/protocol/events/system.py,sha256=FjAnZso1jpOY2nY7DgehuFvBtu_gh5uZqimmpgKbaMA,1392
|
|
135
|
-
klaude_code/protocol/events/tools.py,sha256=8ds_8Zj-wQWvHNAvNt1-fSIHeDffw1dsLWI7ByrAqcM,617
|
|
128
|
+
klaude_code/protocol/events.py,sha256=hn0mM0AOu8nF5lOPoTMQNMsVXOGbBVLh4M5Y9lTE3a0,4284
|
|
136
129
|
klaude_code/protocol/llm_param.py,sha256=mFdAcbzJrIFB4T2QCbLyeZxZQ_38lUNCclEZIH3eWtQ,5191
|
|
137
130
|
klaude_code/protocol/message.py,sha256=pu-wvInS781y-qSKbl9MqO7k3CtAN7Yu4hUHJCXKjZQ,6210
|
|
138
131
|
klaude_code/protocol/model.py,sha256=KboyTyfG5DntRMK98oDHomgJfUpHBdeiq51dWXRSqeM,9923
|
|
@@ -141,7 +134,7 @@ klaude_code/protocol/op_handler.py,sha256=B-dmye-6fgQNUDSa2s9cnHogz_Jl4yoQ9EiNgk
|
|
|
141
134
|
klaude_code/protocol/sub_agent/AGENTS.md,sha256=DHeHl11PYprTOQxInENCEnwnh3kIztBLjvETkwWAO08,1299
|
|
142
135
|
klaude_code/protocol/sub_agent/__init__.py,sha256=RKPFJawd0AB7nRYBxdwuG-14D8pT6HF1-DPCTAxwohI,3784
|
|
143
136
|
klaude_code/protocol/sub_agent/explore.py,sha256=f3fHTyxVeEH4vxJtEts0FbZhdrhOR-_x94QMfNicuUI,1859
|
|
144
|
-
klaude_code/protocol/sub_agent/image_gen.py,sha256=
|
|
137
|
+
klaude_code/protocol/sub_agent/image_gen.py,sha256=npNEOIsMV-1QOvewdb3NFMkG25Fz8wTJe7cxpPO2mWs,4234
|
|
145
138
|
klaude_code/protocol/sub_agent/task.py,sha256=ZOjzK1itxehlva6WfGKKAJq8FvBOKAywrlgGgfb4Tp4,3441
|
|
146
139
|
klaude_code/protocol/sub_agent/web.py,sha256=XOQdqlIp_xno7Q7YVFPFo4AyKU1wbrVKhIi-NxY8eYM,2506
|
|
147
140
|
klaude_code/protocol/tools.py,sha256=T0mzW9EhidVMNkwH-KTeB5FgwMvXBnV_MYE5ytrU1TM,343
|
|
@@ -149,7 +142,7 @@ klaude_code/session/__init__.py,sha256=4sw81uQvEd3YUOOjamKk1KqGmxeb4Ic9T1Tee5zzt
|
|
|
149
142
|
klaude_code/session/codec.py,sha256=a374UZkOusn9MgFCc--yznDljK_4Qfy6yDPfhQq5_P0,1889
|
|
150
143
|
klaude_code/session/export.py,sha256=znoTUCw2tVGgDpl-sT-ba_2Bb2HaH6pvsl4EpLUdYJQ,46102
|
|
151
144
|
klaude_code/session/selector.py,sha256=snBpnz9UQCe_0K8HttSGCJECCE4YEzpWs_Fdmk2P9nI,2195
|
|
152
|
-
klaude_code/session/session.py,sha256=
|
|
145
|
+
klaude_code/session/session.py,sha256=7C_zMIrJGYQw-opeQdLP23OAf3wxjHTVEg7Xe2QM-C4,25029
|
|
153
146
|
klaude_code/session/store.py,sha256=HRrmFzwEVdExqDQlT9FBZOhlFtQmM9Im9zco8pzvUMY,6455
|
|
154
147
|
klaude_code/session/templates/export_session.html,sha256=y4H2DwYx29MuSeKgT8JWdZKNguemaDKN-b75x0sr0eU,127667
|
|
155
148
|
klaude_code/session/templates/mermaid_viewer.html,sha256=Y_wEWFm4mKWpfAz3YMis5DdLEkhw_2d8CpU6jbvGZow,27842
|
|
@@ -183,7 +176,7 @@ klaude_code/tui/command/status_cmd.py,sha256=yALYGxyUX7iVdSRAKdG526YkqOvGV9F0CJN
|
|
|
183
176
|
klaude_code/tui/command/sub_agent_model_cmd.py,sha256=iz9_bdxHBSOQjjMWPP4RBW58V_HhWREweG-4cXuotk0,5610
|
|
184
177
|
klaude_code/tui/command/terminal_setup_cmd.py,sha256=DfusD9c8eVkWPKGtQI0JvTgJnU_686huyzXsYE9TSEM,10639
|
|
185
178
|
klaude_code/tui/command/thinking_cmd.py,sha256=QV3YjcyNRTrmYrujvxfR6Dt05gTK7_uompT9BNWUfgg,2684
|
|
186
|
-
klaude_code/tui/commands.py,sha256=
|
|
179
|
+
klaude_code/tui/commands.py,sha256=EvUzo0b8zL1NerR7gzqU-w7ehJHWY_yXMxsty9JGKKo,3261
|
|
187
180
|
klaude_code/tui/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
181
|
klaude_code/tui/components/assistant.py,sha256=3VUIGf_BJhmoWZ5bHw-QUTMElUxp-MZQKUMWNimHKLE,904
|
|
189
182
|
klaude_code/tui/components/bash_syntax.py,sha256=0Pceo8w7jbK56smaVSBzkZYgCXzqqy7Qnx6kDZOh1yA,7450
|
|
@@ -193,7 +186,7 @@ klaude_code/tui/components/developer.py,sha256=1hDr7boJN1z_JyvvFNn8m7MAf4lPDN3eo
|
|
|
193
186
|
klaude_code/tui/components/diffs.py,sha256=JUokkkJeTIoKD0b-c-chMzIDmMjivBQqH8DYXIA3hHs,10411
|
|
194
187
|
klaude_code/tui/components/errors.py,sha256=_9ojf-23ThR-BoMwNEYG68rzILwA_O59muGvofYL10w,669
|
|
195
188
|
klaude_code/tui/components/mermaid_viewer.py,sha256=MstufMnTauMKzI8cKngXpFqVo-qya20P8ReNkplYtEw,3098
|
|
196
|
-
klaude_code/tui/components/metadata.py,sha256=
|
|
189
|
+
klaude_code/tui/components/metadata.py,sha256=5C3zcK7JSHIDojF5Em2bSMoVYeO_W7m-zOAh9N_6XOQ,7275
|
|
197
190
|
klaude_code/tui/components/rich/__init__.py,sha256=zEZjnHR3Fnv_sFMxwIMjoJfwDoC4GRGv3lHJzAGRq_o,236
|
|
198
191
|
klaude_code/tui/components/rich/cjk_wrap.py,sha256=eMqBxftUtll7zrytUb9WtJ6naYLyax0W4KJRpGwWulM,7602
|
|
199
192
|
klaude_code/tui/components/rich/code_panel.py,sha256=ZKuJHh-kh-hIkBXSGLERLaDbJ7I9hvtvmYKocJn39_w,4744
|
|
@@ -203,19 +196,19 @@ klaude_code/tui/components/rich/quote.py,sha256=u6sBmGdp0ckaZLw_XgJk7iHW4zxnWikU
|
|
|
203
196
|
klaude_code/tui/components/rich/searchable_text.py,sha256=PUe6MotKxSBY4FlPeojVjVQgxCsx_jiQ41bCzLp8WvE,2271
|
|
204
197
|
klaude_code/tui/components/rich/status.py,sha256=kNt08FQGvMZJB-zUhT5UyVFA7jvuRBNqf6yDXLEhb9c,14756
|
|
205
198
|
klaude_code/tui/components/rich/theme.py,sha256=UE70dpIOM8yXoDJk1i3qR3wwOYYEf4VuZ5khHCA8jxw,15260
|
|
206
|
-
klaude_code/tui/components/sub_agent.py,sha256=
|
|
199
|
+
klaude_code/tui/components/sub_agent.py,sha256=byCyRPq0xfit55cLwmp7SfRbCmyiXL77JklvFcbKW4M,6598
|
|
207
200
|
klaude_code/tui/components/thinking.py,sha256=AXC7Xpyiu7ST-eWGLRGY7N8Dak2ny3lV3mvznmfqKmM,2890
|
|
208
201
|
klaude_code/tui/components/tools.py,sha256=Up8DQbXuiPfcbiFVZD6gmZO0YBz2SExWS-tE_xeriX4,25060
|
|
209
202
|
klaude_code/tui/components/user_input.py,sha256=6VHH77xwUUW0rW7yv8hOwGXsmK52HEsBg9-QZVbOm1A,3427
|
|
210
203
|
klaude_code/tui/components/welcome.py,sha256=ZSCcT-wFdSp3L1Fq7shWWz4Rk-BAXvsKisfvIUnP8a4,3665
|
|
211
|
-
klaude_code/tui/display.py,sha256=
|
|
204
|
+
klaude_code/tui/display.py,sha256=JfMETvb1gcgymQVXPy5tH2c-B0cHjXn9PtwSiYlP-1Q,3506
|
|
212
205
|
klaude_code/tui/input/__init__.py,sha256=cAB38ypo7dHo_jgXUCnoBTUKHtiriVaKCv4YepSU9SU,276
|
|
213
206
|
klaude_code/tui/input/clipboard.py,sha256=HjThFB9MG_YdJ76CQv7B-IUoz5JarbWUZDbUVkH1LpY,5106
|
|
214
|
-
klaude_code/tui/input/completers.py,sha256=
|
|
207
|
+
klaude_code/tui/input/completers.py,sha256=t9uhP2z3MJJNy1rlPk0vs-76YJUcpCdO3KFrM5w3E5Y,32932
|
|
215
208
|
klaude_code/tui/input/key_bindings.py,sha256=2uN48J1HRHeCBqq7WrH5J82NIU59oQscce0HquAiYCI,18876
|
|
216
209
|
klaude_code/tui/input/prompt_toolkit.py,sha256=qIb-kDJBBzFhSX3BjwxW2EKAGRQmMYvEI6TzR6hJTP8,28671
|
|
217
|
-
klaude_code/tui/machine.py,sha256=
|
|
218
|
-
klaude_code/tui/renderer.py,sha256=
|
|
210
|
+
klaude_code/tui/machine.py,sha256=bpqIb2DZJHPFquDClsblo2kf0KW1tIyIWJs8SKJrEWM,27542
|
|
211
|
+
klaude_code/tui/renderer.py,sha256=LRF1VtUA5qLweUSlzWFEkyMcSCUwBxqExoWwY5xNE_M,26110
|
|
219
212
|
klaude_code/tui/runner.py,sha256=nOq8wC78HzgqHLRgHC8OgYubH--2gPcDqA6GoV913Yc,11270
|
|
220
213
|
klaude_code/tui/terminal/__init__.py,sha256=GIMnsEcIAGT_vBHvTlWEdyNmAEpruyscUA6M_j3GQZU,1412
|
|
221
214
|
klaude_code/tui/terminal/color.py,sha256=6SJR2RA8cqJINNoRz65w0HL3x9g46ydIvDOGWMeNnQU,7195
|
|
@@ -233,7 +226,7 @@ klaude_code/ui/debug_mode.py,sha256=ZvqbOx4c_rUerMbEZzOfcbNf9leqEDFjqJUlALtzF9Y,
|
|
|
233
226
|
klaude_code/ui/terminal/__init__.py,sha256=5OeAzr994r8-peWsLON0iXsAvJ2pexwMp36JY7FKGDc,179
|
|
234
227
|
klaude_code/ui/terminal/title.py,sha256=EZpLXTMhunsZPVGaxP317lH0Ad2oOh7OsjbV3yRD5is,1115
|
|
235
228
|
klaude_code/update.py,sha256=QER816AZe9u3RhRvP0Z37Jh2Ch5RLy9PREyDsI0e1dA,4480
|
|
236
|
-
klaude_code-2.
|
|
237
|
-
klaude_code-2.
|
|
238
|
-
klaude_code-2.
|
|
239
|
-
klaude_code-2.
|
|
229
|
+
klaude_code-2.6.0.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
230
|
+
klaude_code-2.6.0.dist-info/entry_points.txt,sha256=kkXIXedaTOtjXPr2rVjRVVXZYlFUcBHELaqmyVlWUFA,92
|
|
231
|
+
klaude_code-2.6.0.dist-info/METADATA,sha256=MQ4fWB0k6diVfwvnEISBPHaOxWCsKEOh4JaowkMA3VE,10431
|
|
232
|
+
klaude_code-2.6.0.dist-info/RECORD,,
|
klaude_code/cli/session_cmd.py
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import time
|
|
2
|
-
|
|
3
|
-
import typer
|
|
4
|
-
|
|
5
|
-
from klaude_code.log import log
|
|
6
|
-
from klaude_code.session import Session
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def _session_confirm(sessions: list[Session.SessionMetaBrief], message: str) -> bool:
|
|
10
|
-
"""Show session list and confirm deletion using prompt_toolkit."""
|
|
11
|
-
|
|
12
|
-
from klaude_code.tui.terminal.selector import DEFAULT_PICKER_STYLE, SelectItem, select_one
|
|
13
|
-
|
|
14
|
-
def _fmt(ts: float) -> str:
|
|
15
|
-
try:
|
|
16
|
-
return time.strftime("%m-%d %H:%M:%S", time.localtime(ts))
|
|
17
|
-
except (OSError, OverflowError, ValueError):
|
|
18
|
-
return str(ts)
|
|
19
|
-
|
|
20
|
-
log(f"Sessions to delete ({len(sessions)}):")
|
|
21
|
-
for s in sessions:
|
|
22
|
-
msg_count_display = "N/A" if s.messages_count == -1 else str(s.messages_count)
|
|
23
|
-
first_msg_text = s.user_messages[0] if s.user_messages else ""
|
|
24
|
-
first_msg = first_msg_text.strip().replace("\n", " ")[:50]
|
|
25
|
-
if len(first_msg_text) > 50:
|
|
26
|
-
first_msg += "…"
|
|
27
|
-
log(f" {_fmt(s.updated_at)} {msg_count_display:>3} msgs {first_msg}")
|
|
28
|
-
|
|
29
|
-
items: list[SelectItem[bool]] = [
|
|
30
|
-
SelectItem(title=[("class:text", "No\n")], value=False, search_text="No"),
|
|
31
|
-
SelectItem(title=[("class:text", "Yes\n")], value=True, search_text="Yes"),
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
result = select_one(
|
|
35
|
-
message=message,
|
|
36
|
-
items=items,
|
|
37
|
-
pointer="→",
|
|
38
|
-
style=DEFAULT_PICKER_STYLE,
|
|
39
|
-
use_search_filter=False,
|
|
40
|
-
)
|
|
41
|
-
return bool(result)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def session_clean(
|
|
45
|
-
min_messages: int = typer.Option(5, "--min", "-n", help="Minimum messages to keep a session"),
|
|
46
|
-
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation prompt"),
|
|
47
|
-
) -> None:
|
|
48
|
-
"""Remove sessions with fewer than N messages (default: 5)"""
|
|
49
|
-
sessions = Session.list_sessions()
|
|
50
|
-
to_delete = [s for s in sessions if 0 <= s.messages_count < min_messages]
|
|
51
|
-
|
|
52
|
-
if not to_delete:
|
|
53
|
-
log(f"No sessions with fewer than {min_messages} messages found.")
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
if not yes and not _session_confirm(to_delete, "Delete these sessions?"):
|
|
57
|
-
log("Aborted.")
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
deleted = Session.clean_small_sessions(min_messages)
|
|
61
|
-
log(f"Deleted {deleted} session(s).")
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def session_clean_all(
|
|
65
|
-
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation prompt"),
|
|
66
|
-
) -> None:
|
|
67
|
-
"""Remove all sessions for the current project"""
|
|
68
|
-
sessions = Session.list_sessions()
|
|
69
|
-
|
|
70
|
-
if not sessions:
|
|
71
|
-
log("No sessions found.")
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
if not yes and not _session_confirm(sessions, "Delete ALL sessions? This cannot be undone."):
|
|
75
|
-
log("Aborted.")
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
deleted = Session.clean_all_sessions()
|
|
79
|
-
log(f"Deleted {deleted} session(s).")
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def register_session_commands(app: typer.Typer) -> None:
|
|
83
|
-
"""Register session subcommands to the given Typer app."""
|
|
84
|
-
session_app = typer.Typer(help="Manage sessions for the current project")
|
|
85
|
-
session_app.command("clean")(session_clean)
|
|
86
|
-
session_app.command("clean-all")(session_clean_all)
|
|
87
|
-
app.add_typer(session_app, name="session")
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from klaude_code.protocol.events.base import Event, ResponseEvent
|
|
4
|
-
from klaude_code.protocol.events.chat import (
|
|
5
|
-
CommandOutputEvent,
|
|
6
|
-
DeveloperMessageEvent,
|
|
7
|
-
TodoChangeEvent,
|
|
8
|
-
UserMessageEvent,
|
|
9
|
-
)
|
|
10
|
-
from klaude_code.protocol.events.lifecycle import TaskFinishEvent, TaskStartEvent, TurnEndEvent, TurnStartEvent
|
|
11
|
-
from klaude_code.protocol.events.metadata import TaskMetadataEvent, UsageEvent
|
|
12
|
-
from klaude_code.protocol.events.streaming import (
|
|
13
|
-
AssistantImageDeltaEvent,
|
|
14
|
-
AssistantTextDeltaEvent,
|
|
15
|
-
AssistantTextEndEvent,
|
|
16
|
-
AssistantTextStartEvent,
|
|
17
|
-
ResponseCompleteEvent,
|
|
18
|
-
ThinkingDeltaEvent,
|
|
19
|
-
ThinkingEndEvent,
|
|
20
|
-
ThinkingStartEvent,
|
|
21
|
-
ToolCallStartEvent,
|
|
22
|
-
)
|
|
23
|
-
from klaude_code.protocol.events.system import (
|
|
24
|
-
EndEvent,
|
|
25
|
-
ErrorEvent,
|
|
26
|
-
InterruptEvent,
|
|
27
|
-
ReplayEventUnion,
|
|
28
|
-
ReplayHistoryEvent,
|
|
29
|
-
WelcomeEvent,
|
|
30
|
-
)
|
|
31
|
-
from klaude_code.protocol.events.tools import ToolCallEvent, ToolResultEvent
|
|
32
|
-
|
|
33
|
-
__all__ = [
|
|
34
|
-
"AssistantImageDeltaEvent",
|
|
35
|
-
"AssistantTextDeltaEvent",
|
|
36
|
-
"AssistantTextEndEvent",
|
|
37
|
-
"AssistantTextStartEvent",
|
|
38
|
-
"CommandOutputEvent",
|
|
39
|
-
"DeveloperMessageEvent",
|
|
40
|
-
"EndEvent",
|
|
41
|
-
"ErrorEvent",
|
|
42
|
-
"Event",
|
|
43
|
-
"InterruptEvent",
|
|
44
|
-
"ReplayEventUnion",
|
|
45
|
-
"ReplayHistoryEvent",
|
|
46
|
-
"ResponseCompleteEvent",
|
|
47
|
-
"ResponseEvent",
|
|
48
|
-
"TaskFinishEvent",
|
|
49
|
-
"TaskMetadataEvent",
|
|
50
|
-
"TaskStartEvent",
|
|
51
|
-
"ThinkingDeltaEvent",
|
|
52
|
-
"ThinkingEndEvent",
|
|
53
|
-
"ThinkingStartEvent",
|
|
54
|
-
"TodoChangeEvent",
|
|
55
|
-
"ToolCallEvent",
|
|
56
|
-
"ToolCallStartEvent",
|
|
57
|
-
"ToolResultEvent",
|
|
58
|
-
"TurnEndEvent",
|
|
59
|
-
"TurnStartEvent",
|
|
60
|
-
"UsageEvent",
|
|
61
|
-
"UserMessageEvent",
|
|
62
|
-
"WelcomeEvent",
|
|
63
|
-
]
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import time
|
|
4
|
-
|
|
5
|
-
from pydantic import BaseModel, Field
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Event(BaseModel):
|
|
9
|
-
"""Base event."""
|
|
10
|
-
|
|
11
|
-
session_id: str
|
|
12
|
-
timestamp: float = Field(default_factory=time.time)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class ResponseEvent(Event):
|
|
16
|
-
"""Event associated with a single model response."""
|
|
17
|
-
|
|
18
|
-
response_id: str | None = None
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from klaude_code.protocol import message, model
|
|
4
|
-
from klaude_code.protocol.commands import CommandName
|
|
5
|
-
|
|
6
|
-
from .base import Event
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class UserMessageEvent(Event):
|
|
10
|
-
content: str
|
|
11
|
-
images: list[message.ImageURLPart] | None = None
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class DeveloperMessageEvent(Event):
|
|
15
|
-
"""DeveloperMessages are reminders in user messages or tool results."""
|
|
16
|
-
|
|
17
|
-
item: message.DeveloperMessage
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class TodoChangeEvent(Event):
|
|
21
|
-
todos: list[model.TodoItem]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class CommandOutputEvent(Event):
|
|
25
|
-
"""Event for command output display. Not persisted to session history."""
|
|
26
|
-
|
|
27
|
-
command_name: CommandName | str
|
|
28
|
-
content: str = ""
|
|
29
|
-
ui_extra: model.ToolResultUIExtra | None = None
|
|
30
|
-
is_error: bool = False
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from klaude_code.protocol import model
|
|
4
|
-
|
|
5
|
-
from .base import Event
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TaskStartEvent(Event):
|
|
9
|
-
sub_agent_state: model.SubAgentState | None = None
|
|
10
|
-
model_id: str | None = None
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class TaskFinishEvent(Event):
|
|
14
|
-
task_result: str
|
|
15
|
-
has_structured_output: bool = False
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class TurnStartEvent(Event):
|
|
19
|
-
pass
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class TurnEndEvent(Event):
|
|
23
|
-
pass
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""Metadata-related protocol events."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from klaude_code.protocol import model
|
|
6
|
-
|
|
7
|
-
from .base import Event, ResponseEvent
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class UsageEvent(ResponseEvent):
|
|
11
|
-
usage: model.Usage
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class TaskMetadataEvent(Event):
|
|
15
|
-
metadata: model.TaskMetadataItem
|
|
16
|
-
cancelled: bool = False
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from .base import ResponseEvent
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ThinkingStartEvent(ResponseEvent):
|
|
7
|
-
pass
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ThinkingDeltaEvent(ResponseEvent):
|
|
11
|
-
content: str
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ThinkingEndEvent(ResponseEvent):
|
|
15
|
-
pass
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class AssistantTextStartEvent(ResponseEvent):
|
|
19
|
-
pass
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class AssistantTextDeltaEvent(ResponseEvent):
|
|
23
|
-
content: str
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class AssistantTextEndEvent(ResponseEvent):
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class AssistantImageDeltaEvent(ResponseEvent):
|
|
31
|
-
file_path: str
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class ToolCallStartEvent(ResponseEvent):
|
|
35
|
-
tool_call_id: str
|
|
36
|
-
tool_name: str
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class ResponseCompleteEvent(ResponseEvent):
|
|
40
|
-
"""Final snapshot of the model response."""
|
|
41
|
-
|
|
42
|
-
content: str
|
|
43
|
-
thinking_text: str | None = None
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from pydantic import Field
|
|
4
|
-
|
|
5
|
-
from klaude_code.protocol import llm_param
|
|
6
|
-
from klaude_code.protocol.events.chat import DeveloperMessageEvent, UserMessageEvent
|
|
7
|
-
from klaude_code.protocol.events.lifecycle import TaskFinishEvent, TaskStartEvent, TurnStartEvent
|
|
8
|
-
from klaude_code.protocol.events.metadata import TaskMetadataEvent
|
|
9
|
-
from klaude_code.protocol.events.streaming import AssistantImageDeltaEvent, ResponseCompleteEvent
|
|
10
|
-
from klaude_code.protocol.events.tools import ToolCallEvent, ToolResultEvent
|
|
11
|
-
|
|
12
|
-
from .base import Event
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class WelcomeEvent(Event):
|
|
16
|
-
work_dir: str
|
|
17
|
-
llm_config: llm_param.LLMConfigParameter
|
|
18
|
-
show_klaude_code_info: bool = True
|
|
19
|
-
loaded_skills: dict[str, list[str]] = Field(default_factory=dict)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ErrorEvent(Event):
|
|
23
|
-
error_message: str
|
|
24
|
-
can_retry: bool = False
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class InterruptEvent(Event):
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class EndEvent(Event):
|
|
32
|
-
"""Global display shutdown."""
|
|
33
|
-
|
|
34
|
-
session_id: str = "__app__"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
type ReplayEventUnion = (
|
|
38
|
-
TaskStartEvent
|
|
39
|
-
| TaskFinishEvent
|
|
40
|
-
| TurnStartEvent
|
|
41
|
-
| AssistantImageDeltaEvent
|
|
42
|
-
| ResponseCompleteEvent
|
|
43
|
-
| ToolCallEvent
|
|
44
|
-
| ToolResultEvent
|
|
45
|
-
| UserMessageEvent
|
|
46
|
-
| TaskMetadataEvent
|
|
47
|
-
| InterruptEvent
|
|
48
|
-
| DeveloperMessageEvent
|
|
49
|
-
| ErrorEvent
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class ReplayHistoryEvent(Event):
|
|
54
|
-
events: list[ReplayEventUnion]
|
|
55
|
-
updated_at: float
|
|
56
|
-
is_load: bool = True
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import Literal
|
|
4
|
-
|
|
5
|
-
from klaude_code.protocol import model
|
|
6
|
-
|
|
7
|
-
from .base import ResponseEvent
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ToolCallEvent(ResponseEvent):
|
|
11
|
-
tool_call_id: str
|
|
12
|
-
tool_name: str
|
|
13
|
-
arguments: str
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class ToolResultEvent(ResponseEvent):
|
|
17
|
-
tool_call_id: str
|
|
18
|
-
tool_name: str
|
|
19
|
-
result: str
|
|
20
|
-
ui_extra: model.ToolResultUIExtra | None = None
|
|
21
|
-
status: Literal["success", "error", "aborted"]
|
|
22
|
-
task_metadata: model.TaskMetadata | None = None
|
|
23
|
-
is_last_in_turn: bool = True
|
|
24
|
-
|
|
25
|
-
@property
|
|
26
|
-
def is_error(self) -> bool:
|
|
27
|
-
return self.status in ("error", "aborted")
|
|
File without changes
|
|
File without changes
|