mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
f552269718
Adds a hover-revealed agent button next to each todo item's X button,
mirroring the existing per-note "Agent: solve this" affordance but
scoped to a single checklist item. Clicking it creates a new chat
session named "Agent: {item text}", kicks off the agent run in the
background (user stays in notes), and links the latest run to the
parent note via agent_session_id so the existing Agent tag opens the
chat — same review path as the per-note solve.
The prompt is "Help me with this todo: {item text}" plus the note
title as one-line context when present, so the agent has enough
framing without being handed the whole note.
Why per-item: granular delegation is the main user-facing missing
piece. Today you can hand a whole note to the agent, but if the note
has 5 todos and only one needs agent attention, you either solve all
five or none. Per-item closes that gap without changing the existing
per-note flow.
UI:
- New .note-checkbox-agent button in the item template, placed before
the X so DOM order is text → agent → X.
- Reuses the existing robot SVG (same icon as the corner-menu Agent
item) at 10x10 to match the X visually.
- CSS mirrors .note-checkbox-rm exactly: hidden until item hover,
opacity 0.55 on item hover, opacity 1 + accent on button hover.
- Hidden in select mode and in the same _INTERACTIVE/skip-click lists
as the X so card clicks don't fire.
Backend: none — uses existing /api/session + /api/chat_stream agent
mode. No DB schema change. agent_session_id is latest-wins on the
parent note (matches existing per-note behavior).
Targets `dev`. Visual change — needs a browser test before promoting
to main.