@octaviaflow/core 3.1.0-beta.117 → 3.1.0-beta.119
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/chunk-FM34SY5X.js +3691 -0
- package/dist/chunk-FM34SY5X.js.map +1 -0
- package/dist/chunk-JHIV4QHZ.js +3707 -0
- package/dist/chunk-JHIV4QHZ.js.map +1 -0
- package/dist/chunk-MSRO4K25.js +3691 -0
- package/dist/chunk-MSRO4K25.js.map +1 -0
- package/dist/chunk-ZHTMPKJN.js +3704 -0
- package/dist/chunk-ZHTMPKJN.js.map +1 -0
- package/dist/components/AssistantConversation/AssistantConversation.d.ts +5 -1
- package/dist/components/AssistantConversation/AssistantConversation.d.ts.map +1 -1
- package/dist/components/AssistantConversation/assistant.fixtures.d.ts +2 -0
- package/dist/components/AssistantConversation/assistant.fixtures.d.ts.map +1 -1
- package/dist/components/AssistantConversation/citations.d.ts +3 -0
- package/dist/components/AssistantConversation/citations.d.ts.map +1 -0
- package/dist/components/AssistantConversation/index.d.ts +2 -1
- package/dist/components/AssistantConversation/index.d.ts.map +1 -1
- package/dist/components/AssistantDock/AssistantDock.d.ts +1 -1
- package/dist/components/AssistantDock/AssistantDock.d.ts.map +1 -1
- package/dist/components/ChatToolTrace/ChatToolTrace.d.ts +3 -0
- package/dist/components/ChatToolTrace/ChatToolTrace.d.ts.map +1 -1
- package/dist/index.cjs +62 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/marketing.cjs +44 -17
- package/dist/marketing.cjs.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/marketing.cjs
CHANGED
|
@@ -3832,10 +3832,10 @@ function NodeGlyph({ status }) {
|
|
|
3832
3832
|
}
|
|
3833
3833
|
}
|
|
3834
3834
|
var ChatToolTrace = (0, import_react36.forwardRef)(
|
|
3835
|
-
function ChatToolTrace2({ calls, summary, defaultOpen = false, className, ...rest }, ref) {
|
|
3835
|
+
function ChatToolTrace2({ calls, summary, defaultOpen = false, autoOpen = true, className, ...rest }, ref) {
|
|
3836
3836
|
const count = calls?.length ?? 0;
|
|
3837
3837
|
const running = (calls ?? []).some((c) => c.status === "running" || c.status === "pending");
|
|
3838
|
-
const [open, setOpen] = (0, import_react36.useState)(defaultOpen || running);
|
|
3838
|
+
const [open, setOpen] = (0, import_react36.useState)(defaultOpen || autoOpen && running);
|
|
3839
3839
|
const defaultSummary = running ? "Working\u2026" : `Used ${count} ${count === 1 ? "tool" : "tools"}`;
|
|
3840
3840
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3841
3841
|
"details",
|
|
@@ -4136,7 +4136,7 @@ var STATE_LINE = {
|
|
|
4136
4136
|
thinking: "Thinking\u2026",
|
|
4137
4137
|
processing: "Working\u2026",
|
|
4138
4138
|
speaking: "Writing\u2026",
|
|
4139
|
-
done: "
|
|
4139
|
+
done: "",
|
|
4140
4140
|
stopped: "Stopped",
|
|
4141
4141
|
error: "Couldn't answer",
|
|
4142
4142
|
offline: "Offline"
|
|
@@ -4168,6 +4168,36 @@ function AssistantHeaderButton({
|
|
|
4168
4168
|
}
|
|
4169
4169
|
);
|
|
4170
4170
|
}
|
|
4171
|
+
function stepSummary(steps) {
|
|
4172
|
+
const running = steps.find((s) => s.status === "running" || s.status === "pending");
|
|
4173
|
+
if (running) return running.name;
|
|
4174
|
+
const only = steps.length === 1 ? steps[0] : void 0;
|
|
4175
|
+
if (!only) return void 0;
|
|
4176
|
+
return only.result == null ? only.name : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
4177
|
+
only.name,
|
|
4178
|
+
" \xB7 ",
|
|
4179
|
+
only.result
|
|
4180
|
+
] });
|
|
4181
|
+
}
|
|
4182
|
+
function ReplyText({ message }) {
|
|
4183
|
+
return typeof message.content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4184
|
+
"span",
|
|
4185
|
+
{
|
|
4186
|
+
className: cn("ods-assistant__text", message.streaming && "ods-assistant__text--streaming"),
|
|
4187
|
+
children: message.content
|
|
4188
|
+
}
|
|
4189
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4190
|
+
"div",
|
|
4191
|
+
{
|
|
4192
|
+
className: cn(
|
|
4193
|
+
"ods-assistant__text",
|
|
4194
|
+
"ods-assistant__text--rich",
|
|
4195
|
+
message.streaming && "ods-assistant__text--streaming"
|
|
4196
|
+
),
|
|
4197
|
+
children: message.content
|
|
4198
|
+
}
|
|
4199
|
+
);
|
|
4200
|
+
}
|
|
4171
4201
|
function Block({
|
|
4172
4202
|
block,
|
|
4173
4203
|
busy,
|
|
@@ -4217,6 +4247,7 @@ function AssistantConversation({
|
|
|
4217
4247
|
context,
|
|
4218
4248
|
aura = "normal",
|
|
4219
4249
|
hideHeader = false,
|
|
4250
|
+
layout = "comfortable",
|
|
4220
4251
|
state: stateProp,
|
|
4221
4252
|
greeting,
|
|
4222
4253
|
suggestions,
|
|
@@ -4241,8 +4272,10 @@ function AssistantConversation({
|
|
|
4241
4272
|
const state = stateProp ?? assistantStateOf(messages, busy, typing, { error: Boolean(error) });
|
|
4242
4273
|
const statusLine = STATE_LINE[state] || subtitle;
|
|
4243
4274
|
const tone = STATUS_TONE[state];
|
|
4275
|
+
const compact = layout === "compact";
|
|
4276
|
+
const said = (body) => compact ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ods-assistant__answer", children: body }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatBubble, { variant: "bot", hideAvatar: true, children: body });
|
|
4244
4277
|
const header = hideHeader ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ods-assistant__header", children: [
|
|
4245
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AssistantOrb, { state, size: "md", children: avatar }),
|
|
4278
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AssistantOrb, { state, size: compact ? "sm" : "md", children: avatar }),
|
|
4246
4279
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ods-assistant__heading", children: [
|
|
4247
4280
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { id: nameId, className: "ods-assistant__name", children: name }),
|
|
4248
4281
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -4257,20 +4290,14 @@ function AssistantConversation({
|
|
|
4257
4290
|
actions && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ods-assistant__actions", children: actions })
|
|
4258
4291
|
] });
|
|
4259
4292
|
const thread = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
4260
|
-
greeting &&
|
|
4293
|
+
greeting && said(greeting),
|
|
4261
4294
|
messages.map(
|
|
4262
4295
|
(m) => m.role === "user" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatBubble, { variant: "user", hideAvatar: true, children: m.content }, m.id) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ods-assistant__reply", children: [
|
|
4263
|
-
m.steps && m.steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatToolTrace, { calls: m.steps }),
|
|
4264
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4265
|
-
|
|
4266
|
-
{
|
|
4267
|
-
|
|
4268
|
-
"ods-assistant__text",
|
|
4269
|
-
m.streaming && "ods-assistant__text--streaming"
|
|
4270
|
-
),
|
|
4271
|
-
children: m.content
|
|
4272
|
-
}
|
|
4273
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatThinking, { variant: "shimmer", label: m.status || "Thinking\u2026", size: "sm" }) }),
|
|
4296
|
+
m.steps && m.steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatToolTrace, { calls: m.steps, summary: stepSummary(m.steps), autoOpen: false }),
|
|
4297
|
+
m.content ? said(/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ReplyText, { message: m })) : (
|
|
4298
|
+
// While a step runs, its line already says what is happening.
|
|
4299
|
+
!m.steps?.some((st) => st.status === "running") && said(/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChatThinking, { variant: "shimmer", label: m.status || "Thinking\u2026", size: "sm" }))
|
|
4300
|
+
),
|
|
4274
4301
|
m.blocks && m.blocks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ods-assistant__blocks", children: m.blocks.map((b, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4275
4302
|
Block,
|
|
4276
4303
|
{
|
|
@@ -4311,7 +4338,7 @@ function AssistantConversation({
|
|
|
4311
4338
|
...rest,
|
|
4312
4339
|
state,
|
|
4313
4340
|
intensity: aura,
|
|
4314
|
-
className: cn("ods-assistant", className),
|
|
4341
|
+
className: cn("ods-assistant", compact && "ods-assistant--compact", className),
|
|
4315
4342
|
children: replacement ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ods-assistant__replacement", children: [
|
|
4316
4343
|
header,
|
|
4317
4344
|
context && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ods-assistant__context", children: context }),
|