agentscope-ai / agentscope-ai/QwenPaw

[Feature]: "Edit last message" and "Rewind" button in the Web UI

Aperta
#7,573 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
34.9k
Fork
3.1k
Merge medio
1g 15h
PR unite (30g)
225

Descrizione

## Summary

Add native **Edit-last-message** and **Rewind** controls to the web UI so users can correct their own previous prompt or roll back to an earlier turn without restarting the whole session.

## Component(s) Affected

- [x] Core / Backend (app, agents, config, providers, utils, local_models)
- [x] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy

## Problem / Motivation

Once a user sends a message, there is no built-in way to:

- **Edit their own last message** — if the prompt was worded poorly or a detail is missing, the user must either retype the whole thing in a new turn or start over. There is no in-place correction.
- **Rewind** — roll back the conversation to a previous turn and drop everything after it, so a different path can be taken.

These are standard in modern chat UIs (ChatGPT, Claude) and materially improve UX during experimentation and iterative refinement. Today the only workaround is manual re-prompting, which pollutes the prompt history.

## Proposed Solution

Introduce buttons in the web ui next to the "copy message" button:

1. **Edit last message** — An "Edit" action on the most recent *user* message that rewrites it **in place** and re-sends it to the model. The last LLM response is regenerated.
2. **Rewind** — A button that rolls the session back to a selected turn, discarding all messages after that point. Show a confirmation dialog to prevent accidental data loss.

## Alternatives Considered

- **Manual re-prompting** — re-typing the corrected prompt in a new turn. Simple, but pollutes the history and less intuitive when the user scrolls back in the web ui

## Additional Context

- Follow-up to [#4703](https://github.com/agentscope-ai/QwenPaw/issues/4703) ("Native fork/rewind/regen for conversations")
A plugin has been created by the author but it is outdated and command driven only.

## Willing to Contribute

- [ ] I am willing to open a PR for this feature (after discussion).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.