feat(coding-agent): add configurable title system prompt for sessions

- add discovery of `TITLE_SYSTEM.md` and pass it through interactive startup context
- route custom title prompts to online and local tiny title generators via protocol
- update session-title docs and changelog with override behavior
- add tests for prompt discovery, forwarding, and fallback to bundled title prompts
This commit is contained in:
Adryel Dearo
2026-06-10 08:31:32 +02:00
committed by can1357
parent 96defff9a5
commit ecbc2a3c15
15 changed files with 232 additions and 19 deletions
@@ -260,6 +260,7 @@ export class InteractiveMode implements InteractiveModeContext {
keybindings: KeybindingsManager;
agent: Agent;
historyStorage?: HistoryStorage;
titleSystemPrompt?: string;
ui: TUI;
chatContainer: TranscriptContainer;
@@ -382,6 +383,7 @@ export class InteractiveMode implements InteractiveModeContext {
lspServers: LspStartupServerInfo[] | undefined = undefined,
mcpManager?: import("../mcp").MCPManager,
eventBus?: EventBus,
titleSystemPrompt?: string,
) {
this.session = session;
this.sessionManager = session.sessionManager;
@@ -394,6 +396,7 @@ export class InteractiveMode implements InteractiveModeContext {
this.lspServers = lspServers;
this.mcpManager = mcpManager;
this.#eventBus = eventBus;
this.titleSystemPrompt = titleSystemPrompt;
if (eventBus) {
this.#eventBusUnsubscribers.push(
eventBus.on(LSP_STARTUP_EVENT_CHANNEL, data => {