Ctrl+R can delete the wrong turn's citations and the wrong message

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

Start in src/chatty/ui/app.py, especially ChatApp.action_regenerate around lines 436–475, and trace how augment updates the RAG turn counter and how turn widgets are added to the chat log. Check the Ctrl+R behavior for turns with and without citations and for a system line after a reply. Done means regeneration only removes that assistant turn’s widgets and reverses its counter change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: rag area: sessions bug wrong-result

ChatApp.action_regenerate (src/chatty/ui/app.py:436) assumes the last response produced citations and is the last message on screen:

  • it removes the last CitationsWidget in the chat log (line 468), whichever turn it belongs to;
  • it removes the last MessageWidget (line 471), whatever its role;
  • it decrements the RAG turn counter (line 475), but augment only increments it when chunks were found.

Effect:

  • Turn 1 has sources, turn 2 found no chunks, then Ctrl+R: turn 1's citation list is deleted, and the counter drops from 1 to 0, so the regenerated answer reuses turn 1's [1.N] numbers.
  • If a system line follows the reply (for example Session saved: ... after Ctrl+S), Ctrl+R removes that line and leaves the old assistant reply on screen, while the conversation no longer contains it.

Fix: record, per assistant turn, whether it added citations and incremented the counter, and undo only that. Remove the specific widgets that belong to the turn instead of "the last one".

Lingua principale
Python
Stelle
0
Fork
2
Merge medio
1g 4h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lanl/chatty

Tutte le issue di lanl/chatty

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.