Skip to content

pantoken / ai/pantoken-ai/src / installAgentAssets

ฟังก์ชัน: installAgentAssets()

installAgentAssets(tool, dir?): string[]

อัลฟา

เขียนแอสเซ็ตของ pantoken agent สำหรับเครื่องมือไปยัง repository ของผู้ใช้

พารามิเตอร์

tool

AgentTool | "all"

AgentTool เฉพาะ AgentTool หรือ "all" สำหรับทุกแอสเซ็ต

dir?

string = "."

ไดเรกทอรีเป้าหมาย (ค่าปริยาย ".")

คืนค่า

string[]

พาธที่ถูกเขียน

ตัวอย่าง

ติดตั้งแอสเซ็ตของเครื่องมือหนึ่งชุดลงในรีโป

ts
import { installAgentAssets } from "@pantoken/ai";

const written = installAgentAssets("cursor", "./my-app");
// → ["my-app/.cursor/rules/pantoken.mdc"]

ติดตั้งแอสเซ็ตทั้งหมดลงในไดเรกทอรีปัจจุบัน

ts
import { installAgentAssets } from "@pantoken/ai";

installAgentAssets("all");
// writes AGENTS.md, llms.txt, and the Cursor/Copilot/Windsurf/Claude assets