ngpt 3.0.3__py3-none-any.whl → 3.0.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.
- ngpt/cli/interactive.py +4 -0
- ngpt/cli/modes/rewrite.py +8 -4
- {ngpt-3.0.3.dist-info → ngpt-3.0.5.dist-info}/METADATA +2 -2
- {ngpt-3.0.3.dist-info → ngpt-3.0.5.dist-info}/RECORD +7 -7
- {ngpt-3.0.3.dist-info → ngpt-3.0.5.dist-info}/WHEEL +0 -0
- {ngpt-3.0.3.dist-info → ngpt-3.0.5.dist-info}/entry_points.txt +0 -0
- {ngpt-3.0.3.dist-info → ngpt-3.0.5.dist-info}/licenses/LICENSE +0 -0
ngpt/cli/interactive.py
CHANGED
@@ -3,6 +3,7 @@ import shutil
|
|
3
3
|
import traceback
|
4
4
|
import threading
|
5
5
|
import sys
|
6
|
+
import time
|
6
7
|
from .formatters import COLORS
|
7
8
|
from .renderers import prettify_markdown, prettify_streaming_markdown
|
8
9
|
|
@@ -289,6 +290,9 @@ def interactive_chat_session(client, web_search=False, no_stream=False, temperat
|
|
289
290
|
# Print separator between exchanges
|
290
291
|
print_separator()
|
291
292
|
|
293
|
+
# Add a small delay to ensure terminal stability
|
294
|
+
time.sleep(0.1)
|
295
|
+
|
292
296
|
except KeyboardInterrupt:
|
293
297
|
print(f"\n\n{COLORS['yellow']}Chat session interrupted by user.{COLORS['reset']}")
|
294
298
|
except Exception as e:
|
ngpt/cli/modes/rewrite.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import sys
|
2
2
|
import platform
|
3
3
|
import threading
|
4
|
+
import time
|
4
5
|
from ..formatters import COLORS
|
5
6
|
from ..renderers import prettify_markdown, prettify_streaming_markdown
|
6
7
|
from ..ui import get_multiline_input, spinner
|
@@ -75,7 +76,6 @@ def get_terminal_input():
|
|
75
76
|
# Windows-specific solution
|
76
77
|
try:
|
77
78
|
import msvcrt
|
78
|
-
print("Press Y/N...", end="")
|
79
79
|
sys.stdout.flush()
|
80
80
|
# Wait for a keypress
|
81
81
|
char = msvcrt.getch().decode('utf-8').lower()
|
@@ -181,7 +181,7 @@ def rewrite_mode(client, args, logger=None):
|
|
181
181
|
# Stop the spinner
|
182
182
|
stop_spinner_func()
|
183
183
|
# Ensure spinner message is cleared with an extra blank line
|
184
|
-
sys.stdout.write("\r" + " " * 100 + "\r")
|
184
|
+
sys.stdout.write("\r" + " " * 100 + "\r\n")
|
185
185
|
sys.stdout.flush()
|
186
186
|
|
187
187
|
# Call the original callback to update the display
|
@@ -211,6 +211,8 @@ def rewrite_mode(client, args, logger=None):
|
|
211
211
|
# Stop live display if using stream-prettify
|
212
212
|
if args.stream_prettify and live_display:
|
213
213
|
live_display.stop()
|
214
|
+
# Add a small delay to ensure terminal stability
|
215
|
+
time.sleep(0.2)
|
214
216
|
|
215
217
|
# Log the AI response if logging is enabled
|
216
218
|
if logger and response:
|
@@ -227,7 +229,9 @@ def rewrite_mode(client, args, logger=None):
|
|
227
229
|
if not args.no_stream and sys.stdout.isatty():
|
228
230
|
try:
|
229
231
|
# Make sure to flush output before asking for input
|
230
|
-
|
232
|
+
# Make the prompt more visible with colors and formatting
|
233
|
+
clipboard_prompt = f"{COLORS['cyan']}{COLORS['bold']}Copy to clipboard? (y/n){COLORS['reset']} "
|
234
|
+
print(clipboard_prompt, end="")
|
231
235
|
sys.stdout.flush()
|
232
236
|
|
233
237
|
# Cross-platform terminal input
|
@@ -237,7 +241,7 @@ def rewrite_mode(client, args, logger=None):
|
|
237
241
|
try:
|
238
242
|
import pyperclip
|
239
243
|
pyperclip.copy(response)
|
240
|
-
print("Copied to clipboard.")
|
244
|
+
print(f"{COLORS['green']}Copied to clipboard.{COLORS['reset']}")
|
241
245
|
except ImportError:
|
242
246
|
print(f"{COLORS['yellow']}pyperclip not installed. Try: pip install \"ngpt[clipboard]\" {COLORS['reset']}")
|
243
247
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ngpt
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.5
|
4
4
|
Summary: Swiss army knife for LLMs: powerful CLI, interactive chatbot, and flexible Python library. Works with OpenAI, Ollama, Groq, Claude, Gemini, and any OpenAI-compatible API.
|
5
5
|
Project-URL: Homepage, https://github.com/nazdridoy/ngpt
|
6
6
|
Project-URL: Repository, https://github.com/nazdridoy/ngpt
|
@@ -38,7 +38,7 @@ Description-Content-Type: text/markdown
|
|
38
38
|
|
39
39
|
<p align="center">
|
40
40
|
<a href="https://pypi.org/project/ngpt/"><img src="https://img.shields.io/pypi/v/ngpt.svg" alt="PyPI version"></a>
|
41
|
-
<a href="https://aur.archlinux.org/packages/ngpt"><img src="https://img.shields.io/
|
41
|
+
<a href="https://aur.archlinux.org/packages/ngpt"><img alt="AUR Version" src="https://img.shields.io/aur/version/ngpt"></a>
|
42
42
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
43
43
|
<a href="https://nazdridoy.github.io/ngpt/"><img src="https://img.shields.io/badge/docs-available-brightgreen.svg" alt="Documentation"></a>
|
44
44
|
</p>
|
@@ -5,7 +5,7 @@ ngpt/cli/__init__.py,sha256=hebbDSMGiOd43YNnQP67uzr67Ue6rZPwm2czynr5iZY,43
|
|
5
5
|
ngpt/cli/args.py,sha256=XQvofZs_WkbgUto3Dbx7Yw-AmPAQHh8kdHUe3uWy8w4,11382
|
6
6
|
ngpt/cli/config_manager.py,sha256=NQQcWnjUppAAd0s0p9YAf8EyKS1ex5-0EB4DvKdB4dk,3662
|
7
7
|
ngpt/cli/formatters.py,sha256=HBYGlx_7eoAKyzfy0Vq5L0yn8yVKjngqYBukMmXCcz0,9401
|
8
|
-
ngpt/cli/interactive.py,sha256=
|
8
|
+
ngpt/cli/interactive.py,sha256=TiGiu85Bi7tFqRuhOPUdm8LjCEGr0WbZmCYzrx8cL9g,13037
|
9
9
|
ngpt/cli/main.py,sha256=rIGbsr1wll4fJhAmPx8C9fCJYlhKijdHqal9e3NC2I8,28908
|
10
10
|
ngpt/cli/renderers.py,sha256=yYt3b_cWUYckfgLQ1wkEiQCnq5v5m7hfn5PWxHJzR9Y,12422
|
11
11
|
ngpt/cli/ui.py,sha256=m8qtd4cCSHBGHPUlHVdBEfun1G1Se4vLKTSgnS7QOKE,6775
|
@@ -13,15 +13,15 @@ ngpt/cli/modes/__init__.py,sha256=R3aO662RIzWEOvr3moTrEI8Tpg0zDDyMGGh1-OxiRgM,28
|
|
13
13
|
ngpt/cli/modes/chat.py,sha256=ULSIFach3Namb3FQBhgACxhHXME-fX7bLBDum9JQfks,5699
|
14
14
|
ngpt/cli/modes/code.py,sha256=1EeiooyNe1jvTyNu6r0J9xY34QXb2uBQKPeNca-DrRI,5734
|
15
15
|
ngpt/cli/modes/gitcommsg.py,sha256=rsfMoeOupmNp-5p5fsMSPAf18BbzXWq-4PF2HjEz6SY,46991
|
16
|
-
ngpt/cli/modes/rewrite.py,sha256=
|
16
|
+
ngpt/cli/modes/rewrite.py,sha256=CEo8vzd_sIZbzZx52kPlMpXU0-rsoQg03KqG10h_0nU,10366
|
17
17
|
ngpt/cli/modes/shell.py,sha256=QkprnOxMMTg2v5DIwcofDnnr3JPNfuk-YgSQaae5Xps,3311
|
18
18
|
ngpt/cli/modes/text.py,sha256=z08xaW2r0XzyunUzBhwZKqnwPjyRol_CSazjLygmLRs,4514
|
19
19
|
ngpt/utils/__init__.py,sha256=E46suk2-QgYBI0Qrs6WXOajOUOebF3ETAFY7ah8DTWs,942
|
20
20
|
ngpt/utils/cli_config.py,sha256=IlHnOEEGpLoGZInynM778wgpxLVcJ_STKWxg2Ypvir4,11196
|
21
21
|
ngpt/utils/config.py,sha256=WYOk_b1eiYjo6hpV3pfXr2RjqhOnmKqwZwKid1T41I4,10363
|
22
22
|
ngpt/utils/log.py,sha256=f1jg2iFo35PAmsarH8FVL_62plq4VXH0Mu2QiP6RJGw,15934
|
23
|
-
ngpt-3.0.
|
24
|
-
ngpt-3.0.
|
25
|
-
ngpt-3.0.
|
26
|
-
ngpt-3.0.
|
27
|
-
ngpt-3.0.
|
23
|
+
ngpt-3.0.5.dist-info/METADATA,sha256=NAZUe2QY26o0pRoGL7VWUT34fBHiAZH-blpqdfViTog,28992
|
24
|
+
ngpt-3.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
25
|
+
ngpt-3.0.5.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
|
26
|
+
ngpt-3.0.5.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
|
27
|
+
ngpt-3.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|