kopipasta 0.6.0__tar.gz → 0.8.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kopipasta
3
- Version: 0.6.0
3
+ Version: 0.8.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
@@ -374,11 +374,14 @@ def select_file_patches(file_path):
374
374
  break
375
375
  elif choice == 'n':
376
376
  placeholder = get_placeholder_comment(language)
377
- chunks.append(placeholder)
377
+ if chunks and chunks[-1] != placeholder:
378
+ chunks.append(placeholder)
378
379
  total_char_count += len(placeholder)
379
380
  break
380
381
  elif choice == 'q':
381
382
  print("Skipping the rest of the file.")
383
+ if chunks and chunks[-1] != placeholder:
384
+ chunks.append(placeholder)
382
385
  return chunks, total_char_count
383
386
  else:
384
387
  print("Invalid choice. Please enter 'y', 'n', or 'q'.")
@@ -516,8 +519,13 @@ def process_directory(directory, ignore_patterns, current_char_count=0):
516
519
  continue
517
520
 
518
521
  selected_files, current_char_count = select_files_in_directory(root, ignore_patterns, current_char_count)
519
- full_paths = [(os.path.join(root, f), use_snippet) for f, use_snippet in selected_files]
520
- files_to_include.extend(full_paths)
522
+ for file_tuple in selected_files:
523
+ if len(file_tuple) == 3:
524
+ f, use_snippet, chunks = file_tuple
525
+ files_to_include.append((os.path.join(root, f), use_snippet, chunks))
526
+ else:
527
+ f, use_snippet = file_tuple
528
+ files_to_include.append((os.path.join(root, f), use_snippet))
521
529
  processed_dirs.add(root)
522
530
 
523
531
  return files_to_include, processed_dirs, current_char_count
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kopipasta
3
- Version: 0.6.0
3
+ Version: 0.8.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
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="kopipasta",
8
- version="0.6.0",
8
+ version="0.8.0",
9
9
  author="Mikko Korpela",
10
10
  author_email="mikko.korpela@gmail.com",
11
11
  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