deepagent-code 0.1.2__tar.gz → 0.1.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepagent-code
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A Claude Code-style CLI for running LangGraph agents from the terminal
5
5
  Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
6
6
  License-Expression: MIT
@@ -53,7 +53,7 @@ SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇",
53
53
 
54
54
 
55
55
  # Version info
56
- __version__ = "0.1.2"
56
+ __version__ = "0.1.3"
57
57
 
58
58
 
59
59
  # Slash command registry
@@ -124,6 +124,26 @@ class CommandRegistry:
124
124
  command_registry = CommandRegistry()
125
125
 
126
126
 
127
+ def rl_wrap(code: str) -> str:
128
+ """Wrap ANSI escape code for readline to ignore in length calculations.
129
+
130
+ On terminals, ANSI codes are invisible but counted in string length.
131
+ This causes issues with line wrapping when using input().
132
+ Wrapping with \\001 and \\002 tells readline to ignore these characters.
133
+ """
134
+ if HAS_READLINE:
135
+ return f"\001{code}\002"
136
+ return code
137
+
138
+
139
+ def make_prompt(text: str = "❯", color: str = BRIGHT_BLUE) -> str:
140
+ """Create a prompt string with proper readline escaping for ANSI codes.
141
+
142
+ This prevents line wrapping issues on Windows and other terminals.
143
+ """
144
+ return f"{rl_wrap(BOLD)}{rl_wrap(color)}{text}{rl_wrap(RESET)} "
145
+
146
+
127
147
  def register_command(
128
148
  name: str,
129
149
  description: str,
@@ -647,7 +667,7 @@ def handle_interrupt_input(num_actions: int = 1) -> List[Dict[str, Any]]:
647
667
  return [{"type": "reject"} for _ in range(num_actions)]
648
668
  elif choice == 2:
649
669
  print("Enter your decision as JSON (will be applied to all actions):")
650
- json_str = input(f"{BOLD}{BLUE}{RESET} ").strip()
670
+ json_str = input(make_prompt("❯", BLUE)).strip()
651
671
  try:
652
672
  decision = json.loads(json_str)
653
673
  return [decision for _ in range(num_actions)]
@@ -1119,7 +1139,7 @@ def run_conversation_loop(
1119
1139
  while True:
1120
1140
  try:
1121
1141
  print(separator("dots"))
1122
- user_input = input(f"{BOLD}{BRIGHT_BLUE}❯{RESET} ").strip()
1142
+ user_input = input(make_prompt()).strip()
1123
1143
 
1124
1144
  if not user_input:
1125
1145
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepagent-code
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A Claude Code-style CLI for running LangGraph agents from the terminal
5
5
  Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deepagent-code"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  description = "A Claude Code-style CLI for running LangGraph agents from the terminal"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes
File without changes
File without changes