chore: collapse multi-line argument definitions into single lines across multiple modules
This commit is contained in:
+5
-15
@@ -95,9 +95,7 @@ def handle_command(assistant, command):
|
||||
print(f"{Colors.BOLD}Available Tools:{Colors.RESET}")
|
||||
for tool in get_tools_definition():
|
||||
func = tool["function"]
|
||||
print(
|
||||
f" • {Colors.CYAN}{func['name']}{Colors.RESET}: {func['description']}"
|
||||
)
|
||||
print(f" • {Colors.CYAN}{func['name']}{Colors.RESET}: {func['description']}")
|
||||
|
||||
elif cmd == "/review" and len(command_parts) > 1:
|
||||
filename = command_parts[1]
|
||||
@@ -168,9 +166,7 @@ def handle_command(assistant, command):
|
||||
def review_file(assistant, filename):
|
||||
result = read_file(filename)
|
||||
if result["status"] == "success":
|
||||
message = (
|
||||
f"Please review this file and provide feedback:\n\n{result['content']}"
|
||||
)
|
||||
message = f"Please review this file and provide feedback:\n\n{result['content']}"
|
||||
from pr.core.assistant import process_message
|
||||
|
||||
process_message(assistant, message)
|
||||
@@ -181,9 +177,7 @@ def review_file(assistant, filename):
|
||||
def refactor_file(assistant, filename):
|
||||
result = read_file(filename)
|
||||
if result["status"] == "success":
|
||||
message = (
|
||||
f"Please refactor this code to improve its quality:\n\n{result['content']}"
|
||||
)
|
||||
message = f"Please refactor this code to improve its quality:\n\n{result['content']}"
|
||||
from pr.core.assistant import process_message
|
||||
|
||||
process_message(assistant, message)
|
||||
@@ -354,9 +348,7 @@ def show_conversation_history(assistant):
|
||||
for conv in history:
|
||||
import datetime
|
||||
|
||||
started = datetime.datetime.fromtimestamp(conv["started_at"]).strftime(
|
||||
"%Y-%m-%d %H:%M"
|
||||
)
|
||||
started = datetime.datetime.fromtimestamp(conv["started_at"]).strftime("%Y-%m-%d %H:%M")
|
||||
print(f"\n • {Colors.CYAN}{conv['conversation_id']}{Colors.RESET}")
|
||||
print(f" Started: {started}")
|
||||
print(f" Messages: {conv['message_count']}")
|
||||
@@ -536,9 +528,7 @@ def show_session_output(assistant, session_name):
|
||||
for line in output:
|
||||
print(line)
|
||||
else:
|
||||
print(
|
||||
f"{Colors.YELLOW}No output available for session '{session_name}'{Colors.RESET}"
|
||||
)
|
||||
print(f"{Colors.YELLOW}No output available for session '{session_name}'{Colors.RESET}")
|
||||
except Exception as e:
|
||||
print(f"{Colors.RED}Error getting session output: {e}{Colors.RESET}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user