mirror of
https://github.com/bitbaum/chatkit.git
synced 2026-12-04 11:48:26 +01:00
* feat(answers): answers that read like the ChatGPT app's (0.13.0)
Measured screen by screen against the ChatGPT app on a phone, and closed
in the package so every product gets it:
- Headings are signposts: a size up, with air above them, so a long answer
can be scanned and found again.
- Options are cards: a numbered list whose items open with a bold name gets
a tile badge, the name a size up, a hairline between cards, and a pill
for a short tag written right after the name (`[Recommended]`). The
instruction asks the model to mark the option it recommends that way.
- Sources are chips: a `[F2, F1]` handle is drawn after the sentence as
"Fleet AGENTS.md +1", linked when the record has a link, and moved after
the full stop when the model wrote it before.
- Links in the words that leave the site say so: dotted underline, arrow.
- A layered figure, `{"type":"stack"}`: full-width boxes top to bottom, a
row of tiles where a layer has parts (icons from a closed list, never
markup), the words that cross each arrow, an accent tone, a caption.
`diagram` stays for an arbitrary graph.
- "Thought for 3m 38s ›" above an answer from `message.thinking`, closed by
default; `live.steps` shows the same row open while a turn runs, with
the newest step marked. `ThinkingRow` and `formatThinkingDuration` are
exported; `thoughtFor`, `thought`, `thinking` join the thread labels.
Tests: tag and citation placement (core), stack validation and text form
(core), the whole answer rendered on the server (render), and the stack
fitting six tiles on a 390px phone with the thought line above (browser).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
* fix(markdown): no space before the full stop when a citation chip moves after it
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
---------
Co-authored-by: Claude <noreply@anthropic.com>
22 lines
1.2 KiB
JavaScript
22 lines
1.2 KiB
JavaScript
/**
|
|
* @bitbaum/chatkit/react — the chat every product uses.
|
|
*
|
|
* import { Composer, ChatThread, ChatStarters } from "@bitbaum/chatkit/react";
|
|
* import "@bitbaum/chatkit/styles.css";
|
|
*
|
|
* Behaviour is fixed here and identical everywhere; the look follows the
|
|
* app's tokens through `--ck-*` variables (see styles.css).
|
|
*/
|
|
export { Composer, DEFAULT_COMPOSER_LABELS } from "./Composer.js";
|
|
export { ChatThread, ChatMessage, ChatReplies, ChatStarters, ThinkingRow, formatThinkingDuration, DEFAULT_THREAD_LABELS, } from "./Thread.js";
|
|
export { ChatScreen } from "./Screen.js";
|
|
export { Markdown, SourcesRow, defaultRenderLink, defaultRenderCitation } from "./Markdown.js";
|
|
export { AnswerActions, DEFAULT_ANSWER_ACTIONS_LABELS } from "./AnswerActions.js";
|
|
export { useSpeech } from "./use-speech.js";
|
|
export { Sheet, prefersSheet } from "./Sheet.js";
|
|
export { useDictation } from "./use-dictation.js";
|
|
export { AttachMenu, DEFAULT_ATTACH_MENU_LABELS } from "./AttachMenu.js";
|
|
export { useAttachments } from "./use-attachments.js";
|
|
export { useClipboard, useStickToBottom, useViewportHeight, useAutoGrow } from "./hooks.js";
|
|
export { RichAnswerBlock } from "./RichBlock.js";
|
|
//# sourceMappingURL=index.js.map
|