Skip to content

增加Opencode的转接层逻辑,可以让Opencode使用本项目#61

Closed
LeXwDeX wants to merge 5 commits intowin4r:mainfrom
LeXwDeX:main
Closed

增加Opencode的转接层逻辑,可以让Opencode使用本项目#61
LeXwDeX wants to merge 5 commits intowin4r:mainfrom
LeXwDeX:main

Conversation

@LeXwDeX
Copy link

@LeXwDeX LeXwDeX commented Mar 6, 2026

基本上使用了UP主的所有lanceDB的接口,然后目前采用的是硬编码的方式进行记忆的,匹配文件,语言还有语言中的关键词。

理想的情况下是可以让大模型自主进行选择性记忆(类似于claude-mem),然后强制召回插入到对话。(这部分我在看opencode是否能让我hook主,做成opencode的agent,还在尝试。)

安装方法

  1. 克隆本项目到本地;
  2. 打开opencode访问本项目;
  3. 让opencode阅读 ./opencode/ 让AI安装到opencode插件中;
  4. 配置ollama的embedding或线上api,目前默认是ollama;
  5. opencode中说测试lanceDB验证工作是否正常。

请UP主弄一个opencode的git分支;我这边往那边提交。

lex and others added 4 commits March 5, 2026 14:56
Store durable architecture/contract/data/reliability knowledge synchronously and prioritize inheritance relationships across languages. Keep recall frequent but precision-filtered with mandatory noise filtering and metadata-aware output.
@rwmjhb
Copy link
Collaborator

rwmjhb commented Mar 6, 2026

Hi @LeXwDeX 👋

感谢你的贡献!非常高兴看到社区为 memory-lancedb-pro 增加 OpenCode 适配层的工作。

我已经创建了 opencode 分支,请将这个 PR 的目标分支(base branch)改为 opencode,这样我们可以在独立分支上迭代,不影响主线。

在 review 过程中发现两个小问题,建议调整一下:

  1. OpenCode/config.jsonconfig.example.json 内容完全一致 — 建议只保留 config.example.json 作为模板,将 config.json 加入 .gitignore,避免用户的实际配置(可能包含 API key 等敏感信息)被提交到仓库。

  2. 缺少测试 — 目前适配层没有对应的测试覆盖,后续建议补充基本的单元测试(比如配置解析、工具注册等),确保功能稳定。这个不急,可以在后续 PR 中补充。

整体思路和结构看起来不错,期待后续完善!🎉

@LeXwDeX LeXwDeX closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants