Repository navigation
0.8.9
Adds automatic session titles and processing of complete user messages, including attachments and metadata.
New features
- Automatic session titles. Conversations backed by a
NeuronInteraction\Session\Sessionreceive a title after successful turns. Titles appear in/resume. Generation runs in the background and makes an additional AI request, with at most three attempts per session. Existing titles are preserved. - Complete user messages. Drafts, queued messages and input history preserve attachments and metadata alongside text. Non-text content is represented with placeholders in the conversation.
- File-reference example. Run
composer messagesfromexamples/and tryExplain @composer.json. The processor adds file contents for the Agent while displaying the original input.
Breaking API changes
User-message processors now belong to Neuron Interaction:
use NeuronInteraction\Message\UserMessageProcessorInterface;
public function forAgent(UserMessage $message): UserMessage;
public function forDisplay(UserMessage $message): UserMessage;Replace the previous NeuronTui\Conversation\UserMessageProcessorInterface, whose methods accepted and returned strings. Return new messages without modifying the original message or its content blocks.
Tui::addUserMessageProcessor() has been removed. Register processors in a collection and inject it:
$processors = (new UserMessageProcessors())->addProcessor([
new MyProcessor(),
]);
Tui::make(
$agent,
userMessageProcessors: $processors,
)->run();Preparation follows registration order; display processing follows reverse order. Commands and command-generated prompts bypass preparation. Selection labels are no longer passed through message processors.
This release requires Neuron Interaction ~0.8.7, which also changes these APIs:
- Commands: create an empty collection, then register commands with
addCommand():$commands = (new Commands())->addCommand([ new ClearCommand(), new ResumeCommand(), ]);
- Command-generated prompts:
promptAgent()now accepts aUserMessage:$adapter->promptAgent(new UserMessage($prompt));
- Input history:
record()andolder()acceptUserMessageobjects; navigation andentries()return messages instead of strings. Previously persisted string-based input history requires migration or a reset. - Session summaries: titles can be
null. Custom session listings should provide a fallback, such asNew session.