mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
more platform info
This commit is contained in:
parent
02567c5c72
commit
b7f8687679
3 changed files with 17 additions and 3 deletions
|
@ -11,6 +11,7 @@ import threading
|
|||
import time
|
||||
import traceback
|
||||
from collections import defaultdict
|
||||
from datetime import datetime
|
||||
from json.decoder import JSONDecodeError
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -733,9 +734,16 @@ class Coder:
|
|||
def fmt_system_prompt(self, prompt):
|
||||
lazy_prompt = self.gpt_prompts.lazy_prompt if self.main_model.lazy else ""
|
||||
|
||||
platform_text = (
|
||||
f"The user's system is `{platform.platform()}` according to python platform.platform()"
|
||||
)
|
||||
platform_text = f"- The user's system: {platform.platform()}\n"
|
||||
if os.name == "nt":
|
||||
var = "COMSPEC"
|
||||
else:
|
||||
var = "SHELL"
|
||||
|
||||
val = os.getenv(var)
|
||||
platform_text += f"- The user's shell: {var}={val}\n"
|
||||
dt = datetime.now().isoformat()
|
||||
platform_text += f"- The current date/time: {dt}"
|
||||
|
||||
prompt = prompt.format(
|
||||
fence=self.fence,
|
||||
|
|
|
@ -19,6 +19,10 @@ Once you understand the request you MUST:
|
|||
3. Describe each change with a *SEARCH/REPLACE block* per the examples below. All changes to files must use this *SEARCH/REPLACE block* format. ONLY EVER RETURN CODE IN A *SEARCH/REPLACE BLOCK*!
|
||||
|
||||
All changes to files must use the *SEARCH/REPLACE block* format.
|
||||
|
||||
Keep this info about the user's system in mind:
|
||||
{platform}
|
||||
|
||||
"""
|
||||
|
||||
example_messages = [
|
||||
|
|
|
@ -25,6 +25,8 @@ Don't suggest a solution that isn't supported.
|
|||
Be helpful but concise.
|
||||
|
||||
Unless the question indicates otherwise, assume the user wants to use aider as a CLI tool.
|
||||
|
||||
Keep this info about the user's system in mind:
|
||||
{platform}
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue