agentscope-ai / agentscope-ai/QwenPaw

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

オープン
#7,573 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
35k
フォーク
3.1k
平均マージ
1日 13時間
マージ済み PR(30日)
228

説明

## 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).

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

The issue identifies the Core/Backend and Console frontend as affected, but names no files, tests, or entry points. Start by tracing the existing conversation/session handling across those components and review the related design in issue #4703. Done should include clearly defined edit and rewind behavior, confirmation for discarded turns, regenerated responses, and coverage for the new UI flows.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend, frontend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。