@usecrow/ui 0.1.23 → 0.1.24
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.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -433,6 +433,11 @@ declare function injectStyles(target?: Document | ShadowRoot): void;
|
|
|
433
433
|
/**
|
|
434
434
|
* Shared TypeScript interfaces for the widget and copilot
|
|
435
435
|
*/
|
|
436
|
+
interface ToolResultLink {
|
|
437
|
+
url: string;
|
|
438
|
+
label: string;
|
|
439
|
+
type?: "primary" | "secondary";
|
|
440
|
+
}
|
|
436
441
|
interface Message {
|
|
437
442
|
id: string;
|
|
438
443
|
content: string;
|
|
@@ -441,6 +446,7 @@ interface Message {
|
|
|
441
446
|
citations?: Citation[];
|
|
442
447
|
thinking?: string;
|
|
443
448
|
thinkingComplete?: boolean;
|
|
449
|
+
links?: ToolResultLink[];
|
|
444
450
|
}
|
|
445
451
|
interface Citation {
|
|
446
452
|
document_id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -433,6 +433,11 @@ declare function injectStyles(target?: Document | ShadowRoot): void;
|
|
|
433
433
|
/**
|
|
434
434
|
* Shared TypeScript interfaces for the widget and copilot
|
|
435
435
|
*/
|
|
436
|
+
interface ToolResultLink {
|
|
437
|
+
url: string;
|
|
438
|
+
label: string;
|
|
439
|
+
type?: "primary" | "secondary";
|
|
440
|
+
}
|
|
436
441
|
interface Message {
|
|
437
442
|
id: string;
|
|
438
443
|
content: string;
|
|
@@ -441,6 +446,7 @@ interface Message {
|
|
|
441
446
|
citations?: Citation[];
|
|
442
447
|
thinking?: string;
|
|
443
448
|
thinkingComplete?: boolean;
|
|
449
|
+
links?: ToolResultLink[];
|
|
444
450
|
}
|
|
445
451
|
interface Citation {
|
|
446
452
|
document_id: string;
|
package/dist/index.js
CHANGED
|
@@ -249,6 +249,15 @@ function useChat({
|
|
|
249
249
|
)
|
|
250
250
|
);
|
|
251
251
|
break;
|
|
252
|
+
case "tool_result_links":
|
|
253
|
+
if (parsed.links && Array.isArray(parsed.links)) {
|
|
254
|
+
setMessages(
|
|
255
|
+
(prev) => prev.map(
|
|
256
|
+
(msg) => msg.id === botMsgId ? { ...msg, links: [...msg.links || [], ...parsed.links] } : msg
|
|
257
|
+
)
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
break;
|
|
252
261
|
case "client_tool_call":
|
|
253
262
|
pendingClientTools.push({
|
|
254
263
|
toolName: parsed.tool_name,
|