Widget shows raw dewee-action-result block after a navigating page action

Aperta
#25 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à
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript, web-dev
Ambito
frontend

Direzione di ricerca

Start in packages/dewee-webchat/src/actions/directives.ts, where isActionResultMessage checks only the first line against RESULT_OPEN_RE, then read decorateHistory in packages/dewee-webchat/src/widget/element.ts around line 1176. Run client().history() after a navigating action to see whether the fence newlines survive the reload. Done when no dewee-action-result text is visible after reload, the action chip still restores, and a regression test covers the history path.

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

Descrizione

ai-handle bug

What happens

After a page action that navigates (for example navigate to /changelog), the transcript shows the automatic action-result follow-up as a visible message, with the raw fence intact:

navigate done
```dewee-action-result {"id":"call-1","name":"navigate","status":"ok","result":{"ok":true,"route":"/changelog"}} ```
The changelog is open — you should see it now. ...

Seen on staging.agentkit.best (ak-web, widget embedded via PR bestagentkits/ak-web#747) on 2026-11-01, asking the advisor to open the changelog.

Expected

The result message stays hidden, the same as within a single page load. runTurn(..., hidden: true) handles that, and decorateHistory hides it again when history is loaded.

Where to look

  • packages/dewee-webchat/src/widget/element.ts: decorateHistory (around line 1176) hides a message only when isActionResultMessage(m.content) is true.
  • packages/dewee-webchat/src/actions/directives.ts: isActionResultMessage tests only the first line against RESULT_OPEN_RE.

The visible text is on one line, with the fence opener, the JSON and the closing fence together. That suggests the history returned after the reload has lost its newlines, or has been re-serialised, so the first-line test fails. This is a hypothesis and has not been proven. Check what client().history() returns for an auto follow-up, then make the detection tolerant of the history shape. Add a test that reloads history containing a result message.

Done means

  • After a navigating action and the page reload that follows, no dewee-action-result text is visible in the transcript.
  • The action chip is still restored.
  • A regression test covers the history path.
Lingua principale
TypeScript
Stelle
7
Fork
2
Merge medio
16h 5m
PR unite (30g)
14

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 nextlevelbuilder/dewee-webchat

Tutte le issue di nextlevelbuilder/dewee-webchat

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.