docs: AgentEditor.update creates missing agents, but the plugin docs don't say so

未关闭 适合新手
#62,210 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@starke0o 已经在做这个了。

开始于 2026年11月6日。

  • #62420 来自 @starke0o —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
76/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
documentation

调研方向

从 /v2/docs/build/plugins/server 中的 Agent 部分开始,检查其中对 AgentEditor.update 的描述,并与 packages/core/src/agent.ts 中的行为进行比较。记录 update 会在 agent 不存在时创建它,并添加一个注册示例。完成标准是文档解释了这种 upsert 行为,并展示 plugin 如何注册新的 agent。

由索引模型根据 Issue 内容生成。

描述

The Agent section of /v2/docs/build/plugins/server lists AgentEditor with list/get/default/update/remove and describes update as editing an existing agent. In packages/core/src/agent.ts, update creates the agent when it doesn't exist (Info.default(id)), which is how plugins register new agents (#45841). Two duplicate requests for add() (#45841, #50404) came from this gap. Suggest documenting that update is an upsert and adding a "register a new agent" example.

主要语言
TypeScript
星标
224k
派生
30k
平均合并
4 小时 44 分钟
30 天内合并 PR
513

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。