mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:11:23 +00:00
revert(agents): remove llms.txt discovery prompt (#19192)
This commit is contained in:
@@ -147,23 +147,6 @@ function buildVoiceSection(params: { isMinimal: boolean; ttsHint?: string }) {
|
||||
return ["## Voice (TTS)", hint, ""];
|
||||
}
|
||||
|
||||
function buildLlmsTxtSection(params: { isMinimal: boolean; availableTools: Set<string> }) {
|
||||
if (params.isMinimal) {
|
||||
return [];
|
||||
}
|
||||
if (!params.availableTools.has("web_fetch")) {
|
||||
return [];
|
||||
}
|
||||
return [
|
||||
"## llms.txt Discovery",
|
||||
"When exploring a new domain or website (via web_fetch or browser), check for an llms.txt file that describes how AI agents should interact with the site:",
|
||||
"- Try `/llms.txt` or `/.well-known/llms.txt` at the domain root",
|
||||
"- If found, follow its guidance for interacting with that site's content and APIs",
|
||||
"- llms.txt is an emerging standard (like robots.txt for AI) — not all sites have one, so don't warn if missing",
|
||||
"",
|
||||
];
|
||||
}
|
||||
|
||||
function buildDocsSection(params: { docsPath?: string; isMinimal: boolean; readToolName: string }) {
|
||||
const docsPath = params.docsPath?.trim();
|
||||
if (!docsPath || params.isMinimal) {
|
||||
@@ -557,7 +540,6 @@ export function buildAgentSystemPrompt(params: {
|
||||
messageToolHints: params.messageToolHints,
|
||||
}),
|
||||
...buildVoiceSection({ isMinimal, ttsHint: params.ttsHint }),
|
||||
...buildLlmsTxtSection({ isMinimal, availableTools }),
|
||||
];
|
||||
|
||||
if (extraSystemPrompt) {
|
||||
|
||||
Reference in New Issue
Block a user