2 Commits
Author SHA1 Message Date
Catoandcatomean 9901e004d8 Use the shared visual answer engine in AI chats (#1364)
* feat: adopt shared visual AI answers

* test: preserve all citations in one sources sheet per answer

* feat: negotiate visual answers with public chat clients

* fix: preserve complete visual widget answers and bounded history

* fix: keep visitors' literal messages in rich chat history

* style: normalize widget history formatting

* fix(widget): keep chatkit out of the panel bundle

The panel (public/widget.js) imported richAnswerText from @bitbaum/chatkit,
pulling a dependency into every customer page load and failing
widget-self-contained. Use a dependency-free copy in widget/rich-history.ts
with a parity test against chatkit.

* style: format widget visual answer test

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 15:53:00 +02:00
CatoandClaude ddea79f5cc fix(loki): what talking to the live chat turned up (#1213)
Found by using loki.orangecat.ch as a new, non-technical account:

- "Yes, create it" under Loki's own suggestion was sent to the only
  project as a build task. A bare yes is now a reply: it runs the one
  ready-to-send line the previous answer ended with, or stays in chat.
- A newcomer's private zone (approvals, commitments, people) was locked
  behind the founder's env PIN, which every PIN-less account inherited —
  a dead end for them, and the founder's PIN opened all of them. The env
  PIN now gates the owner account only.
- Loki did not know the date: "dentist on Monday" came back as "the date
  for Monday is not in your data". Every turn now carries the time in
  the person's own zone, and drafts lead with what was drafted.
- "What did I ask you today?" got "no record of any request". Recent
  threads are now a source Loki reads when asked about them.
- A refused dispatch left its run WAITING forever (six phantom runs);
  it is now closed as undelivered, quietly, since the reply says so.
- The fleet fact said "OFFLINE — nothing can run" to an account that
  can never use the cloud builder, so Loki told it to restart a runner.
  It now says which is true and the way forward; the prompt asks for
  plain words and no "restart Loki's services" advice.
- A system-prompt example leaked the owner's project into strangers'
  answers ("sink: bring runner online…").
- Citations were eight 44px "Source" buttons inline; now one per
  paragraph, at its end.
- Thread titles were cut by reasoning tokens ("Bring") and repeated the
  project shown right beside them.


Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 05:29:23 -07:00