python-codex 0.1.4__py3-none-any.whl → 0.1.5__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.
@@ -83,7 +83,7 @@ def format_cli_plan_messages(
83
83
 
84
84
  def build_cli_spinner_frame(index: 'int', label: 'str') -> 'str':
85
85
  suffix = f" {label}" if label else ""
86
- return f"{suffix} {SPINNER_FRAMES[index % len(SPINNER_FRAMES)]}"
86
+ return f"{SPINNER_FRAMES[index % len(SPINNER_FRAMES)]}{suffix}"
87
87
 
88
88
 
89
89
  def percent_of_context_window_remaining(
@@ -740,7 +740,7 @@ class CliSessionView:
740
740
  else:
741
741
  self._spinner.resume()
742
742
  if tool_name and args is not None:
743
- self._spinner.set_label(f"running {tool_name}({args})")
743
+ self._spinner.set_label(shorten_title(f"running {tool_name}({args})", limit=72))
744
744
  elif tool_name:
745
745
  self._spinner.set_label(f"running {tool_name}")
746
746
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-codex
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A minimal Python extraction of Codex's main agent loop
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.6.2
@@ -57,10 +57,10 @@ pycodex/utils/dotenv.py,sha256=EDBXdn93ewmq9zhJki5_LsJJXe0wMIQJ6VfCE1r7voQ,1818
57
57
  pycodex/utils/get_env.py,sha256=jR8G0Xco57jX-71E1oHIcl3-Kz9Ltc0kzxj04DKzt80,7316
58
58
  pycodex/utils/random_ids.py,sha256=zBphjVGc7OXk9ZNExAbxRi_bk7ipyLG491qTv7hi8jM,380
59
59
  pycodex/utils/session_persist.py,sha256=dUvo3Z1QBB4HJT1tLerDlLD3ZB25umB6FP6JORg9V40,16414
60
- pycodex/utils/visualize.py,sha256=9S3oOUAnI_SbVvoFJ18dzq8MLE5v6kAsNiYsMTtqKAc,40022
60
+ pycodex/utils/visualize.py,sha256=wjuW7l8uE7sckRtUJNAQ_irHKIfDWdfnFINHYtvQ5bw,40043
61
61
  responses_server/__init__.py,sha256=3yPv_zeGT7P11tTnmj5kXktISLNsNW-02MUnnbiZcb0,394
62
62
  responses_server/__main__.py,sha256=9SRp-Yw7ShGxc6DhSIXcDLKgGEdAVm3oBZ59rBOPjT0,62
63
- responses_server/app.py,sha256=AtysZYL6ViheHYISS8eCK_iyr7CwUfF3wrt86ekh79U,7371
63
+ responses_server/app.py,sha256=9gKgzD8LsOdkg2Te2KOwodH-Z0BD_RuNEVh9MBclx7Q,7429
64
64
  responses_server/config.py,sha256=wEcZbXZclTYz4fI_oy_sSMglWPeEITWlFeglQrrr6HE,2236
65
65
  responses_server/payload_processors.py,sha256=AcOipqVQyo4wKw_pb3ABlarwIK1VjcnQTlgPehRVGO8,3412
66
66
  responses_server/server.py,sha256=isyzN-p-Ir8LLycN_dQfcanvie2ZqqSu52mOPz_wYD4,2095
@@ -69,8 +69,8 @@ responses_server/stream_router.py,sha256=zWC4yyZ3I8E-Zgco844tIhRMWOwIkjOV0s-G-a9
69
69
  responses_server/tools/__init__.py,sha256=ivsBSEy0SBUhY-Uea5v1XMLXShkwHdCVl0id-1FwdZg,150
70
70
  responses_server/tools/custom_adapter.py,sha256=LxO7ldydvR-GWachDz8GKC0Q8KGGFoFPbZxM0QvxuZ0,8350
71
71
  responses_server/tools/web_search.py,sha256=pm4ZUiHUfxc0bGY1kEvt-BCzDrZIyP24xzPUcga2ul0,8908
72
- python_codex-0.1.4.dist-info/METADATA,sha256=fSNjm5GPh613W0ZFzU3UJFatqKUUs0xWYW17aOY4eLg,15451
73
- python_codex-0.1.4.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
74
- python_codex-0.1.4.dist-info/entry_points.txt,sha256=sNUVakoVuTrzJH505ZgRTQxmtRRPUHV_EH0i6EbYTyM,45
75
- python_codex-0.1.4.dist-info/licenses/LICENSE,sha256=0X8ifk312hYAORM4hlzg8wVSEXYKNmiPgWlB1YIy2Nw,10926
76
- python_codex-0.1.4.dist-info/RECORD,,
72
+ python_codex-0.1.5.dist-info/METADATA,sha256=rTfHXfLqg86xKhx6VNFcrHs_qBdBJuVSn5Mfe_wXODQ,15451
73
+ python_codex-0.1.5.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
74
+ python_codex-0.1.5.dist-info/entry_points.txt,sha256=sNUVakoVuTrzJH505ZgRTQxmtRRPUHV_EH0i6EbYTyM,45
75
+ python_codex-0.1.5.dist-info/licenses/LICENSE,sha256=0X8ifk312hYAORM4hlzg8wVSEXYKNmiPgWlB1YIy2Nw,10926
76
+ python_codex-0.1.5.dist-info/RECORD,,
responses_server/app.py CHANGED
@@ -36,13 +36,14 @@ def _stream_events(response_server: 'ResponseServer', request_body: 'typing.Dict
36
36
  except OutcommingChatError as exc:
37
37
 
38
38
  import traceback
39
+ exc_info = traceback.format_exception(type(exc), exc, exc.__traceback__)
39
40
  yield _format_sse_event(
40
41
  "response.failed",
41
42
  {
42
43
  "type": "response.failed",
43
44
  "response": {
44
45
  "error": {
45
- "message": '\n'.join(traceback.format_exception(exc)),
46
+ "message": '\n'.join(exc_info),
46
47
  }
47
48
  },
48
49
  },