Skip to content

Let readers regenerate an assistant reply in place instead of retyping the question #42

Closed as not planned

Description

@bencode

Problem

The assistant's reply cannot be regenerated. When a reply is poor or errored, the only path is retyping the question — and for a reading assistant that cost is doubled: questions typically lean on document context the assistant gathered through tool calls (search, sheet reads, page renders), all of which is discarded and rebuilt from scratch on a manual re-ask.

Evidence:

  • Stopping is supported (agent.abort() in use-conversation.ts:327, with a stopping phase and a "Generation stopped." status), but nothing re-runs a finished exchange.
  • "Regenerate" appears nowhere in the conversation feature (zero matches across features/conversation/); the only retry affordances are attachment uploads (conversation-attachments.tsx:162) and IndexedDB write retries — neither touches messages.
  • An errored reply renders a status (stopReason === 'error', use-conversation.ts:124-141) with no way to retry it in place.

This also undercuts a marketed capability: each conversation keeps its own chat model and thinking level, so comparing models on the same question is a natural reader need — today it means retyping the identical question twice.

Proposal

  • Add a regenerate control on the last assistant reply (and on errored replies in particular): drop that reply and its tool activity, and rerun the agent loop from the preceding user message.
  • Preserve the reading context: the rerun starts with the same conversation history, so the assistant's own earlier tool results remain available.
  • Pair it with model choice: since the chat model is per-conversation, switching the model and regenerating is how a reader compares answers to the same question — no new UI needed beyond the control itself.
  • Keep it one control, quiet, keyboard-reachable, consistent with the calm surface (no menus of variants).

Goal

After this, any assistant reply — especially an errored one — can be rerun in place from the user message that prompted it, without retyping, and switching the chat model then regenerating compares two models on the same question.

Verification

grep -rqi "regenerate" ui-packages/web/src/features/conversation
pnpm --filter @gamma-reader/web test --silent
pnpm check

Refs

  • ui-packages/web/src/features/conversation/use-conversation.ts:124-141 — error/stop status, no retry path
  • ui-packages/web/src/features/conversation/use-conversation.ts:327 — abort exists, rerun does not
  • ui-packages/web/src/features/conversation/conversation-attachments.tsx:162 — retry exists for uploads only
  • README.md — "Keep questions apart" (per-conversation model and thinking level)
  • ui-packages/web/PRODUCT.md — calm, precise surface

Activity

  1. added
    enhancement
    source:scheduled
    on Sep 30, 2026
  2. bencode commented on Sep 30, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), under the maintainer's standing instruction to evaluate, sharpen, or retire source:scheduled proposals.

    Evidence audit (against main@d28fe0b): all four citations confirmed, two to the exact line.

    • ✅ Stop/abort exists (agent.abort() at use-conversation.ts:327); the error/stop status mapping is at :124-131 with no retry path — the error notice literally says "Send a message to try again."
    • ✅ regenerate has zero matches across features/conversation/ (case-insensitive); retry affordances exist only for failed uploads (conversation-attachments.tsx:162).
    • ✅ Per-conversation model + thinking level confirmed (README "Keep questions apart") — the model-comparison framing is grounded.
    • ✅ Sensor: lint passed; verify fails today as it should → stays open.

    Verdict: valid, keep open. Clear gap with doubled cost for a reading assistant (discarded tool context), and the proposal stays within PRODUCT.md's one-control, calm-surface stance.

    One sharpening note (non-blocking): the anchor grep -rqi "regenerate" binds to one vocabulary word, but the Proposal itself describes the feature as "rerun the agent loop" — an implementation that names it rerun (or retry) passes the Goal and fails the gate. Suggest widening to grep -rEqi "regenerate|rerun" ui-packages/web/src/features/conversation.

  3. bencode commented on Oct 1, 2026

    @bencode
    OwnerAuthor

    Deferred — discussed with the maintainer on 2026-09-30; not scheduled for now.

    • Regeneration can only redo the last reply. Redoing an earlier turn would orphan the later ones or fork the conversation.
    • Dissatisfaction with a reply is usually better served by a follow-up such as "simpler" or "focus on part two" than by an identical rerun. Comparing models on the same question is a nice-to-have.
    • Retrying an errored reply (network, timeout, quota) has the clearest value, because today the only path is retyping the question. If this is picked up again, start there: show the control only on an errored last reply.
    • Implementation note for later: it needs a way to drop the trailing messages of the last turn, both from the messages store and from the agent's in-memory state, before rerunning from the preceding user message.
  4. bencode commented on Oct 2, 2026

    @bencode
    OwnerAuthor

    Not planned — discussed with the maintainer on 2026-10-01. Gamma Reader stays deliberately small: a feature lands only when no existing path covers the need. Already deferred on 2026-09-30; a follow-up message covers unsatisfying replies, and retrying an errored reply by resending is acceptable for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions