ngpt 3.9.4__tar.gz → 3.9.5__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 (66) hide show
  1. {ngpt-3.9.4 → ngpt-3.9.5}/PKG-INFO +1 -1
  2. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/gitcommsg.py +20 -0
  3. ngpt-3.9.5/previews/icon.png +0 -0
  4. ngpt-3.9.5/previews/social-preview.png +0 -0
  5. {ngpt-3.9.4 → ngpt-3.9.5}/pyproject.toml +1 -1
  6. {ngpt-3.9.4 → ngpt-3.9.5}/uv.lock +1 -1
  7. {ngpt-3.9.4 → ngpt-3.9.5}/.github/banner.svg +0 -0
  8. {ngpt-3.9.4 → ngpt-3.9.5}/.github/workflows/aur-publish.yml +0 -0
  9. {ngpt-3.9.4 → ngpt-3.9.5}/.github/workflows/python-publish.yml +0 -0
  10. {ngpt-3.9.4 → ngpt-3.9.5}/.github/workflows/repo-mirror.yml +0 -0
  11. {ngpt-3.9.4 → ngpt-3.9.5}/.gitignore +0 -0
  12. {ngpt-3.9.4 → ngpt-3.9.5}/.python-version +0 -0
  13. {ngpt-3.9.4 → ngpt-3.9.5}/COMMIT_GUIDELINES.md +0 -0
  14. {ngpt-3.9.4 → ngpt-3.9.5}/CONTRIBUTING.md +0 -0
  15. {ngpt-3.9.4 → ngpt-3.9.5}/LICENSE +0 -0
  16. {ngpt-3.9.4 → ngpt-3.9.5}/PKGBUILD +0 -0
  17. {ngpt-3.9.4 → ngpt-3.9.5}/README.md +0 -0
  18. {ngpt-3.9.4 → ngpt-3.9.5}/docs/CONTRIBUTING.md +0 -0
  19. {ngpt-3.9.4 → ngpt-3.9.5}/docs/LICENSE.md +0 -0
  20. {ngpt-3.9.4 → ngpt-3.9.5}/docs/_config.yml +0 -0
  21. {ngpt-3.9.4 → ngpt-3.9.5}/docs/_sass/custom/custom.scss +0 -0
  22. {ngpt-3.9.4 → ngpt-3.9.5}/docs/configuration.md +0 -0
  23. {ngpt-3.9.4 → ngpt-3.9.5}/docs/examples/advanced.md +0 -0
  24. {ngpt-3.9.4 → ngpt-3.9.5}/docs/examples/basic.md +0 -0
  25. {ngpt-3.9.4 → ngpt-3.9.5}/docs/examples/role_gallery.md +0 -0
  26. {ngpt-3.9.4 → ngpt-3.9.5}/docs/examples.md +0 -0
  27. {ngpt-3.9.4 → ngpt-3.9.5}/docs/index.md +0 -0
  28. {ngpt-3.9.4 → ngpt-3.9.5}/docs/installation.md +0 -0
  29. {ngpt-3.9.4 → ngpt-3.9.5}/docs/overview.md +0 -0
  30. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage/cli_config.md +0 -0
  31. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage/cli_usage.md +0 -0
  32. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage/gitcommsg.md +0 -0
  33. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage/roles.md +0 -0
  34. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage/web_search.md +0 -0
  35. {ngpt-3.9.4 → ngpt-3.9.5}/docs/usage.md +0 -0
  36. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/__init__.py +0 -0
  37. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/__main__.py +0 -0
  38. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/__init__.py +0 -0
  39. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/args.py +0 -0
  40. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/config_manager.py +0 -0
  41. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/formatters.py +0 -0
  42. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/main.py +0 -0
  43. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/__init__.py +0 -0
  44. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/chat.py +0 -0
  45. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/code.py +0 -0
  46. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/interactive.py +0 -0
  47. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/rewrite.py +0 -0
  48. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/shell.py +0 -0
  49. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/modes/text.py +0 -0
  50. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/renderers.py +0 -0
  51. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/roles.py +0 -0
  52. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/cli/ui.py +0 -0
  53. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/client.py +0 -0
  54. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/__init__.py +0 -0
  55. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/cli_config.py +0 -0
  56. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/config.py +0 -0
  57. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/log.py +0 -0
  58. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/pipe.py +0 -0
  59. {ngpt-3.9.4 → ngpt-3.9.5}/ngpt/utils/web_search.py +0 -0
  60. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-g.png +0 -0
  61. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-i.png +0 -0
  62. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-s-c.png +0 -0
  63. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-sh-c-a.png +0 -0
  64. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-w-self.png +0 -0
  65. {ngpt-3.9.4 → ngpt-3.9.5}/previews/ngpt-w.png +0 -0
  66. {ngpt-3.9.4 → ngpt-3.9.5}/wiki.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.9.4
3
+ Version: 3.9.5
4
4
  Summary: A Swiss army knife for LLMs: A fast, lightweight CLI and interactive chat tool that brings the power of any OpenAI-compatible LLM (OpenAI, Ollama, Groq, Claude, Gemini, etc.) straight to your terminal. rewrite texts or refine code, craft git commit messages, generate and run OS-aware shell commands.
5
5
  Project-URL: Homepage, https://github.com/nazdridoy/ngpt
6
6
  Project-URL: Repository, https://github.com/nazdridoy/ngpt
@@ -998,6 +998,23 @@ def is_git_diff(content):
998
998
 
999
999
  return False
1000
1000
 
1001
+ def strip_code_block_formatting(text):
1002
+ """Strip code block formatting from the text if present.
1003
+
1004
+ Args:
1005
+ text: Text to strip code block formatting from
1006
+
1007
+ Returns:
1008
+ str: Text without code block formatting
1009
+ """
1010
+ # Check if the text starts with ``` and ends with ```
1011
+ pattern = r'^```(?:.*?)\n(.*?)```$'
1012
+ match = re.search(pattern, text, re.DOTALL)
1013
+ if match:
1014
+ # Extract content between backticks and remove any trailing whitespace
1015
+ return match.group(1).rstrip()
1016
+ return text
1017
+
1001
1018
  def gitcommsg_mode(client, args, logger=None):
1002
1019
  """Handle the Git commit message generation mode.
1003
1020
 
@@ -1183,6 +1200,9 @@ def gitcommsg_mode(client, args, logger=None):
1183
1200
  print(f"{COLORS['red']}Failed to generate commit message.{COLORS['reset']}")
1184
1201
  return
1185
1202
 
1203
+ # Strip any code block formatting
1204
+ result = strip_code_block_formatting(result)
1205
+
1186
1206
  # Display the result
1187
1207
  print(f"\n{COLORS['green']}✨ Generated Commit Message:{COLORS['reset']}\n")
1188
1208
  print(result)
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ngpt"
3
- version = "3.9.4"
3
+ version = "3.9.5"
4
4
  description = "A Swiss army knife for LLMs: A fast, lightweight CLI and interactive chat tool that brings the power of any OpenAI-compatible LLM (OpenAI, Ollama, Groq, Claude, Gemini, etc.) straight to your terminal. rewrite texts or refine code, craft git commit messages, generate and run OS-aware 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.9.4"
151
+ version = "3.9.5"
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
File without changes
File without changes
File without changes
File without changes
File without changes