import CodeEditor from '@/components/CodeEditor' import { Heading } from '@/components/Heading' import { useLanguage } from '@/i18n/context' export default function Instructions() { const { isZh } = useLanguage() return (
{isZh ? '通过 instructions 配置,为 AI 注入系统级指导和页面级上下文,让它更好地理解你的业务场景。' : 'Use the instructions config to inject system-level directives and page-specific context, helping the AI better understand your application.'}
{/* System Instructions */}{isZh ? '全局提示词,应用于所有任务。定义 AI 的角色、工作风格和行为边界。' : "Global directives applied to all tasks. Define the AI's role, working style, and behavioral boundaries."}
{isZh ? '动态回调函数,在每个 step 执行前调用,根据当前页面 URL 返回特定提示词。适用于为不同页面提供针对性的操作引导。' : 'A dynamic callback invoked before each step. Returns page-specific instructions based on the current URL. Useful for providing targeted guidance on different pages.'}
{isZh ? '在每个执行步骤之前,page-agent 会将 instructions 拼接到用户提示词中:' : 'Before each execution step, page-agent prepends the instructions to the user prompt:'}