fix: Switch auto-spawn from discuss to refine agent, surface in UI

The auto-spawned agent on initiative creation was using discuss mode
(Q&A) when it should use refine mode (expand content). Now:

- Description seeds root page as tiptap content (split on double newlines)
- Spawns refine agent with the populated page in inputContext
- getActiveRefineAgent broadened to also surface discuss agents (for
  CLI-spawned discuss agents)
- RefineAgentPanel shows mode-appropriate label for discuss vs refine
This commit is contained in:
Lukas May
2026-03-03 14:25:43 +01:00
parent b38a2ec034
commit 9e7c246280
7 changed files with 41 additions and 18 deletions

View File

@@ -141,7 +141,7 @@ Configured in `src/lib/trpc.ts`. Uses `@trpc/react-query` with TanStack Query fo
### Creating an Initiative
1. Dashboard → "New Initiative" → enter name, optional description, select projects
2. `createInitiative` mutation → auto-creates root page; if description provided, auto-spawns discuss agent
2. `createInitiative` mutation → auto-creates root page (seeded with description as tiptap content); if description provided, auto-spawns refine agent
3. Navigate to initiative detail page on success
### Managing Content (Pages)