@nexface/chat 0.1.19 → 0.1.20-alpha.0
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/assistant-components.js +8 -3
- package/dist/default-chat.d.ts +1 -1
- package/dist/default-chat.js +536 -299
- package/dist/fonts/Inter-OFL.txt +93 -0
- package/dist/fonts/inter-medium.ttf +0 -0
- package/dist/protocol-messages.js +1 -6
- package/dist/react.d.ts +5 -0
- package/dist/react.js +26 -6
- package/dist/shared/tool-presentation.d.ts +16 -0
- package/dist/shared/tool-presentation.js +5 -0
- package/dist/styles.css +1481 -676
- package/dist/tool-presentation.d.ts +6 -0
- package/dist/tool-presentation.js +70 -0
- package/dist/tool-result.d.ts +5 -0
- package/dist/tool-result.js +31 -0
- package/dist/types.d.ts +3 -1
- package/dist/ui/home-demo/greeting.d.ts +3 -1
- package/dist/ui/home-demo/greeting.js +2 -2
- package/dist/ui/home-demo/suggestions.d.ts +2 -4
- package/dist/ui/home-demo/suggestions.js +4 -4
- package/dist/ui/home-demo/trace.js +2 -3
- package/package.json +3 -3
|
@@ -11,10 +11,12 @@ import { TooltipIconButton } from "./ui/tooltip-icon-button.js";
|
|
|
11
11
|
import { Button } from "./ui/button.js";
|
|
12
12
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
13
13
|
import { ToolGroupRoot, ToolGroupContent } from "./ui/tool-group.aui.js";
|
|
14
|
-
import { DisclosureTrigger,
|
|
14
|
+
import { DisclosureTrigger, disclosureContentClass } from "./ui/home-demo/trace.js";
|
|
15
15
|
import { Reasoning, ReasoningRoot, ReasoningContent, ReasoningText } from "./ui/reasoning.aui.js";
|
|
16
16
|
import { TraceLine } from "./ui/home-demo/trace-line.js";
|
|
17
17
|
import { attachmentAccept } from "./attachments.js";
|
|
18
|
+
import { useToolPresentations } from "./react.js";
|
|
19
|
+
import { ToolPresentationUI } from "./tool-presentation.js";
|
|
18
20
|
export function AttachmentTile({ binding, savedPreview, }) {
|
|
19
21
|
const attachment = useAuiState((s) => s.attachment);
|
|
20
22
|
const preview = binding?.attachments.preview(attachment.id) ??
|
|
@@ -103,7 +105,10 @@ const groupAssistantParts = groupPartByType({
|
|
|
103
105
|
"standalone-tool-call": [],
|
|
104
106
|
});
|
|
105
107
|
export function AssistantParts({ showDetails, tools = [], }) {
|
|
106
|
-
|
|
108
|
+
const registry = useToolPresentations();
|
|
109
|
+
return (_jsx(_Fragment, { children: _jsx(GroupedParts, { groupBy: (part, context) => part.type === "tool-call" && registry?.controller?.get(part.toolName)
|
|
110
|
+
? []
|
|
111
|
+
: groupAssistantParts(part, context), children: ({ part, children }) => {
|
|
107
112
|
switch (part.type) {
|
|
108
113
|
case "group-chainOfThought":
|
|
109
114
|
return _jsx("div", { className: cn("mb-3"), children: children });
|
|
@@ -121,7 +126,7 @@ export function AssistantParts({ showDetails, tools = [], }) {
|
|
|
121
126
|
case "text":
|
|
122
127
|
return part.text === "" && part.status?.type === "running" ? (_jsx(TraceLine, { live: true, label: "thinking" })) : (_jsx(MarkdownText, {}));
|
|
123
128
|
case "tool-call":
|
|
124
|
-
return (part.toolUI ?? (_jsx(
|
|
129
|
+
return (part.toolUI ?? (_jsx(ToolPresentationUI, { ...part, showDetails: showDetails, presentation: tools.find((tool) => tool.type === "tool" && tool.toolCallId === part.toolCallId) })));
|
|
125
130
|
case "indicator":
|
|
126
131
|
return _jsx(TraceLine, { live: true, label: "thinking" });
|
|
127
132
|
default:
|
package/dist/default-chat.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import type { ChatProps } from "./types.js";
|
|
3
|
-
export declare function Chat({ title, avatar, welcomeMessage, welcomeDescription, open, onOpenChange, placeholder, layout, side, className, style, suggestions, suggestNextMessage, attachments, dictation, sessionSidebar, showToolDetails, onFullscreenChange, onRunResult, }: ChatProps): ReactElement | null;
|
|
3
|
+
export declare function Chat({ title, avatar, welcomeMessage, welcomeDescription, welcomeIcon, open, onOpenChange, placeholder, layout, side, className, style, suggestions, suggestNextMessage, attachments, dictation, sessionSidebar, showToolDetails, onFullscreenChange, onRunResult, }: ChatProps): ReactElement | null;
|