@docyrus/ui-pro-ai-assistant 0.6.9 → 0.7.1
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/README.md +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -271,7 +271,7 @@ The header renders a tab strip. The first tab is pinned to `tenantAiAgentId` and
|
|
|
271
271
|
| `onMessageSend` | `(message: string) => void` | Fires when a message is sent |
|
|
272
272
|
| `onVoiceStart` | `() => void` | Fires when voice recording starts |
|
|
273
273
|
| `onVoiceEnd` | `() => void` | Fires when voice recording ends |
|
|
274
|
-
| `onFullscreenChange` | `(isFullscreen: boolean) => void` |
|
|
274
|
+
| `onFullscreenChange` | `(isFullscreen: boolean) => void` | Intercepts the expand button. When provided, replaces the package's built-in fullscreen toggle — the host receives the intended next state and decides what to do (toggle, redirect, etc.). When omitted, the package self-toggles its fullscreen state. |
|
|
275
275
|
| `onShare` | `(info: { dataSourceId: string; recordId: string }) => void` | Custom share handler. When provided, the thread header share button calls this instead of the built-in sharing editor |
|
|
276
276
|
|
|
277
277
|
#### Initial prompt
|
package/dist/index.js
CHANGED
|
@@ -34590,7 +34590,7 @@ var AssistantView = ({ ref, ...props }) => {
|
|
|
34590
34590
|
"data-render-mode": "inline",
|
|
34591
34591
|
ref,
|
|
34592
34592
|
children: [
|
|
34593
|
-
showHeader && (!hideHeaderOnWelcome || !(commonProps.showWelcome && commonProps.messages.length === 0)) && /* @__PURE__ */ jsxs("div", { className: "
|
|
34593
|
+
showHeader && (!hideHeaderOnWelcome || !(commonProps.showWelcome && commonProps.messages.length === 0)) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between h-12 px-3 border-b shrink-0 bg-background gap-2", children: [
|
|
34594
34594
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 min-w-0 flex-1", children: renderHeaderTabs ? renderHeaderTabs({ isFullscreen }) : null }),
|
|
34595
34595
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
34596
34596
|
onExpand && /* @__PURE__ */ jsx(
|
|
@@ -36794,25 +36794,23 @@ var DocyAssistant = ({
|
|
|
36794
36794
|
}, 200);
|
|
36795
36795
|
};
|
|
36796
36796
|
const handleExpand = () => {
|
|
36797
|
+
if (onFullscreenChange) {
|
|
36798
|
+
const intendedNext = isInlineMode ? !isInlineFullscreen : !uiState.isExpanded;
|
|
36799
|
+
onFullscreenChange(intendedNext);
|
|
36800
|
+
return;
|
|
36801
|
+
}
|
|
36797
36802
|
if (isInlineMode) {
|
|
36798
|
-
setIsInlineFullscreen((prev) =>
|
|
36799
|
-
const next = !prev;
|
|
36800
|
-
onFullscreenChange?.(next);
|
|
36801
|
-
return next;
|
|
36802
|
-
});
|
|
36803
|
+
setIsInlineFullscreen((prev) => !prev);
|
|
36803
36804
|
return;
|
|
36804
36805
|
}
|
|
36805
36806
|
if (uiState.isExpanded && renderMode === "inline") {
|
|
36806
36807
|
uiActions.setRenderMode("inline");
|
|
36807
36808
|
uiActions.setExpanded(false);
|
|
36808
36809
|
uiActions.setDocked(false);
|
|
36809
|
-
onFullscreenChange?.(false);
|
|
36810
36810
|
return;
|
|
36811
36811
|
}
|
|
36812
|
-
|
|
36813
|
-
uiActions.setExpanded(nextExpanded);
|
|
36812
|
+
uiActions.setExpanded(!uiState.isExpanded);
|
|
36814
36813
|
uiActions.setDocked(false);
|
|
36815
|
-
onFullscreenChange?.(nextExpanded);
|
|
36816
36814
|
};
|
|
36817
36815
|
const handleCreateProject = async (e) => {
|
|
36818
36816
|
e.preventDefault();
|