Codumentor logo Codumentor

Auto Title Plugin

The Auto Title plugin gives each conversation a meaningful, LLM-generated title
automatically — and, optionally, watches for the discussion drifting away from
that title and suggests a fresh one.

Status: explorative. Automatic re-titling on topic shift is an
experimental UX. Defaults are conservative (first-turn naming on, topic-shift
retitling off); tune to taste.

Overview

  1. First-turn naming (always on by default). When a conversation that has no title finishes its first turn, the plugin sends the user's message and the assistant's response to the LLM and renames the conversation to the result. The title is generated in the same language the user wrote in — the LLM is always instructed to match the user's language.
  2. Topic-shift retitling (opt-in). After each subsequent turn it shows the LLM the current title plus the last N exchanges and asks whether the topic has shifted significantly. This check is skipped for short conversations (below min_context_chars_for_shift, default 10 000 chars) to avoid spurious warnings. If a shift is detected, it renames the conversation and posts a transcript card pointing out the shift and suggesting that starting a new conversation for the new topic usually gives better results.

The rename is broadcast as a conversation.renamed event, so the sidebar (and
any other open tab) updates live — no refresh needed.

How it works

Configuration

plugins:
  - module: codumentor.plugins.auto_title
    class: AutoTitlePlugin
    priority: 80
    args:
      enabled: true
      name_after_first_turn: true
      max_title_chars: 60
      extra_instruction: ""
      rename_on_topic_shift: false
      topic_shift_turns: 2
      min_context_chars_for_shift: 10000
      model_role: auto_title
      temperature: 0.3
      max_tokens: 200

Configuration Parameters

KeyTypeDefaultDescription
enabledbooltrueMaster switch for the plugin.
name_after_first_turnbooltrueGenerate an initial title once an untitled conversation finishes its first turn.
max_title_charsint60Hard cap on generated title length (characters). Clamped to ≥ 10.
extra_instructionstring""Extra guidance appended to the prompts — e.g. a preferred style or a non-English language ("Always answer in Hungarian.").
rename_on_topic_shiftboolfalseAfter each turn, ask the LLM whether the topic drifted; if so, retitle and show a card.
topic_shift_turnsint2How many recent (user, assistant) exchanges to show the LLM when judging a shift. Clamped to ≥ 1.
min_context_chars_for_shiftint10000Minimum total conversation context (characters) before topic-shift detection is attempted. Prevents spurious shift warnings on short conversations. Set to 0 to always check.
model_rolestringauto_titleModel-profile role used for the LLM calls. Falls back to the global agent model when the role is not configured.
temperaturefloat0.3Sampling temperature for the LLM calls.
max_tokensint200Max tokens for the LLM calls.

The topic-shift card

When a shift is detected, the plugin emits a plugin.auto_title.topic_shift
event. It renders with the generic plugin-card renderer (no custom UI bundle):

Notes & limitations