@nexface/chat 0.1.20-alpha.0 → 0.1.20
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 +3 -8
- package/dist/default-chat.d.ts +1 -1
- package/dist/default-chat.js +299 -536
- package/dist/protocol-messages.js +6 -1
- package/dist/react.d.ts +0 -5
- package/dist/react.js +6 -26
- package/dist/styles.css +677 -1482
- package/dist/tool-result.d.ts +0 -5
- package/dist/tool-result.js +0 -31
- package/dist/types.d.ts +1 -3
- package/dist/ui/home-demo/greeting.d.ts +1 -3
- package/dist/ui/home-demo/greeting.js +2 -2
- package/dist/ui/home-demo/suggestions.d.ts +4 -2
- package/dist/ui/home-demo/suggestions.js +4 -4
- package/dist/ui/home-demo/trace.js +3 -2
- package/package.json +3 -3
- package/dist/fonts/Inter-OFL.txt +0 -93
- package/dist/fonts/inter-medium.ttf +0 -0
- package/dist/shared/tool-presentation.d.ts +0 -16
- package/dist/shared/tool-presentation.js +0 -5
- package/dist/tool-presentation.d.ts +0 -6
- package/dist/tool-presentation.js +0 -70
|
@@ -11,12 +11,10 @@ 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, disclosureContentClass } from "./ui/home-demo/trace.js";
|
|
14
|
+
import { DisclosureTrigger, ToolCall, 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";
|
|
20
18
|
export function AttachmentTile({ binding, savedPreview, }) {
|
|
21
19
|
const attachment = useAuiState((s) => s.attachment);
|
|
22
20
|
const preview = binding?.attachments.preview(attachment.id) ??
|
|
@@ -105,10 +103,7 @@ const groupAssistantParts = groupPartByType({
|
|
|
105
103
|
"standalone-tool-call": [],
|
|
106
104
|
});
|
|
107
105
|
export function AssistantParts({ showDetails, tools = [], }) {
|
|
108
|
-
|
|
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 }) => {
|
|
106
|
+
return (_jsx(_Fragment, { children: _jsx(GroupedParts, { groupBy: groupAssistantParts, children: ({ part, children }) => {
|
|
112
107
|
switch (part.type) {
|
|
113
108
|
case "group-chainOfThought":
|
|
114
109
|
return _jsx("div", { className: cn("mb-3"), children: children });
|
|
@@ -126,7 +121,7 @@ export function AssistantParts({ showDetails, tools = [], }) {
|
|
|
126
121
|
case "text":
|
|
127
122
|
return part.text === "" && part.status?.type === "running" ? (_jsx(TraceLine, { live: true, label: "thinking" })) : (_jsx(MarkdownText, {}));
|
|
128
123
|
case "tool-call":
|
|
129
|
-
return (part.toolUI ?? (_jsx(
|
|
124
|
+
return (part.toolUI ?? (_jsx(ToolCall, { ...part, showDetails: showDetails, presentation: tools.find((tool) => tool.type === "tool" && tool.toolCallId === part.toolCallId) })));
|
|
130
125
|
case "indicator":
|
|
131
126
|
return _jsx(TraceLine, { live: true, label: "thinking" });
|
|
132
127
|
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,
|
|
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;
|