kopipasta 0.24.0__py3-none-any.whl → 0.25.0__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.

Potentially problematic release.


This version of kopipasta might be problematic. Click here for more details.

kopipasta/main.py CHANGED
@@ -841,21 +841,22 @@ def start_chat_session(initial_prompt: str):
841
841
  sys.exit(1)
842
842
 
843
843
  model_name = 'gemini-2.5-pro-exp-03-25'
844
+ config = GenerateContentConfig(temperature=0.0)
844
845
  print(f"Using model: {model_name}")
845
846
 
846
847
  try:
847
848
  # Create a chat session using the client
848
- chat = client.chats.create(model=model_name)
849
+ chat = client.chats.create(model=model_name, config=config)
849
850
  # Note: History is managed by the chat object itself
850
851
 
851
852
  print("\n--- Starting Interactive Chat with Gemini ---")
852
- print("Type /q to quit, /help or /? for help, /patch to request a diff patch.")
853
+ print("Type /q to quit, /help or /? for help, /review to make clear summary, /patch to request a diff patch.")
853
854
 
854
855
  # Send the initial prompt using send_message_stream
855
856
  print("\n🤖 Gemini:")
856
857
  full_response_text = ""
857
858
  # Use send_message_stream for streaming responses
858
- response_stream = chat.send_message_stream(initial_prompt)
859
+ response_stream = chat.send_message_stream(initial_prompt, config=config)
859
860
  for chunk in response_stream:
860
861
  print(chunk.text, end="", flush=True)
861
862
  full_response_text += chunk.text
@@ -883,6 +884,8 @@ def start_chat_session(initial_prompt: str):
883
884
  # Extract message before /patch
884
885
  user_message = user_input[:-len('/patch')].strip()
885
886
  print(f"\n🛠️ Requesting patches... (Context: '{user_message}' if provided)")
887
+ elif user_input.lower() == '/review':
888
+ user_message = user_input = "Review and reflect on the solution. Summarize and write a minimal, complete set of changes needed for the solution. Do not use + and - style diff. Instead use comments to point where to place the code. Make it easy to copy and paste the solution."
886
889
  elif not user_input:
887
890
  continue # Ignore empty input
888
891
  else:
@@ -913,7 +916,8 @@ def start_chat_session(initial_prompt: str):
913
916
  patch_request_prompt,
914
917
  config=GenerateContentConfig(
915
918
  response_schema=SimplePatchArgs.model_json_schema(),
916
- response_mime_type='application/json'
919
+ response_mime_type='application/json',
920
+ temperature=0.0
917
921
  )
918
922
  )
919
923
 
@@ -995,6 +999,7 @@ def start_chat_session(initial_prompt: str):
995
999
  print("🤖 Gemini: Available commands:")
996
1000
  print(" /q - Quit the chat session.")
997
1001
  print(" /patch - Request a diff patch (not fully implemented yet).")
1002
+ print(" /review - Pre-fill input with a review/summary prompt template.")
998
1003
  print(" /help or /? - Show this help message.")
999
1004
  print("-" * 20)
1000
1005
  continue
@@ -1005,7 +1010,7 @@ def start_chat_session(initial_prompt: str):
1005
1010
  full_response_text = ""
1006
1011
  try:
1007
1012
  # Use send_message_stream for subsequent messages
1008
- response_stream = chat.send_message_stream(user_input)
1013
+ response_stream = chat.send_message_stream(user_input, config=config)
1009
1014
  for chunk in response_stream:
1010
1015
  print(chunk.text, end="", flush=True)
1011
1016
  full_response_text += chunk.text
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kopipasta
3
- Version: 0.24.0
3
+ Version: 0.25.0
4
4
  Summary: A CLI tool to generate prompts with project structure and file contents
5
5
  Home-page: https://github.com/mkorpela/kopipasta
6
6
  Author: Mikko Korpela
@@ -0,0 +1,8 @@
1
+ kopipasta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ kopipasta/main.py,sha256=U4_31xXY2xzYZ-Exm1B6TYzofHfH3NU4iEq6XBHyBj0,53647
3
+ kopipasta-0.25.0.dist-info/LICENSE,sha256=xw4C9TAU7LFu4r_MwSbky90uzkzNtRwAo3c51IWR8lk,1091
4
+ kopipasta-0.25.0.dist-info/METADATA,sha256=03L8Zbl0k7pgrrSxL-_DsWbIT-zTRFkENabTcC1MHmo,8610
5
+ kopipasta-0.25.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6
+ kopipasta-0.25.0.dist-info/entry_points.txt,sha256=but54qDNz1-F8fVvGstq_QID5tHjczP7bO7rWLFkc6Y,50
7
+ kopipasta-0.25.0.dist-info/top_level.txt,sha256=iXohixMuCdw8UjGDUp0ouICLYBDrx207sgZIJ9lxn0o,10
8
+ kopipasta-0.25.0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- kopipasta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- kopipasta/main.py,sha256=iJFQFiN-3udjud2byspXl8RZwZnTg6FPw_HW1exjPbg,53035
3
- kopipasta-0.24.0.dist-info/LICENSE,sha256=xw4C9TAU7LFu4r_MwSbky90uzkzNtRwAo3c51IWR8lk,1091
4
- kopipasta-0.24.0.dist-info/METADATA,sha256=EiMoa_TkI-4SMaMiyiUqroXAvwz1JFM8_ECINOw4fZM,8610
5
- kopipasta-0.24.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6
- kopipasta-0.24.0.dist-info/entry_points.txt,sha256=but54qDNz1-F8fVvGstq_QID5tHjczP7bO7rWLFkc6Y,50
7
- kopipasta-0.24.0.dist-info/top_level.txt,sha256=iXohixMuCdw8UjGDUp0ouICLYBDrx207sgZIJ9lxn0o,10
8
- kopipasta-0.24.0.dist-info/RECORD,,