mirror of
https://github.com/bitbaum/chatkit.git
synced 2026-12-04 04:07:20 +01:00
The first four products to move onto ChatApp (heidi#226, orangecat#1447,
solon#309, substrata#262) each listed what it could not do and wrote a
workaround. This closes those gaps, additively:
- ChatApp ref (ChatAppHandle: send, fill, focus, newChat, openConversation),
initialMessage (once, StrictMode-safe) and deepLinkParam (fills, never
sends unless deepLinkAutoSend)
- Retry re-sends the failed turn's pictures
- ChatTurnError: the failure reason travels with its own turn
- stopKeepsPartial, per ChatApp and per turn
- starters with lang, historySlot/historyEmpty, attachExtras rows in the
attach sheet, chips on the sent message (chipsFor), onTemporaryEnd with
turn.chatId, renderFooter(m, { isLatest, index, send, fill }), thread.after
- the live Stop button is a 44px target
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
Co-authored-by: Claude <noreply@anthropic.com>
34 lines
1.6 KiB
TypeScript
34 lines
1.6 KiB
TypeScript
import { type ReactNode } from "react";
|
|
import { type ConversationSummary } from "../conversations.js";
|
|
import type { ChatAppLabels } from "./ChatApp.js";
|
|
export type ChatHistoryProps = {
|
|
conversations: ConversationSummary[];
|
|
state: "loading" | "ready" | "error";
|
|
activeId: string | null;
|
|
/** Conversations with a turn running: their row says so instead of a date. */
|
|
busyIds: ReadonlySet<string>;
|
|
onOpen: (id: string) => void;
|
|
onNew: () => void;
|
|
onRename: (id: string, title: string) => void;
|
|
onRemove: (id: string) => void;
|
|
onRetry: () => void;
|
|
/** The drawer's close button; absent on the always-open rail. */
|
|
onClose?: () => void;
|
|
search?: (list: ConversationSummary[], query: string) => ConversationSummary[];
|
|
locale?: string;
|
|
labels: ChatAppLabels;
|
|
/** The product's own line under the search box, above the chats (e.g.
|
|
* "Only in this browser · Sign in to keep it"). */
|
|
slot?: ReactNode;
|
|
/** Shown instead of `labels.noChats` when there are no chats yet. */
|
|
empty?: ReactNode;
|
|
};
|
|
/**
|
|
* The chat list — the same in every product: New chat, a search box, the
|
|
* chats under Today / Yesterday / Earlier. Every row has ONE anatomy: the
|
|
* title, the date (or "Answering…"), and one "…" that opens the row's two
|
|
* actions, Rename and Delete, as two equal cells under it. A delete asks
|
|
* once, in the row.
|
|
*/
|
|
export declare function ChatHistory({ conversations, state, activeId, busyIds, onOpen, onNew, onRename, onRemove, onRetry, onClose, search, locale, labels, slot, empty, }: ChatHistoryProps): import("react").JSX.Element;
|
|
//# sourceMappingURL=ChatHistory.d.ts.map
|