Skip to content

[Feature Request]: opencode support #180

Description

@wufei-png

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do?

我们团队有一个想法就是直接用opencode serve的方式暴露自己设计出来的agent,这样有一些好处:

  1. opencode的项目持久追踪更新
  2. 自定义agent提示词比较方便,且可以操作自动提pr
  3. 所有解析代码的方式用opencode 的mcp工具以及原生grep方式实现,简洁高效,甚至可以通过提前设置本地repo来实现自动提mr(实测需要opus 4.6 能做mr,差一些的模型可能要subagent 做一个mr agent)
  4. 如果想要多轮对话,可以opencode web启动可视化页面,直接找到之前的自动触发的mr聊天记录继续聊。

而该项目兼容了多种webhook,如飞书,gitlab,比较合适作为base开发

这是我的提示词
code-reviewer.md

开发的提示词:

现在webhook拿到信息后,希望将请求发送到 opencode serve 命令运行的的后端api,agent指定为 /Users/wufei2/.config/opencode/opencode.json 中的code-reviewer,agent名设置为env中的变量
请求内容固定为: review this mr: https://github.com/sgl-project/sglang/pull/18918

调研方案并实现。
然后给出重新部署这个项目的方式,用于测试。

本来打算单独维护一个repo,不过实现的时候做了兼容,现在有两个bool 分别控制 是否发送给opencode以及当前流程的llm,实现了兼容,因此可以考虑提一个mr,看您是否对这个feat感兴趣

Proposed workflow

  1. Go to ....
  2. Press ....
  3. ...

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions