0
30
近 7 天 8
27.5
生态多维模型
1 个月前
2026-07-15
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-rename-chat@0.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-rename-chat@0.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-rename-chatopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode plugin that lets you rename chat sessions from within the conversation.
Why?
OpenCode auto-generates chat titles using a small model, but conversations evolve. What starts as "fix login bug" becomes "refactor auth middleware + write tests." The auto-title sticks with the first topic forever.
This plugin registers a rename_chat tool that the AI (or you) can call to update the session title at any point — keeping your session list readable and accurate.
Bonus: you can embed status markers like [DONE], [REVIEW], [WIP] in titles.
Install
npm (global)
npm install -g opencode-rename-chat
Then add to your opencode config (~/.config/opencode/opencode.json):
{
"plugin": ["opencode-rename-chat"]
}
Manual (drop-in file)
Copy rename-chat.ts to ~/.config/opencode/plugins/rename-chat.ts and restart opencode.
Usage
Just say it:
"rename this chat to CDIS: fix facility audit history [DONE]"
Or the AI will call the tool automatically when you ask to rename.
The tool can also be invoked directly: rename_chat with argument name.
How it works
Calls opencode's internal REST API at PATCH /session/{id} with the new title. No external services, no telemetry. Runs entirely within your opencode instance.
License
MIT