Commit Graph
5 Commits
Author SHA1 Message Date
t0saki 88f338f78f feat(docs): load VikingBot from the shared embed widget (#3939)
* feat(docs): load VikingBot from the shared embed widget

The docs assistant was a copy of the playground chat panel: its own
transport, markdown renderer and ~700 lines of panel CSS, all talking to
a hardcoded gateway. Replace it with a thin loader so the shared embed
widget owns the conversation UI.

- VikingBotAssistant.vue keeps only the navbar trigger; the first click
  lazy-loads the widget script and mounts it with the docs locale, later
  clicks toggle the panel.
- Widget URL defaults to the stable alias and can be overridden with
  VITE_VIKINGBOT_WIDGET_URL for local development.
- A failed script load surfaces a small hint next to the button and
  leaves the docs untouched; the next click retries.
- Drop vikingbot-api.ts, vikingbot-markdown.ts and their tests, the
  panel styles, and the markdown-it/xss dependencies they needed.

* fix(docs): let the trigger button own the widget click

mount({trigger: el}) makes the widget bind its own click->toggle on that
element. Passing the navbar button while this component also toggles on
@click meant every click after the first toggled twice: the panel stayed
put while aria-expanded flipped, so the button announced the wrong state.

Mount with trigger: 'none' instead — the widget then neither renders its
floating launcher nor binds a listener, leaving this component the single
owner of the click while open/close events keep aria-expanded honest.

* fix(docs): stop double-writing the trigger's expanded state

toggle() emits open/close synchronously, so onWidgetEvent has already
updated isOpen by the time the click handler returns. The extra manual
flip inverted it: after the second click the panel was closed while the
button still reported aria-expanded=true. The post-mount assignment was
redundant for the same reason (mount({open:true}) emits 'open').

Widget events are now the single writer of isOpen.
2026-08-12 12:52:20 +08:00
yufeng 6914f365ae feat(docs): add VikingBot assistant (#3211)
* feat(docs): add VikingBot assistant

* chore(docs): remove unused env example

* fix(docs): harden VikingBot assistant

* fix(docs): polish VikingBot panel layout

* fix(docs): stabilize responsive page actions
2026-07-13 15:57:18 +08:00
yufeng 91a8f03084 docs: add tabbed API examples (#3185)
* docs: add tabbed API examples

* docs: move llms actions to page header

* docs: make content layout responsive

* docs: split guide navigation sections

* docs: regroup agent and migration guides

* docs: add wide-screen page gutters

* fix: address API docs review findings

* fix: address API docs review findings

* fix: harden API example tabs

* fix: harden tabbed API documentation

* fix(docs): hide unavailable llms actions

* fix(docs): group API examples into tabs

* fix(docs): preserve localized response tabs
2026-07-13 10:00:52 +08:00
Hao Zhe b1712aab28 fix(docs): localize OpenViking search UI (#2711) 2026-06-18 18:57:20 +08:00
yufeng d796af4d68 Add VitePress docs site and Pages deployment (#1681)
* Add VitePress docs deployment

* fix docs english home route

* route docs logo to introduction

* route zh docs logo to introduction
2026-04-24 18:00:06 +08:00