@progress/kendo-react-conversational-ui 15.2.0-develop.2 → 15.2.0-develop.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/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +34 -24
- package/llm-kit/AgentStep.d.ts +14 -0
- package/llm-kit/AgentStep.js +8 -0
- package/llm-kit/AgentStep.mjs +100 -0
- package/llm-kit/ChainOfThought.d.ts +10 -0
- package/llm-kit/ChainOfThought.js +8 -0
- package/llm-kit/ChainOfThought.mjs +67 -0
- package/llm-kit/Checkpoint.d.ts +10 -0
- package/llm-kit/Checkpoint.js +8 -0
- package/llm-kit/Checkpoint.mjs +45 -0
- package/llm-kit/Citation.d.ts +14 -0
- package/llm-kit/Citation.js +8 -0
- package/llm-kit/Citation.mjs +171 -0
- package/llm-kit/Events.d.ts +69 -0
- package/llm-kit/Reasoning.d.ts +10 -0
- package/llm-kit/Reasoning.js +8 -0
- package/llm-kit/Reasoning.mjs +48 -0
- package/llm-kit/Thought.d.ts +16 -0
- package/llm-kit/Thought.js +8 -0
- package/llm-kit/Thought.mjs +47 -0
- package/llm-kit/ToolCall.d.ts +10 -0
- package/llm-kit/ToolCall.js +8 -0
- package/llm-kit/ToolCall.mjs +100 -0
- package/llm-kit/defaults/DefaultCitationBody.d.ts +11 -0
- package/llm-kit/defaults/DefaultCitationBody.js +8 -0
- package/llm-kit/defaults/DefaultCitationBody.mjs +27 -0
- package/llm-kit/defaults/DefaultToolError.d.ts +11 -0
- package/llm-kit/defaults/DefaultToolError.js +8 -0
- package/llm-kit/defaults/DefaultToolError.mjs +12 -0
- package/llm-kit/defaults/DefaultToolInput.d.ts +11 -0
- package/llm-kit/defaults/DefaultToolInput.js +8 -0
- package/llm-kit/defaults/DefaultToolInput.mjs +13 -0
- package/llm-kit/defaults/DefaultToolOutput.d.ts +11 -0
- package/llm-kit/defaults/DefaultToolOutput.js +8 -0
- package/llm-kit/defaults/DefaultToolOutput.mjs +13 -0
- package/llm-kit/index.d.ts +32 -0
- package/llm-kit/interfaces/AgentStepBodyTemplateProps.d.ts +26 -0
- package/llm-kit/interfaces/AgentStepHeaderTemplateProps.d.ts +40 -0
- package/llm-kit/interfaces/AgentStepProps.d.ts +123 -0
- package/llm-kit/interfaces/ChainOfThoughtProps.d.ts +102 -0
- package/llm-kit/interfaces/CheckpointProps.d.ts +48 -0
- package/llm-kit/interfaces/CheckpointState.d.ts +20 -0
- package/llm-kit/interfaces/CheckpointTemplateProps.d.ts +19 -0
- package/llm-kit/interfaces/CitationBodyTemplateProps.d.ts +18 -0
- package/llm-kit/interfaces/CitationProps.d.ts +81 -0
- package/llm-kit/interfaces/CitationShowOn.d.ts +13 -0
- package/llm-kit/interfaces/CitationSource.d.ts +26 -0
- package/llm-kit/interfaces/ReasoningContentTemplateProps.d.ts +18 -0
- package/llm-kit/interfaces/ReasoningProps.d.ts +90 -0
- package/llm-kit/interfaces/Thought.d.ts +55 -0
- package/llm-kit/interfaces/ThoughtProps.d.ts +82 -0
- package/llm-kit/interfaces/ThoughtTemplateProps.d.ts +19 -0
- package/llm-kit/interfaces/ToolCallActionType.d.ts +14 -0
- package/llm-kit/interfaces/ToolCallApprovalTemplateProps.d.ts +20 -0
- package/llm-kit/interfaces/ToolCallErrorTemplateProps.d.ts +16 -0
- package/llm-kit/interfaces/ToolCallParamsTemplateProps.d.ts +16 -0
- package/llm-kit/interfaces/ToolCallProps.d.ts +119 -0
- package/llm-kit/interfaces/ToolCallResultTemplateProps.d.ts +16 -0
- package/llm-kit/interfaces/ToolCallState.d.ts +16 -0
- package/llm-kit/utils.d.ts +12 -0
- package/llm-kit/utils.js +8 -0
- package/llm-kit/utils.mjs +11 -0
- package/messages/index.d.ts +60 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +88 -64
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -11
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { classNames as g, SvgIcon as k } from "@progress/kendo-react-common";
|
|
10
|
+
import { Badge as f } from "@progress/kendo-react-indicators";
|
|
11
|
+
const R = e.forwardRef((u, N) => {
|
|
12
|
+
const {
|
|
13
|
+
svgIcon: n,
|
|
14
|
+
label: l,
|
|
15
|
+
labelClassName: E,
|
|
16
|
+
secondaryLabel: c,
|
|
17
|
+
linesAdded: t,
|
|
18
|
+
linesRemoved: a,
|
|
19
|
+
status: m,
|
|
20
|
+
statusThemeColor: s,
|
|
21
|
+
statusSvgIcon: o,
|
|
22
|
+
completed: h,
|
|
23
|
+
description: r,
|
|
24
|
+
className: v,
|
|
25
|
+
children: p,
|
|
26
|
+
...b
|
|
27
|
+
} = u, i = h === !0, d = !i;
|
|
28
|
+
return /* @__PURE__ */ e.createElement(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: g(
|
|
32
|
+
"k-thought",
|
|
33
|
+
{ "k-thought-completed": i },
|
|
34
|
+
{ "k-thought-active": d },
|
|
35
|
+
v
|
|
36
|
+
),
|
|
37
|
+
ref: N,
|
|
38
|
+
...b
|
|
39
|
+
},
|
|
40
|
+
n && /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-icon-col" }, /* @__PURE__ */ e.createElement(k, { icon: n, size: "small", className: "k-agent-step-icon" })),
|
|
41
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-agent-step-content" }, l && /* @__PURE__ */ e.createElement("span", { className: g("k-agent-step-label", d && "k-text-shimmer", E) }, l), r && /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-description" }, r), c && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-sep" }, "·"), /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-secondary" }, c)), t != null && t > 0 && /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-added k-text-success" }, "+", t), a != null && a > 0 && /* @__PURE__ */ e.createElement("span", { className: "k-agent-step-removed k-text-error" }, "-", a), m && /* @__PURE__ */ e.createElement(f, { size: "small", themeColor: s != null ? s : "success", rounded: "full" }, o && /* @__PURE__ */ e.createElement(k, { icon: o, size: "small" }), m), p && /* @__PURE__ */ e.createElement("div", { className: "k-agent-step-body" }, p))
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
R.displayName = "KendoReactThought";
|
|
45
|
+
export {
|
|
46
|
+
R as ThoughtRow
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToolCallProps } from './interfaces/ToolCallProps';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export declare const ToolCall: React.ForwardRefExoticComponent<ToolCallProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),I=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-buttons"),Q=require("@progress/kendo-react-indicators"),T=require("@progress/kendo-react-layout"),U=require("@progress/kendo-react-intl"),p=require("@progress/kendo-svg-icons"),V=require("./AgentStep.js"),W=require("./defaults/DefaultToolInput.js"),X=require("./defaults/DefaultToolOutput.js"),Z=require("./defaults/DefaultToolError.js"),o=require("../messages/index.js");function $(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const t=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(c,l,t.get?t:{enumerable:!0,get:()=>n[l]})}}return c.default=n,Object.freeze(c)}const e=$(J),ee={active:"base",completed:"success",awaitingApproval:"warning",error:"error"},te={completed:p.checkCircleIcon,awaitingApproval:p.clockIcon,error:p.xCircleIcon},q={active:o.toolCallStateActive,completed:o.toolCallStateCompleted,awaitingApproval:o.toolCallStateAwaitingApproval,error:o.toolCallStateError},w=e.forwardRef((n,c)=>{const{svgIcon:l=p.wrenchIcon,state:t,parameters:f,result:S,errorText:A,approvalText:d,paramsTemplate:m,resultTemplate:v,errorTemplate:g,approvalTemplate:R,onExpandedChange:j,onAction:r,className:_,children:D,...L}=n,E=U.useLocalization(),h=e.useRef(null),O=e.useRef(null),u=t!=null&&t!=="active",x=t!=null&&t!=="active"&&t!=="awaitingApproval",B=u?E.toLanguageString(q[t],o.messages[q[t]]):void 0,N=u?ee[t]:void 0,k=u?te[t]:void 0,z=u&&e.createElement(Q.Badge,{size:"small",themeColor:N,rounded:"full",position:null},k&&e.createElement(I.SvgIcon,{icon:k,size:"small"}),B),y=t==="awaitingApproval",M=e.useCallback(a=>{var s,i;if(r){const C={action:"approve",syntheticEvent:a,nativeEvent:a.nativeEvent,target:(i=(s=h.current)==null?void 0:s.element)!=null?i:a.currentTarget};r(C)}},[r]),P=e.useCallback(a=>{var s,i;if(r){const C={action:"reject",syntheticEvent:a,nativeEvent:a.nativeEvent,target:(i=(s=O.current)==null?void 0:s.element)!=null?i:a.currentTarget};r(C)}},[r]),K=y&&(R?e.createElement(R,{state:t,approvalText:d}):e.createElement(T.Card,null,d&&e.createElement(T.CardBody,null,d),e.createElement(T.CardActions,{layout:"end"},e.createElement(b.Button,{ref:O,fillMode:"outline",onClick:P},E.toLanguageString(o.toolCallReject,o.messages[o.toolCallReject])),e.createElement(b.Button,{ref:h,themeColor:"primary",onClick:M},E.toLanguageString(o.toolCallApprove,o.messages[o.toolCallApprove]))))),F=m!=null?m:W.DefaultToolInput,G=v!=null?v:X.DefaultToolOutput,H=g!=null?g:Z.DefaultToolError,Y=e.createElement(e.Fragment,null,f!=null&&e.createElement(F,{parameters:f}),S!=null&&e.createElement(G,{result:S}),A!=null&&e.createElement(H,{errorText:A}),y?K:D);return e.createElement(V.AgentStep,{ref:c,svgIcon:l,headerExtra:z,completed:x,onExpandedChange:j,className:I.classNames("k-tool-call",_),...L},Y)});w.displayName="KendoReactToolCall";exports.ToolCall=w;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { classNames as Y, SvgIcon as q } from "@progress/kendo-react-common";
|
|
10
|
+
import { Button as h } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { Badge as J } from "@progress/kendo-react-indicators";
|
|
12
|
+
import { Card as Q, CardBody as U, CardActions as V } from "@progress/kendo-react-layout";
|
|
13
|
+
import { useLocalization as W } from "@progress/kendo-react-intl";
|
|
14
|
+
import { wrenchIcon as X, xCircleIcon as Z, clockIcon as $, checkCircleIcon as ee } from "@progress/kendo-svg-icons";
|
|
15
|
+
import { AgentStep as te } from "./AgentStep.mjs";
|
|
16
|
+
import { DefaultToolInput as oe } from "./defaults/DefaultToolInput.mjs";
|
|
17
|
+
import { DefaultToolOutput as ae } from "./defaults/DefaultToolOutput.mjs";
|
|
18
|
+
import { DefaultToolError as le } from "./defaults/DefaultToolError.mjs";
|
|
19
|
+
import { toolCallStateError as ne, toolCallStateAwaitingApproval as re, toolCallStateCompleted as ce, toolCallStateActive as se, messages as v, toolCallReject as w, toolCallApprove as R } from "../messages/index.mjs";
|
|
20
|
+
const ie = {
|
|
21
|
+
active: "base",
|
|
22
|
+
completed: "success",
|
|
23
|
+
awaitingApproval: "warning",
|
|
24
|
+
error: "error"
|
|
25
|
+
}, me = {
|
|
26
|
+
completed: ee,
|
|
27
|
+
awaitingApproval: $,
|
|
28
|
+
error: Z
|
|
29
|
+
}, I = {
|
|
30
|
+
active: se,
|
|
31
|
+
completed: ce,
|
|
32
|
+
awaitingApproval: re,
|
|
33
|
+
error: ne
|
|
34
|
+
}, pe = e.forwardRef((O, k) => {
|
|
35
|
+
const {
|
|
36
|
+
svgIcon: x = X,
|
|
37
|
+
state: t,
|
|
38
|
+
parameters: E,
|
|
39
|
+
result: g,
|
|
40
|
+
errorText: d,
|
|
41
|
+
approvalText: c,
|
|
42
|
+
paramsTemplate: s,
|
|
43
|
+
resultTemplate: i,
|
|
44
|
+
errorTemplate: m,
|
|
45
|
+
approvalTemplate: f,
|
|
46
|
+
onExpandedChange: y,
|
|
47
|
+
onAction: a,
|
|
48
|
+
className: L,
|
|
49
|
+
children: _,
|
|
50
|
+
...B
|
|
51
|
+
} = O, p = W(), C = e.useRef(null), T = e.useRef(null), r = t != null && t !== "active", N = t != null && t !== "active" && t !== "awaitingApproval", b = r ? p.toLanguageString(
|
|
52
|
+
I[t],
|
|
53
|
+
v[I[t]]
|
|
54
|
+
) : void 0, j = r ? ie[t] : void 0, A = r ? me[t] : void 0, z = r && /* @__PURE__ */ e.createElement(J, { size: "small", themeColor: j, rounded: "full", position: null }, A && /* @__PURE__ */ e.createElement(q, { icon: A, size: "small" }), b), S = t === "awaitingApproval", D = e.useCallback(
|
|
55
|
+
(o) => {
|
|
56
|
+
var l, n;
|
|
57
|
+
if (a) {
|
|
58
|
+
const u = {
|
|
59
|
+
action: "approve",
|
|
60
|
+
syntheticEvent: o,
|
|
61
|
+
nativeEvent: o.nativeEvent,
|
|
62
|
+
target: (n = (l = C.current) == null ? void 0 : l.element) != null ? n : o.currentTarget
|
|
63
|
+
};
|
|
64
|
+
a(u);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
[a]
|
|
68
|
+
), M = e.useCallback(
|
|
69
|
+
(o) => {
|
|
70
|
+
var l, n;
|
|
71
|
+
if (a) {
|
|
72
|
+
const u = {
|
|
73
|
+
action: "reject",
|
|
74
|
+
syntheticEvent: o,
|
|
75
|
+
nativeEvent: o.nativeEvent,
|
|
76
|
+
target: (n = (l = T.current) == null ? void 0 : l.element) != null ? n : o.currentTarget
|
|
77
|
+
};
|
|
78
|
+
a(u);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
[a]
|
|
82
|
+
), K = S && (f ? /* @__PURE__ */ e.createElement(f, { state: t, approvalText: c }) : /* @__PURE__ */ e.createElement(Q, null, c && /* @__PURE__ */ e.createElement(U, null, c), /* @__PURE__ */ e.createElement(V, { layout: "end" }, /* @__PURE__ */ e.createElement(h, { ref: T, fillMode: "outline", onClick: M }, p.toLanguageString(w, v[w])), /* @__PURE__ */ e.createElement(h, { ref: C, themeColor: "primary", onClick: D }, p.toLanguageString(R, v[R]))))), F = s != null ? s : oe, G = i != null ? i : ae, H = m != null ? m : le, P = /* @__PURE__ */ e.createElement(e.Fragment, null, E != null && /* @__PURE__ */ e.createElement(F, { parameters: E }), g != null && /* @__PURE__ */ e.createElement(G, { result: g }), d != null && /* @__PURE__ */ e.createElement(H, { errorText: d }), S ? K : _);
|
|
83
|
+
return /* @__PURE__ */ e.createElement(
|
|
84
|
+
te,
|
|
85
|
+
{
|
|
86
|
+
ref: k,
|
|
87
|
+
svgIcon: x,
|
|
88
|
+
headerExtra: z,
|
|
89
|
+
completed: N,
|
|
90
|
+
onExpandedChange: y,
|
|
91
|
+
className: Y("k-tool-call", L),
|
|
92
|
+
...B
|
|
93
|
+
},
|
|
94
|
+
P
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
pe.displayName = "KendoReactToolCall";
|
|
98
|
+
export {
|
|
99
|
+
pe as ToolCall
|
|
100
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CitationBodyTemplateProps } from '../interfaces/CitationBodyTemplateProps';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/** @hidden */
|
|
11
|
+
export declare const DefaultCitationBody: (props: CitationBodyTemplateProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),r=require("@progress/kendo-react-common"),o=require("@progress/kendo-svg-icons");function c(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const n=c(l),m=t=>{const{sources:a}=t;return n.createElement(n.Fragment,null,a.map((e,i)=>n.createElement("div",{className:"k-citation-popover-view",key:i},(e==null?void 0:e.title)&&n.createElement("div",{className:"k-citation-popover-view-title"},e.title),(e==null?void 0:e.url)&&n.createElement("a",{className:"k-citation-popover-view-source",href:e.url,target:"_blank",rel:"noopener noreferrer"},n.createElement(r.IconWrap,{name:o.globeIcon.name,icon:o.globeIcon}),e.url),(e==null?void 0:e.description)&&n.createElement("span",{className:"k-citation-popover-view-body"},e.description))))};exports.DefaultCitationBody=m;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as t from "react";
|
|
9
|
+
import { IconWrap as m } from "@progress/kendo-react-common";
|
|
10
|
+
import { globeIcon as a } from "@progress/kendo-svg-icons";
|
|
11
|
+
const o = (n) => {
|
|
12
|
+
const { sources: i } = n;
|
|
13
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, i.map((e, l) => /* @__PURE__ */ t.createElement("div", { className: "k-citation-popover-view", key: l }, (e == null ? void 0 : e.title) && /* @__PURE__ */ t.createElement("div", { className: "k-citation-popover-view-title" }, e.title), (e == null ? void 0 : e.url) && /* @__PURE__ */ t.createElement(
|
|
14
|
+
"a",
|
|
15
|
+
{
|
|
16
|
+
className: "k-citation-popover-view-source",
|
|
17
|
+
href: e.url,
|
|
18
|
+
target: "_blank",
|
|
19
|
+
rel: "noopener noreferrer"
|
|
20
|
+
},
|
|
21
|
+
/* @__PURE__ */ t.createElement(m, { name: a.name, icon: a }),
|
|
22
|
+
e.url
|
|
23
|
+
), (e == null ? void 0 : e.description) && /* @__PURE__ */ t.createElement("span", { className: "k-citation-popover-view-body" }, e.description))));
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
o as DefaultCitationBody
|
|
27
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToolCallErrorTemplateProps } from '../interfaces/ToolCallErrorTemplateProps';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/** @hidden */
|
|
11
|
+
export declare const DefaultToolError: (props: ToolCallErrorTemplateProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const c=n(a),l=e=>e.errorText?c.createElement("div",{className:"k-messagebox k-messagebox-error"},e.errorText):null;exports.DefaultToolError=l;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as r from "react";
|
|
9
|
+
const o = (e) => e.errorText ? /* @__PURE__ */ r.createElement("div", { className: "k-messagebox k-messagebox-error" }, e.errorText) : null;
|
|
10
|
+
export {
|
|
11
|
+
o as DefaultToolError
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToolCallParamsTemplateProps } from '../interfaces/ToolCallParamsTemplateProps';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/** @hidden */
|
|
11
|
+
export declare const DefaultToolInput: (props: ToolCallParamsTemplateProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),n=require("../utils.js");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const t=o(c),u=e=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-tool-call-label"},"Parameters"),t.createElement("pre",{className:"k-pre"},t.createElement("code",{className:"k-code"},n.formatValue(e.parameters))));exports.DefaultToolInput=u;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { formatValue as t } from "../utils.mjs";
|
|
10
|
+
const r = (a) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "k-tool-call-label" }, "Parameters"), /* @__PURE__ */ e.createElement("pre", { className: "k-pre" }, /* @__PURE__ */ e.createElement("code", { className: "k-code" }, t(a.parameters))));
|
|
11
|
+
export {
|
|
12
|
+
r as DefaultToolInput
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToolCallResultTemplateProps } from '../interfaces/ToolCallResultTemplateProps';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/** @hidden */
|
|
11
|
+
export declare const DefaultToolOutput: (props: ToolCallResultTemplateProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),o=require("../utils.js");function n(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:()=>e[l]})}}return a.default=e,Object.freeze(a)}const t=n(c),u=e=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-tool-call-label"},"Result"),t.createElement("pre",{className:"k-pre"},t.createElement("code",{className:"k-code"},o.formatValue(e.result))));exports.DefaultToolOutput=u;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { formatValue as l } from "../utils.mjs";
|
|
10
|
+
const r = (t) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "k-tool-call-label" }, "Result"), /* @__PURE__ */ e.createElement("pre", { className: "k-pre" }, /* @__PURE__ */ e.createElement("code", { className: "k-code" }, l(t.result))));
|
|
11
|
+
export {
|
|
12
|
+
r as DefaultToolOutput
|
|
13
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export type { ReasoningExpandedChangeEvent, ChainOfThoughtExpandedChangeEvent, ToolCallExpandedChangeEvent, ToolCallActionEvent, CheckpointActionEvent, CitationOpenEvent } from './Events';
|
|
9
|
+
export * from './Reasoning.js';
|
|
10
|
+
export * from './ChainOfThought.js';
|
|
11
|
+
export * from './ToolCall.js';
|
|
12
|
+
export * from './Citation.js';
|
|
13
|
+
export * from './Checkpoint.js';
|
|
14
|
+
export * from './interfaces/ReasoningProps';
|
|
15
|
+
export * from './interfaces/ChainOfThoughtProps';
|
|
16
|
+
export type { Thought } from './interfaces/Thought';
|
|
17
|
+
export * from './interfaces/ThoughtTemplateProps';
|
|
18
|
+
export * from './interfaces/CheckpointState';
|
|
19
|
+
export * from './interfaces/ToolCallProps';
|
|
20
|
+
export * from './interfaces/ToolCallState';
|
|
21
|
+
export * from './interfaces/ToolCallActionType';
|
|
22
|
+
export * from './interfaces/CitationProps';
|
|
23
|
+
export * from './interfaces/CitationSource';
|
|
24
|
+
export * from './interfaces/CheckpointProps';
|
|
25
|
+
export * from './interfaces/ReasoningContentTemplateProps';
|
|
26
|
+
export * from './interfaces/CitationBodyTemplateProps';
|
|
27
|
+
export * from './interfaces/CitationShowOn';
|
|
28
|
+
export * from './interfaces/ToolCallApprovalTemplateProps';
|
|
29
|
+
export * from './interfaces/ToolCallParamsTemplateProps';
|
|
30
|
+
export * from './interfaces/ToolCallResultTemplateProps';
|
|
31
|
+
export * from './interfaces/ToolCallErrorTemplateProps';
|
|
32
|
+
export * from './interfaces/CheckpointTemplateProps';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* The props passed to a custom `bodyTemplate` component for `AgentStep`-based components
|
|
11
|
+
* (`Reasoning`, `ChainOfThought`, `ToolCall`).
|
|
12
|
+
*
|
|
13
|
+
* When a `bodyTemplate` is provided, the component renders the custom component
|
|
14
|
+
* instead of the default step body. The original `children` are passed through
|
|
15
|
+
* so the template can choose how (or whether) to render them.
|
|
16
|
+
*
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export interface AgentStepBodyTemplateProps {
|
|
20
|
+
/** The original step children (e.g. `Thought` rows, text content). */
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
/** Whether the step is currently expanded. */
|
|
23
|
+
expanded?: boolean;
|
|
24
|
+
/** Whether the step is completed. */
|
|
25
|
+
completed?: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SVGIcon } from '@progress/kendo-react-common';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* The props passed to a custom `headerTemplate` component for `AgentStep`-based components
|
|
12
|
+
* (`Reasoning`, `ChainOfThought`, `ToolCall`).
|
|
13
|
+
*
|
|
14
|
+
* When a `headerTemplate` is provided, the component renders the custom component
|
|
15
|
+
* instead of the default step header. All data the default header uses is forwarded.
|
|
16
|
+
*
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export interface AgentStepHeaderTemplateProps {
|
|
20
|
+
/** The SVG icon displayed in the step header. */
|
|
21
|
+
svgIcon?: SVGIcon;
|
|
22
|
+
/** The primary label text. */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** The secondary label text. */
|
|
25
|
+
secondaryLabel?: string;
|
|
26
|
+
/** Additional content rendered in the header content area, e.g. a status badge. */
|
|
27
|
+
headerExtra?: React.ReactNode;
|
|
28
|
+
/** The number of lines added. */
|
|
29
|
+
linesAdded?: number;
|
|
30
|
+
/** The number of lines removed. */
|
|
31
|
+
linesRemoved?: number;
|
|
32
|
+
/** Whether the step is completed. */
|
|
33
|
+
completed?: boolean;
|
|
34
|
+
/** Whether the step is currently expanded. */
|
|
35
|
+
expanded?: boolean;
|
|
36
|
+
/** Whether the step can be expanded/collapsed. */
|
|
37
|
+
expandable?: boolean;
|
|
38
|
+
/** Custom content rendered inside the header. */
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SVGIcon } from '@progress/kendo-react-common';
|
|
9
|
+
import { AgentStepExpandedChangeEvent } from '../Events';
|
|
10
|
+
import { AgentStepHeaderTemplateProps } from './AgentStepHeaderTemplateProps';
|
|
11
|
+
import { AgentStepBodyTemplateProps } from './AgentStepBodyTemplateProps';
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
/**
|
|
14
|
+
* Defines the props for the `AgentStep`-based step components:
|
|
15
|
+
* `Reasoning`, `ChainOfThought`, and `ToolCall`.
|
|
16
|
+
*
|
|
17
|
+
* Extends `React.HTMLAttributes<HTMLDivElement>` to allow passing standard HTML
|
|
18
|
+
* attributes (e.g. `className`, `style`, `children`, `id`) directly to the root element.
|
|
19
|
+
*
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export interface AgentStepProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
/**
|
|
24
|
+
* The SVG icon displayed in the step header.
|
|
25
|
+
* Pass an icon object from `@progress/kendo-svg-icons`.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { brainIcon } from '@progress/kendo-svg-icons';
|
|
30
|
+
* <Reasoning svgIcon={brainIcon} />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
svgIcon?: SVGIcon;
|
|
34
|
+
/**
|
|
35
|
+
* The primary label text displayed in the step header.
|
|
36
|
+
*/
|
|
37
|
+
label?: string;
|
|
38
|
+
/**
|
|
39
|
+
* An optional CSS class name applied to the label `<span>` element in the step header.
|
|
40
|
+
*/
|
|
41
|
+
labelClassName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* An optional secondary label displayed below or alongside the primary label,
|
|
44
|
+
* typically used to show a brief summary of the step (e.g. number of thoughts,
|
|
45
|
+
* file path, or duration text).
|
|
46
|
+
*/
|
|
47
|
+
secondaryLabel?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The number of lines added during this step, shown as a green diff indicator.
|
|
50
|
+
* Typically used in `ToolCall` or code-generating steps.
|
|
51
|
+
*/
|
|
52
|
+
linesAdded?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The number of lines removed during this step, shown as a red diff indicator.
|
|
55
|
+
* Typically used in `ToolCall` or code-modifying steps.
|
|
56
|
+
*/
|
|
57
|
+
linesRemoved?: number;
|
|
58
|
+
/**
|
|
59
|
+
* When `true`, the step header renders a toggle button that allows
|
|
60
|
+
* the user to expand or collapse the step body.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
expandable?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Controls the expanded state of the step in controlled mode.
|
|
67
|
+
* Use together with `onExpandedChange` to manage state externally.
|
|
68
|
+
* When provided, the component behaves as a controlled component.
|
|
69
|
+
*/
|
|
70
|
+
expanded?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The initial expanded state of the step when used in uncontrolled mode.
|
|
73
|
+
* Ignored when `expanded` is provided.
|
|
74
|
+
* Defaults to `false`.
|
|
75
|
+
*/
|
|
76
|
+
defaultExpanded?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* When `true`, the step is marked as completed.
|
|
79
|
+
* Completed steps may render with a distinct visual treatment (e.g. a check icon).
|
|
80
|
+
*/
|
|
81
|
+
completed?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Callback fired when the user expands or collapses the step.
|
|
84
|
+
* Receives an `AgentStepExpandedChangeEvent` with the new `expanded` state.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <Reasoning onExpandedChange={(e) => setExpanded(e.expanded)} />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
onExpandedChange?: (event: AgentStepExpandedChangeEvent) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Additional content rendered inside the step header content area, after the
|
|
94
|
+
* label, secondary label, and line-count indicators, and before the expand
|
|
95
|
+
* indicator. Intended for persistent header UI such as the `ToolCall` status badge.
|
|
96
|
+
*
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
headerExtra?: React.ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* A custom component that replaces the default step header row.
|
|
102
|
+
* Receives all header data props via `AgentStepHeaderTemplateProps`.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* const MyHeader = (props: AgentStepHeaderTemplateProps) => <div>{props.label}</div>;
|
|
107
|
+
* <Reasoning headerTemplate={MyHeader} />
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
headerTemplate?: React.ComponentType<AgentStepHeaderTemplateProps>;
|
|
111
|
+
/**
|
|
112
|
+
* A custom component that replaces the default step body area.
|
|
113
|
+
* Receives `expanded`, `completed`, and `children`
|
|
114
|
+
* via `AgentStepBodyTemplateProps`.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* const MyBody = (props: AgentStepBodyTemplateProps) => <section>{props.children}</section>;
|
|
119
|
+
* <Reasoning bodyTemplate={MyBody} />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
bodyTemplate?: React.ComponentType<AgentStepBodyTemplateProps>;
|
|
123
|
+
}
|