@agentscope-ai/chat 1.1.68-beta.1780475996648 → 1.1.68
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.
|
@@ -10,7 +10,9 @@ import { ChatAnyWhereLayoutContext } from "../Context/ChatAnywhereLayoutContext"
|
|
|
10
10
|
export default function Header() {
|
|
11
11
|
const prefixCls = useProviderContext().getPrefixCls('chat-anywhere');
|
|
12
12
|
const { narrowMode, rightHeader } = useChatAnywhereOptions(v => v.theme);
|
|
13
|
+
const hideBuiltInSessionList = useChatAnywhereOptions(v => v.session?.hideBuiltInSessionList);
|
|
13
14
|
const { toggleCollapsed, collapsed } = useContext(ChatAnyWhereLayoutContext);
|
|
15
|
+
const showNarrowSessionList = narrowMode && !hideBuiltInSessionList;
|
|
14
16
|
|
|
15
17
|
return <>
|
|
16
18
|
<Style />
|
|
@@ -19,7 +21,7 @@ export default function Header() {
|
|
|
19
21
|
className={`${prefixCls}-layout-right-header`}
|
|
20
22
|
>
|
|
21
23
|
{
|
|
22
|
-
|
|
24
|
+
showNarrowSessionList ? <InnerHeader className={`${prefixCls}-default-header-inner`} /> : null
|
|
23
25
|
}
|
|
24
26
|
{
|
|
25
27
|
rightHeader && <div className={`${prefixCls}-default-header-right`}>{rightHeader}</div>
|
|
@@ -27,7 +29,7 @@ export default function Header() {
|
|
|
27
29
|
</div>
|
|
28
30
|
|
|
29
31
|
{
|
|
30
|
-
|
|
32
|
+
showNarrowSessionList && <Drawer
|
|
31
33
|
width="80vw"
|
|
32
34
|
styles={{ body: { padding: 0 } }}
|
|
33
35
|
open={collapsed}
|
|
@@ -15,19 +15,24 @@ export default function Header() {
|
|
|
15
15
|
}),
|
|
16
16
|
narrowMode = _useChatAnywhereOptio.narrowMode,
|
|
17
17
|
rightHeader = _useChatAnywhereOptio.rightHeader;
|
|
18
|
+
var hideBuiltInSessionList = useChatAnywhereOptions(function (v) {
|
|
19
|
+
var _v$session;
|
|
20
|
+
return (_v$session = v.session) === null || _v$session === void 0 ? void 0 : _v$session.hideBuiltInSessionList;
|
|
21
|
+
});
|
|
18
22
|
var _useContext = useContext(ChatAnyWhereLayoutContext),
|
|
19
23
|
toggleCollapsed = _useContext.toggleCollapsed,
|
|
20
24
|
collapsed = _useContext.collapsed;
|
|
25
|
+
var showNarrowSessionList = narrowMode && !hideBuiltInSessionList;
|
|
21
26
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
22
27
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
23
28
|
className: "".concat(prefixCls, "-layout-right-header"),
|
|
24
|
-
children: [
|
|
29
|
+
children: [showNarrowSessionList ? /*#__PURE__*/_jsx(InnerHeader, {
|
|
25
30
|
className: "".concat(prefixCls, "-default-header-inner")
|
|
26
31
|
}) : null, rightHeader && /*#__PURE__*/_jsx("div", {
|
|
27
32
|
className: "".concat(prefixCls, "-default-header-right"),
|
|
28
33
|
children: rightHeader
|
|
29
34
|
})]
|
|
30
|
-
}),
|
|
35
|
+
}), showNarrowSessionList && /*#__PURE__*/_jsx(Drawer, {
|
|
31
36
|
width: "80vw",
|
|
32
37
|
styles: {
|
|
33
38
|
body: {
|
package/package.json
CHANGED