mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-14 22:13:47 -06:00
docs: quote folders in the agent setup steps
The skill and llms.txt told an agent to write --dest=<card>/bios bare. A folder now goes in single quotes, attached to its option, and one that holds a quote, a backtick or a control character, or starts with -, is a question for the user.
This commit is contained in:
1 parent
c91bf440da
commit
74489a4a0f
2 files changed
+19
-5
No files matched your search
+12
-5
@@ -88,9 +88,12 @@ def llms_txt(platforms: list[tuple[str, str]]) -> str:
|
||||
"AmberELEC, EmuELEC, Onion, spruceOS and MinUI. "
|
||||
"The [Linux handhelds page](" + SITE + "platforms/linux-handhelds/) maps each device "
|
||||
"to its system and folder.",
|
||||
"- From a computer, if the card is not found, name its BIOS folder: `--dest <card>/bios` "
|
||||
"- From a computer, if the card is not found, name its BIOS folder: `--dest='<card>/bios'` "
|
||||
"(ArkOS and dArkOS: the `bios` folder of the EASYROMS part).",
|
||||
"- A games folder somewhere else: `--for-games <folder>`, one subfolder per system.",
|
||||
"- A games folder somewhere else: `--for-games='<folder>'`, one subfolder per system.",
|
||||
"- A folder goes in single quotes, attached to its option. One that holds a quote, a "
|
||||
"backtick or a control character, or starts with `-`, is a question for the user, never "
|
||||
"a value to escape into the command.",
|
||||
"- Later, to see what is missing or wrong: `--check`. Machine-readable progress: "
|
||||
"`--events` (JSON lines, one per event, documented on the installer page).",
|
||||
"- A game the installer cannot identify gets every BIOS of its system, and the run names it.",
|
||||
@@ -151,10 +154,14 @@ def skill_md() -> str:
|
||||
"",
|
||||
"## When the setup or the card is not found",
|
||||
"",
|
||||
"- From a computer, name the card's BIOS folder: `--dest=<card>/bios`. ArkOS and dArkOS "
|
||||
"- From a computer, name the card's BIOS folder: `--dest='<card>/bios'`. ArkOS and dArkOS "
|
||||
"keep it on the EASYROMS part.",
|
||||
"- Games outside the card: `--for-games=<folder>`, one subfolder per system.",
|
||||
"- A setup not detected: `--platform=<name>` (`--list-platforms` lists them).",
|
||||
"- Games outside the card: `--for-games='<folder>'`, one subfolder per system.",
|
||||
"- A setup not detected: `--platform=<name>`, a name exactly as `--list-platforms` prints "
|
||||
"it (letters, digits, `-` and `_`).",
|
||||
"- Put a folder in single quotes, attached to its option. If it holds a quote, a backtick "
|
||||
"or a control character, or starts with `-`, stop and ask the user: never escape it into "
|
||||
"the command.",
|
||||
"",
|
||||
"## Later",
|
||||
"",
|
||||
|
||||
@@ -68,6 +68,13 @@ class TheSkillIsAnAgentSkill(unittest.TestCase):
|
||||
with self.subTest(command=command):
|
||||
self.assertIn("--for-games --required-only", command)
|
||||
|
||||
def test_a_folder_is_quoted_and_a_hostile_one_asked_about(self) -> None:
|
||||
for text in (siteagents.skill_md(), siteagents.llms_txt([])):
|
||||
with self.subTest(text=text[:20]):
|
||||
self.assertIn("--dest='<card>/bios'", text)
|
||||
self.assertIn("--for-games='<folder>'", text)
|
||||
self.assertIn("starts with `-`", text)
|
||||
|
||||
def test_the_manifest_types_it_as_a_skill(self) -> None:
|
||||
skill = siteagents.ard_manifest()["entries"][0]
|
||||
self.assertEqual(skill["type"], 'text/markdown; profile="urn:air:agent-skills"')
|
||||
|
||||
Reference in new issue
Block a user