Skip to content

Commit 3a3ee3e

Browse files
committed
🇺🇸 Context
1 parent 3fab198 commit 3a3ee3e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎scripts/wtf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def main():
7878
pyperclip.copy(clipboard)
7979

8080
# Trim history
81-
history = "Terminal: " + history[-10000:].strip()
81+
history = history[-9000:].strip()
8282

8383
# Remove any trailing spinner commands
8484
spinner_commands = [
@@ -139,6 +139,9 @@ def get_lines_from_file(filename, line_number):
139139
lines = get_lines_from_file(filename, line_number)
140140
result.append({"filename": filename, "text": "\n".join(lines)})
141141

142+
if result != []:
143+
history = "Terminal: " + history
144+
142145
# Add context
143146
for entry in result:
144147
history = f"""File: {entry["filename"]}\n{entry["text"]}\n\n""" + history

0 commit comments

Comments
 (0)