code-puppy 0.0.342__py3-none-any.whl → 0.0.343__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.
@@ -648,18 +648,38 @@ async def get_input_with_combined_completion(
648
648
  else:
649
649
  event.current_buffer.validate_and_handle()
650
650
 
651
- # Handle bracketed paste - TEXT ONLY, never check clipboard for images.
652
- # Drag-and-drop sends file paths through this handler (as text), and paste
653
- # operations send text through here too. We should NOT conflate this with
654
- # clipboard image capture - those are separate operations (Ctrl+V / F3).
651
+ # Handle bracketed paste - smart detection for text vs images.
652
+ # Most terminals (Windows included!) send Ctrl+V through bracketed paste.
653
+ # - If there's meaningful text content paste as text (drag-and-drop file paths, copied text)
654
+ # - If text is empty/whitespace check for clipboard image (image paste on Windows)
655
655
  @bindings.add(Keys.BracketedPaste)
656
656
  def handle_bracketed_paste(event):
657
- """Handle bracketed paste - insert text data only."""
657
+ """Handle bracketed paste - smart text vs image detection."""
658
658
  pasted_data = event.data
659
- if pasted_data:
659
+
660
+ # If we have meaningful text content, paste it (don't check for images)
661
+ # This handles drag-and-drop file paths and normal text paste
662
+ if pasted_data and pasted_data.strip():
660
663
  # Normalize Windows line endings to Unix style
661
664
  sanitized_data = pasted_data.replace("\r\n", "\n").replace("\r", "\n")
662
665
  event.app.current_buffer.insert_text(sanitized_data)
666
+ return
667
+
668
+ # No meaningful text - check if clipboard has an image (Windows image paste!)
669
+ try:
670
+ if has_image_in_clipboard():
671
+ placeholder = capture_clipboard_image_to_pending()
672
+ if placeholder:
673
+ event.app.current_buffer.insert_text(placeholder + " ")
674
+ event.app.output.bell()
675
+ return
676
+ except Exception:
677
+ pass
678
+
679
+ # Fallback: if there was whitespace-only data, paste it
680
+ if pasted_data:
681
+ sanitized_data = pasted_data.replace("\r\n", "\n").replace("\r", "\n")
682
+ event.app.current_buffer.insert_text(sanitized_data)
663
683
 
664
684
  # Fallback Ctrl+V for terminals without bracketed paste support
665
685
  @bindings.add("c-v", eager=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.342
3
+ Version: 0.0.343
4
4
  Summary: Code generation agent
5
5
  Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
6
6
  Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
@@ -63,7 +63,7 @@ code_puppy/command_line/motd.py,sha256=XuIk3UTLawwVFM-NfoaJGU5F2hPLASTFXq84UdDMT
63
63
  code_puppy/command_line/onboarding_slides.py,sha256=tHob7rB_n32dfjtPH-RSG0WLMjDHhlmNxfsF7WCgcVc,7191
64
64
  code_puppy/command_line/onboarding_wizard.py,sha256=U5lV_1P3IwDYZUHar0zKgdp121zzkvOwwORvdCZwFcw,10241
65
65
  code_puppy/command_line/pin_command_completion.py,sha256=juSvdqRpk7AdfkPy1DJx5NzfEUU5KYGlChvP0hisM18,11667
66
- code_puppy/command_line/prompt_toolkit_completion.py,sha256=ytfP6c9G9xdhSS5aTmCCGdmWN7zr6Vauq1uRHCglEzg,31910
66
+ code_puppy/command_line/prompt_toolkit_completion.py,sha256=49GM3jVE89G1M3XroMZk2LhGgXpOO8XZ0Sg8h4a6LLw,32806
67
67
  code_puppy/command_line/session_commands.py,sha256=Jh8GGfhlfBAEVfucKLbcZjNaXYd0twImiOwq2ZnGdQQ,9902
68
68
  code_puppy/command_line/utils.py,sha256=7eyxDHjPjPB9wGDJQQcXV_zOsGdYsFgI0SGCetVmTqE,1251
69
69
  code_puppy/command_line/mcp/__init__.py,sha256=0-OQuwjq_pLiTVJ1_NrirVwdRerghyKs_MTZkwPC7YY,315
@@ -175,10 +175,10 @@ code_puppy/tools/browser/browser_scripts.py,sha256=sNb8eLEyzhasy5hV4B9OjM8yIVMLV
175
175
  code_puppy/tools/browser/browser_workflows.py,sha256=nitW42vCf0ieTX1gLabozTugNQ8phtoFzZbiAhw1V90,6491
176
176
  code_puppy/tools/browser/camoufox_manager.py,sha256=RZjGOEftE5sI_tsercUyXFSZI2wpStXf-q0PdYh2G3I,8680
177
177
  code_puppy/tools/browser/vqa_agent.py,sha256=DBn9HKloILqJSTSdNZzH_PYWT0B2h9VwmY6akFQI_uU,2913
178
- code_puppy-0.0.342.data/data/code_puppy/models.json,sha256=FMQdE_yvP_8y0xxt3K918UkFL9cZMYAqW1SfXcQkU_k,3105
179
- code_puppy-0.0.342.data/data/code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
180
- code_puppy-0.0.342.dist-info/METADATA,sha256=rW8RfH48CIeoHIe49cVy1DU7161RkVjjhh_Rm2sA-Ok,27550
181
- code_puppy-0.0.342.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
182
- code_puppy-0.0.342.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
183
- code_puppy-0.0.342.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
184
- code_puppy-0.0.342.dist-info/RECORD,,
178
+ code_puppy-0.0.343.data/data/code_puppy/models.json,sha256=FMQdE_yvP_8y0xxt3K918UkFL9cZMYAqW1SfXcQkU_k,3105
179
+ code_puppy-0.0.343.data/data/code_puppy/models_dev_api.json,sha256=wHjkj-IM_fx1oHki6-GqtOoCrRMR0ScK0f-Iz0UEcy8,548187
180
+ code_puppy-0.0.343.dist-info/METADATA,sha256=cC9Qt3q-Sn2DgGTrjH_RfHN5qN8vNVzIaKafyQBeokU,27550
181
+ code_puppy-0.0.343.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
182
+ code_puppy-0.0.343.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
183
+ code_puppy-0.0.343.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
184
+ code_puppy-0.0.343.dist-info/RECORD,,