mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue