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
@@ -467,6 +467,7 @@ export class InputController {
this.ctx.session.sessionId,
this.ctx.session.model,
provider => this.ctx.session.agent.metadataForProvider(provider),
this.ctx.titleSystemPrompt,
)
.then(async title => {
// Re-check: a concurrent attempt for an earlier message may have
@@ -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 => {
+1
View File
@@ -99,6 +99,7 @@ export interface InteractiveModeContext {
historyStorage?: HistoryStorage;
mcpManager?: MCPManager;
lspServers?: LspStartupServerInfo[];
titleSystemPrompt?: string;
// State
isInitialized: boolean;