@sybilion/uilib 1.4.27 → 1.4.28
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/assets/globals.css +4 -4
- package/dist/esm/src/components/ui/Chat/ChatChrome/ChatChrome.js +1 -1
- package/dist/esm/src/components/ui/Chat/ChatPrompt/useChatPromptEditor.js +7 -4
- package/dist/esm/src/components/ui/Page/PageFooter/PageFooter.styl.js +1 -1
- package/dist/esm/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js +16 -5
- package/dist/esm/types/tests/sidebarMenuButton.test.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/ui/Chat/ChatPrompt/useChatPromptEditor.ts +7 -4
- package/src/components/ui/Page/PageFooter/PageFooter.styl +8 -2
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.tsx +37 -23
- package/src/docs/pages/ChatAttachmentsDropzonePage.tsx +40 -38
- package/src/docs/pages/ChatComposerPrefillPage.tsx +30 -28
- package/src/docs/pages/ChatPage.styl +1 -1
- package/src/docs/pages/ChatSlashCommandsPage.tsx +31 -29
- package/src/docs/pages/ChatUserCsvAttachmentPage.tsx +29 -27
package/assets/globals.css
CHANGED
|
@@ -133,8 +133,8 @@
|
|
|
133
133
|
:root {
|
|
134
134
|
--sb-cyan-50: oklch(0.964 0.006 204);
|
|
135
135
|
--sb-cyan-100: oklch(0.933 0.011 204);
|
|
136
|
-
--sb-cyan-200: oklch(0.
|
|
137
|
-
--sb-cyan-300: oklch(0.
|
|
136
|
+
--sb-cyan-200: oklch(0.882 0.127 204);
|
|
137
|
+
--sb-cyan-300: oklch(0.754 0.181 204);
|
|
138
138
|
--sb-cyan-400: oklch(0.625 0.234 204);
|
|
139
139
|
--sb-cyan-500: oklch(0.518 0.258 204);
|
|
140
140
|
--sb-cyan-600: oklch(0.421 0.231 204);
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
|
|
299
299
|
/* app variables */
|
|
300
300
|
--brand-color: var(--sb-purple-400);
|
|
301
|
-
--brand-color-bg: var(--brand-color-
|
|
301
|
+
--brand-color-bg: var(--brand-color-400);
|
|
302
302
|
--brand-color-50: var(--sb-purple-50);
|
|
303
303
|
--brand-color-100: var(--sb-purple-100);
|
|
304
304
|
--brand-color-200: var(--sb-purple-200);
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
.dark {
|
|
372
|
-
--brand-color-bg: var(--brand-color-
|
|
372
|
+
--brand-color-bg: var(--brand-color-500);
|
|
373
373
|
--page-color: oklch(0.22 0 0);
|
|
374
374
|
--page-color-alpha-800: oklch(0.2242 0 0 / 0.8);
|
|
375
375
|
--background: oklch(0.14 0 0);
|
|
@@ -30,8 +30,8 @@ import '@radix-ui/react-slot';
|
|
|
30
30
|
import '../../Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js';
|
|
31
31
|
import '../../Sidebar/SidebarGroupLabel/SidebarGroupLabel.styl.js';
|
|
32
32
|
import '../../Sidebar/SidebarMenu/SidebarMenu.styl.js';
|
|
33
|
-
import '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
34
33
|
import '../../Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js';
|
|
34
|
+
import '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
35
35
|
import '../../Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js';
|
|
36
36
|
import '../../Sidebar/SidebarMenuSub/SidebarMenuSub.styl.js';
|
|
37
37
|
import '../../Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js';
|
|
@@ -137,14 +137,17 @@ function useChatPromptEditor({ disabled, placeholder, slashCommandItems, onSlash
|
|
|
137
137
|
if (!editor || prefillMessage == null || prefillMessage === '')
|
|
138
138
|
return;
|
|
139
139
|
editor.commands.setContent(chatPromptParagraphDoc(prefillMessage));
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
// Derive plainDraft from the prefill text directly: relying on
|
|
141
|
+
// editor.getText() right after setContent can race with onTransaction
|
|
142
|
+
// (which also reads getText), leaving plainDraft empty and the submit
|
|
143
|
+
// button disabled.
|
|
144
|
+
setPlainDraft(prefillMessage);
|
|
142
145
|
queueMicrotask(() => {
|
|
143
146
|
const dom = chatPromptSafeEditorDom(editor);
|
|
144
147
|
if (dom)
|
|
145
|
-
syncChatPromptComposerHeight(dom,
|
|
148
|
+
syncChatPromptComposerHeight(dom, prefillMessage);
|
|
146
149
|
if (!disabled && !editor.isDestroyed) {
|
|
147
|
-
editor.chain().focus(
|
|
150
|
+
editor.chain().focus().selectAll().run();
|
|
148
151
|
}
|
|
149
152
|
});
|
|
150
153
|
}, [editor, prefillMessage, disabled]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PageFooter_root__TAfX6{display:flex;flex-direction:column;gap:6px;padding:var(--p-5) var(--p-10)}@media (max-width:768px){.PageFooter_root__TAfX6{padding:var(--p-10) var(--p-6)}}.PageFooter_line__OyGA-{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.PageFooter_line__OyGA-:last-child{min-height:55px}.PageFooter_meta__Gvenf{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_copyright__4LFUP{font-size:14px}.PageFooter_links__q5BXo{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_link__mel3N{align-items:center;color:var(--foreground);display:inline-flex;font-size:14px;gap:var(--p-2);text-decoration:none}.PageFooter_link__mel3N:hover{text-decoration:underline}.PageFooter_link__mel3N svg{color:var(--brand-color-400);flex-shrink:0;height:20px;width:20px}.PageFooter_logo__B2SRg{align-items:center;display:flex;font-size:var(--text-2xl);position:relative}.PageFooter_logo__B2SRg a{align-items:center;color:var(--foreground);display:flex;gap:var(--p-2);text-decoration:none}.PageFooter_logo__B2SRg svg{height:24px;width:24px}.PageFooter_version__8pZXn{align-items:center;bottom:
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PageFooter_root__TAfX6{display:flex;flex-direction:column;gap:6px;padding:var(--p-5) var(--p-10)}@media (max-width:768px){.PageFooter_root__TAfX6{padding:var(--p-10) var(--p-6)}}.PageFooter_line__OyGA-{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.PageFooter_line__OyGA-:last-child{min-height:55px}.PageFooter_meta__Gvenf{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_copyright__4LFUP{font-size:14px}.PageFooter_links__q5BXo{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_link__mel3N{align-items:center;color:var(--foreground);display:inline-flex;font-size:14px;gap:var(--p-2);text-decoration:none}.PageFooter_link__mel3N:hover{text-decoration:underline}.PageFooter_link__mel3N svg{color:var(--brand-color-400);flex-shrink:0;height:20px;width:20px}.PageFooter_logo__B2SRg{align-items:center;display:flex;font-size:var(--text-2xl);position:relative}.PageFooter_logo__B2SRg a{align-items:center;color:var(--foreground);display:flex;gap:var(--p-2);text-decoration:none}.PageFooter_logo__B2SRg svg{height:24px;width:24px}.PageFooter_version__8pZXn{align-items:center;bottom:10px;color:var(--muted-foreground);display:flex;font-size:14px;left:calc(100% + 10px);opacity:.5;position:absolute;white-space:nowrap}.PageFooter_version__8pZXn:before{content:\"v\"}@media (min-width:1024px){.PageFooter_version__8pZXn{opacity:0;transition:opacity .1s ease-out}.PageFooter_logo__B2SRg:hover .PageFooter_version__8pZXn{opacity:1}}.PageFooter_versionLink__dILP5{color:inherit;text-decoration:none}.PageFooter_logo__B2SRg:hover .PageFooter_version__8pZXn{opacity:1}";
|
|
4
4
|
var S = {"root":"PageFooter_root__TAfX6","line":"PageFooter_line__OyGA-","meta":"PageFooter_meta__Gvenf","copyright":"PageFooter_copyright__4LFUP","links":"PageFooter_links__q5BXo","link":"PageFooter_link__mel3N","logo":"PageFooter_logo__B2SRg","version":"PageFooter_version__8pZXn","versionLink":"PageFooter_versionLink__dILP5"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
import { jsx, jsxs
|
|
2
|
-
import cn from 'classnames';
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
import { Button } from '../../Button/Button.js';
|
|
4
|
-
import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
5
3
|
import { ChevronRight } from 'lucide-react';
|
|
6
4
|
import S from './SidebarMenuButton.styl.js';
|
|
5
|
+
import { Slottable } from '@radix-ui/react-slot';
|
|
6
|
+
import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
7
|
+
import cn from 'classnames';
|
|
7
8
|
|
|
8
9
|
function SidebarMenuButton({ asChild = false, isActive = false, hasSubItems = false, isExpanded = false, variant = 'ghost', size = 'sm', className, icon, children, addon, ...props }) {
|
|
9
10
|
const effectiveAsChild = asChild && !hasSubItems;
|
|
10
11
|
const label = (jsx(SmartTextTruncate, { className: S.sidebarMenuButtonLabel, children: children }));
|
|
11
12
|
const chevron = hasSubItems ? (jsx("span", { className: cn(S.sidebarMenuButtonChevron, isExpanded && S.expanded), "aria-hidden": "true", children: jsx(ChevronRight, { size: 16 }) })) : null;
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
const buttonClassName = cn(variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton, S[`size-${size}`], className);
|
|
14
|
+
if (effectiveAsChild) {
|
|
15
|
+
// The consumer supplies the root element (e.g. <NavLink/>). Radix Slot
|
|
16
|
+
// requires exactly one element child, so the consumer's element is wrapped
|
|
17
|
+
// in <Slottable/> and icon/addon stay as siblings — Slot clones the
|
|
18
|
+
// consumer's element with Button's props and injects the siblings as its
|
|
19
|
+
// children. SmartTextTruncate is intentionally omitted: wrapping the
|
|
20
|
+
// consumer's element would nest the rendered <a> inside a truncate
|
|
21
|
+
// container and break the slot contract.
|
|
22
|
+
return (jsxs(Button, { asChild: true, variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, className: buttonClassName, ...props, children: [icon, jsx(Slottable, { children: children }), addon] }));
|
|
23
|
+
}
|
|
24
|
+
return (jsxs(Button, { variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, "aria-expanded": hasSubItems ? isExpanded : undefined, className: buttonClassName, ...props, children: [icon, label, addon, chevron] }));
|
|
14
25
|
}
|
|
15
26
|
|
|
16
27
|
export { SidebarMenuButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -203,13 +203,16 @@ export function useChatPromptEditor({
|
|
|
203
203
|
useEffect(() => {
|
|
204
204
|
if (!editor || prefillMessage == null || prefillMessage === '') return;
|
|
205
205
|
editor.commands.setContent(chatPromptParagraphDoc(prefillMessage));
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
// Derive plainDraft from the prefill text directly: relying on
|
|
207
|
+
// editor.getText() right after setContent can race with onTransaction
|
|
208
|
+
// (which also reads getText), leaving plainDraft empty and the submit
|
|
209
|
+
// button disabled.
|
|
210
|
+
setPlainDraft(prefillMessage);
|
|
208
211
|
queueMicrotask(() => {
|
|
209
212
|
const dom = chatPromptSafeEditorDom(editor);
|
|
210
|
-
if (dom) syncChatPromptComposerHeight(dom,
|
|
213
|
+
if (dom) syncChatPromptComposerHeight(dom, prefillMessage);
|
|
211
214
|
if (!disabled && !editor.isDestroyed) {
|
|
212
|
-
editor.chain().focus(
|
|
215
|
+
editor.chain().focus().selectAll().run();
|
|
213
216
|
}
|
|
214
217
|
});
|
|
215
218
|
}, [editor, prefillMessage, disabled]);
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
.version
|
|
71
71
|
position absolute
|
|
72
|
-
bottom
|
|
72
|
+
bottom 10px
|
|
73
73
|
left calc(100% + 10px)
|
|
74
74
|
|
|
75
75
|
display flex
|
|
@@ -78,12 +78,18 @@
|
|
|
78
78
|
font-size 14px
|
|
79
79
|
color var(--muted-foreground)
|
|
80
80
|
opacity 0.5
|
|
81
|
-
transition opacity 0.3s ease-out
|
|
82
81
|
white-space nowrap
|
|
83
82
|
|
|
84
83
|
&::before
|
|
85
84
|
content 'v'
|
|
86
85
|
|
|
86
|
+
@media (min-width: unit(DESKTOP, 'px'))
|
|
87
|
+
opacity 0
|
|
88
|
+
transition opacity 0.1s ease-out
|
|
89
|
+
|
|
90
|
+
.logo:hover &
|
|
91
|
+
opacity 1
|
|
92
|
+
|
|
87
93
|
.versionLink
|
|
88
94
|
color inherit
|
|
89
95
|
text-decoration none
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import cn from 'classnames';
|
|
2
|
-
|
|
3
1
|
import { Button } from '#uilib/components/ui/Button';
|
|
4
2
|
import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
|
|
5
|
-
import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
|
|
6
3
|
import { ChevronRight } from 'lucide-react';
|
|
7
|
-
|
|
8
4
|
import S from './SidebarMenuButton.styl';
|
|
5
|
+
import { Slottable } from '@radix-ui/react-slot';
|
|
6
|
+
import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
|
|
7
|
+
import cn from 'classnames';
|
|
9
8
|
|
|
10
9
|
export function SidebarMenuButton({
|
|
11
10
|
asChild = false,
|
|
@@ -45,38 +44,53 @@ export function SidebarMenuButton({
|
|
|
45
44
|
</span>
|
|
46
45
|
) : null;
|
|
47
46
|
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</>
|
|
47
|
+
const buttonClassName = cn(
|
|
48
|
+
variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
|
|
49
|
+
S[`size-${size}`],
|
|
50
|
+
className,
|
|
53
51
|
);
|
|
54
52
|
|
|
53
|
+
if (effectiveAsChild) {
|
|
54
|
+
// The consumer supplies the root element (e.g. <NavLink/>). Radix Slot
|
|
55
|
+
// requires exactly one element child, so the consumer's element is wrapped
|
|
56
|
+
// in <Slottable/> and icon/addon stay as siblings — Slot clones the
|
|
57
|
+
// consumer's element with Button's props and injects the siblings as its
|
|
58
|
+
// children. SmartTextTruncate is intentionally omitted: wrapping the
|
|
59
|
+
// consumer's element would nest the rendered <a> inside a truncate
|
|
60
|
+
// container and break the slot contract.
|
|
61
|
+
return (
|
|
62
|
+
<Button
|
|
63
|
+
asChild
|
|
64
|
+
variant={variant}
|
|
65
|
+
size={size}
|
|
66
|
+
data-slot="sidebar-menu-button"
|
|
67
|
+
data-sidebar="menu-button"
|
|
68
|
+
data-active={isActive}
|
|
69
|
+
className={buttonClassName}
|
|
70
|
+
{...props}
|
|
71
|
+
>
|
|
72
|
+
{icon}
|
|
73
|
+
<Slottable>{children}</Slottable>
|
|
74
|
+
{addon}
|
|
75
|
+
</Button>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
55
79
|
return (
|
|
56
80
|
<Button
|
|
57
|
-
asChild={effectiveAsChild}
|
|
58
81
|
variant={variant}
|
|
59
82
|
size={size}
|
|
60
83
|
data-slot="sidebar-menu-button"
|
|
61
84
|
data-sidebar="menu-button"
|
|
62
85
|
data-active={isActive}
|
|
63
86
|
aria-expanded={hasSubItems ? isExpanded : undefined}
|
|
64
|
-
className={
|
|
65
|
-
variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
|
|
66
|
-
S[`size-${size}`],
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
87
|
+
className={buttonClassName}
|
|
69
88
|
{...props}
|
|
70
89
|
>
|
|
71
90
|
{icon}
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<>
|
|
76
|
-
{userContent}
|
|
77
|
-
{chevron}
|
|
78
|
-
</>
|
|
79
|
-
)}
|
|
91
|
+
{label}
|
|
92
|
+
{addon}
|
|
93
|
+
{chevron}
|
|
80
94
|
</Button>
|
|
81
95
|
);
|
|
82
96
|
}
|
|
@@ -111,44 +111,46 @@ export default function ChatAttachmentsDropzonePage() {
|
|
|
111
111
|
send to post it. Office and PDF parsers load on demand when you attach
|
|
112
112
|
those types; PDF also requires <code>allowPdfAttachments</code>.
|
|
113
113
|
</p>
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
114
|
+
<div style={{ minHeight: 600 }}>
|
|
115
|
+
<ChatChrome
|
|
116
|
+
variant="clean"
|
|
117
|
+
showResizeHandle={false}
|
|
118
|
+
resizeHandle={undefined}
|
|
119
|
+
onClose={undefined}
|
|
120
|
+
isEmpty={isEmpty}
|
|
121
|
+
renderPresets={() => null}
|
|
122
|
+
messages={messages}
|
|
123
|
+
onQuickReply={() => {}}
|
|
124
|
+
suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
|
|
125
|
+
isLoading={isLoading}
|
|
126
|
+
scriptContinueLabel={undefined}
|
|
127
|
+
onScriptContinue={undefined}
|
|
128
|
+
showSyntheticBranchButtons={false}
|
|
129
|
+
unusedBranchKeys={[]}
|
|
130
|
+
showInlinePresets={false}
|
|
131
|
+
isLastMessageFromUser={isLastMessageFromUser}
|
|
132
|
+
scrollRef={scrollRef}
|
|
133
|
+
effectiveScopeId="docs-chat-attachments-dropzone"
|
|
134
|
+
onPromptSubmit={onPromptSubmit}
|
|
135
|
+
onChatDeleted={() => {}}
|
|
136
|
+
allowedAttachments={TEXT_ATTACHMENT_ACCEPT_PARTS}
|
|
137
|
+
allowPdfAttachments
|
|
138
|
+
emptyState={{
|
|
139
|
+
title: 'Drop a text, Office, or PDF file',
|
|
140
|
+
description:
|
|
141
|
+
'Drag a file onto this panel, review it above the composer, then send. DOCX and XLSX are parsed in the browser.',
|
|
142
|
+
additionalContent: (
|
|
143
|
+
<p style={{ fontSize: 13, opacity: 0.85 }}>
|
|
144
|
+
Accepted types include <code>.txt</code>, <code>.csv</code>,{' '}
|
|
145
|
+
<code>.md</code>, <code>.json</code>, <code>.docx</code>,{' '}
|
|
146
|
+
<code>.xlsx</code>, and more (
|
|
147
|
+
{TEXT_ATTACHMENT_ACCEPT_PARTS.length} entries in the text
|
|
148
|
+
allowlist).
|
|
149
|
+
</p>
|
|
150
|
+
),
|
|
151
|
+
}}
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
152
154
|
</PageContentSection>
|
|
153
155
|
</>
|
|
154
156
|
);
|
|
@@ -172,34 +172,36 @@ export default function ChatComposerPrefillPage() {
|
|
|
172
172
|
opens chat with prefill once
|
|
173
173
|
</li>
|
|
174
174
|
</ul>
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
175
|
+
<div style={{ minHeight: 600 }}>
|
|
176
|
+
<ChatChrome
|
|
177
|
+
variant="clean"
|
|
178
|
+
showResizeHandle={false}
|
|
179
|
+
resizeHandle={undefined}
|
|
180
|
+
onClose={undefined}
|
|
181
|
+
isEmpty={isEmpty}
|
|
182
|
+
renderPresets={() => null}
|
|
183
|
+
messages={messages}
|
|
184
|
+
onQuickReply={() => {}}
|
|
185
|
+
suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
|
|
186
|
+
isLoading={isLoading}
|
|
187
|
+
scriptContinueLabel={undefined}
|
|
188
|
+
onScriptContinue={undefined}
|
|
189
|
+
showSyntheticBranchButtons={false}
|
|
190
|
+
unusedBranchKeys={[]}
|
|
191
|
+
showInlinePresets={false}
|
|
192
|
+
isLastMessageFromUser={isLastMessageFromUser}
|
|
193
|
+
scrollRef={scrollRef}
|
|
194
|
+
effectiveScopeId="docs-chat-composer-prefill-inline"
|
|
195
|
+
onPromptSubmit={onSubmit}
|
|
196
|
+
onChatDeleted={() => {}}
|
|
197
|
+
promptPrefill={inlinePrefill}
|
|
198
|
+
emptyState={{
|
|
199
|
+
title: 'Inline prefill demo',
|
|
200
|
+
description:
|
|
201
|
+
'Click “Prefill inline composer” or type below. Portal and ?prompt= use the header ChatSheet.',
|
|
202
|
+
}}
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
203
205
|
</PageContentSection>
|
|
204
206
|
</>
|
|
205
207
|
);
|
|
@@ -117,35 +117,37 @@ export default function ChatSlashCommandsPage() {
|
|
|
117
117
|
font-size: 150%;
|
|
118
118
|
}
|
|
119
119
|
`}</style>
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
120
|
+
<div style={{ minHeight: 600 }}>
|
|
121
|
+
<ChatChrome
|
|
122
|
+
variant="clean"
|
|
123
|
+
showResizeHandle={false}
|
|
124
|
+
resizeHandle={undefined}
|
|
125
|
+
onClose={undefined}
|
|
126
|
+
isEmpty={isEmpty}
|
|
127
|
+
renderPresets={() => null}
|
|
128
|
+
messages={messages}
|
|
129
|
+
onQuickReply={() => {}}
|
|
130
|
+
suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
|
|
131
|
+
isLoading={isLoading}
|
|
132
|
+
scriptContinueLabel={undefined}
|
|
133
|
+
onScriptContinue={undefined}
|
|
134
|
+
showSyntheticBranchButtons={false}
|
|
135
|
+
unusedBranchKeys={[]}
|
|
136
|
+
showInlinePresets={false}
|
|
137
|
+
isLastMessageFromUser={isLastMessageFromUser}
|
|
138
|
+
scrollRef={scrollRef}
|
|
139
|
+
effectiveScopeId="docs-chat-slash-inline"
|
|
140
|
+
onPromptSubmit={onSubmit}
|
|
141
|
+
onChatDeleted={() => {}}
|
|
142
|
+
slashCommandItems={DOCS_SLASH_ITEMS}
|
|
143
|
+
promptPlaceholder='Ask something or type "/" for demo commands…'
|
|
144
|
+
emptyState={{
|
|
145
|
+
title: 'Try slash commands',
|
|
146
|
+
description:
|
|
147
|
+
'Pick a command from the palette to insert a mention chip with optional className and color.',
|
|
148
|
+
}}
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
149
151
|
</PageContentSection>
|
|
150
152
|
</>
|
|
151
153
|
);
|
|
@@ -139,33 +139,35 @@ export default function ChatUserCsvAttachmentPage() {
|
|
|
139
139
|
Load preset-style message + CSV attachment
|
|
140
140
|
</Button>
|
|
141
141
|
</p>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
142
|
+
<div style={{ minHeight: 600 }}>
|
|
143
|
+
<ChatChrome
|
|
144
|
+
variant="clean"
|
|
145
|
+
showResizeHandle={false}
|
|
146
|
+
resizeHandle={undefined}
|
|
147
|
+
onClose={undefined}
|
|
148
|
+
isEmpty={isEmpty}
|
|
149
|
+
renderPresets={() => null}
|
|
150
|
+
messages={messages}
|
|
151
|
+
onQuickReply={() => {}}
|
|
152
|
+
suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
|
|
153
|
+
isLoading={isLoading}
|
|
154
|
+
scriptContinueLabel={undefined}
|
|
155
|
+
onScriptContinue={undefined}
|
|
156
|
+
showSyntheticBranchButtons={false}
|
|
157
|
+
unusedBranchKeys={[]}
|
|
158
|
+
showInlinePresets={false}
|
|
159
|
+
isLastMessageFromUser={isLastMessageFromUser}
|
|
160
|
+
scrollRef={scrollRef}
|
|
161
|
+
effectiveScopeId="docs-chat-user-csv"
|
|
162
|
+
onPromptSubmit={onSubmit}
|
|
163
|
+
onChatDeleted={() => {}}
|
|
164
|
+
emptyState={{
|
|
165
|
+
title: 'CSV attachment demo',
|
|
166
|
+
description:
|
|
167
|
+
'Click the button above or send any message. The CSV row uses the same UI as dashboard presets.',
|
|
168
|
+
}}
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
169
171
|
</PageContentSection>
|
|
170
172
|
</>
|
|
171
173
|
);
|