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

Abierto
#25 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript, web-dev
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
7
Forks
2
Merge medio
16 h 5 min
PR fusionados (30 d)
14

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextlevelbuilder/dewee-webchat

Todos los issues de nextlevelbuilder/dewee-webchat

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.