@ai-group/chat-sdk 0.4.1 → 0.4.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.
|
@@ -47,12 +47,12 @@ var useStyles = (0, import_common.withBasicStyles)(() => ({
|
|
|
47
47
|
wrapper: import_css.css`
|
|
48
48
|
display: flex;
|
|
49
49
|
flex-direction: column;
|
|
50
|
-
max-height: 812px;
|
|
50
|
+
// max-height: 812px;
|
|
51
51
|
min-height: 300px;
|
|
52
52
|
width: 100%;
|
|
53
53
|
height: 100%;
|
|
54
54
|
min-width: 375px;
|
|
55
|
-
background-color: #fff;
|
|
55
|
+
// background-color: #fff;
|
|
56
56
|
// border: 1px solid rgba(80,96,122,.15);
|
|
57
57
|
border-radius: 12px;
|
|
58
58
|
overflow: hidden;
|
|
@@ -65,7 +65,7 @@ var useStyles = (0, import_common.withBasicStyles)(() => ({
|
|
|
65
65
|
justify-content: center;
|
|
66
66
|
padding: 12px 16px;
|
|
67
67
|
border-bottom: 1px solid ${borderGray};
|
|
68
|
-
background-color: #fff;
|
|
68
|
+
// background-color: #fff;
|
|
69
69
|
`,
|
|
70
70
|
userAvatar: import_css.css`
|
|
71
71
|
display: flex;
|
|
@@ -99,7 +99,7 @@ var useStyles = (0, import_common.withBasicStyles)(() => ({
|
|
|
99
99
|
flex: 1;
|
|
100
100
|
overflow-y: auto;
|
|
101
101
|
padding: 16px;
|
|
102
|
-
background-color: #fff;
|
|
102
|
+
// background-color: #fff;
|
|
103
103
|
display: flex;
|
|
104
104
|
flex-direction: column;
|
|
105
105
|
gap: 10px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/XAiChatbot/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { css } from '@emotion/css';\nimport { css as globalCss, Global } from '@emotion/react';\nimport { withBasicStyles } from '@/styles/common';\n\nconst primaryBlue = '#0078FF'; // 主蓝色\nconst lightBlue = '#E6F0FF'; // 浅蓝色气泡背景\nconst darkGray = '#333'; // 深灰色文本\nconst lightGray = '#888'; // 浅灰文本\nconst borderGray = '#ddd'; // 边框灰色\n\nexport const useStyles = withBasicStyles(() => ({\n // 静态样式\n wrapper: css`\n display: flex;\n flex-direction: column;\n max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n `,\n\n navbar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n userAvatar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n `,\n\n avatar: css`\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n border: 1px solid ${borderGray};\n `,\n\n title: css`\n font-weight: 600;\n font-size: 16px;\n color: ${darkGray};\n `,\n\n subtitle: css`\n font-size: 12px;\n color: ${lightGray};\n margin-top: 2px;\n `,\n\n messageContainer: css`\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n `,\n\n emptyWrapper: css`\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: '#222';\n userSelect: none;\n `,\n\n emptyImg: css`\n width: 60px;\n height: 60px;\n margin-bottom: 16px;\n `,\n\n message: css`\n max-width: 70%;\n padding: 10px 14px;\n border-radius: 20px;\n background-color: ${lightBlue};\n color: ${darkGray};\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n `,\n\n messageRight: css`\n align-self: flex-end;\n background-color: ${primaryBlue};\n color: white;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 20px;\n border-top-left-radius: 20px;\n border-top-right-radius: 20px;\n `,\n\n quickReplies: css`\n display: flex;\n gap: 8px;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n overflow-x: auto;\n `,\n\n replyItem: css`\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid ${primaryBlue};\n border-radius: 20px;\n background-color: #fff;\n color: ${primaryBlue};\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: ${primaryBlue};\n color: #fff;\n }\n `,\n\n highlight: css`\n background-color: ${primaryBlue};\n color: white;\n border-color: ${primaryBlue};\n `,\n\n inputBar: css`\n display: flex;\n align-items: center;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n input: css`\n flex: 1;\n padding: 8px 12px;\n border: 1px solid ${borderGray};\n border-radius: 20px;\n font-size: 14px;\n outline: none;\n \n &:focus {\n border-color: ${primaryBlue};\n box-shadow: 0 0 3px ${primaryBlue};\n }\n `,\n\n sendWrapper: css`\n flex: 1;\n border-radius: 26px;\n `,\n\n stopButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n `,\n\n sendButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${primaryBlue};\n border: none;\n border-radius: 20px;\n color: white;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.2s ease;\n box-sizing: border-box;\n &:hover {\n background-color: #005ecb;\n }\n &:disabled {\n background-color: ${lightBlue};\n cursor: not-allowed;\n }\n `,\n\n uploadBtn: css`\n margin-left: 8px;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background-color: ${primaryBlue};\n color: white;\n font-weight: 700;\n font-size: 22px;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n border: none;\n user-select: none;\n &:hover {\n background-color: #005ecb;\n }\n `,\n\n clearBtn: css`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgb(228, 231, 236);\n border-radius: 12px;\n width: 45px;\n height: 45px;\n box-sizing: border-box;\n `,\n\n chatFooter: css`\n gap: 8px;\n position: relatative;\n z-index: 10;\n padding: 0 20px 10px 20px;\n `,\n\n footerTips: css`\n display: flex;\n align-items:center;\n justify-content: center;\n font-size: 12px;\n color: rgba(0,0,0,0.4);\n `,\n\n flexCenterGap2: css`\n display: flex;\n align-items: center;\n gap: 8px;\n `,\n\n iconHuihuarenqun: css`\n font-family: \"iconfont\";\n font-size: 16px;\n font-weight: 300;\n padding: 3px;\n border-radius: 6px;\n color: #181B25;\n cursor: pointer;\n &:hover {\n background: #E1E4EA;\n color: #7F56D9;\n }\n `,\n\n popoverFooter: css`\n display: flex;\n gap: 8px;\n justify-content: end;\n `,\n\n divider: css`\n width: 1px;\n height: 15px;\n margin-left: 3px;\n margin-right: 3px;\n background: #D0D5DD;\n `,\n\n flexCenterGap4: css`\n display: flex;\n align-items: center;\n gap: 4px;\n color: #7F56D9;\n cursor: pointer;\n &:hover {\n opacity: 0.8;\n }\n `,\n\n iconZengjiaDisabled: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #D0D5DD;\n cursor: not-allowed;\n `,\n\n iconZengjiaNormal: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #98A2B3;\n cursor: pointer;\n &:hover {\n color: #7F56D9;\n }\n `,\n actionHeaderWrapper: css`\n margin-bottom: 12px;\n `,\n actionHeaderItem: css`\n display: flex;\n align-items: center;\n height: 40px;\n box-sizing: border-box;\n padding: 10px 16px;\n margin-bottom: 8px;\n background: #f7fafd;\n cursor: pointer;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.03);\n `,\n actionHeaderIcon: css`\n height: 14px;\n `,\n actionHeaderText: css`\n font-weight: 400;\n font-size: 14px;\n color: #3961F2;\n margin-left: 10px;\n margin-right: 6px;\n `,\n actionHeaderDetail: css`\n background: #F3F5FA;\n border-radius: 8px;\n overflow: hidden;\n `,\n actionDetailTitle: css`\n display: flex;\n align-items: center;\n padding: 0 16px;\n box-sizing: border-box;\n background: #EDEFF5;\n height: 32px;\n margin-bottom: 12px;\n cursor: pointer;\n `,\n actionHeaderDetailItem: css`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n padding: 0 16px;\n margin-bottom: 12px;\n color: #949494;\n `,\n actionHeaderCost: css`\n margin-left: auto;\n color: #888;\n font-size: 12px;\n min-width: 32px;\n text-align: right;\n `,\n}));\n\nexport const GlobalStyle: React.FC = () => (\n <Global\n styles={globalCss`\n .ant-bubble-footer {\n display: flex;\n align-items: center;\n min-width: 0,\n max-width: 600,\n /* 你想覆盖的其他样式 */\n }\n\n .ant-sender-content {\n textarea {\n word-break: break-all;\n }\n }\n\n .ant-avatar {\n background-color: transparent;\n }\n\n .ant-sender-actions-list {\n margin-left: -40px;\n }\n\n .ant-sender {\n box-shadow: none !important;\n }\n\n .ant-prompts-item {\n padding-block: 8px !important;\n }\n\n /* 用户消息气泡背景色 */\n .ant-bubble .user-content {\n background-color: #D8E0FD;\n }\n\n /* 助手消息气泡背景色 */\n .ant-bubble .assistant-content {\n background-color: #F3F5FA;\n }\n `}\n />\n);\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { css } from '@emotion/css';\nimport { css as globalCss, Global } from '@emotion/react';\nimport { withBasicStyles } from '@/styles/common';\n\nconst primaryBlue = '#0078FF'; // 主蓝色\nconst lightBlue = '#E6F0FF'; // 浅蓝色气泡背景\nconst darkGray = '#333'; // 深灰色文本\nconst lightGray = '#888'; // 浅灰文本\nconst borderGray = '#ddd'; // 边框灰色\n\nexport const useStyles = withBasicStyles(() => ({\n // 静态样式\n wrapper: css`\n display: flex;\n flex-direction: column;\n // max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n // background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n `,\n\n navbar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ${borderGray};\n // background-color: #fff;\n `,\n\n userAvatar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n `,\n\n avatar: css`\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n border: 1px solid ${borderGray};\n `,\n\n title: css`\n font-weight: 600;\n font-size: 16px;\n color: ${darkGray};\n `,\n\n subtitle: css`\n font-size: 12px;\n color: ${lightGray};\n margin-top: 2px;\n `,\n\n messageContainer: css`\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n // background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n `,\n\n emptyWrapper: css`\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: '#222';\n userSelect: none;\n `,\n\n emptyImg: css`\n width: 60px;\n height: 60px;\n margin-bottom: 16px;\n `,\n\n message: css`\n max-width: 70%;\n padding: 10px 14px;\n border-radius: 20px;\n background-color: ${lightBlue};\n color: ${darkGray};\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n `,\n\n messageRight: css`\n align-self: flex-end;\n background-color: ${primaryBlue};\n color: white;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 20px;\n border-top-left-radius: 20px;\n border-top-right-radius: 20px;\n `,\n\n quickReplies: css`\n display: flex;\n gap: 8px;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n overflow-x: auto;\n `,\n\n replyItem: css`\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid ${primaryBlue};\n border-radius: 20px;\n background-color: #fff;\n color: ${primaryBlue};\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: ${primaryBlue};\n color: #fff;\n }\n `,\n\n highlight: css`\n background-color: ${primaryBlue};\n color: white;\n border-color: ${primaryBlue};\n `,\n\n inputBar: css`\n display: flex;\n align-items: center;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n input: css`\n flex: 1;\n padding: 8px 12px;\n border: 1px solid ${borderGray};\n border-radius: 20px;\n font-size: 14px;\n outline: none;\n \n &:focus {\n border-color: ${primaryBlue};\n box-shadow: 0 0 3px ${primaryBlue};\n }\n `,\n\n sendWrapper: css`\n flex: 1;\n border-radius: 26px;\n `,\n\n stopButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n `,\n\n sendButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${primaryBlue};\n border: none;\n border-radius: 20px;\n color: white;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.2s ease;\n box-sizing: border-box;\n &:hover {\n background-color: #005ecb;\n }\n &:disabled {\n background-color: ${lightBlue};\n cursor: not-allowed;\n }\n `,\n\n uploadBtn: css`\n margin-left: 8px;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background-color: ${primaryBlue};\n color: white;\n font-weight: 700;\n font-size: 22px;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n border: none;\n user-select: none;\n &:hover {\n background-color: #005ecb;\n }\n `,\n\n clearBtn: css`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgb(228, 231, 236);\n border-radius: 12px;\n width: 45px;\n height: 45px;\n box-sizing: border-box;\n `,\n\n chatFooter: css`\n gap: 8px;\n position: relatative;\n z-index: 10;\n padding: 0 20px 10px 20px;\n `,\n\n footerTips: css`\n display: flex;\n align-items:center;\n justify-content: center;\n font-size: 12px;\n color: rgba(0,0,0,0.4);\n `,\n\n flexCenterGap2: css`\n display: flex;\n align-items: center;\n gap: 8px;\n `,\n\n iconHuihuarenqun: css`\n font-family: \"iconfont\";\n font-size: 16px;\n font-weight: 300;\n padding: 3px;\n border-radius: 6px;\n color: #181B25;\n cursor: pointer;\n &:hover {\n background: #E1E4EA;\n color: #7F56D9;\n }\n `,\n\n popoverFooter: css`\n display: flex;\n gap: 8px;\n justify-content: end;\n `,\n\n divider: css`\n width: 1px;\n height: 15px;\n margin-left: 3px;\n margin-right: 3px;\n background: #D0D5DD;\n `,\n\n flexCenterGap4: css`\n display: flex;\n align-items: center;\n gap: 4px;\n color: #7F56D9;\n cursor: pointer;\n &:hover {\n opacity: 0.8;\n }\n `,\n\n iconZengjiaDisabled: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #D0D5DD;\n cursor: not-allowed;\n `,\n\n iconZengjiaNormal: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #98A2B3;\n cursor: pointer;\n &:hover {\n color: #7F56D9;\n }\n `,\n actionHeaderWrapper: css`\n margin-bottom: 12px;\n `,\n actionHeaderItem: css`\n display: flex;\n align-items: center;\n height: 40px;\n box-sizing: border-box;\n padding: 10px 16px;\n margin-bottom: 8px;\n background: #f7fafd;\n cursor: pointer;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.03);\n `,\n actionHeaderIcon: css`\n height: 14px;\n `,\n actionHeaderText: css`\n font-weight: 400;\n font-size: 14px;\n color: #3961F2;\n margin-left: 10px;\n margin-right: 6px;\n `,\n actionHeaderDetail: css`\n background: #F3F5FA;\n border-radius: 8px;\n overflow: hidden;\n `,\n actionDetailTitle: css`\n display: flex;\n align-items: center;\n padding: 0 16px;\n box-sizing: border-box;\n background: #EDEFF5;\n height: 32px;\n margin-bottom: 12px;\n cursor: pointer;\n `,\n actionHeaderDetailItem: css`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n padding: 0 16px;\n margin-bottom: 12px;\n color: #949494;\n `,\n actionHeaderCost: css`\n margin-left: auto;\n color: #888;\n font-size: 12px;\n min-width: 32px;\n text-align: right;\n `,\n}));\n\nexport const GlobalStyle: React.FC = () => (\n <Global\n styles={globalCss`\n .ant-bubble-footer {\n display: flex;\n align-items: center;\n min-width: 0,\n max-width: 600,\n /* 你想覆盖的其他样式 */\n }\n\n .ant-sender-content {\n textarea {\n word-break: break-all;\n }\n }\n\n .ant-avatar {\n background-color: transparent;\n }\n\n .ant-sender-actions-list {\n margin-left: -40px;\n }\n\n .ant-sender {\n box-shadow: none !important;\n }\n\n .ant-prompts-item {\n padding-block: 8px !important;\n }\n\n /* 用户消息气泡背景色 */\n .ant-bubble .user-content {\n background-color: #D8E0FD;\n }\n\n /* 助手消息气泡背景色 */\n .ant-bubble .assistant-content {\n background-color: #F3F5FA;\n }\n `}\n />\n);\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,iBAAoB;AACpB,IAAAA,gBAAyC;AACzC,oBAAgC;AAEhC,IAAM,cAAc;AACpB,IAAM,YAAY;AAClB,IAAM,WAAW;AACjB,IAAM,YAAY;AAClB,IAAM,aAAa;AAEZ,IAAM,gBAAY,+BAAgB,OAAO;AAAA;AAAA,EAE9C,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUnB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASxB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpB,EAAE;AAEK,IAAM,cAAwB,MACnC,6BAAAC,QAAA;AAAA,EAAC;AAAA;AAAA,IACC,QAAQ,cAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyCV;",
|
|
6
6
|
"names": ["import_react", "React", "globalCss"]
|
|
7
7
|
}
|
|
@@ -14,13 +14,13 @@ var borderGray = '#ddd'; // 边框灰色
|
|
|
14
14
|
export var useStyles = withBasicStyles(function () {
|
|
15
15
|
return {
|
|
16
16
|
// 静态样式
|
|
17
|
-
wrapper: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n "]))),
|
|
18
|
-
navbar: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ", ";\n background-color: #fff;\n "])), borderGray),
|
|
17
|
+
wrapper: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n // max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n // background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n "]))),
|
|
18
|
+
navbar: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ", ";\n // background-color: #fff;\n "])), borderGray),
|
|
19
19
|
userAvatar: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n "]))),
|
|
20
20
|
avatar: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n border: 1px solid ", ";\n "])), borderGray),
|
|
21
21
|
title: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-weight: 600;\n font-size: 16px;\n color: ", ";\n "])), darkGray),
|
|
22
22
|
subtitle: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n margin-top: 2px;\n "])), lightGray),
|
|
23
|
-
messageContainer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n "]))),
|
|
23
|
+
messageContainer: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n // background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n "]))),
|
|
24
24
|
emptyWrapper: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: '#222';\n userSelect: none;\n "]))),
|
|
25
25
|
emptyImg: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 60px;\n height: 60px;\n margin-bottom: 16px;\n "]))),
|
|
26
26
|
message: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n max-width: 70%;\n padding: 10px 14px;\n border-radius: 20px;\n background-color: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n "])), lightBlue, darkGray),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","css","globalCss","Global","withBasicStyles","jsx","_jsx","primaryBlue","lightBlue","darkGray","lightGray","borderGray","useStyles","wrapper","_templateObject","_taggedTemplateLiteral","navbar","_templateObject2","userAvatar","_templateObject3","avatar","_templateObject4","title","_templateObject5","subtitle","_templateObject6","messageContainer","_templateObject7","emptyWrapper","_templateObject8","emptyImg","_templateObject9","message","_templateObject10","messageRight","_templateObject11","quickReplies","_templateObject12","replyItem","_templateObject13","highlight","_templateObject14","inputBar","_templateObject15","input","_templateObject16","sendWrapper","_templateObject17","stopButton","_templateObject18","sendButton","_templateObject19","uploadBtn","_templateObject20","clearBtn","_templateObject21","chatFooter","_templateObject22","footerTips","_templateObject23","flexCenterGap2","_templateObject24","iconHuihuarenqun","_templateObject25","popoverFooter","_templateObject26","divider","_templateObject27","flexCenterGap4","_templateObject28","iconZengjiaDisabled","_templateObject29","iconZengjiaNormal","_templateObject30","actionHeaderWrapper","_templateObject31","actionHeaderItem","_templateObject32","actionHeaderIcon","_templateObject33","actionHeaderText","_templateObject34","actionHeaderDetail","_templateObject35","actionDetailTitle","_templateObject36","actionHeaderDetailItem","_templateObject37","actionHeaderCost","_templateObject38","GlobalStyle","styles","_templateObject39"],"sources":["../../../../src/components/XAiChatbot/styles.tsx"],"sourcesContent":["import React from 'react';\nimport { css } from '@emotion/css';\nimport { css as globalCss, Global } from '@emotion/react';\nimport { withBasicStyles } from '@/styles/common';\n\nconst primaryBlue = '#0078FF'; // 主蓝色\nconst lightBlue = '#E6F0FF'; // 浅蓝色气泡背景\nconst darkGray = '#333'; // 深灰色文本\nconst lightGray = '#888'; // 浅灰文本\nconst borderGray = '#ddd'; // 边框灰色\n\nexport const useStyles = withBasicStyles(() => ({\n // 静态样式\n wrapper: css`\n display: flex;\n flex-direction: column;\n max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n `,\n\n navbar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n userAvatar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n `,\n\n avatar: css`\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n border: 1px solid ${borderGray};\n `,\n\n title: css`\n font-weight: 600;\n font-size: 16px;\n color: ${darkGray};\n `,\n\n subtitle: css`\n font-size: 12px;\n color: ${lightGray};\n margin-top: 2px;\n `,\n\n messageContainer: css`\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n `,\n\n emptyWrapper: css`\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: '#222';\n userSelect: none;\n `,\n\n emptyImg: css`\n width: 60px;\n height: 60px;\n margin-bottom: 16px;\n `,\n\n message: css`\n max-width: 70%;\n padding: 10px 14px;\n border-radius: 20px;\n background-color: ${lightBlue};\n color: ${darkGray};\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n `,\n\n messageRight: css`\n align-self: flex-end;\n background-color: ${primaryBlue};\n color: white;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 20px;\n border-top-left-radius: 20px;\n border-top-right-radius: 20px;\n `,\n\n quickReplies: css`\n display: flex;\n gap: 8px;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n overflow-x: auto;\n `,\n\n replyItem: css`\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid ${primaryBlue};\n border-radius: 20px;\n background-color: #fff;\n color: ${primaryBlue};\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: ${primaryBlue};\n color: #fff;\n }\n `,\n\n highlight: css`\n background-color: ${primaryBlue};\n color: white;\n border-color: ${primaryBlue};\n `,\n\n inputBar: css`\n display: flex;\n align-items: center;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n input: css`\n flex: 1;\n padding: 8px 12px;\n border: 1px solid ${borderGray};\n border-radius: 20px;\n font-size: 14px;\n outline: none;\n \n &:focus {\n border-color: ${primaryBlue};\n box-shadow: 0 0 3px ${primaryBlue};\n }\n `,\n\n sendWrapper: css`\n flex: 1;\n border-radius: 26px;\n `,\n\n stopButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n `,\n\n sendButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${primaryBlue};\n border: none;\n border-radius: 20px;\n color: white;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.2s ease;\n box-sizing: border-box;\n &:hover {\n background-color: #005ecb;\n }\n &:disabled {\n background-color: ${lightBlue};\n cursor: not-allowed;\n }\n `,\n\n uploadBtn: css`\n margin-left: 8px;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background-color: ${primaryBlue};\n color: white;\n font-weight: 700;\n font-size: 22px;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n border: none;\n user-select: none;\n &:hover {\n background-color: #005ecb;\n }\n `,\n\n clearBtn: css`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgb(228, 231, 236);\n border-radius: 12px;\n width: 45px;\n height: 45px;\n box-sizing: border-box;\n `,\n\n chatFooter: css`\n gap: 8px;\n position: relatative;\n z-index: 10;\n padding: 0 20px 10px 20px;\n `,\n\n footerTips: css`\n display: flex;\n align-items:center;\n justify-content: center;\n font-size: 12px;\n color: rgba(0,0,0,0.4);\n `,\n\n flexCenterGap2: css`\n display: flex;\n align-items: center;\n gap: 8px;\n `,\n\n iconHuihuarenqun: css`\n font-family: \"iconfont\";\n font-size: 16px;\n font-weight: 300;\n padding: 3px;\n border-radius: 6px;\n color: #181B25;\n cursor: pointer;\n &:hover {\n background: #E1E4EA;\n color: #7F56D9;\n }\n `,\n\n popoverFooter: css`\n display: flex;\n gap: 8px;\n justify-content: end;\n `,\n\n divider: css`\n width: 1px;\n height: 15px;\n margin-left: 3px;\n margin-right: 3px;\n background: #D0D5DD;\n `,\n\n flexCenterGap4: css`\n display: flex;\n align-items: center;\n gap: 4px;\n color: #7F56D9;\n cursor: pointer;\n &:hover {\n opacity: 0.8;\n }\n `,\n\n iconZengjiaDisabled: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #D0D5DD;\n cursor: not-allowed;\n `,\n\n iconZengjiaNormal: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #98A2B3;\n cursor: pointer;\n &:hover {\n color: #7F56D9;\n }\n `,\n actionHeaderWrapper: css`\n margin-bottom: 12px;\n `,\n actionHeaderItem: css`\n display: flex;\n align-items: center;\n height: 40px;\n box-sizing: border-box;\n padding: 10px 16px;\n margin-bottom: 8px;\n background: #f7fafd;\n cursor: pointer;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.03);\n `,\n actionHeaderIcon: css`\n height: 14px;\n `,\n actionHeaderText: css`\n font-weight: 400;\n font-size: 14px;\n color: #3961F2;\n margin-left: 10px;\n margin-right: 6px;\n `,\n actionHeaderDetail: css`\n background: #F3F5FA;\n border-radius: 8px;\n overflow: hidden;\n `,\n actionDetailTitle: css`\n display: flex;\n align-items: center;\n padding: 0 16px;\n box-sizing: border-box;\n background: #EDEFF5;\n height: 32px;\n margin-bottom: 12px;\n cursor: pointer;\n `,\n actionHeaderDetailItem: css`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n padding: 0 16px;\n margin-bottom: 12px;\n color: #949494;\n `,\n actionHeaderCost: css`\n margin-left: auto;\n color: #888;\n font-size: 12px;\n min-width: 32px;\n text-align: right;\n `,\n}));\n\nexport const GlobalStyle: React.FC = () => (\n <Global\n styles={globalCss`\n .ant-bubble-footer {\n display: flex;\n align-items: center;\n min-width: 0,\n max-width: 600,\n /* 你想覆盖的其他样式 */\n }\n\n .ant-sender-content {\n textarea {\n word-break: break-all;\n }\n }\n\n .ant-avatar {\n background-color: transparent;\n }\n\n .ant-sender-actions-list {\n margin-left: -40px;\n }\n\n .ant-sender {\n box-shadow: none !important;\n }\n\n .ant-prompts-item {\n padding-block: 8px !important;\n }\n\n /* 用户消息气泡背景色 */\n .ant-bubble .user-content {\n background-color: #D8E0FD;\n }\n\n /* 助手消息气泡背景色 */\n .ant-bubble .assistant-content {\n background-color: #F3F5FA;\n }\n `}\n />\n);\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASA,GAAG,IAAIC,SAAS,EAAEC,MAAM,QAAQ,gBAAgB;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AAAA,iBAAA,GAAA1E,sBAAA;EAOvB,CAAC;AAAA,CAAC,CAAC;AAEH,OAAO,IAAM2E,WAAqB,GAAG,SAAxBA,WAAqBA,CAAA;EAAA,oBAChCpF,IAAA,CAACH,MAAM;IACLwF,MAAM,EAAEzF,SAAS,CAAA0F,iBAAA,KAAAA,iBAAA,GAAA7E,sBAAA;EAwCf,CACH,CAAC;AAAA,CACH"}
|
|
1
|
+
{"version":3,"names":["React","css","globalCss","Global","withBasicStyles","jsx","_jsx","primaryBlue","lightBlue","darkGray","lightGray","borderGray","useStyles","wrapper","_templateObject","_taggedTemplateLiteral","navbar","_templateObject2","userAvatar","_templateObject3","avatar","_templateObject4","title","_templateObject5","subtitle","_templateObject6","messageContainer","_templateObject7","emptyWrapper","_templateObject8","emptyImg","_templateObject9","message","_templateObject10","messageRight","_templateObject11","quickReplies","_templateObject12","replyItem","_templateObject13","highlight","_templateObject14","inputBar","_templateObject15","input","_templateObject16","sendWrapper","_templateObject17","stopButton","_templateObject18","sendButton","_templateObject19","uploadBtn","_templateObject20","clearBtn","_templateObject21","chatFooter","_templateObject22","footerTips","_templateObject23","flexCenterGap2","_templateObject24","iconHuihuarenqun","_templateObject25","popoverFooter","_templateObject26","divider","_templateObject27","flexCenterGap4","_templateObject28","iconZengjiaDisabled","_templateObject29","iconZengjiaNormal","_templateObject30","actionHeaderWrapper","_templateObject31","actionHeaderItem","_templateObject32","actionHeaderIcon","_templateObject33","actionHeaderText","_templateObject34","actionHeaderDetail","_templateObject35","actionDetailTitle","_templateObject36","actionHeaderDetailItem","_templateObject37","actionHeaderCost","_templateObject38","GlobalStyle","styles","_templateObject39"],"sources":["../../../../src/components/XAiChatbot/styles.tsx"],"sourcesContent":["import React from 'react';\nimport { css } from '@emotion/css';\nimport { css as globalCss, Global } from '@emotion/react';\nimport { withBasicStyles } from '@/styles/common';\n\nconst primaryBlue = '#0078FF'; // 主蓝色\nconst lightBlue = '#E6F0FF'; // 浅蓝色气泡背景\nconst darkGray = '#333'; // 深灰色文本\nconst lightGray = '#888'; // 浅灰文本\nconst borderGray = '#ddd'; // 边框灰色\n\nexport const useStyles = withBasicStyles(() => ({\n // 静态样式\n wrapper: css`\n display: flex;\n flex-direction: column;\n // max-height: 812px;\n min-height: 300px;\n width: 100%;\n height: 100%;\n min-width: 375px;\n // background-color: #fff;\n // border: 1px solid rgba(80,96,122,.15);\n border-radius: 12px;\n overflow: hidden;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n `,\n\n navbar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-bottom: 1px solid ${borderGray};\n // background-color: #fff;\n `,\n\n userAvatar: css`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n `,\n\n avatar: css`\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n margin-right: 12px;\n border: 1px solid ${borderGray};\n `,\n\n title: css`\n font-weight: 600;\n font-size: 16px;\n color: ${darkGray};\n `,\n\n subtitle: css`\n font-size: 12px;\n color: ${lightGray};\n margin-top: 2px;\n `,\n\n messageContainer: css`\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n // background-color: #fff;\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n position: relative;\n `,\n\n emptyWrapper: css`\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n color: '#222';\n userSelect: none;\n `,\n\n emptyImg: css`\n width: 60px;\n height: 60px;\n margin-bottom: 16px;\n `,\n\n message: css`\n max-width: 70%;\n padding: 10px 14px;\n border-radius: 20px;\n background-color: ${lightBlue};\n color: ${darkGray};\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n `,\n\n messageRight: css`\n align-self: flex-end;\n background-color: ${primaryBlue};\n color: white;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 20px;\n border-top-left-radius: 20px;\n border-top-right-radius: 20px;\n `,\n\n quickReplies: css`\n display: flex;\n gap: 8px;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n overflow-x: auto;\n `,\n\n replyItem: css`\n padding: 6px 12px;\n font-size: 13px;\n border: 1px solid ${primaryBlue};\n border-radius: 20px;\n background-color: #fff;\n color: ${primaryBlue};\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: ${primaryBlue};\n color: #fff;\n }\n `,\n\n highlight: css`\n background-color: ${primaryBlue};\n color: white;\n border-color: ${primaryBlue};\n `,\n\n inputBar: css`\n display: flex;\n align-items: center;\n padding: 10px 16px;\n border-top: 1px solid ${borderGray};\n background-color: #fff;\n `,\n\n input: css`\n flex: 1;\n padding: 8px 12px;\n border: 1px solid ${borderGray};\n border-radius: 20px;\n font-size: 14px;\n outline: none;\n \n &:focus {\n border-color: ${primaryBlue};\n box-shadow: 0 0 3px ${primaryBlue};\n }\n `,\n\n sendWrapper: css`\n flex: 1;\n border-radius: 26px;\n `,\n\n stopButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n `,\n\n sendButton: css`\n width: 23px !important;\n height: 23px !important;\n padding: 0 !important;\n min-width: 23px !important;\n min-height: 23px !important;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${primaryBlue};\n border: none;\n border-radius: 20px;\n color: white;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.2s ease;\n box-sizing: border-box;\n &:hover {\n background-color: #005ecb;\n }\n &:disabled {\n background-color: ${lightBlue};\n cursor: not-allowed;\n }\n `,\n\n uploadBtn: css`\n margin-left: 8px;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background-color: ${primaryBlue};\n color: white;\n font-weight: 700;\n font-size: 22px;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n border: none;\n user-select: none;\n &:hover {\n background-color: #005ecb;\n }\n `,\n\n clearBtn: css`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: 1px solid rgb(228, 231, 236);\n border-radius: 12px;\n width: 45px;\n height: 45px;\n box-sizing: border-box;\n `,\n\n chatFooter: css`\n gap: 8px;\n position: relatative;\n z-index: 10;\n padding: 0 20px 10px 20px;\n `,\n\n footerTips: css`\n display: flex;\n align-items:center;\n justify-content: center;\n font-size: 12px;\n color: rgba(0,0,0,0.4);\n `,\n\n flexCenterGap2: css`\n display: flex;\n align-items: center;\n gap: 8px;\n `,\n\n iconHuihuarenqun: css`\n font-family: \"iconfont\";\n font-size: 16px;\n font-weight: 300;\n padding: 3px;\n border-radius: 6px;\n color: #181B25;\n cursor: pointer;\n &:hover {\n background: #E1E4EA;\n color: #7F56D9;\n }\n `,\n\n popoverFooter: css`\n display: flex;\n gap: 8px;\n justify-content: end;\n `,\n\n divider: css`\n width: 1px;\n height: 15px;\n margin-left: 3px;\n margin-right: 3px;\n background: #D0D5DD;\n `,\n\n flexCenterGap4: css`\n display: flex;\n align-items: center;\n gap: 4px;\n color: #7F56D9;\n cursor: pointer;\n &:hover {\n opacity: 0.8;\n }\n `,\n\n iconZengjiaDisabled: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #D0D5DD;\n cursor: not-allowed;\n `,\n\n iconZengjiaNormal: css`\n font-family: \"iconfont\";\n font-size: 25px;\n font-weight: 300;\n color: #98A2B3;\n cursor: pointer;\n &:hover {\n color: #7F56D9;\n }\n `,\n actionHeaderWrapper: css`\n margin-bottom: 12px;\n `,\n actionHeaderItem: css`\n display: flex;\n align-items: center;\n height: 40px;\n box-sizing: border-box;\n padding: 10px 16px;\n margin-bottom: 8px;\n background: #f7fafd;\n cursor: pointer;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.03);\n `,\n actionHeaderIcon: css`\n height: 14px;\n `,\n actionHeaderText: css`\n font-weight: 400;\n font-size: 14px;\n color: #3961F2;\n margin-left: 10px;\n margin-right: 6px;\n `,\n actionHeaderDetail: css`\n background: #F3F5FA;\n border-radius: 8px;\n overflow: hidden;\n `,\n actionDetailTitle: css`\n display: flex;\n align-items: center;\n padding: 0 16px;\n box-sizing: border-box;\n background: #EDEFF5;\n height: 32px;\n margin-bottom: 12px;\n cursor: pointer;\n `,\n actionHeaderDetailItem: css`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n padding: 0 16px;\n margin-bottom: 12px;\n color: #949494;\n `,\n actionHeaderCost: css`\n margin-left: auto;\n color: #888;\n font-size: 12px;\n min-width: 32px;\n text-align: right;\n `,\n}));\n\nexport const GlobalStyle: React.FC = () => (\n <Global\n styles={globalCss`\n .ant-bubble-footer {\n display: flex;\n align-items: center;\n min-width: 0,\n max-width: 600,\n /* 你想覆盖的其他样式 */\n }\n\n .ant-sender-content {\n textarea {\n word-break: break-all;\n }\n }\n\n .ant-avatar {\n background-color: transparent;\n }\n\n .ant-sender-actions-list {\n margin-left: -40px;\n }\n\n .ant-sender {\n box-shadow: none !important;\n }\n\n .ant-prompts-item {\n padding-block: 8px !important;\n }\n\n /* 用户消息气泡背景色 */\n .ant-bubble .user-content {\n background-color: #D8E0FD;\n }\n\n /* 助手消息气泡背景色 */\n .ant-bubble .assistant-content {\n background-color: #F3F5FA;\n }\n `}\n />\n);\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASA,GAAG,IAAIC,SAAS,EAAEC,MAAM,QAAQ,gBAAgB;AACzD,SAASC,eAAe;AAA0B,SAAAC,GAAA,IAAAC,IAAA;AAElD,IAAMC,WAAW,GAAG,SAAS,CAAC,CAAC;AAC/B,IAAMC,SAAS,GAAG,SAAS,CAAC,CAAG;AAC/B,IAAMC,QAAQ,GAAG,MAAM,CAAC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