Skip to content

feat(conversation): side conversation fork API#383

Open
taekchef wants to merge 4 commits into
iOfficeAI:mainfrom
taekchef:feat/side-conversation
Open

feat(conversation): side conversation fork API#383
taekchef wants to merge 4 commits into
iOfficeAI:mainfrom
taekchef:feat/side-conversation

Conversation

@taekchef

@taekchef taekchef commented Jun 1, 2026

Copy link
Copy Markdown

Summary

Adds the backend side-conversation fork API used by AionUi's side dock.

This PR provides the backend primitive for creating and restoring side child conversations from a parent conversation, with server-selected fork strategy.

API

POST /api/conversations/{id}/side

Creates a new side child conversation.

Request body:

  • guardrail?
  • initial_prompt?
  • forked_at_msg_id?

Response:

  • conversation_id
  • created: true
  • fork_mode: agent_fork or text_snapshot

GET /api/conversations/{id}/side

Lists existing side children for a parent conversation so the frontend can restore side tabs after reload.

Fork Policy

  • claude / opencode / vibe ACP backends -> agent_fork
  • codex, aionrs, and ACP backends without declared session/fork -> text_snapshot
  • OpenClaw / Nanobot / Remote / legacy gemini parent types are rejected by the backend and hidden by the frontend

Compatibility

  • New v0.2 side children inject parent context once at creation time.
  • Legacy children without fork_mode keep the previous per-turn enrich path.
  • Parent guardrail messages do not leak into child conversations.

Related Frontend PR

iOfficeAI/AionUi#3196

Testing

  • cargo fmt --all
  • cargo check --workspace
  • cargo test -p aionui-ai-agent --lib
  • cargo test -p aionui-conversation -p aionui-db
  • AionUi side-fork policy verification against this backend binary:
    • codex -> text_snapshot
    • aionrs -> text_snapshot
    • claude -> agent_fork
    • openclaw skipped locally because the copied dev DB had no OpenClaw parent conversation

黄肠粉 added 4 commits June 8, 2026 17:03
Expose POST /api/conversations/:id/side to fork ephemeral side threads
with hidden guardrail context, optional initial prompt, and cascade
delete of ephemeral children when the parent is removed.
@taekchef taekchef force-pushed the feat/side-conversation branch from 0a5aa4e to 7a16ea4 Compare June 8, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant