From 29e34119a25b6d1e76f2b495d04912a6a77a0781 Mon Sep 17 00:00:00 2001 From: Scott Hu Date: Thu, 9 Jul 2026 14:30:43 +0800 Subject: [PATCH 1/4] docs: modify agent promots --- docs/src/components/home/agentPrompt.ts | 114 ++++++++------- .../presets/ai-doc/SKILL.md.handlebars | 2 +- pnpm-lock.yaml | 131 +++++++++++------- 3 files changed, 144 insertions(+), 103 deletions(-) diff --git a/docs/src/components/home/agentPrompt.ts b/docs/src/components/home/agentPrompt.ts index eceecdbd..0ee4f921 100644 --- a/docs/src/components/home/agentPrompt.ts +++ b/docs/src/components/home/agentPrompt.ts @@ -1,51 +1,63 @@ -const PREDEFINED_CLIENTS = ['alova', 'axios', 'fetch', 'ky'] as const - -export const AGENT_PROMPT = `Install the worma-guidelines skill and the worma npm package, then configure worma for this project. - -**Step 1: Install** -\`\`\`bash -npx skills add alovajs/skills --skill worma-guidelines -npm i wormajs -D -\`\`\` - -**Step 2: Detect HTTP client** -Check \`package.json\` for an already installed HTTP client among: ${PREDEFINED_CLIENTS.join(', ')}. -- If found, use that client's worma template (e.g. axios → \`axios()\`, fetch → \`fetch()\`). -- If none found, install alova (\`npm i alova\`) and default to the \`alova()\` template. - -**Step 3: Ask the user for their API setup** -Before configuring, ask: -- What is the OpenAPI data source URL? -- Which platform or source type are they using? - - Swagger / Knife4j / FastAPI → use the \`platform()\` plugin - - Apifox → use the \`apifox()\` plugin (needs projectId and apifoxToken) - - Direct OpenAPI file URL → use \`input\` directly - -**Step 4: Initialize config** -Run \`npx worma init -T