nanocode-cli 0.5.11__tar.gz → 0.5.12__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: nanocode-cli
3
- Version: 0.5.11
3
+ Version: 0.5.12
4
4
  Summary: A small terminal coding agent written in Python
5
5
  Author-email: hit9 <hit9@icloud.com>
6
6
  License-Expression: BSD-3-Clause
@@ -55,7 +55,7 @@ from prompt_toolkit.widgets import SearchToolbar
55
55
  from rich.console import Console
56
56
  from rich.markdown import Markdown
57
57
 
58
- __version__ = "0.5.11"
58
+ __version__ = "0.5.12"
59
59
 
60
60
  Json = dict[str, Any]
61
61
  HTTP_USER_AGENT = "nanocode/" + __version__
@@ -4155,8 +4155,7 @@ Tools:
4155
4155
  except (EOFError, KeyboardInterrupt):
4156
4156
  pass
4157
4157
  finally:
4158
- if not stop_event.is_set():
4159
- self.queue_input_text = buffer.text
4158
+ self.queue_input_text = buffer.text
4160
4159
  self.queue_input_active.clear()
4161
4160
  if self.queue_input_app is app:
4162
4161
  self.queue_input_app = None
@@ -4175,7 +4174,8 @@ Tools:
4175
4174
  UpdateChecker(self.session).start()
4176
4175
  while True:
4177
4176
  try:
4178
- user_input = self.read_input()
4177
+ user_input = self.read_input(initial_text=self.queue_input_text)
4178
+ self.queue_input_text = ""
4179
4179
  except EOFError:
4180
4180
  self.emit("")
4181
4181
  return 0
@@ -4212,7 +4212,6 @@ Tools:
4212
4212
  if watcher:
4213
4213
  watcher.join(timeout=1.0)
4214
4214
  self.queue_input_paused.clear()
4215
- self.queue_input_text = ""
4216
4215
  self.session.state.manual_model_retry_requested = False
4217
4216
  CodeIndex(self.session).update_pending()
4218
4217
  self.status_bar.stop()
@@ -4271,6 +4270,7 @@ Tools:
4271
4270
  multiline: bool = False,
4272
4271
  submit_on_enter: bool = False,
4273
4272
  prompt_style: str = "class:prompt",
4273
+ initial_text: str = "",
4274
4274
  ) -> str:
4275
4275
  if self.input_history is None:
4276
4276
  return self.input_fn(prompt_text)
@@ -4286,6 +4286,7 @@ Tools:
4286
4286
  enable_history_search=True,
4287
4287
  multiline=multiline,
4288
4288
  accept_handler=accept,
4289
+ document=Document(initial_text, cursor_position=len(initial_text)),
4289
4290
  )
4290
4291
  search_toolbar = SearchToolbar()
4291
4292
  control = BufferControl(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.5.11
3
+ Version: 0.5.12
4
4
  Summary: A small terminal coding agent written in Python
5
5
  Author-email: hit9 <hit9@icloud.com>
6
6
  License-Expression: BSD-3-Clause
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nanocode-cli"
7
- version = "0.5.11"
7
+ version = "0.5.12"
8
8
  description = "A small terminal coding agent written in Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes
File without changes
File without changes
File without changes