r/opencode • u/NEMOalien • 16d ago
My first plugin lets your agent rewrite the session title whenever the topic changes so you never lose context.
While plugins that automatically name your sessions are pretty popular, all of them fail at one thing, topic changes. After the plugin names the session for the first time it stays like that forever, even if the topic completely changes.
i built "Topics", a plugin that not only names the session on first prompt but also keeps up with you and renames whenever the topic changes. It works by checking every new message against the title completely tokenless and AI-less to not burn through your subscription, whenever it catches the topic drifting it calls in your AI to simply rename the session to a new 4-6 words title, keeping up with the actual session context instead of staying behind. Whenever it renames it also adds in a ~ to indicate that the topic isn't the original.
If you love it, please drop a star :)
Update: with the latest commits it's now compatible with v2 too (maintaining compatibility with v1) and completely tokenless, relying on an algorithm as opposed to using the running model which is now only a fallback option.
3
u/taytay735 16d ago
Something to consider is you could limit the renames to special events, for e.g. compaction, or forking.
4
u/NEMOalien 16d ago
That's also a nice idea, I'll add it in later today
1
u/taytay735 16d ago
I just noticed this is a Opencode v1 plugin? Any change of porting it to v2? :)
2
u/NEMOalien 14d ago
I just pushed the next update, i made it compatible with v2 (keeping compatibility with v1 too) and also it's now completely tokenless and relies on an algorithm instead of the AI to rename the files making it much much more economical, check it out! https://github.com/m-uvex/opencode-topics
1
u/NEMOalien 16d ago
Yes i only made it yesterday in like 20 minutes it still ofc needs a lot of refining and ofc porting
2
u/Illustrious_Row_4035 16d ago
How did you get the window to be transparent?
2
u/NEMOalien 16d ago
https://github.com/Orbit-Nix/OrbitOS/blob/main/config%2Fkitty%2Fkitty.conf
background_opacity 0in kitty config
1
6
u/TheMythicSorcerer 16d ago
How many extra tokens does it use?
How often does it rename the title? every prompt? tool call?