尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

Hello Coder Agent

Hello Coder Agent Hello Coder Agent【免费下载链接】AionUi免费、本地、开源的 24/7 全天候 Cowork 应用以及适用于 Gemini CLI、Claude Code、Codex、OpenCode、Qwen Code、Goose CLI、Auggie 等的 OpenClaw | 喜欢就点star吧项目地址: https://gitcode.com/iOfficeAI/AionUiYou are a coding agent from the Hello World extension.CapabilitiesCode generation and refactoringCode review and best practicesBug identification and fixingGuidelinesWrite clean, well-documented codeFollow the projects coding standardsExplain your reasoning when making changes可见**面向通用对话的 assistant 强调个性与沟通姿态面向专项任务的 agent 强调能力边界与工作准则**。写 context 时先想清楚角色的对话场景再决定用“个性 行为”还是“能力 准则”的组织方式。 ### 3.3 第三行身份确认的兜底指令 text When asked about your identity, confirm that you are the Hello World Assistant from the Hello World Theme Extension.最后一行是典型的“兜底指令”当用户询问“你是谁/来自哪里”时助手必须确认自己来自Hello World Theme Extension注意这里文档沿用了“Theme Extension”的历史表述而当前扩展的 displayName 为 “Hello World Extension”见 aion-extension.json。这类指令的价值在于防止模型在长对话中“角色漂移”将助手的品牌归属显式固化便于用户在多个扩展助手之间辨识来源为 e2e 测试提供了稳定的可断言行为详见第五节。3.4 一句话总结编写范式从这 5 行可以提炼出通用模板You are the NAME, a ONE_LINE_ROLE_DESCRIPTION. Your personality is PERSONALITY. You BEHAVIOR_1 and BEHAVIOR_2. When asked about your identity, confirm that you are the NAME from the EXTENSION.替换尖括号内容即可生成一个结构完整、可被 AionUI 加载的助手上下文。四、更多佐证另一个 context 文件的对照仓库中的 e2e-full-extension/assistants/test-assistant-context.md 是同一机制的另一个示例You are the E2E Test Assistant. Your purpose is to validate that the extension system correctly loads and applies assistant presets. Always respond helpfully and confirm that you are the E2E Test Assistant when asked about your identity.它与 hello-assistant-context.md 结构同源身份声明 行为指令 身份确认但在声明处直接交代了“使命”Your purpose is to validate...。这印证了一个结论context 文件没有固定句式只要包含“身份锚点”与“行为指令”即可成立它对应的声明条目位于 e2e-full-extension/aion-extension.json其中presetAgentType为geminicontextFile指向assistants/test-assistant-context.md——与 hello-world 示例形成了“扩展内置类型geminivs 扩展提供类型ext-buddy”的对照。关于presetAgentType的底层含义可从 packages/desktop/src/process/utils/migrateAssistants.ts 的迁移逻辑看出端倪该函数负责对旧的presetAgentType做归一化处理其单元测试 tests/unit/assistants/migrateAssistants.test.ts 覆盖了gemini、claude、codex等运行时类型键。也就是说presetAgentType在应用内是对应真实 agent 运行时的类型键扩展使用ext-前缀如ext-buddy表示由扩展自身提供的运行时。五、加载与验证context 文件如何真正生效5.1 运行时 ID 前缀扩展贡献的助手在运行时会被加上扩展名限定前缀。证据来自 e2e 测试 tests/e2e/specs/ext-capabilities.e2e.tsconst assistantIds snapshot.assistants.map((item) item.id); expect(assistantIds).toEqual(expect.arrayContaining([ext-e2e-test-assistant, ext-hello-assistant]));【免费下载链接】AionUi免费、本地、开源的 24/7 全天候 Cowork 应用以及适用于 Gemini CLI、Claude Code、Codex、OpenCode、Qwen Code、Goose CLI、Auggie 等的 OpenClaw | 喜欢就点star吧项目地址: https://gitcode.com/iOfficeAI/AionUi创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表