@gram-ai/elements 1.38.1 → 1.38.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/components/ui/tool-ui.d.ts +12 -8
- package/dist/elements.cjs +1 -1
- package/dist/elements.css +1 -1
- package/dist/elements.js +1 -1
- package/dist/{index-DJwZquGT.js → index-CNSYMffp.js} +2471 -2473
- package/dist/index-CNSYMffp.js.map +1 -0
- package/dist/{index-EHNsQZHU.cjs → index-DTZOelvp.cjs} +66 -66
- package/dist/index-DTZOelvp.cjs.map +1 -0
- package/dist/{profiler-tmT7xKnI.cjs → profiler-CZDIhdNN.cjs} +2 -2
- package/dist/{profiler-tmT7xKnI.cjs.map → profiler-CZDIhdNN.cjs.map} +1 -1
- package/dist/{profiler-De-Fmqbg.js → profiler-DiD0upYa.js} +2 -2
- package/dist/{profiler-De-Fmqbg.js.map → profiler-DiD0upYa.js.map} +1 -1
- package/dist/{startRecording-BDccFns1.cjs → startRecording-B2vd2HGG.cjs} +2 -2
- package/dist/{startRecording-BDccFns1.cjs.map → startRecording-B2vd2HGG.cjs.map} +1 -1
- package/dist/{startRecording-BD0yDLcT.js → startRecording-DAV031k-.js} +2 -2
- package/dist/{startRecording-BD0yDLcT.js.map → startRecording-DAV031k-.js.map} +1 -1
- package/package.json +1 -1
- package/src/components/ui/tool-ui.tsx +48 -37
- package/dist/index-DJwZquGT.js.map +0 -1
- package/dist/index-EHNsQZHU.cjs.map +0 -1
|
@@ -51,6 +51,12 @@ interface SectionHighlight {
|
|
|
51
51
|
/** Mark colour: "risk" (red, default) for findings, "search" (yellow) for a
|
|
52
52
|
* text-search hit. */
|
|
53
53
|
tone?: "risk" | "search";
|
|
54
|
+
/** Search tone only: index of the active query occurrence within THIS section
|
|
55
|
+
* (the unified thread navigator's current target). The host owns occurrence
|
|
56
|
+
* stepping, so this is controlled: the occurrence at this index renders bright
|
|
57
|
+
* and scrolls into view; null/undefined means this section holds no active
|
|
58
|
+
* occurrence, so all its hits render pale. */
|
|
59
|
+
activeOccurrence?: number | null;
|
|
54
60
|
}
|
|
55
61
|
interface ToolUIProps {
|
|
56
62
|
/** Display name of the tool */
|
|
@@ -76,9 +82,10 @@ interface ToolUIProps {
|
|
|
76
82
|
/** When set, highlight occurrences of this query (case-insensitive) in the
|
|
77
83
|
* tool name — e.g. a thread search for "customer" lights up `get_customer`. */
|
|
78
84
|
nameQuery?: string;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
|
|
85
|
+
/** Index of the active query occurrence within the tool name (the unified
|
|
86
|
+
* navigator's current target), or null when the active occurrence isn't in the
|
|
87
|
+
* name. Per-section args/output active occurrences ride their `*Highlight`. */
|
|
88
|
+
nameActiveOccurrence?: number | null;
|
|
82
89
|
/** Additional class names */
|
|
83
90
|
className?: string;
|
|
84
91
|
/** MCP tool annotations */
|
|
@@ -103,9 +110,6 @@ interface ToolUISectionProps {
|
|
|
103
110
|
language?: BundledLanguage;
|
|
104
111
|
/** Flagged substrings — renders a navigable highlighted view + header icon. */
|
|
105
112
|
highlight?: SectionHighlight;
|
|
106
|
-
/** Search tone only: whether this tool holds the active thread match (bright
|
|
107
|
-
* vs pale marks). */
|
|
108
|
-
searchActive?: boolean;
|
|
109
113
|
}
|
|
110
114
|
declare function StatusIndicator({ status, }: {
|
|
111
115
|
status: ToolStatus;
|
|
@@ -121,11 +125,11 @@ declare function SyntaxHighlightedCode({ text, language, className, }: {
|
|
|
121
125
|
declare namespace SyntaxHighlightedCode {
|
|
122
126
|
var displayName: string;
|
|
123
127
|
}
|
|
124
|
-
declare function ToolUISection({ title, content, defaultExpanded, highlightSyntax, language, highlight,
|
|
128
|
+
declare function ToolUISection({ title, content, defaultExpanded, highlightSyntax, language, highlight, }: ToolUISectionProps): React.JSX.Element;
|
|
125
129
|
declare namespace ToolUISection {
|
|
126
130
|
var displayName: string;
|
|
127
131
|
}
|
|
128
|
-
declare function ToolUI({ name, icon, provider, status, request, result, defaultExpanded, requestHighlight, resultHighlight, nameQuery,
|
|
132
|
+
declare function ToolUI({ name, icon, provider, status, request, result, defaultExpanded, requestHighlight, resultHighlight, nameQuery, nameActiveOccurrence, className, annotations, onApproveOnce, onApproveForSession, onDeny, }: ToolUIProps): React.JSX.Element;
|
|
129
133
|
declare namespace ToolUI {
|
|
130
134
|
var displayName: string;
|
|
131
135
|
}
|
package/dist/elements.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DTZOelvp.cjs"),t=require("./index-CGBkMd0d.cjs");exports.ActiveChatTitle=e.ActiveChatTitle;exports.CREDITS_EXHAUSTED_MESSAGE=e.CREDITS_EXHAUSTED_MESSAGE;exports.Calendar=e.Calendar;exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.Markdown=e.Markdown;exports.MessageContent=e.MessageContent;exports.PRESETS=e.PRESETS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.SyntaxHighlightedCode=e.SyntaxHighlightedCode;exports.TimeRangePicker=e.TimeRangePicker;exports.ToolFallback=e.ToolFallback;exports.ToolUI=e.ToolUI;exports.ToolUISection=e.ToolUISection;exports.convertGramMessagesToExported=e.convertGramMessagesToExported;exports.convertGramMessagesToUIMessages=e.convertGramMessagesToUIMessages;exports.defineFrontendTool=e.defineFrontendTool;exports.describeStreamError=e.describeStreamError;exports.getPresetRange=e.getPresetRange;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.sleep=t.sleep;exports.useChatId=t.useChatId;exports.useElements=t.useElements;exports.useGramElements=t.useElements;
|
|
2
2
|
//# sourceMappingURL=elements.cjs.map
|