mirror of
https://github.com/bitbaum/chatkit.git
synced 2026-12-04 05:47:38 +01:00
The owner's finding, 2026-11-06: every product installs the shared packages
and the text boxes people type in are still made by hand, with no microphone;
two comment systems were written in one week. This gives the two remaining
shapes of "a person types words" a component, so there is nothing to build
locally.
- DictationField: a labelled text area (or one line) with the composer's
microphone — Web Speech, the recording fallback, the take with its timer,
kept for a retry — appending to what is there; 16px, 44px targets.
Optional improve={{ run, suggestions }}: one tap or say/type what to change;
working, failure and Undo in words, the text untouched on failure. No model
call or prompt here; run is the app's.
- CommentThread: oldest first, the box is Composer, a transport the app
implements (post, optional remove), optimistic removal rolled back with a
message, a refused post keeps the draft, text not markup, a sign-in link
for a signed-out reader, times in a stated timeZone.
- VoiceBar/VoiceProblem are one implementation shared by Composer and the
field; Composer behaves as before.
- Styles after the ChatApp boundary: the embedded sheet keeps its budget.
- test/browser-field.mjs + fixture page; render tests; README; 0.23.0.
verify: format, lint, typecheck, build, 142 unit tests, and all five browser
suites (the four existing ones unchanged) pass.
Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD
Co-authored-by: Claude <noreply@anthropic.com>
28 lines
1.7 KiB
JavaScript
28 lines
1.7 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, starterParts, ThinkingRow, formatThinkingDuration, DEFAULT_THREAD_LABELS, } from "./Thread.js";
|
|
export { DictationField, DEFAULT_DICTATION_FIELD_LABELS } from "./DictationField.js";
|
|
export { CommentThread, DEFAULT_COMMENT_THREAD_LABELS } from "./CommentThread.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, readAttachmentFile, readAttachmentFiles } from "./use-attachments.js";
|
|
export { useClipboard, useStickToBottom, useViewportHeight, useAutoGrow } from "./hooks.js";
|
|
export { RichAnswerBlock, ChartTableFigure } from "./RichBlock.js";
|
|
export { RichRenderersContext, useRichRenderers } from "./renderers.js";
|
|
export { ChatApp, DEFAULT_CHAT_APP_LABELS, takeDeepLink } from "./ChatApp.js";
|
|
export { ChatHistory } from "./ChatHistory.js";
|
|
export { useChatApp, isTemporaryId, ChatTurnError, chatTurnFailure } from "./use-chat-app.js";
|
|
//# sourceMappingURL=index.js.map
|