Neurons IO, image! Command & Prompt History

Neurons become portable with import/export bundles, inline AI image generation lands in chat, and a new prompt history editor lets you correct and replay past AI interactions.

Neurons import/export — the .neurons format

Neurons are named chunks of text injected into the AI's system prompt when active — a coding style guide, a persona definition, a domain glossary. Until now they were room-local. With this update, neurons can be exported as a .neurons JSON bundle and imported into any room via drag-and-drop.

NeuronIO.tsx is a new tab in the NeuronPanel that handles the entire import/export flow. On the backend, neuron-io.service.ts validates and upserts the imported neurons in one transaction. This means a team can maintain a shared set of AI context — shared coding conventions, a domain vocabulary, a persona — and distribute it as a file anyone can drop into their room.

The .neurons format is the first exportable artifact in GroupGPT. It makes rooms reproducible and shareable at the AI-context level, not just the message level. A well-curated neuron bundle is effectively a portable AI personality for your room.

The image! command

Type image! followed by a prompt and GroupGPT calls an image generation model via OpenRouter, returning the result inline in the chat as a rendered image. The image URL is stored in message metadata so it persists in history — scrolling back or rejoining the room shows the image, not a broken placeholder.

This completes the trio of power commands alongside search! (Tavily web search) and code! (multi-file scaffold generation). All three follow the same pattern: a prefix triggers a specialized AI workflow, the result renders inline with its own display style, and the output is persisted with the message.

Railway session restore

On Railway's infrastructure, server processes restart more aggressively than in local development. Sessions weren't being reconstructed after a restart, so users in private rooms would get "no active room" errors until they manually re-joined.

The fix reconstructs session state from the database on socket reconnect whenever no in-memory session is found for the sessionId provided by the client. The session is rebuilt from the persisted room membership, the user re-joins the correct Socket.io room, and the reconnect is transparent to the user. This was a production reliability bug causing real user confusion on the shared Railway deployment.

Prompt history & the correction loop

A new "History" tab in the NeuronPanel shows all AI responses logged for the room, with the tools used (search, scaffold, image generation) noted alongside each entry. Users can edit logged prompts and responses — corrections are written back to the prompt_logs table and fed back into the AI's context as training examples.

Backend: prompt-log.service.ts with get_prompt_logs and update_prompt_log socket events. This creates a lightweight human-in-the-loop feedback loop: if the AI gave a wrong answer, you fix it once and that correction influences future responses in the same room.

Why it matters

The .neurons format changes the product category. GroupGPT rooms aren't just group chats with an AI anymore — they're reusable, shareable AI environments with portable context. You can build a highly tuned room for a specific project and hand the configuration to a teammate as a single file. Combined with prompt history correction, the AI in your room gets incrementally better the more you use it.