ngpt 3.8.0__tar.gz → 3.8.1__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.
Files changed (59) hide show
  1. {ngpt-3.8.0 → ngpt-3.8.1}/PKG-INFO +1 -1
  2. {ngpt-3.8.0 → ngpt-3.8.1}/docs/examples/basic.md +1 -1
  3. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/shell.py +12 -3
  4. {ngpt-3.8.0 → ngpt-3.8.1}/pyproject.toml +1 -1
  5. {ngpt-3.8.0 → ngpt-3.8.1}/uv.lock +1 -1
  6. {ngpt-3.8.0 → ngpt-3.8.1}/.github/workflows/aur-publish.yml +0 -0
  7. {ngpt-3.8.0 → ngpt-3.8.1}/.github/workflows/python-publish.yml +0 -0
  8. {ngpt-3.8.0 → ngpt-3.8.1}/.gitignore +0 -0
  9. {ngpt-3.8.0 → ngpt-3.8.1}/.python-version +0 -0
  10. {ngpt-3.8.0 → ngpt-3.8.1}/COMMIT_GUIDELINES.md +0 -0
  11. {ngpt-3.8.0 → ngpt-3.8.1}/CONTRIBUTING.md +0 -0
  12. {ngpt-3.8.0 → ngpt-3.8.1}/LICENSE +0 -0
  13. {ngpt-3.8.0 → ngpt-3.8.1}/PKGBUILD +0 -0
  14. {ngpt-3.8.0 → ngpt-3.8.1}/README.md +0 -0
  15. {ngpt-3.8.0 → ngpt-3.8.1}/docs/CONTRIBUTING.md +0 -0
  16. {ngpt-3.8.0 → ngpt-3.8.1}/docs/LICENSE.md +0 -0
  17. {ngpt-3.8.0 → ngpt-3.8.1}/docs/_config.yml +0 -0
  18. {ngpt-3.8.0 → ngpt-3.8.1}/docs/_sass/custom/custom.scss +0 -0
  19. {ngpt-3.8.0 → ngpt-3.8.1}/docs/configuration.md +0 -0
  20. {ngpt-3.8.0 → ngpt-3.8.1}/docs/examples/advanced.md +0 -0
  21. {ngpt-3.8.0 → ngpt-3.8.1}/docs/examples.md +0 -0
  22. {ngpt-3.8.0 → ngpt-3.8.1}/docs/index.md +0 -0
  23. {ngpt-3.8.0 → ngpt-3.8.1}/docs/installation.md +0 -0
  24. {ngpt-3.8.0 → ngpt-3.8.1}/docs/overview.md +0 -0
  25. {ngpt-3.8.0 → ngpt-3.8.1}/docs/usage/cli_config.md +0 -0
  26. {ngpt-3.8.0 → ngpt-3.8.1}/docs/usage/cli_usage.md +0 -0
  27. {ngpt-3.8.0 → ngpt-3.8.1}/docs/usage/gitcommsg.md +0 -0
  28. {ngpt-3.8.0 → ngpt-3.8.1}/docs/usage/web_search.md +0 -0
  29. {ngpt-3.8.0 → ngpt-3.8.1}/docs/usage.md +0 -0
  30. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/__init__.py +0 -0
  31. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/__main__.py +0 -0
  32. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/__init__.py +0 -0
  33. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/args.py +0 -0
  34. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/config_manager.py +0 -0
  35. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/formatters.py +0 -0
  36. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/main.py +0 -0
  37. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/__init__.py +0 -0
  38. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/chat.py +0 -0
  39. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/code.py +0 -0
  40. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/gitcommsg.py +0 -0
  41. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/interactive.py +0 -0
  42. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/rewrite.py +0 -0
  43. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/modes/text.py +0 -0
  44. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/renderers.py +0 -0
  45. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/cli/ui.py +0 -0
  46. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/client.py +0 -0
  47. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/__init__.py +0 -0
  48. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/cli_config.py +0 -0
  49. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/config.py +0 -0
  50. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/log.py +0 -0
  51. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/pipe.py +0 -0
  52. {ngpt-3.8.0 → ngpt-3.8.1}/ngpt/utils/web_search.py +0 -0
  53. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-g.png +0 -0
  54. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-i.png +0 -0
  55. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-s-c.png +0 -0
  56. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-sh-c-a.png +0 -0
  57. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-w-self.png +0 -0
  58. {ngpt-3.8.0 → ngpt-3.8.1}/previews/ngpt-w.png +0 -0
  59. {ngpt-3.8.0 → ngpt-3.8.1}/wiki.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.8.0
3
+ Version: 3.8.1
4
4
  Summary: Swiss army knife for LLMs: powerful CLI and interactive chatbot in one package. Seamlessly work with OpenAI, Ollama, Groq, Claude, Gemini, or any OpenAI-compatible API to generate code, craft git commits, rewrite text, and execute shell commands.
5
5
  Project-URL: Homepage, https://github.com/nazdridoy/ngpt
6
6
  Project-URL: Repository, https://github.com/nazdridoy/ngpt
@@ -379,4 +379,4 @@ For more advanced examples and detailed explanations of specific features, see:
379
379
  - [Advanced Examples](advanced.md)
380
380
  - [CLI Usage Guide](../usage/cli_usage.md)
381
381
  - [CLI Configuration Guide](../usage/cli_config.md)
382
- - [Git Commit Message Guide](../usage/gitcommsg.md)
382
+ - [Git Commit Message Guide](../usage/gitcommsg.md)
@@ -1,5 +1,5 @@
1
1
  from ..formatters import COLORS
2
- from ..ui import spinner, copy_to_clipboard
2
+ from ..ui import spinner, copy_to_clipboard, get_terminal_input
3
3
  from ..renderers import prettify_markdown, has_markdown_renderer, prettify_streaming_markdown, show_available_renderers
4
4
  from ...utils import enhance_prompt_with_web_search, process_piped_input
5
5
  import subprocess
@@ -540,10 +540,19 @@ def shell_mode(client, args, logger=None):
540
540
  time.sleep(0.2)
541
541
 
542
542
  # Print prompt and flush to ensure it appears
543
- print(prompt_text, end='', flush=True)
543
+ sys.stdout.write(prompt_text)
544
+ sys.stdout.flush()
544
545
 
545
546
  try:
546
- response = input().lower()
547
+ # Use get_terminal_input which opens /dev/tty directly rather than using stdin
548
+ # This allows user input even when stdin has been consumed by pipe
549
+ response = get_terminal_input()
550
+ if response:
551
+ response = response.lower()
552
+ else:
553
+ # If get_terminal_input fails, default to copy
554
+ print("\nFailed to get terminal input. Defaulting to copy option.")
555
+ response = 'c'
547
556
  except KeyboardInterrupt:
548
557
  print("\nCommand execution cancelled by user.")
549
558
  return
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ngpt"
3
- version = "3.8.0"
3
+ version = "3.8.1"
4
4
  description = "Swiss army knife for LLMs: powerful CLI and interactive chatbot in one package. Seamlessly work with OpenAI, Ollama, Groq, Claude, Gemini, or any OpenAI-compatible API to generate code, craft git commits, rewrite text, and execute shell commands."
5
5
  authors = [
6
6
  {name = "nazDridoy", email = "nazdridoy399@gmail.com"},
@@ -148,7 +148,7 @@ wheels = [
148
148
 
149
149
  [[package]]
150
150
  name = "ngpt"
151
- version = "3.8.0"
151
+ version = "3.8.1"
152
152
  source = { editable = "." }
153
153
  dependencies = [
154
154
  { name = "beautifulsoup4" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes