klaude-code 2.5.0__py3-none-any.whl → 2.5.1__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/const.py +1 -1
- klaude_code/core/task.py +1 -0
- klaude_code/core/turn.py +0 -1
- klaude_code/protocol/events/lifecycle.py +1 -0
- klaude_code/protocol/events/streaming.py +0 -1
- klaude_code/tui/machine.py +29 -18
- {klaude_code-2.5.0.dist-info → klaude_code-2.5.1.dist-info}/METADATA +1 -1
- {klaude_code-2.5.0.dist-info → klaude_code-2.5.1.dist-info}/RECORD +10 -10
- {klaude_code-2.5.0.dist-info → klaude_code-2.5.1.dist-info}/WHEEL +0 -0
- {klaude_code-2.5.0.dist-info → klaude_code-2.5.1.dist-info}/entry_points.txt +0 -0
klaude_code/const.py
CHANGED
|
@@ -159,7 +159,7 @@ STATUS_HINT_TEXT = " (esc to interrupt)" # Status hint text shown after spinner
|
|
|
159
159
|
# Spinner status texts
|
|
160
160
|
STATUS_WAITING_TEXT = "Connecting …"
|
|
161
161
|
STATUS_THINKING_TEXT = "Thinking …"
|
|
162
|
-
STATUS_COMPOSING_TEXT = "Composing
|
|
162
|
+
STATUS_COMPOSING_TEXT = "Composing"
|
|
163
163
|
|
|
164
164
|
# Backwards-compatible alias for the default spinner status text.
|
|
165
165
|
STATUS_DEFAULT_TEXT = STATUS_WAITING_TEXT
|
klaude_code/core/task.py
CHANGED
|
@@ -217,6 +217,7 @@ class TaskExecutor:
|
|
|
217
217
|
yield events.TaskStartEvent(
|
|
218
218
|
session_id=session_ctx.session_id,
|
|
219
219
|
sub_agent_state=ctx.sub_agent_state,
|
|
220
|
+
model_id=ctx.profile.llm_client.get_llm_config().model_id,
|
|
220
221
|
)
|
|
221
222
|
del user_input # Persisted by the operation handler before launching the task.
|
|
222
223
|
|
klaude_code/core/turn.py
CHANGED
klaude_code/tui/machine.py
CHANGED
|
@@ -66,17 +66,6 @@ FAST_TOOLS: frozenset[str] = frozenset(
|
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
def _should_skip_tool_activity(tool_name: str, model_id: str | None) -> bool:
|
|
70
|
-
"""Check if tool activity should be skipped for non-streaming models."""
|
|
71
|
-
if model_id is None:
|
|
72
|
-
return False
|
|
73
|
-
if tool_name not in FAST_TOOLS:
|
|
74
|
-
return False
|
|
75
|
-
# Gemini and Grok models don't stream tool JSON at fine granularity
|
|
76
|
-
model_lower = model_id.lower()
|
|
77
|
-
return "gemini" in model_lower or "grok" in model_lower
|
|
78
|
-
|
|
79
|
-
|
|
80
69
|
@dataclass
|
|
81
70
|
class SubAgentThinkingHeaderState:
|
|
82
71
|
buffer: str = ""
|
|
@@ -257,7 +246,7 @@ class SpinnerStatusState:
|
|
|
257
246
|
base_status = self._reasoning_status or self._todo_status
|
|
258
247
|
|
|
259
248
|
if base_status:
|
|
260
|
-
# Default "
|
|
249
|
+
# Default "Thinking ..." uses normal style; custom headers use bold italic
|
|
261
250
|
is_default_reasoning = base_status == STATUS_THINKING_TEXT
|
|
262
251
|
status_style = ThemeKey.STATUS_TEXT if is_default_reasoning else ThemeKey.STATUS_TEXT_BOLD_ITALIC
|
|
263
252
|
if activity_text:
|
|
@@ -300,6 +289,7 @@ class _SessionState:
|
|
|
300
289
|
session_id: str
|
|
301
290
|
sub_agent_state: model.SubAgentState | None = None
|
|
302
291
|
sub_agent_thinking_header: SubAgentThinkingHeaderState | None = None
|
|
292
|
+
model_id: str | None = None
|
|
303
293
|
assistant_stream_active: bool = False
|
|
304
294
|
thinking_stream_active: bool = False
|
|
305
295
|
assistant_char_count: int = 0
|
|
@@ -313,6 +303,23 @@ class _SessionState:
|
|
|
313
303
|
def should_show_sub_agent_thinking_header(self) -> bool:
|
|
314
304
|
return bool(self.sub_agent_state and self.sub_agent_state.sub_agent_type == "ImageGen")
|
|
315
305
|
|
|
306
|
+
@property
|
|
307
|
+
def should_extract_reasoning_header(self) -> bool:
|
|
308
|
+
"""Gemini and GPT-5 models use markdown bold headers in thinking."""
|
|
309
|
+
if self.model_id is None:
|
|
310
|
+
return False
|
|
311
|
+
model_lower = self.model_id.lower()
|
|
312
|
+
return "gemini" in model_lower or "gpt-5" in model_lower
|
|
313
|
+
|
|
314
|
+
def should_skip_tool_activity(self, tool_name: str) -> bool:
|
|
315
|
+
"""Check if tool activity should be skipped for non-streaming models."""
|
|
316
|
+
if self.model_id is None:
|
|
317
|
+
return False
|
|
318
|
+
if tool_name not in FAST_TOOLS:
|
|
319
|
+
return False
|
|
320
|
+
model_lower = self.model_id.lower()
|
|
321
|
+
return "gemini" in model_lower or "grok" in model_lower
|
|
322
|
+
|
|
316
323
|
|
|
317
324
|
class DisplayStateMachine:
|
|
318
325
|
"""Simplified, session-aware REPL UI state machine.
|
|
@@ -380,6 +387,7 @@ class DisplayStateMachine:
|
|
|
380
387
|
|
|
381
388
|
case events.TaskStartEvent() as e:
|
|
382
389
|
s.sub_agent_state = e.sub_agent_state
|
|
390
|
+
s.model_id = e.model_id
|
|
383
391
|
if not s.is_sub_agent:
|
|
384
392
|
self._set_primary_if_needed(e.session_id)
|
|
385
393
|
cmds.append(TaskClockStart())
|
|
@@ -412,6 +420,7 @@ class DisplayStateMachine:
|
|
|
412
420
|
if not self._is_primary(e.session_id):
|
|
413
421
|
return []
|
|
414
422
|
s.thinking_stream_active = True
|
|
423
|
+
s.thinking_tail = ""
|
|
415
424
|
# Ensure the status reflects that reasoning has started even
|
|
416
425
|
# before we receive any deltas (or a bold header).
|
|
417
426
|
self._spinner.set_reasoning_status(STATUS_THINKING_TEXT)
|
|
@@ -435,11 +444,13 @@ class DisplayStateMachine:
|
|
|
435
444
|
cmds.append(AppendThinking(session_id=e.session_id, content=e.content))
|
|
436
445
|
|
|
437
446
|
# Update reasoning status for spinner (based on bounded tail).
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
447
|
+
# Only extract headers for models that use markdown bold headers in thinking.
|
|
448
|
+
if s.should_extract_reasoning_header:
|
|
449
|
+
s.thinking_tail = (s.thinking_tail + e.content)[-8192:]
|
|
450
|
+
header = extract_last_bold_header(normalize_thinking_content(s.thinking_tail))
|
|
451
|
+
if header:
|
|
452
|
+
self._spinner.set_reasoning_status(header)
|
|
453
|
+
cmds.extend(self._spinner_update_commands())
|
|
443
454
|
|
|
444
455
|
return cmds
|
|
445
456
|
|
|
@@ -528,7 +539,7 @@ class DisplayStateMachine:
|
|
|
528
539
|
|
|
529
540
|
# Skip activity state for fast tools on non-streaming models (e.g., Gemini)
|
|
530
541
|
# to avoid flash-and-disappear effect
|
|
531
|
-
if not
|
|
542
|
+
if not s.should_skip_tool_activity(e.tool_name):
|
|
532
543
|
tool_active_form = get_tool_active_form(e.tool_name)
|
|
533
544
|
if is_sub_agent_tool(e.tool_name):
|
|
534
545
|
self._spinner.add_sub_agent_tool_call(e.tool_call_id, tool_active_form)
|
|
@@ -29,7 +29,7 @@ klaude_code/config/config.py,sha256=0-CLWK5oGGa5PY6o2mVkLNiaiuoaG8zp1UvQ6q0_Xxc,
|
|
|
29
29
|
klaude_code/config/model_matcher.py,sha256=8pYt7DhEhsjLlYS7G14k6KdDtIzcNj2fYhQQach_JTU,6110
|
|
30
30
|
klaude_code/config/sub_agent_model_helper.py,sha256=ntEZXocf3nGesFb8TeyGy1zoB8-yHKih4zngJRdjvf4,8040
|
|
31
31
|
klaude_code/config/thinking.py,sha256=RDWH8UYbeDoIKPXaCIcvVwPAh07Ntaq8w5Zn_fhm-Fk,9329
|
|
32
|
-
klaude_code/const.py,sha256=
|
|
32
|
+
klaude_code/const.py,sha256=FFBwUI2DolPu4_XNzaODyWTr1dETr-JwMQnSTt4Kimc,11149
|
|
33
33
|
klaude_code/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
klaude_code/core/agent.py,sha256=5TNzzzHgKLKpEcFhaM0d136kaGUn_mESC8b1nLoxS2o,3913
|
|
35
35
|
klaude_code/core/agent_profile.py,sha256=FlLDfwyGyoycJYdp70vCuUliZ0GrmcVd0ZCOs4x7MuQ,12776
|
|
@@ -49,7 +49,7 @@ klaude_code/core/prompts/prompt-sub-agent-image-gen.md,sha256=tXYKSzFd04OiC0dmVO
|
|
|
49
49
|
klaude_code/core/prompts/prompt-sub-agent-web.md,sha256=UwrO5M_jPUbee_8lL7gB-2VFFLxvzEejluXDkMzmR5A,3625
|
|
50
50
|
klaude_code/core/prompts/prompt-sub-agent.md,sha256=dmmdsOenbAOfqG6FmdR88spOLZkXmntDBs-cmZ9DN_g,897
|
|
51
51
|
klaude_code/core/reminders.py,sha256=SOSB1wZMPdCtCwTpvjUW5et-d0JcnUxF7lMg90CZnA4,24384
|
|
52
|
-
klaude_code/core/task.py,sha256=
|
|
52
|
+
klaude_code/core/task.py,sha256=rAgulw45GT1NMhe2P5aLCdCnAa_hOZxKzEAaPYMc6Jk,13982
|
|
53
53
|
klaude_code/core/tool/__init__.py,sha256=ABUzLwQbBoZPirCcgYbI88GEtswfy1JBDkFUsGpQ-zc,1415
|
|
54
54
|
klaude_code/core/tool/context.py,sha256=RnO8gN1w9Lxev0BMqUsZp-zvzD9iKxrYQ3261beLRa4,2975
|
|
55
55
|
klaude_code/core/tool/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -87,7 +87,7 @@ klaude_code/core/tool/web/web_fetch_tool.md,sha256=i0IwsZ6r9vAQeCpwDBtEGrWmHPzZk
|
|
|
87
87
|
klaude_code/core/tool/web/web_fetch_tool.py,sha256=jXbJTgpI_RvyXy5ac8qIrC-AKOUX1fJ3TpqXq_BfkS4,9596
|
|
88
88
|
klaude_code/core/tool/web/web_search_tool.md,sha256=l5gGPx-fXHFel1zLBljm8isy9pwEYXGrq5cFzzw1VBw,1135
|
|
89
89
|
klaude_code/core/tool/web/web_search_tool.py,sha256=ljkgXxP6L5nJnbYB_IOUtPUN9zA_h5hBD55lhNAja08,4293
|
|
90
|
-
klaude_code/core/turn.py,sha256=
|
|
90
|
+
klaude_code/core/turn.py,sha256=ZtZ1OcmPCxKE54wpkHSRtmVxe3l2sxNybb-kAPrym_E,17912
|
|
91
91
|
klaude_code/llm/__init__.py,sha256=b4AsqnrMIs0a5qR_ti6rZcHwFzAReTwOW96EqozEoSo,287
|
|
92
92
|
klaude_code/llm/anthropic/__init__.py,sha256=PWETvaeNAAX3ue0ww1uRUIxTJG0RpWiutkn7MlwKxBs,67
|
|
93
93
|
klaude_code/llm/anthropic/client.py,sha256=N1p7dll7jxERejsZM5Wh7HbLWcN6bcLQN6LA7OTgRxk,15655
|
|
@@ -125,9 +125,9 @@ klaude_code/protocol/commands.py,sha256=MfiUgN7r7VFGh0pel4nCRnk44F2Yzdcd7xqM-M36
|
|
|
125
125
|
klaude_code/protocol/events/__init__.py,sha256=5WoUQzj3P7Lih6xO6keaJmaLOyxboO1OtOPavrNNj24,1673
|
|
126
126
|
klaude_code/protocol/events/base.py,sha256=QfqgksjA2Hj-ClmwKVeJ7QA6Z7YdzjswO1NfAVnPCoI,335
|
|
127
127
|
klaude_code/protocol/events/chat.py,sha256=mI_Ks5IIU1ZiywclQYxzhSsGA3ga7ACKShU6d9_KqSs,731
|
|
128
|
-
klaude_code/protocol/events/lifecycle.py,sha256=
|
|
128
|
+
klaude_code/protocol/events/lifecycle.py,sha256=gykOiAvdxMrvZ9Jm2T_qlve6Iw70C23o2HRooR0rHg4,389
|
|
129
129
|
klaude_code/protocol/events/metadata.py,sha256=VcktYa6k51vIQ1H_KeOqQYCZkX0K9gaCQR1neOAOENs,313
|
|
130
|
-
klaude_code/protocol/events/streaming.py,sha256=
|
|
130
|
+
klaude_code/protocol/events/streaming.py,sha256=U1plGQSTeGZa3E4fIxW_fHXJpuv_DSIBrmGh1l4Fm54,708
|
|
131
131
|
klaude_code/protocol/events/system.py,sha256=0c3x8WwqAo5Y0JmukKbn7FKtgEv-ErqwJb5PGjuHehk,1294
|
|
132
132
|
klaude_code/protocol/events/tools.py,sha256=8ds_8Zj-wQWvHNAvNt1-fSIHeDffw1dsLWI7ByrAqcM,617
|
|
133
133
|
klaude_code/protocol/llm_param.py,sha256=DSCxBdFSdQV8qOhEjjjYNapgA3v4TBkN5V9HgEWho_k,5164
|
|
@@ -210,7 +210,7 @@ klaude_code/tui/input/clipboard.py,sha256=HjThFB9MG_YdJ76CQv7B-IUoz5JarbWUZDbUVk
|
|
|
210
210
|
klaude_code/tui/input/completers.py,sha256=lkDBjnqYPLMgR6AZHhx2bfT_vMW-fbV6aqY9SqRwq74,32571
|
|
211
211
|
klaude_code/tui/input/key_bindings.py,sha256=2uN48J1HRHeCBqq7WrH5J82NIU59oQscce0HquAiYCI,18876
|
|
212
212
|
klaude_code/tui/input/prompt_toolkit.py,sha256=ZwkQodc3GufGo7SMmebaOiVopkqxkMDC48y8RFeGuLk,28551
|
|
213
|
-
klaude_code/tui/machine.py,sha256=
|
|
213
|
+
klaude_code/tui/machine.py,sha256=S1OKLx1YlAIQfjUAIYFJPRK-5X8cI_1mSpBqEU0NJwM,25291
|
|
214
214
|
klaude_code/tui/renderer.py,sha256=JZu892irKW0aNis3vs5Rq9aqYdcKhllrhnC2kfsC9tM,29522
|
|
215
215
|
klaude_code/tui/runner.py,sha256=nOq8wC78HzgqHLRgHC8OgYubH--2gPcDqA6GoV913Yc,11270
|
|
216
216
|
klaude_code/tui/terminal/__init__.py,sha256=GIMnsEcIAGT_vBHvTlWEdyNmAEpruyscUA6M_j3GQZU,1412
|
|
@@ -229,7 +229,7 @@ klaude_code/ui/debug_mode.py,sha256=ZvqbOx4c_rUerMbEZzOfcbNf9leqEDFjqJUlALtzF9Y,
|
|
|
229
229
|
klaude_code/ui/terminal/__init__.py,sha256=5OeAzr994r8-peWsLON0iXsAvJ2pexwMp36JY7FKGDc,179
|
|
230
230
|
klaude_code/ui/terminal/title.py,sha256=EZpLXTMhunsZPVGaxP317lH0Ad2oOh7OsjbV3yRD5is,1115
|
|
231
231
|
klaude_code/update.py,sha256=QER816AZe9u3RhRvP0Z37Jh2Ch5RLy9PREyDsI0e1dA,4480
|
|
232
|
-
klaude_code-2.5.
|
|
233
|
-
klaude_code-2.5.
|
|
234
|
-
klaude_code-2.5.
|
|
235
|
-
klaude_code-2.5.
|
|
232
|
+
klaude_code-2.5.1.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
233
|
+
klaude_code-2.5.1.dist-info/entry_points.txt,sha256=kkXIXedaTOtjXPr2rVjRVVXZYlFUcBHELaqmyVlWUFA,92
|
|
234
|
+
klaude_code-2.5.1.dist-info/METADATA,sha256=n2CKAP-sKJmVwwLGgD9c-ha2WN6d23kB0mUKL1BrR3k,10249
|
|
235
|
+
klaude_code-2.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|