@itechchoice/prime-chatkit 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3176 -2754
- package/dist/types/components/agent-thread.d.ts +5 -1
- package/dist/types/components/ui/chat-composer-clean.d.ts +4 -1
- package/dist/types/components/ui/command-menu-clean.d.ts +3 -1
- package/dist/types/components/ui/thinking-loader-clean.d.ts +19 -0
- package/dist/types/ui/blocks/BlocksPanel.d.ts +4 -1
- package/dist/types/ui/blocks/LiveStatus.d.ts +9 -0
- package/dist/types/ui/i18n.d.ts +13 -0
- package/package.json +1 -1
|
@@ -312,6 +312,7 @@ declare function threadDefaults(locale: string): {
|
|
|
312
312
|
message: string;
|
|
313
313
|
voiceInput: string;
|
|
314
314
|
sendMessage: string;
|
|
315
|
+
stop: string;
|
|
315
316
|
discardRecording: string;
|
|
316
317
|
useRecording: string;
|
|
317
318
|
connectApps: string;
|
|
@@ -539,6 +540,7 @@ declare const defaultLabels: {
|
|
|
539
540
|
message: string;
|
|
540
541
|
voiceInput: string;
|
|
541
542
|
sendMessage: string;
|
|
543
|
+
stop: string;
|
|
542
544
|
discardRecording: string;
|
|
543
545
|
useRecording: string;
|
|
544
546
|
connectApps: string;
|
|
@@ -721,8 +723,10 @@ declare function UserMessage({ message: m, labels, onRetry }: {
|
|
|
721
723
|
}): import("react").JSX.Element;
|
|
722
724
|
/** The orchestrator's: plain text on the page under its mark, with its cards, tools and files in between */
|
|
723
725
|
declare const ThreadLinkContext: import("react").Context<((href: string, event: MouseEvent<HTMLAnchorElement>) => void) | undefined>;
|
|
724
|
-
declare function AgentMessage({ message: m, clock, orchestratorAvatar, first, now, labels, askState, onTask, onAsk, onRetry, onCopy, onRegenerate, onFeedback, feedbackReasons, }: {
|
|
726
|
+
declare function AgentMessage({ message: m, status, phase, clock, orchestratorAvatar, first, now, labels, askState, onTask, onAsk, onRetry, onCopy, onRegenerate, onFeedback, feedbackReasons, }: {
|
|
725
727
|
message: ThreadAgentMessage;
|
|
728
|
+
status?: ReactNode;
|
|
729
|
+
phase?: "working" | "writing" | "done";
|
|
726
730
|
clock: Intl.DateTimeFormat;
|
|
727
731
|
orchestratorAvatar?: string;
|
|
728
732
|
first: boolean;
|
|
@@ -50,6 +50,7 @@ export declare const defaultChatComposerLabels: {
|
|
|
50
50
|
message: string;
|
|
51
51
|
voiceInput: string;
|
|
52
52
|
sendMessage: string;
|
|
53
|
+
stop: string;
|
|
53
54
|
discardRecording: string;
|
|
54
55
|
useRecording: string;
|
|
55
56
|
connectApps: string;
|
|
@@ -66,6 +67,8 @@ export declare const defaultChatComposerLabels: {
|
|
|
66
67
|
};
|
|
67
68
|
export type ChatComposerLabels = typeof defaultChatComposerLabels;
|
|
68
69
|
export type ChatComposerProps = {
|
|
70
|
+
running?: boolean;
|
|
71
|
+
onStop?: () => void;
|
|
69
72
|
sendDisabled?: boolean;
|
|
70
73
|
labels?: Partial<ChatComposerLabels>;
|
|
71
74
|
placeholder?: string;
|
|
@@ -112,4 +115,4 @@ export type ChatComposerProps = {
|
|
|
112
115
|
export declare const defaultFolders: string[];
|
|
113
116
|
export declare const defaultApps: ChatApp[];
|
|
114
117
|
export declare const defaultModels: ChatModel[];
|
|
115
|
-
export declare function ChatComposer({ sendDisabled, placeholder, disabled, labels: labelProp, models, dictation, onSend, onModelChange, onAttach, addItems, voice, approval: firstApproval, onApprovalChange, onLearnMore, folders, folder: firstFolder, onFolderChange, apps, connectedApps, onAppsChange, foot, tray, }: ChatComposerProps): import("react").JSX.Element;
|
|
118
|
+
export declare function ChatComposer({ running, onStop, sendDisabled, placeholder, disabled, labels: labelProp, models, dictation, onSend, onModelChange, onAttach, addItems, voice, approval: firstApproval, onApprovalChange, onLearnMore, folders, folder: firstFolder, onFolderChange, apps, connectedApps, onAppsChange, foot, tray, }: ChatComposerProps): import("react").JSX.Element;
|
|
@@ -51,7 +51,9 @@ export type CommandMenuProps = {
|
|
|
51
51
|
ask?: boolean;
|
|
52
52
|
hotkey?: boolean;
|
|
53
53
|
labels?: Partial<CommandMenuLabels>;
|
|
54
|
+
/** Fill the parent height and scroll results within the remaining space. */
|
|
55
|
+
fill?: boolean;
|
|
54
56
|
};
|
|
55
57
|
/** Sample commands – replace with your own */
|
|
56
58
|
export declare const defaultGroups: CommandGroup[];
|
|
57
|
-
export declare function CommandMenu({ groups, placeholder, onAction, onEditSubmit, onEditCancel, ask, hotkey, labels: labelOverrides, onRun, onClose, autoFocus, className, }: CommandMenuProps): import("react").JSX.Element;
|
|
59
|
+
export declare function CommandMenu({ groups, placeholder, onAction, onEditSubmit, onEditCancel, ask, hotkey, labels: labelOverrides, fill, onRun, onClose, autoFocus, className, }: CommandMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ThinkingLoaderProps = {
|
|
2
|
+
/** Labels to walk through, one after another */
|
|
3
|
+
phases?: string[];
|
|
4
|
+
/** Time per phase, in ms */
|
|
5
|
+
interval?: number;
|
|
6
|
+
/** Show a specific phase instead of advancing on a timer – e.g. from your stream events */
|
|
7
|
+
phase?: number;
|
|
8
|
+
/** Start over after the last phase instead of holding it */
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
/** Finished: the spinner turns into a check and the label into doneLabel */
|
|
11
|
+
done?: boolean;
|
|
12
|
+
/** Label once done – a string, or a function that gets the seconds since the loader started */
|
|
13
|
+
doneLabel?: string | ((seconds: number) => string);
|
|
14
|
+
size?: "sm" | "md";
|
|
15
|
+
/** "pill" = bordered capsule, "plain" = just the spinner and the label, e.g. inside a chat bubble */
|
|
16
|
+
variant?: "pill" | "plain";
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function ThinkingLoader({ phases: phasesProp, interval: intervalProp, phase, loop, done, doneLabel, size, variant, className, }: ThinkingLoaderProps): import("react").JSX.Element;
|
|
@@ -7,6 +7,8 @@ import { type OlderMessages } from "./useFollowLatest";
|
|
|
7
7
|
import { type GetAttachmentUrls } from "./useAttachmentDownload";
|
|
8
8
|
export type BlocksPanelProps = {
|
|
9
9
|
messages: ChatMessage[];
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
title?: string;
|
|
10
12
|
history?: {
|
|
11
13
|
sessions?: ControllerState["sessions"];
|
|
12
14
|
currentId?: string;
|
|
@@ -51,6 +53,7 @@ export type BlocksPanelProps = {
|
|
|
51
53
|
onSend: (text: string, attachments: UploadedAttachment[]) => void;
|
|
52
54
|
onStop?: () => void;
|
|
53
55
|
onNewChat?: () => void;
|
|
56
|
+
layout?: "split" | "float";
|
|
54
57
|
onToggleLayout?: () => void;
|
|
55
58
|
onClose?: () => void;
|
|
56
59
|
onCreditsClick?: () => void;
|
|
@@ -67,4 +70,4 @@ export type BlocksPanelProps = {
|
|
|
67
70
|
};
|
|
68
71
|
getAttachmentUrls?: GetAttachmentUrls;
|
|
69
72
|
};
|
|
70
|
-
export declare function BlocksPanel({ messages, history, start, availability, provisioning, older, suspension, onAnswerSuspension, onCancelSuspension, error, locale, credits, branding, onSend, onStop, onNewChat, onToggleLayout, onClose, onCreditsClick, onHeaderPointerDown, processView, onRegenerate, onFeedback, onNavigate, upload, attachmentLimits, getAttachmentUrls, className }: BlocksPanelProps): import("react").JSX.Element;
|
|
73
|
+
export declare function BlocksPanel({ messages, loading, title, history, start, availability, provisioning, older, suspension, onAnswerSuspension, onCancelSuspension, error, locale, credits, branding, onSend, onStop, onNewChat, layout, onToggleLayout, onClose, onCreditsClick, onHeaderPointerDown, processView, onRegenerate, onFeedback, onNavigate, upload, attachmentLimits, getAttachmentUrls, className }: BlocksPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Run } from "../../core/types";
|
|
2
|
+
import type { BlocksCopy, ThreadCopy } from "../i18n";
|
|
3
|
+
/** The prototype's phase precedence, preferring concise tool names for the live status. */
|
|
4
|
+
export declare function phaseLabel(run: Run, live: BlocksCopy["live"], copy: ThreadCopy): string;
|
|
5
|
+
export declare function LiveStatus({ run, live, copy }: {
|
|
6
|
+
run: Run;
|
|
7
|
+
live: BlocksCopy["live"];
|
|
8
|
+
copy: ThreadCopy;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
package/dist/types/ui/i18n.d.ts
CHANGED
|
@@ -26,8 +26,13 @@ export declare function threadLabelsFor(locale?: string): {
|
|
|
26
26
|
export type PanelCopy = {
|
|
27
27
|
credits: (balance: number, locale: string) => string;
|
|
28
28
|
history: string;
|
|
29
|
+
backToChat: string;
|
|
30
|
+
historyTitle: string;
|
|
31
|
+
loadingSession: string;
|
|
29
32
|
newChat: string;
|
|
30
33
|
switchLayout: string;
|
|
34
|
+
layoutFloat: string;
|
|
35
|
+
layoutSplit: string;
|
|
31
36
|
close: string;
|
|
32
37
|
placeholder: string;
|
|
33
38
|
unavailable: string;
|
|
@@ -82,6 +87,14 @@ export declare function historyLabelsFor(locale?: string): Partial<import("../co
|
|
|
82
87
|
import { type AIAnswerLabels } from "../components/ui/ai-answer-clean";
|
|
83
88
|
import { type DropzoneLabels } from "../components/ui/dropzone-clean";
|
|
84
89
|
export type BlocksCopy = {
|
|
90
|
+
live: {
|
|
91
|
+
ready: string;
|
|
92
|
+
thinking: string;
|
|
93
|
+
tool: (name: string) => string;
|
|
94
|
+
writing: string;
|
|
95
|
+
waiting: string;
|
|
96
|
+
working: string;
|
|
97
|
+
};
|
|
85
98
|
attachments: {
|
|
86
99
|
dropzone: DropzoneLabels;
|
|
87
100
|
collapse: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itechchoice/prime-chatkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "PrimeChatKit: React chat UI for products built on the prime-chatkit SDK BFF contract. Shows the agent's work: thinking, tool calls, approvals, sources and cost.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|