@itechchoice/prime-chatkit 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +3069 -2638
- package/dist/style.css +1 -1
- package/dist/types/components/agent-thread.d.ts +11 -2
- 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/layout/constants.d.ts +3 -1
- 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 +15 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.abc-prime-dock{position:fixed;right:1rem;bottom:1rem;top:auto;left:auto;width:min(
|
|
1
|
+
.abc-prime-dock{position:fixed;right:1rem;bottom:1rem;top:auto;left:auto;width:min(420px,94vw);height:calc(100vh - var(--abc-prime-header-offset, var(--chatkit-header-offset, 0px)) - 16px);z-index:60;pointer-events:none;transition:width .22s ease,right .22s ease,bottom .22s ease,transform .22s ease;visibility:hidden}.abc-prime-dock--open{pointer-events:auto;visibility:visible}.abc-prime-dock--minimized{pointer-events:none;visibility:visible}.abc-prime-dock--split{inset:0 0 0 auto;width:var(--abc-prime-split-width, var(--chatkit-split-width, 480px));min-width:var(--abc-prime-split-min-width, var(--chatkit-split-min-width, 480px));height:100vh;border-left:1px solid var(--border-input, rgba(15, 23, 42, .08))}body.chatkit-resizing .abc-prime-dock,body.chatkit-dragging .abc-prime-dock,body.chatkit-dock-resizing .abc-prime-dock{transition:none}.abc-prime-dock__resize-handle{position:absolute;top:0;bottom:0;left:-12px;width:24px;display:flex;align-items:center;justify-content:center;cursor:col-resize;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;z-index:2}.abc-prime-dock__panel{display:flex;flex-direction:column;gap:0;border:1px solid var(--border-input, rgba(15, 23, 42, .08));border-radius:1.25rem;background:transparent;box-shadow:0 25px 50px #0f172a2e;padding:0;overflow:hidden;overscroll-behavior:contain;transform:translateY(20px);opacity:0;pointer-events:auto;transition:opacity .18s ease,transform .26s cubic-bezier(.2,.8,.2,1);height:100%}.abc-prime-dock--open .abc-prime-dock__panel{opacity:1;transform:translateY(0)}.abc-prime-dock--split .abc-prime-dock__panel{transform:translate(32px);border-radius:0}.abc-prime-dock--open.abc-prime-dock--split .abc-prime-dock__panel{transform:translate(0)}.abc-prime-dock--minimized .abc-prime-dock__panel{opacity:0;transform:scale(.06) translate(12px,12px);pointer-events:none}.abc-prime-dock__minimized{position:fixed;right:1rem;bottom:1rem;width:48px;height:48px;border-radius:999px;background:rgb(var(--color-theme-blue, 34 99 248));color:#fff;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 12px 24px #2263f847;transform:scale(.6);opacity:0;pointer-events:none;transition:transform .36s cubic-bezier(.18,1.35,.32,1),opacity .32s ease}.abc-prime-dock--minimized .abc-prime-dock__minimized{opacity:1;transform:scale(1);pointer-events:auto}.abc-prime-dock__header{cursor:default}.abc-prime-dock--dock-interactive:not(.abc-prime-dock--split) .abc-prime-dock__header{cursor:grab;touch-action:none}.abc-prime-dock--dragging:not(.abc-prime-dock--split) .abc-prime-dock__header{cursor:grabbing}.abc-prime-dock__resize-corner{position:absolute;right:.75rem;bottom:.75rem;width:18px;height:18px;border:0;background:transparent;cursor:nwse-resize;z-index:3}@media(max-width:640px){.abc-prime-dock{right:.75rem;left:.75rem;width:auto;bottom:.75rem}}
|
|
@@ -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;
|
|
@@ -631,6 +633,7 @@ export type AgentThreadScreenProps = Pick<AppShellProps, "onNavigate" | "user" |
|
|
|
631
633
|
start?: {
|
|
632
634
|
greeting?: string;
|
|
633
635
|
body?: string;
|
|
636
|
+
avatar?: string;
|
|
634
637
|
prompts?: {
|
|
635
638
|
id: string;
|
|
636
639
|
label: string;
|
|
@@ -712,6 +715,10 @@ export type AgentThreadScreenProps = Pick<AppShellProps, "onNavigate" | "user" |
|
|
|
712
715
|
labels?: ThreadLabels;
|
|
713
716
|
locale?: string;
|
|
714
717
|
};
|
|
718
|
+
declare function ThreadStart({ start, onStartPrompt }: {
|
|
719
|
+
start: NonNullable<AgentThreadScreenProps["start"]>;
|
|
720
|
+
onStartPrompt?: AgentThreadScreenProps["onStartPrompt"];
|
|
721
|
+
}): import("react").JSX.Element;
|
|
715
722
|
export declare function AgentThreadScreen({ workspace, messages: messagesProp, overlay, start, onStartPrompt, onLink, orchestratorAvatar, onCopy, onRegenerate, onFeedback, feedbackReasons, onSend, onStop, onRetry, connection: connectionProp, onReconnect, lastSeen: lastSeenProp, awayAfter, onMarkRead, running, decisions: decisionsProp, onDecide, onLater, tasks: taskDetailsProp, onOpenTask, onShowTask, onOpenInbox, artifacts, openArtifacts, models, composer, suggested, upload, transcribe, simulate, labels: labelProp, locale, onNavigate, ...props }: AgentThreadScreenProps): import("react").JSX.Element;
|
|
716
723
|
/** Yours: a soft bubble on the right, files above it; queued, sending or failed under it */
|
|
717
724
|
declare function UserMessage({ message: m, labels, onRetry }: {
|
|
@@ -721,8 +728,10 @@ declare function UserMessage({ message: m, labels, onRetry }: {
|
|
|
721
728
|
}): import("react").JSX.Element;
|
|
722
729
|
/** The orchestrator's: plain text on the page under its mark, with its cards, tools and files in between */
|
|
723
730
|
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, }: {
|
|
731
|
+
declare function AgentMessage({ message: m, status, phase, clock, orchestratorAvatar, first, now, labels, askState, onTask, onAsk, onRetry, onCopy, onRegenerate, onFeedback, feedbackReasons, }: {
|
|
725
732
|
message: ThreadAgentMessage;
|
|
733
|
+
status?: ReactNode;
|
|
734
|
+
phase?: "working" | "writing" | "done";
|
|
726
735
|
clock: Intl.DateTimeFormat;
|
|
727
736
|
orchestratorAvatar?: string;
|
|
728
737
|
first: boolean;
|
|
@@ -733,7 +742,7 @@ declare function AgentMessage({ message: m, clock, orchestratorAvatar, first, no
|
|
|
733
742
|
onAsk: (id: string) => void;
|
|
734
743
|
onRetry?: () => void;
|
|
735
744
|
} & Pick<AgentThreadScreenProps, "onCopy" | "onRegenerate" | "onFeedback" | "feedbackReasons">): import("react").JSX.Element;
|
|
736
|
-
export { UserMessage, AgentMessage, ThreadLinkContext, threadDefaults };
|
|
745
|
+
export { UserMessage, AgentMessage, ThreadStart, ThreadLinkContext, threadDefaults };
|
|
737
746
|
export type { Labels };
|
|
738
747
|
/** The original message parts, with their shell tokens but no screen layout. */
|
|
739
748
|
export declare function ThreadPartsRoot({ children, className }: {
|
|
@@ -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;
|
|
@@ -10,11 +10,13 @@ export declare const SPLIT_BREAKPOINT = 1440;
|
|
|
10
10
|
export declare const MIN_SPLIT_WIDTH = 1280;
|
|
11
11
|
export declare const DOCK_INTERACTIVE_BREAKPOINT = 768;
|
|
12
12
|
export declare const MIN_SPLIT_CONTENT_WIDTH = 620;
|
|
13
|
+
export declare const SPLIT_PANEL_MIN_WIDTH = 480;
|
|
14
|
+
export declare const SPLIT_PANEL_MAX_WIDTH = 720;
|
|
13
15
|
export declare const HEADER_HEIGHT_FALLBACK = 64;
|
|
14
16
|
export declare const DOCK_EDGE_GAP = 12;
|
|
15
|
-
export declare const DOCK_DEFAULT_WIDTH = 720;
|
|
16
17
|
export declare const DOCK_DEFAULT_HEIGHT = 760;
|
|
17
18
|
export declare const DOCK_MIN_WIDTH = 420;
|
|
19
|
+
export declare const DOCK_DEFAULT_WIDTH = 420;
|
|
18
20
|
export declare const DOCK_MIN_HEIGHT = 620;
|
|
19
21
|
export declare const DOCK_MAX_WIDTH = 960;
|
|
20
22
|
export declare const DOCK_GEOMETRY_STORAGE_KEY = "abcPrimeDockGeometry:v1";
|
|
@@ -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,13 +26,20 @@ 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;
|
|
34
39
|
provisionTitle: string;
|
|
35
40
|
provisionAction: string;
|
|
41
|
+
startGreeting: string;
|
|
42
|
+
startBody: string;
|
|
36
43
|
};
|
|
37
44
|
export declare const zhPanelCopy: PanelCopy;
|
|
38
45
|
export declare const enPanelCopy: PanelCopy;
|
|
@@ -82,6 +89,14 @@ export declare function historyLabelsFor(locale?: string): Partial<import("../co
|
|
|
82
89
|
import { type AIAnswerLabels } from "../components/ui/ai-answer-clean";
|
|
83
90
|
import { type DropzoneLabels } from "../components/ui/dropzone-clean";
|
|
84
91
|
export type BlocksCopy = {
|
|
92
|
+
live: {
|
|
93
|
+
ready: string;
|
|
94
|
+
thinking: string;
|
|
95
|
+
tool: (name: string) => string;
|
|
96
|
+
writing: string;
|
|
97
|
+
waiting: string;
|
|
98
|
+
working: string;
|
|
99
|
+
};
|
|
85
100
|
attachments: {
|
|
86
101
|
dropzone: DropzoneLabels;
|
|
87
102
|
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.3",
|
|
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": {
|