klaude-code 2.8.0__py3-none-any.whl → 2.9.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.
Files changed (100) hide show
  1. klaude_code/app/runtime.py +2 -1
  2. klaude_code/auth/antigravity/oauth.py +0 -9
  3. klaude_code/auth/antigravity/token_manager.py +0 -18
  4. klaude_code/auth/base.py +53 -0
  5. klaude_code/auth/codex/exceptions.py +0 -4
  6. klaude_code/auth/codex/oauth.py +32 -28
  7. klaude_code/auth/codex/token_manager.py +0 -18
  8. klaude_code/cli/cost_cmd.py +128 -39
  9. klaude_code/cli/list_model.py +27 -10
  10. klaude_code/cli/main.py +15 -4
  11. klaude_code/config/assets/builtin_config.yaml +8 -24
  12. klaude_code/config/config.py +47 -25
  13. klaude_code/config/sub_agent_model_helper.py +18 -13
  14. klaude_code/config/thinking.py +0 -8
  15. klaude_code/const.py +2 -2
  16. klaude_code/core/agent_profile.py +11 -53
  17. klaude_code/core/compaction/compaction.py +4 -6
  18. klaude_code/core/compaction/overflow.py +0 -4
  19. klaude_code/core/executor.py +51 -5
  20. klaude_code/core/manager/llm_clients.py +9 -1
  21. klaude_code/core/prompts/prompt-claude-code.md +4 -4
  22. klaude_code/core/reminders.py +21 -23
  23. klaude_code/core/task.py +0 -4
  24. klaude_code/core/tool/__init__.py +3 -2
  25. klaude_code/core/tool/file/apply_patch.py +0 -27
  26. klaude_code/core/tool/file/edit_tool.py +1 -2
  27. klaude_code/core/tool/file/read_tool.md +3 -2
  28. klaude_code/core/tool/file/read_tool.py +15 -2
  29. klaude_code/core/tool/offload.py +0 -35
  30. klaude_code/core/tool/sub_agent/__init__.py +6 -0
  31. klaude_code/core/tool/sub_agent/image_gen.md +16 -0
  32. klaude_code/core/tool/sub_agent/image_gen.py +146 -0
  33. klaude_code/core/tool/sub_agent/task.md +20 -0
  34. klaude_code/core/tool/sub_agent/task.py +205 -0
  35. klaude_code/core/tool/tool_registry.py +0 -16
  36. klaude_code/core/turn.py +1 -1
  37. klaude_code/llm/anthropic/input.py +6 -5
  38. klaude_code/llm/antigravity/input.py +14 -7
  39. klaude_code/llm/codex/client.py +22 -0
  40. klaude_code/llm/codex/prompt_sync.py +237 -0
  41. klaude_code/llm/google/client.py +8 -6
  42. klaude_code/llm/google/input.py +20 -12
  43. klaude_code/llm/image.py +18 -11
  44. klaude_code/llm/input_common.py +14 -6
  45. klaude_code/llm/json_stable.py +37 -0
  46. klaude_code/llm/openai_compatible/input.py +0 -10
  47. klaude_code/llm/openai_compatible/stream.py +16 -1
  48. klaude_code/llm/registry.py +0 -5
  49. klaude_code/llm/responses/input.py +15 -5
  50. klaude_code/llm/usage.py +0 -8
  51. klaude_code/protocol/commands.py +1 -0
  52. klaude_code/protocol/events.py +2 -1
  53. klaude_code/protocol/message.py +2 -2
  54. klaude_code/protocol/model.py +20 -1
  55. klaude_code/protocol/op.py +27 -0
  56. klaude_code/protocol/op_handler.py +10 -0
  57. klaude_code/protocol/sub_agent/AGENTS.md +5 -5
  58. klaude_code/protocol/sub_agent/__init__.py +13 -34
  59. klaude_code/protocol/sub_agent/explore.py +7 -34
  60. klaude_code/protocol/sub_agent/image_gen.py +3 -74
  61. klaude_code/protocol/sub_agent/task.py +3 -47
  62. klaude_code/protocol/sub_agent/web.py +8 -52
  63. klaude_code/protocol/tools.py +2 -0
  64. klaude_code/session/export.py +308 -299
  65. klaude_code/session/session.py +58 -21
  66. klaude_code/session/store.py +0 -4
  67. klaude_code/session/templates/export_session.html +430 -134
  68. klaude_code/skill/assets/deslop/SKILL.md +9 -0
  69. klaude_code/skill/system_skills.py +0 -20
  70. klaude_code/tui/command/__init__.py +3 -0
  71. klaude_code/tui/command/continue_cmd.py +34 -0
  72. klaude_code/tui/command/fork_session_cmd.py +5 -2
  73. klaude_code/tui/command/resume_cmd.py +9 -2
  74. klaude_code/tui/command/sub_agent_model_cmd.py +85 -18
  75. klaude_code/tui/components/assistant.py +0 -26
  76. klaude_code/tui/components/command_output.py +3 -1
  77. klaude_code/tui/components/developer.py +3 -0
  78. klaude_code/tui/components/diffs.py +2 -208
  79. klaude_code/tui/components/errors.py +4 -0
  80. klaude_code/tui/components/mermaid_viewer.py +2 -2
  81. klaude_code/tui/components/rich/markdown.py +60 -63
  82. klaude_code/tui/components/rich/theme.py +2 -0
  83. klaude_code/tui/components/sub_agent.py +2 -46
  84. klaude_code/tui/components/thinking.py +0 -33
  85. klaude_code/tui/components/tools.py +43 -21
  86. klaude_code/tui/input/images.py +21 -18
  87. klaude_code/tui/input/key_bindings.py +2 -2
  88. klaude_code/tui/input/prompt_toolkit.py +49 -49
  89. klaude_code/tui/machine.py +15 -11
  90. klaude_code/tui/renderer.py +12 -20
  91. klaude_code/tui/runner.py +2 -1
  92. klaude_code/tui/terminal/image.py +6 -34
  93. klaude_code/ui/common.py +0 -70
  94. {klaude_code-2.8.0.dist-info → klaude_code-2.9.0.dist-info}/METADATA +3 -6
  95. {klaude_code-2.8.0.dist-info → klaude_code-2.9.0.dist-info}/RECORD +97 -92
  96. klaude_code/core/tool/sub_agent_tool.py +0 -126
  97. klaude_code/llm/openai_compatible/tool_call_accumulator.py +0 -108
  98. klaude_code/tui/components/rich/searchable_text.py +0 -68
  99. {klaude_code-2.8.0.dist-info → klaude_code-2.9.0.dist-info}/WHEEL +0 -0
  100. {klaude_code-2.8.0.dist-info → klaude_code-2.9.0.dist-info}/entry_points.txt +0 -0
@@ -1,58 +1,58 @@
1
1
  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
- klaude_code/app/runtime.py,sha256=xo5_oxc80kjoF1h5IWSEWukRwdA257JzakC_VgcikII,5976
4
+ klaude_code/app/runtime.py,sha256=mRr-Rb1u7M2P1vkF8OFOPo98C_9G_sh0CP7LCcApWtk,6030
5
5
  klaude_code/auth/AGENTS.md,sha256=5ObIfgMfUDuNBKykK6kikRSEvCxDt5fO0-ySVaLVDW0,8467
6
6
  klaude_code/auth/__init__.py,sha256=LhGS2P80Ci_DeaqxVueknDIj-Ded4OFQdNmFHekXNY8,1106
7
7
  klaude_code/auth/antigravity/__init__.py,sha256=Lv37yKg7CLzoQss2Jho-jtrGiU-zUCa7W1w3eDWmR0o,610
8
8
  klaude_code/auth/antigravity/exceptions.py,sha256=jKtlTtoHzoqGARYmLjFl0Sxms9ySj_raPAaqEc4tcVs,448
9
- klaude_code/auth/antigravity/oauth.py,sha256=SsGMXSRm8wfKb4wUBJfVyDgnNvC3GUFdQ-XXNZ2Hpoo,11098
9
+ klaude_code/auth/antigravity/oauth.py,sha256=H4LZUHPwhhNSCz_SyzRdCmQw8GbsHXvRfM8wrgIognk,10787
10
10
  klaude_code/auth/antigravity/pkce.py,sha256=SfSLyIkiO9s0ROLDljz9Vu5GCxYP42U1b1nvWbXnkSI,664
11
- klaude_code/auth/antigravity/token_manager.py,sha256=BFMuop0h2zMHUFzPmfuanguX8S2cbORCObcZ3CutXSA,1548
12
- klaude_code/auth/base.py,sha256=ZRDHC0IzpmI7cnypHQvMGwyFcUryJDlb3j-M4gKmeB4,3166
11
+ klaude_code/auth/antigravity/token_manager.py,sha256=Osab3ppyzvndTf1B8FBrrW3XayrhwOKkGpsQBTEWBnI,752
12
+ klaude_code/auth/base.py,sha256=j6sc8XvP2kXRHOfEfr_nKyp94QPVWJsJDN0lMYLsg2Q,5178
13
13
  klaude_code/auth/claude/__init__.py,sha256=h1oyqEttDM5TAF6w1Stk6YXYMsbATjODCsi6GhU4zAA,218
14
14
  klaude_code/auth/claude/exceptions.py,sha256=_3KbC6W7_gWpxTsSqI0Bxk5Q_v3Fad6dBjweEsoFun4,246
15
15
  klaude_code/auth/claude/oauth.py,sha256=fcnR8BdpVe9LuTz0FvAFn24FAGyE_Y_HaIzxmXNQ1CA,6921
16
16
  klaude_code/auth/claude/token_manager.py,sha256=XNsBOy2lNFnD6wZhM4V3k4aQlMogb2_avvgL9LlNGEQ,691
17
17
  klaude_code/auth/codex/__init__.py,sha256=rrpPvr-_R4kbj_oZ2U_fPmIfDPZov9Pjz2bAFpztUJk,502
18
- klaude_code/auth/codex/exceptions.py,sha256=w9Z6Wlp7DJRRO18GJFrd-V4jVdq8ZYJ4Bc9B7Rnux7c,498
18
+ klaude_code/auth/codex/exceptions.py,sha256=TcAKPozsY3SCh_krTYFlJ8FU5jepgSTg-5UO1dA4OgE,388
19
19
  klaude_code/auth/codex/jwt_utils.py,sha256=tuaJKT4vAIGeaQjNzgNcHWGrYYSDrDeaQT9h4cw5Us8,1134
20
- klaude_code/auth/codex/oauth.py,sha256=4hAGZ2Dv87NC3loEws7U5yNyPyIrryGm5YXY2FkHeyo,7840
21
- klaude_code/auth/codex/token_manager.py,sha256=EiEdxEErh_mcnW8USWbvdbN91LK7nyk0PZJZGmdUTG8,1405
20
+ klaude_code/auth/codex/oauth.py,sha256=y1qpZ-6GK4wtxj7O6hFj5SWX61SFuS_buv0j_Wt46yk,8130
21
+ klaude_code/auth/codex/token_manager.py,sha256=I6tSp6jiBAe0mrYC94F7FfaP3KWf1iwcaG1SBxyVX-g,669
22
22
  klaude_code/auth/env.py,sha256=QLqV2QjVCAAPSaH2xm2W0KvQ-RSbRxk_Y_FSH_MGDNY,2550
23
23
  klaude_code/cli/__init__.py,sha256=YzlAoWAr5rx5oe6B_4zPxRFS4QaZauuy1AFwampP5fg,45
24
24
  klaude_code/cli/auth_cmd.py,sha256=OwU7aOgSc7lZusQuVK6P6X0flKWK6cU677ED3YUja9s,11100
25
25
  klaude_code/cli/config_cmd.py,sha256=7BmZpKeiO24mKKLKGO46WvSQzSaNwuZ3KtCV4GH-Yh0,3306
26
- klaude_code/cli/cost_cmd.py,sha256=yW_niFZtCnBfFXkCWkxYDB07CIMZbirQXgjj3soljkw,13474
26
+ klaude_code/cli/cost_cmd.py,sha256=74ZJcMfUOkyqBrwPO8DgYmYk9EClMp0PBGGDguaIDgA,16604
27
27
  klaude_code/cli/debug.py,sha256=vEHOjObhrIHDAXk3q6cOgeW2NZxCx5AWM1rJ6FiJnVU,1901
28
- klaude_code/cli/list_model.py,sha256=G1_vW7uZDos9j-77INHPRh_rq4o5KkcrxZZ_VUwUtpo,15494
29
- klaude_code/cli/main.py,sha256=j8TRoMRYrITVBwROZbQzZHUN8mAK3Vd9tukfJI_pqM0,12224
28
+ klaude_code/cli/list_model.py,sha256=2YA2PlWcdL9vP8UUg15xpMtNVwbnBH_nlacTGDe5ufA,16192
29
+ klaude_code/cli/main.py,sha256=Z0jCfGvMH7iIlmpjcPsCOHgqDFEcEl3LkzIQr9fUHNM,12772
30
30
  klaude_code/cli/self_update.py,sha256=1xdG9ifvRZQDSx6RAtSSgXmw9hZNXMLvqC2zu4bS-GY,2622
31
31
  klaude_code/config/__init__.py,sha256=Qe1BeMekBfO2-Zd30x33lB70hdM1QQZGrp4DbWSQ-II,353
32
32
  klaude_code/config/assets/__init__.py,sha256=uMUfmXT3I-gYiI-HVr1DrE60mx5cY1o8V7SYuGqOmvY,32
33
- klaude_code/config/assets/builtin_config.yaml,sha256=Wge4O8y9gCtg88mKf-av_It3LANtaSN6BVip9lh6GH8,9233
33
+ klaude_code/config/assets/builtin_config.yaml,sha256=aSGUng4IOUxJtjF2A6camuivat_1UXsrUpAubSRnMUA,8747
34
34
  klaude_code/config/builtin_config.py,sha256=OG5VERUHo3tSojgFXfNDV6pAHNOh3kO-xFHpvTr-cpc,1786
35
- klaude_code/config/config.py,sha256=adJCE1j231fjzJYRZw1CGW-ACbOLWjWM6MUrCum6_6E,26288
35
+ klaude_code/config/config.py,sha256=otBvsUkvI-2fpZzx9fO6SPnCek7FI7kufvAnGIQqTz8,27084
36
36
  klaude_code/config/model_matcher.py,sha256=3IlLU5h3NDh_bURbCW-PV027C3irG3hyitwj1cj99Ig,6179
37
- klaude_code/config/sub_agent_model_helper.py,sha256=fI-OIZWFI4116qjalsZj2pIi0waPR1cXE-OKrVMFS6g,8064
38
- klaude_code/config/thinking.py,sha256=RDWH8UYbeDoIKPXaCIcvVwPAh07Ntaq8w5Zn_fhm-Fk,9329
39
- klaude_code/const.py,sha256=ePpQE2hy4CsJXNTCcdjCceKh6Gme1wB1wyh7xvL7gUs,11525
37
+ klaude_code/config/sub_agent_model_helper.py,sha256=PvYuGE0fVKn7eReHyL7Q3ReyH6_nCm7VPwEgZqcX5cI,8384
38
+ klaude_code/config/thinking.py,sha256=5uVM0cFUJZBBsBGGdPG-tjdiNwZ-GFeWOBBWIdSPFvQ,9017
39
+ klaude_code/const.py,sha256=EMR2MX-aTyiKj0Io92Jhh7eSFo1SqgrQxLyxnlMnmVM,11527
40
40
  klaude_code/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  klaude_code/core/agent.py,sha256=GrIg22nfoq1c90UHyEfU_bh46vtXTCo4bLezb-3mGNo,4120
42
- klaude_code/core/agent_profile.py,sha256=tRPNTsgF_Sv7pEy75_O8Ycb8KE7jrH_chQGRwy_2NPE,12992
42
+ klaude_code/core/agent_profile.py,sha256=-3Kudw_Sm33pjtQp-T841EL6JQErWqFzUeJdNac1QFI,10773
43
43
  klaude_code/core/compaction/AGENTS.md,sha256=KZR5lxe4jVAbT5K9PxbZcHWI1UwsppbGmxIfCdHYr7Q,3684
44
44
  klaude_code/core/compaction/__init__.py,sha256=CvidYx3sX0IZAa4pifX9jrQSkg4Nib7PKrcaOHswF60,329
45
- klaude_code/core/compaction/compaction.py,sha256=tYOs_czkyojBkAoUV2DTgVKmWS5N7hUwWBuxSnhiBPQ,25075
46
- klaude_code/core/compaction/overflow.py,sha256=uNqTy8ZITl_oaNlU2wgAN663zeoBC5BI6W5kPS1rSJc,1244
45
+ klaude_code/core/compaction/compaction.py,sha256=IEKA2mmiOyQq5ryJKBcNcIDQ51AuTD5ewVc8qmUoMoQ,25032
46
+ klaude_code/core/compaction/overflow.py,sha256=bDxITbYIqhiTtc0inQx10HWw0qCnRsQ0B1OgluzImH8,1152
47
47
  klaude_code/core/compaction/prompts.py,sha256=GgwbMi9fkCF4eHScoHe7hykzNT_L160nRdgmQn9-MYU,3191
48
- klaude_code/core/executor.py,sha256=VJBe5Pi3AImCj_F7Gnq_C57Ccf0tZdVlcJ_ulhCYBkU,37470
48
+ klaude_code/core/executor.py,sha256=9dqXkglbQIpVc_8ArDlGkjrLFz_9GDaWclxAgNvge5g,39616
49
49
  klaude_code/core/loaded_skills.py,sha256=5lxPzXx2uf9mNxwEu_Jt3qRoATa2jaMvFjBfWhgbaSk,1177
50
50
  klaude_code/core/manager/__init__.py,sha256=hdIbpnYj6i18byiWjtJIm5l7NYYDQMvafw8fePVPydc,562
51
- klaude_code/core/manager/llm_clients.py,sha256=8v56JOXHye1CshKSEtUwPt9ndJuKaPU7zGCM9dDzpy4,1077
51
+ klaude_code/core/manager/llm_clients.py,sha256=XWzFytE1iDL6qx78PnN6SEf6fjdch0kO8-9IJ-_t4E8,1353
52
52
  klaude_code/core/manager/llm_clients_builder.py,sha256=hw9lbGm5RZRZtxbEnxlfp9Hov384lrUeKYL7_e6dwXU,2409
53
53
  klaude_code/core/manager/sub_agent_manager.py,sha256=sQ88o0ivWHTlaNz-FC23CiHiPXF4mLsQ0T69jPO9Hck,7797
54
54
  klaude_code/core/prompts/prompt-antigravity.md,sha256=OpxPKLY6S8QDJExrHTuU_snIxgvNrvT09WHj-8dWZcc,6671
55
- klaude_code/core/prompts/prompt-claude-code.md,sha256=uuWBv6GrG63mdmBedAHT5U9yOpbHSKFYbbS2xBnUzOE,8290
55
+ klaude_code/core/prompts/prompt-claude-code.md,sha256=Wcv_FZ9vmFA2LhvkLiomN9g2oAmvs6qO3FN_xeAE4XM,8359
56
56
  klaude_code/core/prompts/prompt-codex-gpt-5-2-codex.md,sha256=GA1pIIF6JuAl4P3FIW4tVJ6zL_5iZ8MY_PF0DW9hBuU,11719
57
57
  klaude_code/core/prompts/prompt-codex-gpt-5-2.md,sha256=LUPKiO1x6cWKWmetMEVGSxCE_St2yDk-SAHL0TthHmc,25798
58
58
  klaude_code/core/prompts/prompt-codex.md,sha256=ybL6CXrGnK6Cw9KuEicQg4kKllIcVa2NwUyuUWitPzk,21672
@@ -62,29 +62,33 @@ klaude_code/core/prompts/prompt-sub-agent-explore.md,sha256=21kFodjhvN0L-c_ZFo4y
62
62
  klaude_code/core/prompts/prompt-sub-agent-image-gen.md,sha256=tXYKSzFd04OiC0dmVO9suMKeD5f9qo_4NsvqGo7irfI,78
63
63
  klaude_code/core/prompts/prompt-sub-agent-web.md,sha256=UwrO5M_jPUbee_8lL7gB-2VFFLxvzEejluXDkMzmR5A,3625
64
64
  klaude_code/core/prompts/prompt-sub-agent.md,sha256=dmmdsOenbAOfqG6FmdR88spOLZkXmntDBs-cmZ9DN_g,897
65
- klaude_code/core/reminders.py,sha256=reV4pLZL78RqK6WE1pSfrXWkqOXMu2kxPShDdKVK2EY,24490
66
- klaude_code/core/task.py,sha256=M0DUUUYjwbq3Z-XSG-P5MXiHtQ5blygf5YmnqcvxHeo,20241
67
- klaude_code/core/tool/__init__.py,sha256=ABUzLwQbBoZPirCcgYbI88GEtswfy1JBDkFUsGpQ-zc,1415
65
+ klaude_code/core/reminders.py,sha256=-howMkzIfQrx8I5oRSci_sqElnGdoTmhFhXkm-61pcM,24359
66
+ klaude_code/core/task.py,sha256=jPxKFyc96Gh-JmERRT0hSrkHH5gc5HxY9I67nRD1S4Y,20141
67
+ klaude_code/core/tool/__init__.py,sha256=3NrBZrSTcm0rX0ube_cCXNSS59sYkaTSY4s5mxcfrH4,1436
68
68
  klaude_code/core/tool/context.py,sha256=lHMjbLE--WVek8gAPOvaHz4CdeRGzLXSusMyEdEU5ss,2961
69
69
  klaude_code/core/tool/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
70
  klaude_code/core/tool/file/_utils.py,sha256=OG4BE9WyJqzH8ilVCL3D9yvAcHk-r-L9snd-E8gO_io,967
71
- klaude_code/core/tool/file/apply_patch.py,sha256=LZd3pYQ9ow_TxiFnqYuzD216HmvkLX6lW6BoMd9iQRs,17080
71
+ klaude_code/core/tool/file/apply_patch.py,sha256=ovdSw7Lt68wVORGcmG_JzsljI2y4M0l2g0JkhMcI51w,16073
72
72
  klaude_code/core/tool/file/apply_patch_tool.md,sha256=KVDsjUiLDa97gym0NrZNVG4jA1_zN-2i-B3upVQyOhU,59
73
73
  klaude_code/core/tool/file/apply_patch_tool.py,sha256=t7zNZW2wYpDyHutxq7nx_xSs7GbPx8UymveSR25F2-8,8079
74
74
  klaude_code/core/tool/file/diff_builder.py,sha256=IH5Ws8LvcU66DnPfI40m_qfDyjN3mH4C1LVjC9eKYJQ,6044
75
75
  klaude_code/core/tool/file/edit_tool.md,sha256=rEcUjJuPC46t1nXWjTDxplDcxWDbzTWsr6_bYt5_aRI,1110
76
- klaude_code/core/tool/file/edit_tool.py,sha256=zduRQKnydxO8_nn_W64WkU_2NbOjoVDVR80qsgpJ0Aw,10898
77
- klaude_code/core/tool/file/read_tool.md,sha256=74SLSl1tq3L0por73M0QV_ws41MRIvGXQpfLb8dmtp0,1351
78
- klaude_code/core/tool/file/read_tool.py,sha256=wne_aibWnsCpVc9xFYYPlPIDKCtVeTaqHCMaMhpoLwc,13236
76
+ klaude_code/core/tool/file/edit_tool.py,sha256=x5NUWeArtAvtbZrj4atrZEjmY73rspEEasUHuHnqnQA,10865
77
+ klaude_code/core/tool/file/read_tool.md,sha256=_0yftoexOCwdJBKKUxNfxuEXixJipmhtTgZEGTfbS-g,1428
78
+ klaude_code/core/tool/file/read_tool.py,sha256=jN-SngslKQ0mXCRhu9de3LVJ-ZSLW2lHbzAZ0JSrc-4,13666
79
79
  klaude_code/core/tool/file/write_tool.md,sha256=CNnYgtieUasuHdpXLDpTEsqe492Pf7v75M4RQ3oIer8,613
80
80
  klaude_code/core/tool/file/write_tool.py,sha256=R2gWJp8kDOm_gUMbb8F6Z-SrEf8-8Y__9KaMmaQaQVg,5674
81
- klaude_code/core/tool/offload.py,sha256=y-OgDVFwB-hMdzXll94ylUhFkiK0KwFCu7sxtFLlNxM,12477
81
+ klaude_code/core/tool/offload.py,sha256=hxc-up--3KdIvjoslg7FvUek-8wUUSHr3QcGfyJaSQg,11557
82
82
  klaude_code/core/tool/report_back_tool.py,sha256=SkuRhfLpVwTOSpIj7XwYfGDNBp8YsCUNXieXDkafS2E,3381
83
83
  klaude_code/core/tool/shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
84
  klaude_code/core/tool/shell/bash_tool.md,sha256=VqDfwZOy3Ok1t1rEPKEEkN4Rf_1ZFZzDFzpmOstH2Xo,52
85
85
  klaude_code/core/tool/shell/bash_tool.py,sha256=LPF-Iqypzfq9IMkumErTSBDgCYYNz8vvZYe7ZobqjYk,14779
86
86
  klaude_code/core/tool/shell/command_safety.py,sha256=-x-qs1ctciEvFrBNn2JQq9540lSGacaS5R7e1MmB1y4,6457
87
- klaude_code/core/tool/sub_agent_tool.py,sha256=WLhjZ6mqMp9KVDZ37ZPaJRXmvpwUQ2Gq2t_f5mcNub8,4734
87
+ klaude_code/core/tool/sub_agent/__init__.py,sha256=OtcANavZ2hbVeC_TIUeodzH5X3noL-aBJOPdg1xNm8c,142
88
+ klaude_code/core/tool/sub_agent/image_gen.md,sha256=YT-x5EYUHcv0xgXNpioLfSqpf7yK5k--6T7mMSbcW3s,900
89
+ klaude_code/core/tool/sub_agent/image_gen.py,sha256=nHEOdyxqOVxBJkzBqgJ_sAnhNLZGmIfElcSrwbIDme0,5768
90
+ klaude_code/core/tool/sub_agent/task.md,sha256=3EvKcFWIi4MtG5eVfjYk_XD1iGIsTRwHkIKsx_8yipI,1952
91
+ klaude_code/core/tool/sub_agent/task.py,sha256=7EBE5vgzPtUuzNTmA5HScnSsUlpmDFGynNIAt5N5e5U,8037
88
92
  klaude_code/core/tool/todo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
93
  klaude_code/core/tool/todo/todo_write_tool.md,sha256=0Qf3NXPPfduA0hY8AQ2dE2P64WfY2nSqqTHhk-0R5as,287
90
94
  klaude_code/core/tool/todo/todo_write_tool.py,sha256=ngdVmx5eQ5ttySB3WwxeYKa9GwQ9rlZESUHiSsbx7ak,4206
@@ -92,7 +96,7 @@ klaude_code/core/tool/todo/todo_write_tool_raw.md,sha256=AJ2OkZGcccQYDXkydPAr5JI
92
96
  klaude_code/core/tool/todo/update_plan_tool.md,sha256=OoEF4voHHd5J3VDv7tq3UCHdXApkBvxdHXUf5tVOkE8,157
93
97
  klaude_code/core/tool/todo/update_plan_tool.py,sha256=ChPgE9ZUU2G0kLu93_ZTTs9J5veySuYR41PIWDQ_Tdc,3703
94
98
  klaude_code/core/tool/tool_abc.py,sha256=GtzCGPrPUMJyUVYJAVIMpEcaAJwf-dtisUx-bLdZCX0,1262
95
- klaude_code/core/tool/tool_registry.py,sha256=-FRU1aCy-jRG6ohdcl20v5_7c6FC3Ixa4GFLr_WkH6M,1336
99
+ klaude_code/core/tool/tool_registry.py,sha256=ngk37B_7-bEC_Vi3-_MCl-HXOLuRKAqUI-urzxOFw3o,847
96
100
  klaude_code/core/tool/tool_runner.py,sha256=yj9DpXSMd-u8BOAiFsVVxUbB-CEFS8D_Vcv3ytS3vUA,13238
97
101
  klaude_code/core/tool/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
102
  klaude_code/core/tool/web/mermaid_tool.md,sha256=vvPSWxbY3P_cBpHh6AM8Je9JJoMY4FBTJzoteEkwuDU,2095
@@ -101,119 +105,120 @@ klaude_code/core/tool/web/web_fetch_tool.md,sha256=i0IwsZ6r9vAQeCpwDBtEGrWmHPzZk
101
105
  klaude_code/core/tool/web/web_fetch_tool.py,sha256=jXbJTgpI_RvyXy5ac8qIrC-AKOUX1fJ3TpqXq_BfkS4,9596
102
106
  klaude_code/core/tool/web/web_search_tool.md,sha256=l5gGPx-fXHFel1zLBljm8isy9pwEYXGrq5cFzzw1VBw,1135
103
107
  klaude_code/core/tool/web/web_search_tool.py,sha256=ljkgXxP6L5nJnbYB_IOUtPUN9zA_h5hBD55lhNAja08,4293
104
- klaude_code/core/turn.py,sha256=CdSkNxpCSOvr0HkyeUEduMnepNiQB961I4dmM5QTmFI,18564
108
+ klaude_code/core/turn.py,sha256=ynuSprAzHEHVP3JC2rXmdz4N7zo9lA5HN0CCgdJDUsg,18569
105
109
  klaude_code/llm/__init__.py,sha256=b4AsqnrMIs0a5qR_ti6rZcHwFzAReTwOW96EqozEoSo,287
106
110
  klaude_code/llm/anthropic/__init__.py,sha256=PWETvaeNAAX3ue0ww1uRUIxTJG0RpWiutkn7MlwKxBs,67
107
111
  klaude_code/llm/anthropic/client.py,sha256=RpYw4UQnhLzAsp6i-FU7cDW4deqngdAoQaTPGnCeO5U,17346
108
- klaude_code/llm/anthropic/input.py,sha256=TCR9egH_bC6Y-KupZ6RSfkcZMZ4h3Upy6iwGoN_H4kQ,9766
112
+ klaude_code/llm/anthropic/input.py,sha256=ObcRuQEwdiFoI7bjBzHv5bClgIYEw23bJMgHudT92C4,9923
109
113
  klaude_code/llm/antigravity/__init__.py,sha256=TuK_k4mJpBQVBCfhRFQvVLeGtHRU8_2wXO2lRC-OB9o,71
110
114
  klaude_code/llm/antigravity/client.py,sha256=XnOBw7QPNA8NRrZIdNrOD1qLrvWLyI82PL7kIolgdic,20120
111
- klaude_code/llm/antigravity/input.py,sha256=Ybz9wD0dJZgvrq64X6dpaR4iYEDILk8lpdXivl-uIQU,8996
115
+ klaude_code/llm/antigravity/input.py,sha256=WblkpS4DxnqHLb9oXGS3uDlgbzdP4GKWmC9L2HEtRwk,9463
112
116
  klaude_code/llm/bedrock/__init__.py,sha256=UmXPBXMmigAJ7euIh59iivSeUdrYJwum0RYU7okkkPM,86
113
117
  klaude_code/llm/bedrock/client.py,sha256=mETQrhGDt4uEDXO2c3y5Iao9RngygFSF6MOtwqAy1tk,2279
114
118
  klaude_code/llm/claude/__init__.py,sha256=8VCvvEjQQI-RpAMfHCl5ct4zlDU_jgbAuLOc9p9u-B4,61
115
119
  klaude_code/llm/claude/client.py,sha256=YD0jkzFy1iDngPzaf5uFl_M0CcKh6IeNaujI7ocChA4,3917
116
120
  klaude_code/llm/client.py,sha256=2PRxcKBHRk7csw-swglsmLJfYUpbJn6tzNqMb5fJBvE,1820
117
121
  klaude_code/llm/codex/__init__.py,sha256=8vN2j2ezWB_UVpfqQ8ooStsBeLL5SY4SUMXOXdWiMaI,132
118
- klaude_code/llm/codex/client.py,sha256=d2pDHKokQAaMfnWRoliBtTtjeyElQiPjSwNWyjW_PRs,5389
122
+ klaude_code/llm/codex/client.py,sha256=BEj_ZwaxxOfRDOm8iSR7CnunlLdjW6lGkQqnj4ZukCw,6227
123
+ klaude_code/llm/codex/prompt_sync.py,sha256=u9RBuVpfRJGB5cdpI_OJkJVSL33s4pZNxbiCIm1l70Y,8767
119
124
  klaude_code/llm/google/__init__.py,sha256=tQtf_mh_mC3E4S9XAsnhS2JZXGRnYUsBKF0jpXZTvM0,61
120
- klaude_code/llm/google/client.py,sha256=nBkAyB_LFtEpdFE8NmD64kEZI1Ft24P2U1_yAeYaEPw,21154
121
- klaude_code/llm/google/input.py,sha256=ErbpSmmv8wOaxSO7b2KSZqPgKvRJo1m4deW-JTzN5CU,8798
122
- klaude_code/llm/image.py,sha256=jt9FBPFhAIo48pauIEJMIhB9WuDt4wwNs9s3LiEsETE,4272
123
- klaude_code/llm/input_common.py,sha256=-GnZ87BfzyGqXTP3WYflFOqbRcbKpJjE9mjIv8qKWsQ,6228
125
+ klaude_code/llm/google/client.py,sha256=9yf49q4-I-OSbUuHreBSiwqxXnRH7718bDpSyENfPUY,21330
126
+ klaude_code/llm/google/input.py,sha256=tBOX2R9_26EVnNwe-QF77nRcALwu3xGlTNjGgwo2Sx4,9340
127
+ klaude_code/llm/image.py,sha256=TJzduNtSmoJLizTUDo0EjbovqOeaXkvwnRyMfuzVVUQ,4512
128
+ klaude_code/llm/input_common.py,sha256=Z9Tpu50tQOzsw4M3UilA7GyigHToHb6lrxVOXiozrAU,6650
129
+ klaude_code/llm/json_stable.py,sha256=FrgJbJ33YrAkzl5iPOWLolFjYFZMuT97sbOegeXN7GE,1288
124
130
  klaude_code/llm/openai_compatible/__init__.py,sha256=ACGpnki7k53mMcCl591aw99pm9jZOZk0ghr7atOfNps,81
125
131
  klaude_code/llm/openai_compatible/client.py,sha256=9epE7B58UX-Rr8Zw62AwVv1uonajzcT2RLjreQTQ_PU,4683
126
- klaude_code/llm/openai_compatible/input.py,sha256=VpgT2wbph6bFsB6OFWKnIdjE32W_gKA_p39T-xuJPrE,3217
127
- klaude_code/llm/openai_compatible/stream.py,sha256=QBmhhQT7b1WjlDd8VfpNjbnbjxuao5cBa78vM8vxucQ,16057
128
- klaude_code/llm/openai_compatible/tool_call_accumulator.py,sha256=quajimkUR1uSIPVXYsVNiQSTnOSVt7WuyZ23RyT7lJs,4906
132
+ klaude_code/llm/openai_compatible/input.py,sha256=UfEu2c866QuVMFTY3GEPhuKV7QcCgxBwNYqGT88E_8E,2834
133
+ klaude_code/llm/openai_compatible/stream.py,sha256=kYo9uUF79376xF4p7ERJJB9kGkgmdHEwIjASZqrk2Og,16522
129
134
  klaude_code/llm/openrouter/__init__.py,sha256=_As8lHjwj6vapQhLorZttTpukk5ZiCdhFdGT38_ASPo,69
130
135
  klaude_code/llm/openrouter/client.py,sha256=P_mDQK4_i1MLF0jK4p_bKhh15ACXgw6Ie0rUrtbfsdM,5738
131
136
  klaude_code/llm/openrouter/input.py,sha256=Z_Cf6TnMZ5KQNJ0E5IIDCKK2OWlzi8IW0S5A72BBGT0,6176
132
137
  klaude_code/llm/openrouter/reasoning.py,sha256=u7ccfnGxJ4Ws8P3X5FW91d8HXie29JjeWz0hZ1r0oFg,3320
133
138
  klaude_code/llm/partial_message.py,sha256=-sjlpV-et4ViBtBpdtihK5QBjAlwS47-mBpVbRQPP3s,142
134
- klaude_code/llm/registry.py,sha256=OGMxsTr45jeqMuyCY26EIqUhjzjumaeBQVE4qTEQ8pQ,2311
139
+ klaude_code/llm/registry.py,sha256=Nub4POSJOa7YFmrBrQanp7jFBeXytvTSCkFNZ5VMpag,2153
135
140
  klaude_code/llm/responses/__init__.py,sha256=WsiyvnNiIytaYcaAqNiB8GI-5zcpjjeODPbMlteeFjA,67
136
141
  klaude_code/llm/responses/client.py,sha256=cOpf8aCAtrcxN_hYTzYVAU67M49JkOjLlaVeJIELf8U,16355
137
- klaude_code/llm/responses/input.py,sha256=kYR4VZpdc-iH-VG_xhQV-tYkRGX581oOcE9D1O_mMYg,8845
142
+ klaude_code/llm/responses/input.py,sha256=eEeSHlGYY5VYGpj2DIVm8qjH2cXo-JaODT_SjFtS6Nw,9264
138
143
  klaude_code/llm/stream_parts.py,sha256=kU40BaWyiKOqzrIwF0_IwogWgKRRqVEt-6MvwMi5J1I,2790
139
- klaude_code/llm/usage.py,sha256=L6w-DlZ3oF8lOR_SEudPBM9idzIy7__f5FZ4ZJ2smi8,5957
144
+ klaude_code/llm/usage.py,sha256=mRdtNsnBgF70r4BPdLEcfislVELWiHci8m7Tv7wWups,5757
140
145
  klaude_code/log.py,sha256=i9iVCmp4dxqxqH_7XPMVjZt8umiH1KPhRbX4Ao93mSM,11382
141
146
  klaude_code/protocol/__init__.py,sha256=TTPnuyQ22RypoTGKdoiS7ZEgHzinuaRHUrauzHDh7Xo,246
142
- klaude_code/protocol/commands.py,sha256=ZgD0GoAT6j5yfF29FIupiKCcP9bq5wxUeDaqFoReOHc,733
143
- klaude_code/protocol/events.py,sha256=g1yrbv83NEcmBFFk1mvdeB4DSzuqxXb_VXXyzWCVNgY,4860
147
+ klaude_code/protocol/commands.py,sha256=sy6z48I3q8HHL91bqou9n0TZZ91P34pVmtNHqcHArBo,759
148
+ klaude_code/protocol/events.py,sha256=4r9IyuwK4GkeQL9koAaqV92wF6hP39XVVnMYAgoGRfY,4925
144
149
  klaude_code/protocol/llm_param.py,sha256=MzKiZBKK_uTvJsmbaXJd7EEmQ9dedLEtVsSJUn2jbjg,5223
145
- klaude_code/protocol/message.py,sha256=bq3cxbZ8Vk5e2mE1NQ-7fvdnOTDCauiT0Pl7FPyCJoc,6958
146
- klaude_code/protocol/model.py,sha256=KboyTyfG5DntRMK98oDHomgJfUpHBdeiq51dWXRSqeM,9923
147
- klaude_code/protocol/op.py,sha256=JqQAVYQCUhba4hmI6K7KtGu8TpWarCI-9dlsHZrAgnM,6433
148
- klaude_code/protocol/op_handler.py,sha256=uYPL7oF_IJITgA4JP9UYXYxhsneV8DPVnPI9kXre85c,2157
149
- klaude_code/protocol/sub_agent/AGENTS.md,sha256=DHeHl11PYprTOQxInENCEnwnh3kIztBLjvETkwWAO08,1299
150
- klaude_code/protocol/sub_agent/__init__.py,sha256=RKPFJawd0AB7nRYBxdwuG-14D8pT6HF1-DPCTAxwohI,3784
151
- klaude_code/protocol/sub_agent/explore.py,sha256=f3fHTyxVeEH4vxJtEts0FbZhdrhOR-_x94QMfNicuUI,1859
152
- klaude_code/protocol/sub_agent/image_gen.py,sha256=npNEOIsMV-1QOvewdb3NFMkG25Fz8wTJe7cxpPO2mWs,4234
153
- klaude_code/protocol/sub_agent/task.py,sha256=ZOjzK1itxehlva6WfGKKAJq8FvBOKAywrlgGgfb4Tp4,3441
154
- klaude_code/protocol/sub_agent/web.py,sha256=XOQdqlIp_xno7Q7YVFPFo4AyKU1wbrVKhIi-NxY8eYM,2506
155
- klaude_code/protocol/tools.py,sha256=T0mzW9EhidVMNkwH-KTeB5FgwMvXBnV_MYE5ytrU1TM,343
150
+ klaude_code/protocol/message.py,sha256=eTOyKmlsnmX1WgHnvpJMfa-F18Eo4VDws2egu5UL9S8,6998
151
+ klaude_code/protocol/model.py,sha256=b5lgTqI2bPqJoJCQqfV8Fy7fj-wgbBKEnHE3gbVwBwk,10236
152
+ klaude_code/protocol/op.py,sha256=eQjduSxSr9ccFsY9BM1hrHLc-ORGQExTg71cjR3ZhNI,7319
153
+ klaude_code/protocol/op_handler.py,sha256=U3Wlm4b5rFRUpCXVLR37YqinhhgZEF9HPuZqZuTzJB4,2576
154
+ klaude_code/protocol/sub_agent/AGENTS.md,sha256=qhlboiEU51dr_l7_-TdDCbd61ADjSOgiO16-qrmBAMI,1316
155
+ klaude_code/protocol/sub_agent/__init__.py,sha256=0Zc-gTdBJ7P2kC50p3njpwBt7fqSg7KRQ5AVRmyF924,3252
156
+ klaude_code/protocol/sub_agent/explore.py,sha256=GAl1aoj6afNq5WiuBuWKsxCEQ5tnbcTyIvrkwMEIwhU,670
157
+ klaude_code/protocol/sub_agent/image_gen.py,sha256=HlJFODtjzAuUbolNTVariRzYR8c17Y2ZK4jPESmHPGU,1225
158
+ klaude_code/protocol/sub_agent/task.py,sha256=D7OOmqqwExqvblJzogKMIag9_JsJIbl3ytWN0WVSNtc,599
159
+ klaude_code/protocol/sub_agent/web.py,sha256=gvs2lE4sFByuZqoHttphR3U4WERY2_Z8rf4PMkyD7Qc,701
160
+ klaude_code/protocol/tools.py,sha256=JxkhZquAcYfIUVUgCWSVuwD2JQGhvnHWQ1ata7AQslY,380
156
161
  klaude_code/session/__init__.py,sha256=4sw81uQvEd3YUOOjamKk1KqGmxeb4Ic9T1Tee5zztyU,241
157
162
  klaude_code/session/codec.py,sha256=a374UZkOusn9MgFCc--yznDljK_4Qfy6yDPfhQq5_P0,1889
158
- klaude_code/session/export.py,sha256=znoTUCw2tVGgDpl-sT-ba_2Bb2HaH6pvsl4EpLUdYJQ,46102
163
+ klaude_code/session/export.py,sha256=EQZD8R7w3dnLpJjC6WP5yf7X6mAdjOkmwm1bMw7nftM,44922
159
164
  klaude_code/session/selector.py,sha256=snBpnz9UQCe_0K8HttSGCJECCE4YEzpWs_Fdmk2P9nI,2195
160
- klaude_code/session/session.py,sha256=QloQWxCt9ptSoOwTGNl055rkbBQFoEs1O_-l0OtnYFo,26913
161
- klaude_code/session/store.py,sha256=HRrmFzwEVdExqDQlT9FBZOhlFtQmM9Im9zco8pzvUMY,6455
162
- klaude_code/session/templates/export_session.html,sha256=y4H2DwYx29MuSeKgT8JWdZKNguemaDKN-b75x0sr0eU,127667
165
+ klaude_code/session/session.py,sha256=bsT6i1SUwdSzHOojj8-n4rEu3Lyq99ElipPww6B7a_U,28167
166
+ klaude_code/session/store.py,sha256=f_Ve6uMX1s-yH3jqiDWPULoLnab07QcFA04b3PD0ehE,6306
167
+ klaude_code/session/templates/export_session.html,sha256=ekRt1zGePqT2lOYSPgdNlDjsOemM2r7FVB6X8nBrC00,137452
163
168
  klaude_code/session/templates/mermaid_viewer.html,sha256=Y_wEWFm4mKWpfAz3YMis5DdLEkhw_2d8CpU6jbvGZow,27842
164
169
  klaude_code/skill/.DS_Store,sha256=zy9qIqi2YLGzlZwHNM4oAX8rDoNTg9yxdo22PJOwupg,6148
165
170
  klaude_code/skill/__init__.py,sha256=yeWeCfRGPOhT4mx_pjdo4fLondQ_Vx0edBtnFusLhls,839
166
171
  klaude_code/skill/assets/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
167
172
  klaude_code/skill/assets/create-plan/SKILL.md,sha256=ZAtiM2qPHcc8Z3Ongl1NgX5ythITPwyvcIqisgqWrGA,2493
168
- klaude_code/skill/assets/deslop/SKILL.md,sha256=XMBER6gOyYnZof_u7l30CZSzmDcINe8XP-n_loah0EQ,873
173
+ klaude_code/skill/assets/deslop/SKILL.md,sha256=1rJVgwSjd1ZB4-yZXRqH2LYD1_yzz11GVpt9ajuvADM,1404
169
174
  klaude_code/skill/assets/handoff/SKILL.md,sha256=GDHrEqWUeAQy7gGhha_y5jzjpv8C-xhk0hqMH5h59v8,1712
170
175
  klaude_code/skill/assets/skill-creator/SKILL.md,sha256=0ByoWb9ao0UKSoM5Tmz-Qe5CAPliTrVpUK0gPd9TFqo,5520
171
176
  klaude_code/skill/loader.py,sha256=g3MNDBq4B4_hf_d1NXf0Zhw3Xu9M2GIiaUZIN6S1ikM,8706
172
177
  klaude_code/skill/manager.py,sha256=6N1sfa0a5a7NgQgj3M_rRO2aj0vecyeBp_kWOZg211c,3452
173
- klaude_code/skill/system_skills.py,sha256=ryGN07t0Xv2Yn_Prfq072tdIN0Dp4ZpdXLTl7O7rCkg,6122
178
+ klaude_code/skill/system_skills.py,sha256=AmQFyUW0yNc6gkG2-SnwLMNH3M8ESNH9aPKvjD95wkc,5595
174
179
  klaude_code/tui/__init__.py,sha256=Q8-0D-uesw3oFwHcFLD5UaWlTFbrj8qV7dSn6C6_g_o,274
175
- klaude_code/tui/command/__init__.py,sha256=0QGwMI7ghFhaoOZUAoZCqf1MAvgDKJQN14vKB8pWLRU,3421
180
+ klaude_code/tui/command/__init__.py,sha256=2s6uu3uEi-vqRYJ5MPe1Ty1synRhT8C_kowgsNH-6hY,3542
176
181
  klaude_code/tui/command/clear_cmd.py,sha256=9stN0blD24sME_xvTae0gN1r9caZA7QmLWnxzhTB4iA,744
177
182
  klaude_code/tui/command/command_abc.py,sha256=sTzn0LAJguDKPrXK-0wkiadf0jQuAtuXbDMfDZJ4pqk,2438
178
183
  klaude_code/tui/command/compact_cmd.py,sha256=lT1ODB1Tdo8Q163_jtUXn_Y5x4-hmZCmQ4E2gwAZNJg,999
184
+ klaude_code/tui/command/continue_cmd.py,sha256=P5FkqXiclEmqB7_Uz_LZSYeuuEsTbUJzsgPgTa9uA-M,1157
179
185
  klaude_code/tui/command/copy_cmd.py,sha256=2gjKYTbOspmVotD8FrU7oQgwyNxdcjYP0iLKs6AXcL4,1792
180
186
  klaude_code/tui/command/debug_cmd.py,sha256=cXi2ymcsbcJVCKfVKPvtUFPOmgNFEpwG-IcLlnkiyZY,2698
181
187
  klaude_code/tui/command/export_cmd.py,sha256=KdFlOMJ6gruKYnd_24eWJJb21t9gLVwI1FnN1s08m5U,1609
182
188
  klaude_code/tui/command/export_online_cmd.py,sha256=34De0K486wNOC5yjjPemcGTILrKQhWld2qfV3c0PUQ8,5664
183
- klaude_code/tui/command/fork_session_cmd.py,sha256=2sI31c6pOlKAvz7zYu2JIOJAJ8vII0uqFPuN_tDlDEU,13170
189
+ klaude_code/tui/command/fork_session_cmd.py,sha256=lZpkYffk2icucXcOyjYTFgra3qz1b-KlS7kMK7Xj2hI,13322
184
190
  klaude_code/tui/command/model_cmd.py,sha256=EnUcr_nnUm433G2HwEKKNssVE767IgQFNoc9etxPpmY,1734
185
191
  klaude_code/tui/command/model_picker.py,sha256=Kvu0fL-uBfue6UP4l-x3eZiWw0FghnUFnJn6i0bqkKo,5253
186
192
  klaude_code/tui/command/prompt-init.md,sha256=a4_FQ3gKizqs2vl9oEY5jtG6HNhv3f-1b5RSCFq0A18,1873
187
193
  klaude_code/tui/command/prompt_command.py,sha256=PGGoH_ZgA-0kTtpjk19rDSsWjiZyAEoUlxnSp8B8GRQ,2764
188
194
  klaude_code/tui/command/refresh_cmd.py,sha256=_nY7Iko7GSpHmc9t2vKK2DcXRYbXfUnbGzwsmNc-yPI,1405
189
195
  klaude_code/tui/command/registry.py,sha256=2HDrC6ZqGKSdzQAYra2TSFt1kc3tDliobjrWfgrTdX8,7028
190
- klaude_code/tui/command/resume_cmd.py,sha256=XaQyoB00_TiimUNl__z5ZvRg5EdG16LXvkGAZ3H6YxU,3359
196
+ klaude_code/tui/command/resume_cmd.py,sha256=aciOa0fs-CX5mCc8KbxeVtn1EDmFOpdhCNs-ukDTbEA,3664
191
197
  klaude_code/tui/command/status_cmd.py,sha256=yALYGxyUX7iVdSRAKdG526YkqOvGV9F0CJNwk8nmzu4,5164
192
- klaude_code/tui/command/sub_agent_model_cmd.py,sha256=iz9_bdxHBSOQjjMWPP4RBW58V_HhWREweG-4cXuotk0,5610
198
+ klaude_code/tui/command/sub_agent_model_cmd.py,sha256=OA0Dr0az7MUPxcoYvMDHisp5sQ0UmKUvJm-BjDfG0I0,8112
193
199
  klaude_code/tui/command/thinking_cmd.py,sha256=gUQOhqtEieIMR-FUMSDj7OYEPloAC-ZSKxD1OVBn3jo,2683
194
200
  klaude_code/tui/commands.py,sha256=9is3jw9c9Zx2UY0bFqYxCMGUO3gSfiNlMQLudafHDs8,3453
195
201
  klaude_code/tui/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
196
- klaude_code/tui/components/assistant.py,sha256=3VUIGf_BJhmoWZ5bHw-QUTMElUxp-MZQKUMWNimHKLE,904
202
+ klaude_code/tui/components/assistant.py,sha256=ts1Iph-ePF7jVfYcW34eI97gyT64m647glIVoYDXUnM,44
197
203
  klaude_code/tui/components/bash_syntax.py,sha256=0Pceo8w7jbK56smaVSBzkZYgCXzqqy7Qnx6kDZOh1yA,7450
198
- klaude_code/tui/components/command_output.py,sha256=IC8smn6k6C6DGgDdlhG2prvsw2V2ZW092jifKqVMc5c,3731
204
+ klaude_code/tui/components/command_output.py,sha256=Ryp8fYaNBgYdVWxFd6vFqWb-rtyp287iMTYiV4Unlpk,3821
199
205
  klaude_code/tui/components/common.py,sha256=dhUYLVVOSKxg5GCoS4eyUeKZ3E8Kpt4nqft4njuvPaI,4698
200
- klaude_code/tui/components/developer.py,sha256=1hDr7boJN1z_JyvvFNn8m7MAf4lPDN3eoqmofE0lv4Y,5414
201
- klaude_code/tui/components/diffs.py,sha256=JUokkkJeTIoKD0b-c-chMzIDmMjivBQqH8DYXIA3hHs,10411
202
- klaude_code/tui/components/errors.py,sha256=_9ojf-23ThR-BoMwNEYG68rzILwA_O59muGvofYL10w,669
203
- klaude_code/tui/components/mermaid_viewer.py,sha256=MstufMnTauMKzI8cKngXpFqVo-qya20P8ReNkplYtEw,3098
206
+ klaude_code/tui/components/developer.py,sha256=gdFmEkh8-vW-cgvtC7GalD5dtJYiCe07KmXY2BMjw24,5573
207
+ klaude_code/tui/components/diffs.py,sha256=7h9Pr3HrzGOpD14Uljl7rLUQOvX92M85j9B4PZgRLyU,3012
208
+ klaude_code/tui/components/errors.py,sha256=fSojNfRceB6eE7cyJHfwGt5Ru0OYp63fCJ-W6-3SSYs,799
209
+ klaude_code/tui/components/mermaid_viewer.py,sha256=zI1FBuX6Ionx38KqkzhOIQ9tFzd7REPbjW1iqSiNrec,3086
204
210
  klaude_code/tui/components/metadata.py,sha256=5C3zcK7JSHIDojF5Em2bSMoVYeO_W7m-zOAh9N_6XOQ,7275
205
211
  klaude_code/tui/components/rich/__init__.py,sha256=zEZjnHR3Fnv_sFMxwIMjoJfwDoC4GRGv3lHJzAGRq_o,236
206
212
  klaude_code/tui/components/rich/cjk_wrap.py,sha256=eMqBxftUtll7zrytUb9WtJ6naYLyax0W4KJRpGwWulM,7602
207
213
  klaude_code/tui/components/rich/code_panel.py,sha256=ZKuJHh-kh-hIkBXSGLERLaDbJ7I9hvtvmYKocJn39_w,4744
208
214
  klaude_code/tui/components/rich/live.py,sha256=xiMT6dPsxM_jaazddKrV9CMJQWwpe2t9OdjffHvo1JU,2821
209
- klaude_code/tui/components/rich/markdown.py,sha256=hAjCNzniGTyNTsJ7w-tZngIqVj1V-fpKdTMj7IaEaoM,23985
215
+ klaude_code/tui/components/rich/markdown.py,sha256=pO_z-uxa9YlXhzUZOgzB4U4yiU-UeaBzBcZzALoeVbI,24082
210
216
  klaude_code/tui/components/rich/quote.py,sha256=u6sBmGdp0ckaZLw_XgJk7iHW4zxnWikUaB3GX2tkhlM,5375
211
- klaude_code/tui/components/rich/searchable_text.py,sha256=PUe6MotKxSBY4FlPeojVjVQgxCsx_jiQ41bCzLp8WvE,2271
212
217
  klaude_code/tui/components/rich/status.py,sha256=kNt08FQGvMZJB-zUhT5UyVFA7jvuRBNqf6yDXLEhb9c,14756
213
- klaude_code/tui/components/rich/theme.py,sha256=XKfIc7ke1dUx6AyRMXWWJMeItVfIg85YM_FoqyxXxR0,16255
214
- klaude_code/tui/components/sub_agent.py,sha256=byCyRPq0xfit55cLwmp7SfRbCmyiXL77JklvFcbKW4M,6598
215
- klaude_code/tui/components/thinking.py,sha256=AXC7Xpyiu7ST-eWGLRGY7N8Dak2ny3lV3mvznmfqKmM,2890
216
- klaude_code/tui/components/tools.py,sha256=iUaBTTekaLngRsUmpeUIJn4NjnAb17DO20kMBS12Oa0,25917
218
+ klaude_code/tui/components/rich/theme.py,sha256=Ppu9dzquDXEhfUVXpCVHeeGhqitJZRgJAfyH4xEeQz8,16349
219
+ klaude_code/tui/components/sub_agent.py,sha256=8XTWsTi9mfbNLMD8SZ__nZQmBf81rW-NWpuOT-sFbv8,4723
220
+ klaude_code/tui/components/thinking.py,sha256=zxeELXVoU0zgN_IrRHSNqjCHfpt5uX7_U-rXpd3RktI,1857
221
+ klaude_code/tui/components/tools.py,sha256=PzDJvsmmjCuOQQWmgG2Esg3I4LdvrrNP-89atNOcyfk,26295
217
222
  klaude_code/tui/components/user_input.py,sha256=t8O73xL0oYSYQUJuYKcsU9j-SgBlDCpr7Im6SqCDmJA,3701
218
223
  klaude_code/tui/components/welcome.py,sha256=ZSCcT-wFdSp3L1Fq7shWWz4Rk-BAXvsKisfvIUnP8a4,3665
219
224
  klaude_code/tui/display.py,sha256=JfMETvb1gcgymQVXPy5tH2c-B0cHjXn9PtwSiYlP-1Q,3506
@@ -221,22 +226,22 @@ klaude_code/tui/input/AGENTS.md,sha256=2RBLz7H0JbUJv6OBzeadLOlGUF5EBqvtwTGBf6nZu
221
226
  klaude_code/tui/input/__init__.py,sha256=wLbjqBrvP6fmbGtbKe9Wp12yxhse0faVLOxtoWua_1E,353
222
227
  klaude_code/tui/input/completers.py,sha256=RHf8dFDRxLlCG7Pw5feNjtKvH3yCYET1fKB7p44yICY,32869
223
228
  klaude_code/tui/input/drag_drop.py,sha256=oyKtrHCyUiGiMLEXpsDTnTnAKJ1_xrvVkrASOiG8O4g,3974
224
- klaude_code/tui/input/images.py,sha256=DqDKl2yt-pNzkfhKKo_ApTjJTccBCvuYDufpMeGM0d4,7090
225
- klaude_code/tui/input/key_bindings.py,sha256=rgWC3wlO1MvxFeMmQRxm0s5Y9sChzUDh0c8rfwfZz5o,25101
229
+ klaude_code/tui/input/images.py,sha256=ft2AaOg1Figdm1t_NNoBCGdp20silYXGw-m9XKDd9GU,6996
230
+ klaude_code/tui/input/key_bindings.py,sha256=ePBb9Ff8guhlTrrH_hWYtotHErpJcbasRcuU1zSabIA,25131
226
231
  klaude_code/tui/input/paste.py,sha256=kELg5jC0WdBXWHJUsEjIhZ67KCvHMbN1XzyGmevVSNM,1888
227
- klaude_code/tui/input/prompt_toolkit.py,sha256=fYUn_e1IVrbX4xDup9N22T9xwGGaJvH4FnIETKOM54M,29485
228
- klaude_code/tui/machine.py,sha256=Ue4Ta13zNoVNg3-xrUrEPckNgVbTN8uTfEmJrp3C0RI,28690
229
- klaude_code/tui/renderer.py,sha256=FGyPhUq2imKWLu-AJBimutSrqGLA_FNLMSRc9Sx7Fn8,28644
230
- klaude_code/tui/runner.py,sha256=dOmuWEVT5D0pLCGpdThCkNSE1ohdCgk7EkWdSAbSm5A,11874
232
+ klaude_code/tui/input/prompt_toolkit.py,sha256=wvRf8hBL7eBghft7c2WsUpYTwTmYCMuN9mlfMCUy21A,29485
233
+ klaude_code/tui/machine.py,sha256=uBTX_6VqsS0RRxrp6KHmzFJ3jsxjUg2Shl88C4cOBqY,29009
234
+ klaude_code/tui/renderer.py,sha256=nP60T2S4mg9ru5modEXjfWGP5iNCZJoGqkREJeEfhQ0,28403
235
+ klaude_code/tui/runner.py,sha256=WMoxwxAlwhuIIKmmpJCRrXwPwjkZrCDlGiTyUGDbCCY,11936
231
236
  klaude_code/tui/terminal/__init__.py,sha256=GIMnsEcIAGT_vBHvTlWEdyNmAEpruyscUA6M_j3GQZU,1412
232
237
  klaude_code/tui/terminal/color.py,sha256=6SJR2RA8cqJINNoRz65w0HL3x9g46ydIvDOGWMeNnQU,7195
233
238
  klaude_code/tui/terminal/control.py,sha256=m2fL6uHum5Li25X2IPnI4z_oVzMpVYcSldB-r0NLLzk,4920
234
- klaude_code/tui/terminal/image.py,sha256=UYRpnwTVEP16NpTmy1fik-yGhklRWJa310vI9ZWZus4,4669
239
+ klaude_code/tui/terminal/image.py,sha256=p902lkcOxvH4FbLOOx5BoJbxag69lx6rECBk7KCUglA,3505
235
240
  klaude_code/tui/terminal/notifier.py,sha256=-aTtgRvpzQcfbkOfbeDOfUs3l9smNBZX-60G9f0326Y,4643
236
241
  klaude_code/tui/terminal/progress_bar.py,sha256=Go-0_ZodrmJVaQodaPnyxVU2nkpkBaYLnZBqwAUQukE,2133
237
242
  klaude_code/tui/terminal/selector.py,sha256=xuSaOcr9ctPNrZay4muAwuX2khlYLbTX0BZ1G4oCrg0,32407
238
243
  klaude_code/ui/__init__.py,sha256=3k9Sbesq0nNN3jcSMDqJ4zUcys4PKzGg4Xsum-6dZis,451
239
- klaude_code/ui/common.py,sha256=_KmCNM-U8VowObYkfq8e9cyuvN1dF85P56hG8tGYlts,4309
244
+ klaude_code/ui/common.py,sha256=Ovqnj97yp3bQbIKKPBycZ2aFFD8ucHo4B5d-JMoWUSQ,2517
240
245
  klaude_code/ui/core/__init__.py,sha256=2NakrTDcxem5D0atyEY_Rxv1BbKCeZweF63L6AAq6r8,23
241
246
  klaude_code/ui/core/display.py,sha256=wk3_4-SE93BpxJOrx9MzEouMc4wTsYo7bBj9eeJO-ik,3569
242
247
  klaude_code/ui/core/input.py,sha256=8wXszl2Es6BbpqUjXMZka-7zc1d0kuySCxJUiDGHTaY,2593
@@ -244,7 +249,7 @@ klaude_code/ui/debug_mode.py,sha256=ZvqbOx4c_rUerMbEZzOfcbNf9leqEDFjqJUlALtzF9Y,
244
249
  klaude_code/ui/terminal/__init__.py,sha256=5OeAzr994r8-peWsLON0iXsAvJ2pexwMp36JY7FKGDc,179
245
250
  klaude_code/ui/terminal/title.py,sha256=EZpLXTMhunsZPVGaxP317lH0Ad2oOh7OsjbV3yRD5is,1115
246
251
  klaude_code/update.py,sha256=QER816AZe9u3RhRvP0Z37Jh2Ch5RLy9PREyDsI0e1dA,4480
247
- klaude_code-2.8.0.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
248
- klaude_code-2.8.0.dist-info/entry_points.txt,sha256=kkXIXedaTOtjXPr2rVjRVVXZYlFUcBHELaqmyVlWUFA,92
249
- klaude_code-2.8.0.dist-info/METADATA,sha256=eYq_QUGydFgn9YIeXWieYnGLcWm0upyCbIcgjEGCP6c,10379
250
- klaude_code-2.8.0.dist-info/RECORD,,
252
+ klaude_code-2.9.0.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
253
+ klaude_code-2.9.0.dist-info/entry_points.txt,sha256=kkXIXedaTOtjXPr2rVjRVVXZYlFUcBHELaqmyVlWUFA,92
254
+ klaude_code-2.9.0.dist-info/METADATA,sha256=I4oZHv0wSt2OCjGisvNKizoaG08NJ9DsCMbPpx-WhtA,10119
255
+ klaude_code-2.9.0.dist-info/RECORD,,
@@ -1,126 +0,0 @@
1
- """Generic sub-agent tool implementation.
2
-
3
- This module provides a single tool class that can handle all sub-agent invocations
4
- based on their SubAgentProfile configuration.
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- import asyncio
10
- import json
11
- from typing import TYPE_CHECKING, Any, ClassVar, cast
12
-
13
- from klaude_code.core.tool.context import ToolContext
14
- from klaude_code.core.tool.tool_abc import ToolABC, ToolConcurrencyPolicy, ToolMetadata
15
- from klaude_code.protocol import llm_param, message, model
16
- from klaude_code.session.session import Session
17
-
18
- if TYPE_CHECKING:
19
- from klaude_code.protocol.sub_agent import SubAgentProfile
20
-
21
-
22
- class SubAgentTool(ToolABC):
23
- """Generic tool implementation for all sub-agents.
24
-
25
- Each sub-agent type gets its own dynamically generated subclass with the
26
- appropriate profile attached as a class variable.
27
- """
28
-
29
- _profile: ClassVar[SubAgentProfile]
30
-
31
- @classmethod
32
- def for_profile(cls, profile: SubAgentProfile) -> type[SubAgentTool]:
33
- """Create a tool class for a specific sub-agent profile."""
34
- tool_cls = type(
35
- f"{profile.name}Tool",
36
- (SubAgentTool,),
37
- {"_profile": profile},
38
- )
39
- return cast(type[SubAgentTool], tool_cls)
40
-
41
- @classmethod
42
- def metadata(cls) -> ToolMetadata:
43
- return ToolMetadata(concurrency_policy=ToolConcurrencyPolicy.CONCURRENT, has_side_effects=True)
44
-
45
- @classmethod
46
- def schema(cls) -> llm_param.ToolSchema:
47
- profile = cls._profile
48
- return llm_param.ToolSchema(
49
- name=profile.name,
50
- type="function",
51
- description=profile.description,
52
- parameters=profile.parameters,
53
- )
54
-
55
- @classmethod
56
- async def call(cls, arguments: str, context: ToolContext) -> message.ToolResultMessage:
57
- profile = cls._profile
58
-
59
- try:
60
- args = json.loads(arguments)
61
- except json.JSONDecodeError as e:
62
- return message.ToolResultMessage(status="error", output_text=f"Invalid JSON arguments: {e}")
63
-
64
- runner = context.run_subtask
65
- if runner is None:
66
- return message.ToolResultMessage(status="error", output_text="No subtask runner available in this context")
67
-
68
- # Build the prompt using the profile's prompt builder
69
- prompt = profile.prompt_builder(args)
70
- description = args.get("description", "")
71
-
72
- resume_raw = args.get("resume")
73
- resume_session_id: str | None = None
74
- if isinstance(resume_raw, str) and resume_raw.strip():
75
- try:
76
- resume_session_id = Session.resolve_sub_agent_session_id(resume_raw)
77
- except ValueError as exc:
78
- return message.ToolResultMessage(status="error", output_text=str(exc))
79
-
80
- claims = context.sub_agent_resume_claims
81
- if claims is not None:
82
- ok = await claims.claim(resume_session_id)
83
- if not ok:
84
- return message.ToolResultMessage(
85
- status="error",
86
- output_text=(
87
- "Duplicate sub-agent resume in the same response: "
88
- f"resume='{resume_raw.strip()}' (resolved='{resume_session_id[:7]}…'). "
89
- "Merge into a single call or resume in a later turn."
90
- ),
91
- )
92
-
93
- generation = args.get("generation")
94
- generation_dict: dict[str, Any] | None = (
95
- cast(dict[str, Any], generation) if isinstance(generation, dict) else None
96
- )
97
-
98
- # Extract output_schema if configured
99
- output_schema = None
100
- if profile.output_schema_arg:
101
- output_schema = args.get(profile.output_schema_arg)
102
-
103
- try:
104
- result = await runner(
105
- model.SubAgentState(
106
- sub_agent_type=profile.name,
107
- sub_agent_desc=description,
108
- sub_agent_prompt=prompt,
109
- resume=resume_session_id,
110
- output_schema=output_schema,
111
- generation=generation_dict,
112
- ),
113
- context.record_sub_agent_session_id,
114
- context.register_sub_agent_metadata_getter,
115
- )
116
- except asyncio.CancelledError:
117
- raise
118
- except Exception as e:
119
- return message.ToolResultMessage(status="error", output_text=f"Failed to run subtask: {e}")
120
-
121
- return message.ToolResultMessage(
122
- status="success" if not result.error else "error",
123
- output_text=result.task_result,
124
- ui_extra=model.SessionIdUIExtra(session_id=result.session_id),
125
- task_metadata=result.task_metadata,
126
- )
@@ -1,108 +0,0 @@
1
- import re
2
- from abc import ABC, abstractmethod
3
-
4
- from openai.types.chat.chat_completion_chunk import ChoiceDeltaToolCall
5
- from pydantic import BaseModel, Field
6
-
7
- from klaude_code.log import log_debug
8
- from klaude_code.protocol import message
9
-
10
-
11
- def normalize_tool_name(name: str) -> str:
12
- """Normalize tool name from Gemini-3 format.
13
-
14
- Gemini-3 sometimes returns tool names in format like 'tool_Edit_mUoY2p3W3r3z8uO5P2nZ'.
15
- This function extracts the actual tool name (e.g., 'Edit').
16
- """
17
- match = re.match(r"^tool_([A-Za-z]+)_[A-Za-z0-9]+$", name)
18
- if match:
19
- normalized = match.group(1)
20
- log_debug(f"Gemini-3 tool name normalized: {name} -> {normalized}", style="yellow")
21
- return normalized
22
- return name
23
-
24
-
25
- class ToolCallAccumulatorABC(ABC):
26
- @abstractmethod
27
- def add(self, chunks: list[ChoiceDeltaToolCall]) -> None:
28
- pass
29
-
30
- @abstractmethod
31
- def get(self) -> list[message.ToolCallPart]:
32
- pass
33
-
34
- @abstractmethod
35
- def set_response_id(self, response_id: str | None) -> None:
36
- pass
37
-
38
- @abstractmethod
39
- def reset(self) -> None:
40
- pass
41
-
42
-
43
- class BasicToolCallAccumulator(ToolCallAccumulatorABC, BaseModel):
44
- """
45
- Support for API:
46
- - returns multiple tool calls within a single response in a serial manner.
47
- - Each step contains exactly one chunk.
48
-
49
- e.g.:
50
- Claude, GPT series
51
- The sequence for each tool call follows this pattern:
52
- - Initial chunk: contains tool call id and function name
53
- - Subsequent chunks: contain argument fragments with id and name set to None
54
- - Every chunk has a valid index
55
- - Pattern repeats for the next tool call
56
- [ChoiceDeltaToolCall(index=0, id='toolu_vrtx_01QxTq6QeJZd9tTLt6pvtSy6', function=ChoiceDeltaToolCallFunction(arguments='', name='Bash'), type='function')]
57
- [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='', name=None), type='function')]
58
- [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"comm', name=None), type='function')]
59
- [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='an', name=None), type='function')]
60
- [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='d": "', name=None), type='function')]
61
- [ChoiceDeltaToolCall(index=0, id=None, function=ChoiceDeltaToolCallFunction(arguments='pwd"}', name=None), type='function')]
62
- [ChoiceDeltaToolCall(index=1, id='toolu_vrtx_01Uvxge2edYAZBnNLoYGeDBg', function=ChoiceDeltaToolCallFunction(arguments='', name='Bash'), type='function')]
63
- [ChoiceDeltaToolCall(index=1, id=None, function=ChoiceDeltaToolCallFunction(arguments='', name=None), type='function')]
64
- [ChoiceDeltaToolCall(index=1, id=None, function=ChoiceDeltaToolCallFunction(arguments='{"com', name=None), type='function')]
65
- [ChoiceDeltaToolCall(index=1, id=None, function=ChoiceDeltaToolCallFunction(arguments='mand":', name=None), type='function')]
66
- [ChoiceDeltaToolCall(index=1, id=None, function=ChoiceDeltaToolCallFunction(arguments=' "ls"}', name=None), type='function')]
67
-
68
- Grok, Gemini
69
- Each step is one completed tool call
70
- [ChoiceDeltaToolCall(index=0, id='call_83297568', function=ChoiceDeltaToolCallFunction(arguments='{"command":"pwd"}', name='Bash'), type='function')]
71
- [ChoiceDeltaToolCall(index=1, id='call_88931225', function=ChoiceDeltaToolCallFunction(arguments='{"command":"ls"}', name='Bash'), type='function')]
72
- """
73
-
74
- chunks_by_step: list[list[ChoiceDeltaToolCall]] = Field(default_factory=list) # pyright: ignore[reportUnknownVariableType]
75
- response_id: str | None = None
76
-
77
- def add(self, chunks: list[ChoiceDeltaToolCall]) -> None:
78
- self.chunks_by_step.append(chunks)
79
-
80
- def get(self) -> list[message.ToolCallPart]:
81
- result: list[message.ToolCallPart] = []
82
- current_index = -1
83
- for current_step in self.chunks_by_step:
84
- if len(current_step) == 0:
85
- continue
86
- first_chunk = current_step[0]
87
- if first_chunk.index != current_index:
88
- current_index = first_chunk.index
89
- result.append(
90
- message.ToolCallPart(
91
- call_id=first_chunk.id or "",
92
- tool_name="",
93
- arguments_json="",
94
- )
95
- )
96
- if first_chunk.function is None:
97
- continue
98
- if first_chunk.function.name:
99
- result[-1].tool_name = normalize_tool_name(first_chunk.function.name)
100
- if first_chunk.function.arguments:
101
- result[-1].arguments_json += first_chunk.function.arguments
102
- return result
103
-
104
- def set_response_id(self, response_id: str | None) -> None:
105
- self.response_id = response_id
106
-
107
- def reset(self) -> None:
108
- self.chunks_by_step = []