ngpt 3.9.5__py3-none-any.whl → 3.9.6__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/modes/text.py CHANGED
@@ -1,9 +1,10 @@
1
1
  from ..formatters import COLORS
2
2
  from ..renderers import prettify_markdown, prettify_streaming_markdown, TERMINAL_RENDER_LOCK
3
- from ..ui import get_multiline_input, spinner
3
+ from ..ui import get_multiline_input, spinner, copy_to_clipboard
4
4
  from ...utils import enhance_prompt_with_web_search
5
5
  import threading
6
6
  import sys
7
+ import time
7
8
 
8
9
  def text_mode(client, args, logger=None):
9
10
  """Handle the multi-line text input mode.
@@ -152,6 +153,8 @@ def text_mode(client, args, logger=None):
152
153
  # Before stopping the live display, update with complete=True to show final formatted content
153
154
  if stream_callback and response:
154
155
  stream_callback(response, complete=True)
156
+ # Add a small delay to ensure terminal stability
157
+ time.sleep(0.2)
155
158
 
156
159
  # Log the AI response if logging is enabled
157
160
  if logger and response:
@@ -163,4 +166,9 @@ def text_mode(client, args, logger=None):
163
166
  if args.prettify:
164
167
  prettify_markdown(response, args.renderer)
165
168
  else:
166
- print(response)
169
+ print(response)
170
+
171
+ # Offer to copy to clipboard if not in a redirected output
172
+ if not args.no_stream and response:
173
+ with TERMINAL_RENDER_LOCK:
174
+ copy_to_clipboard(response)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.9.5
3
+ Version: 3.9.6
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
@@ -16,15 +16,15 @@ ngpt/cli/modes/gitcommsg.py,sha256=21I3WZYa8Eb3BKPn6-aLMN7OhEmo1KHHnhTpnJkGesg,5
16
16
  ngpt/cli/modes/interactive.py,sha256=E0c38NA8xnuRKAce40F35uFYcohFDvaqSB8nf1ywS-4,17958
17
17
  ngpt/cli/modes/rewrite.py,sha256=QQm453X9aoUQP9CAtmeghlMytMJPlsDZPKef9tGfj6g,11181
18
18
  ngpt/cli/modes/shell.py,sha256=it1Brq1-LGeNfPKYBeVAwF-a78g9UP-KscofBZQkbr4,41589
19
- ngpt/cli/modes/text.py,sha256=rUr7Byds7zkO9ZbMSZWOO_3fWfpeM40Tq1XJAgdapcs,6679
19
+ ngpt/cli/modes/text.py,sha256=NOikaU9YVCBgyaCl6pwy9EVt-YY5Q4jBx0l47izpVTA,6986
20
20
  ngpt/utils/__init__.py,sha256=_92f8eGMMOtQQA3uwgSRVwUEl1EIRFjWPUjcfGgI-eI,1244
21
21
  ngpt/utils/cli_config.py,sha256=Ug8cECBTIuzOwkBWidLTfs-OAdOsCMJ2bNa70pOADfw,11195
22
22
  ngpt/utils/config.py,sha256=wsArA4osnh8fKqOvtsPqqBxAz3DpdjtaWUFaRtnUdyc,10452
23
23
  ngpt/utils/log.py,sha256=f1jg2iFo35PAmsarH8FVL_62plq4VXH0Mu2QiP6RJGw,15934
24
24
  ngpt/utils/pipe.py,sha256=qRHF-Ma7bbU0cOcb1Yhe4S-kBavivtnnvLA3EYS4FY4,2162
25
25
  ngpt/utils/web_search.py,sha256=w5ke4KJMRxq7r5jtbUXvspja6XhjoPZloVkZ0IvBXIE,30731
26
- ngpt-3.9.5.dist-info/METADATA,sha256=OiNZBFl7V7WyfNSurU4DDmLvWswvukcx8xzo8FP4QIQ,31174
27
- ngpt-3.9.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- ngpt-3.9.5.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
29
- ngpt-3.9.5.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
30
- ngpt-3.9.5.dist-info/RECORD,,
26
+ ngpt-3.9.6.dist-info/METADATA,sha256=ZuhiHI7b-ZzBTx1YUeWCdFlcGvzFTtgAVuTCQV2CaJo,31174
27
+ ngpt-3.9.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ ngpt-3.9.6.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
29
+ ngpt-3.9.6.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
30
+ ngpt-3.9.6.dist-info/RECORD,,
File without changes