@itechchoice/prime-chatkit 0.1.0-alpha.0 → 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 +9939 -8783
- package/dist/types/components/agent-thread.d.ts +746 -0
- package/dist/types/components/app-shell.d.ts +478 -0
- 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/filter-menu-clean.d.ts +28 -0
- package/dist/types/components/ui/message-actions-clean.d.ts +85 -0
- package/dist/types/components/ui/setup-guide-clean.d.ts +22 -0
- package/dist/types/components/ui/text-field-clean.d.ts +28 -0
- 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 +18 -78
- package/package.json +1 -1
- package/dist/types/ui/blocks/Process.d.ts +0 -7
|
@@ -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
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { ThreadLabels, ThreadLabelsFull } from "../components/agent-thread";
|
|
1
2
|
import type { ChatComposerLabels } from "../components/ui/chat-composer-clean";
|
|
3
|
+
import type { MessageActionsLabels } from "../components/ui/message-actions-clean";
|
|
2
4
|
import type { ToolCallLabels } from "../components/ui/tool-call-card-clean";
|
|
3
5
|
/** Copy used only by the view-model → thread mapping. */
|
|
4
6
|
export type ThreadCopy = {
|
|
@@ -12,85 +14,10 @@ export type ThreadCopy = {
|
|
|
12
14
|
export declare const zhThreadCopy: ThreadCopy;
|
|
13
15
|
export declare const enThreadCopy: ThreadCopy;
|
|
14
16
|
export declare const zhComposerLabels: ChatComposerLabels;
|
|
17
|
+
export declare const zhMessageActionsLabels: MessageActionsLabels;
|
|
15
18
|
export declare const zhToolCallLabels: ToolCallLabels;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
toolCall?: Partial<ToolCallLabels>;
|
|
19
|
-
};
|
|
20
|
-
export declare const zhThreadLabels: {
|
|
21
|
-
composer: {
|
|
22
|
-
placeholder: string;
|
|
23
|
-
requestApproval: string;
|
|
24
|
-
requestApprovalDescription: string;
|
|
25
|
-
approveForMe: string;
|
|
26
|
-
approveForMeDescription: string;
|
|
27
|
-
fullAccess: string;
|
|
28
|
-
fullAccessDescription: string;
|
|
29
|
-
add: string;
|
|
30
|
-
files: string;
|
|
31
|
-
attachClaude: string;
|
|
32
|
-
workInFolder: string;
|
|
33
|
-
chooseFolder: string;
|
|
34
|
-
goal: string;
|
|
35
|
-
goalDescription: string;
|
|
36
|
-
planMode: string;
|
|
37
|
-
planOnDescription: string;
|
|
38
|
-
recordSkill: string;
|
|
39
|
-
draw: string;
|
|
40
|
-
drawDescription: string;
|
|
41
|
-
plugins: string;
|
|
42
|
-
documents: string;
|
|
43
|
-
documentsDescription: string;
|
|
44
|
-
pdf: string;
|
|
45
|
-
pdfDescription: string;
|
|
46
|
-
noFolder: string;
|
|
47
|
-
planOff: string;
|
|
48
|
-
planOn: string;
|
|
49
|
-
recording: string;
|
|
50
|
-
recordingAdded: string;
|
|
51
|
-
recordingDiscarded: string;
|
|
52
|
-
messageSent: string;
|
|
53
|
-
composer: string;
|
|
54
|
-
message: string;
|
|
55
|
-
voiceInput: string;
|
|
56
|
-
sendMessage: string;
|
|
57
|
-
discardRecording: string;
|
|
58
|
-
useRecording: string;
|
|
59
|
-
connectApps: string;
|
|
60
|
-
addToChat: string;
|
|
61
|
-
planOffDescription: string;
|
|
62
|
-
approvalQuestion: string;
|
|
63
|
-
learnMore: string;
|
|
64
|
-
selectModel: string;
|
|
65
|
-
apps: string;
|
|
66
|
-
workingIn: (folder: string) => string;
|
|
67
|
-
appConnection: (name: string | undefined, connected: boolean) => string;
|
|
68
|
-
selected: (name: string | undefined) => string;
|
|
69
|
-
connectedCount: (n: number) => string;
|
|
70
|
-
};
|
|
71
|
-
toolCall: {
|
|
72
|
-
failed: string;
|
|
73
|
-
error: string;
|
|
74
|
-
retry: string;
|
|
75
|
-
arguments: string;
|
|
76
|
-
result: string;
|
|
77
|
-
waiting: string;
|
|
78
|
-
empty: string;
|
|
79
|
-
showAll: string;
|
|
80
|
-
showLess: string;
|
|
81
|
-
copied: string;
|
|
82
|
-
copyArguments: string;
|
|
83
|
-
copyResult: string;
|
|
84
|
-
running: (name: string) => string;
|
|
85
|
-
finished: (name: string) => string;
|
|
86
|
-
failedAnnouncement: (name: string, error?: string) => string;
|
|
87
|
-
duration: (ms: number, live: boolean) => string;
|
|
88
|
-
usingTools: string;
|
|
89
|
-
usedTools: (n: number) => string;
|
|
90
|
-
failedTools: (n: number) => string;
|
|
91
|
-
groupAnnouncement: (count: string, failed: number) => string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
19
|
+
export declare const zhThreadLabels: ThreadLabelsFull;
|
|
20
|
+
export declare const enThreadLabels: Pick<ThreadLabelsFull, "toolsRunning" | "toolsStopped" | "toolsRan" | "toolsFailed">;
|
|
94
21
|
export declare function threadLabelsFor(locale?: string): {
|
|
95
22
|
labels: ThreadLabels;
|
|
96
23
|
copy: ThreadCopy;
|
|
@@ -99,8 +26,13 @@ export declare function threadLabelsFor(locale?: string): {
|
|
|
99
26
|
export type PanelCopy = {
|
|
100
27
|
credits: (balance: number, locale: string) => string;
|
|
101
28
|
history: string;
|
|
29
|
+
backToChat: string;
|
|
30
|
+
historyTitle: string;
|
|
31
|
+
loadingSession: string;
|
|
102
32
|
newChat: string;
|
|
103
33
|
switchLayout: string;
|
|
34
|
+
layoutFloat: string;
|
|
35
|
+
layoutSplit: string;
|
|
104
36
|
close: string;
|
|
105
37
|
placeholder: string;
|
|
106
38
|
unavailable: string;
|
|
@@ -155,6 +87,14 @@ export declare function historyLabelsFor(locale?: string): Partial<import("../co
|
|
|
155
87
|
import { type AIAnswerLabels } from "../components/ui/ai-answer-clean";
|
|
156
88
|
import { type DropzoneLabels } from "../components/ui/dropzone-clean";
|
|
157
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
|
+
};
|
|
158
98
|
attachments: {
|
|
159
99
|
dropzone: DropzoneLabels;
|
|
160
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": {
|