kopipasta 0.24.0__tar.gz → 0.25.0__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.
Potentially problematic release.
This version of kopipasta might be problematic. Click here for more details.
- {kopipasta-0.24.0/kopipasta.egg-info → kopipasta-0.25.0}/PKG-INFO +1 -1
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta/main.py +10 -5
- {kopipasta-0.24.0 → kopipasta-0.25.0/kopipasta.egg-info}/PKG-INFO +1 -1
- {kopipasta-0.24.0 → kopipasta-0.25.0}/setup.py +1 -1
- {kopipasta-0.24.0 → kopipasta-0.25.0}/LICENSE +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/MANIFEST.in +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/README.md +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta/__init__.py +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta.egg-info/SOURCES.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta.egg-info/dependency_links.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta.egg-info/entry_points.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta.egg-info/requires.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/kopipasta.egg-info/top_level.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/requirements.txt +0 -0
- {kopipasta-0.24.0 → kopipasta-0.25.0}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -10,7 +10,7 @@ with open("requirements.txt", "r", encoding="utf-8") as f:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="kopipasta",
|
|
13
|
-
version="0.
|
|
13
|
+
version="0.25.0",
|
|
14
14
|
author="Mikko Korpela",
|
|
15
15
|
author_email="mikko.korpela@gmail.com",
|
|
16
16
|
description="A CLI tool to generate prompts with project structure and file contents",
|
|
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
|