@red-hat-developer-hub/backstage-plugin-lightspeed 2.6.7 → 2.7.0
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/CHANGELOG.md +21 -0
- package/dist/alpha.d.ts +7 -0
- package/dist/components/CollapsedHistoryStrip.esm.js +94 -0
- package/dist/components/CollapsedHistoryStrip.esm.js.map +1 -0
- package/dist/components/LightSpeedChat.esm.js +272 -106
- package/dist/components/LightSpeedChat.esm.js.map +1 -1
- package/dist/components/MessageBarModelSelector.esm.js +92 -0
- package/dist/components/MessageBarModelSelector.esm.js.map +1 -0
- package/dist/images/logo.svg +1 -0
- package/dist/translations/de.esm.js +5 -0
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js +7 -0
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js +5 -0
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/it.esm.js +7 -0
- package/dist/translations/it.esm.js.map +1 -1
- package/dist/translations/ja.esm.js +5 -0
- package/dist/translations/ja.esm.js.map +1 -1
- package/dist/translations/ref.esm.js +9 -0
- package/dist/translations/ref.esm.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
## @red-hat-developer-hub/backstage-plugin-lightspeed
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 41c1901: Implemented fullscreen chat UX updates including:
|
|
8
|
+
- Collapsible history panel with new expand/collapse icons
|
|
9
|
+
- Redesigned message bar with inline model selector and attachment menu
|
|
10
|
+
- New collapsed history strip with quick new chat functionality
|
|
11
|
+
- Updated header with Lightspeed logo
|
|
12
|
+
- Improved conversation list with hover-only options menu
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- @red-hat-developer-hub/backstage-plugin-lightspeed-common@2.7.0
|
|
17
|
+
|
|
18
|
+
## 2.6.8
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- @red-hat-developer-hub/backstage-plugin-lightspeed-common@2.6.8
|
|
23
|
+
|
|
3
24
|
## 2.6.7
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -155,6 +155,9 @@ declare const lightspeedTranslationRef: _backstage_frontend_plugin_api.Translati
|
|
|
155
155
|
readonly "tooltip.send": string;
|
|
156
156
|
readonly "tooltip.microphone.active": string;
|
|
157
157
|
readonly "tooltip.microphone.inactive": string;
|
|
158
|
+
readonly "tooltip.expandHistoryPanel": string;
|
|
159
|
+
readonly "tooltip.collapseHistoryPanel": string;
|
|
160
|
+
readonly "tooltip.quickNewChat": string;
|
|
158
161
|
readonly "button.newChat": string;
|
|
159
162
|
readonly "tooltip.chatHistoryMenu": string;
|
|
160
163
|
readonly "tooltip.responseRecorded": string;
|
|
@@ -164,6 +167,10 @@ declare const lightspeedTranslationRef: _backstage_frontend_plugin_api.Translati
|
|
|
164
167
|
readonly "tooltip.close": string;
|
|
165
168
|
readonly "tooltip.fab.open": string;
|
|
166
169
|
readonly "tooltip.fab.close": string;
|
|
170
|
+
readonly "attach.menu.title": string;
|
|
171
|
+
readonly "attach.menu.description": string;
|
|
172
|
+
readonly "history.section.pinned": string;
|
|
173
|
+
readonly "history.section.recent": string;
|
|
167
174
|
readonly "modal.title.preview": string;
|
|
168
175
|
readonly "modal.title.edit": string;
|
|
169
176
|
readonly "icon.lightspeed.alt": string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles } from '@material-ui/core';
|
|
3
|
+
import { Tooltip, Button } from '@patternfly/react-core';
|
|
4
|
+
import { useTranslation } from '../hooks/useTranslation.esm.js';
|
|
5
|
+
import { SidebarExpandIcon } from './notebooks/SidebarCollapseIcon.esm.js';
|
|
6
|
+
|
|
7
|
+
const EditSquareIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
className,
|
|
11
|
+
width: "20",
|
|
12
|
+
height: "20",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
fill: "none",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
style: { verticalAlign: "middle" },
|
|
17
|
+
children: /* @__PURE__ */ jsx(
|
|
18
|
+
"path",
|
|
19
|
+
{
|
|
20
|
+
d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H14L12 5H5V19H19V12L21 10V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM16.175 5.775L17.6 7.2L12 12.8V14H13.2L18.8 8.4L20.225 9.825L14.275 15.775C14.1083 15.9417 13.9167 16.0667 13.7 16.15C13.4833 16.2333 13.2583 16.275 13.025 16.275H11C10.7167 16.275 10.4792 16.1792 10.2875 15.9875C10.0958 15.7958 10 15.5583 10 15.275V13.25C10 13.0167 10.0417 12.7917 10.125 12.575C10.2083 12.3583 10.3333 12.1667 10.5 12L16.175 5.775ZM20.225 9.825L16.175 5.775L18.175 3.775C18.5583 3.39167 19.0292 3.2 19.5875 3.2C20.1458 3.2 20.6167 3.39167 21 3.775L22.225 5C22.6083 5.38333 22.8 5.85417 22.8 6.4125C22.8 6.97083 22.6083 7.44167 22.225 7.825L20.225 9.825Z",
|
|
21
|
+
fill: "currentColor"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const useStyles = makeStyles((theme) => ({
|
|
27
|
+
strip: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
paddingTop: theme.spacing(1.5),
|
|
32
|
+
gap: theme.spacing(1.5),
|
|
33
|
+
borderRight: "1px solid var(--pf-t--global--border--color--default)",
|
|
34
|
+
width: 48,
|
|
35
|
+
minWidth: 48,
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
backgroundColor: "var(--pf-t--global--background--color--primary--default)",
|
|
38
|
+
height: "100%"
|
|
39
|
+
},
|
|
40
|
+
iconButton: {
|
|
41
|
+
padding: 8,
|
|
42
|
+
minWidth: 0,
|
|
43
|
+
lineHeight: 1,
|
|
44
|
+
borderRadius: "50%",
|
|
45
|
+
color: "var(--pf-t--global--icon--color--regular)",
|
|
46
|
+
"&:hover": {
|
|
47
|
+
color: "var(--pf-t--global--icon--color--hover)",
|
|
48
|
+
backgroundColor: "var(--pf-t--global--background--color--action--plain--hover)"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
newChatIconButton: {
|
|
52
|
+
padding: 0,
|
|
53
|
+
minWidth: 0,
|
|
54
|
+
lineHeight: 1,
|
|
55
|
+
color: "var(--pf-t--global--color--brand--default)",
|
|
56
|
+
"&:hover": {
|
|
57
|
+
color: "var(--pf-t--global--color--brand--hover)"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
const CollapsedHistoryStrip = ({
|
|
62
|
+
onExpand,
|
|
63
|
+
onNewChat,
|
|
64
|
+
newChatDisabled = false
|
|
65
|
+
}) => {
|
|
66
|
+
const classes = useStyles();
|
|
67
|
+
const { t } = useTranslation();
|
|
68
|
+
return /* @__PURE__ */ jsxs("div", { className: classes.strip, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Tooltip, { content: t("tooltip.expandHistoryPanel"), position: "right", children: /* @__PURE__ */ jsx(
|
|
70
|
+
Button,
|
|
71
|
+
{
|
|
72
|
+
variant: "plain",
|
|
73
|
+
className: classes.iconButton,
|
|
74
|
+
onClick: onExpand,
|
|
75
|
+
"aria-label": t("tooltip.expandHistoryPanel"),
|
|
76
|
+
children: /* @__PURE__ */ jsx(SidebarExpandIcon, {})
|
|
77
|
+
}
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ jsx(Tooltip, { content: t("tooltip.quickNewChat"), position: "right", children: /* @__PURE__ */ jsx(
|
|
80
|
+
Button,
|
|
81
|
+
{
|
|
82
|
+
variant: "plain",
|
|
83
|
+
className: classes.newChatIconButton,
|
|
84
|
+
onClick: onNewChat,
|
|
85
|
+
"aria-label": t("tooltip.quickNewChat"),
|
|
86
|
+
isDisabled: newChatDisabled,
|
|
87
|
+
children: /* @__PURE__ */ jsx(EditSquareIcon, {})
|
|
88
|
+
}
|
|
89
|
+
) })
|
|
90
|
+
] });
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { CollapsedHistoryStrip, EditSquareIcon };
|
|
94
|
+
//# sourceMappingURL=CollapsedHistoryStrip.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsedHistoryStrip.esm.js","sources":["../../src/components/CollapsedHistoryStrip.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core';\nimport { Button, Tooltip } from '@patternfly/react-core';\n\nimport { useTranslation } from '../hooks/useTranslation';\nimport { SidebarExpandIcon } from './notebooks/SidebarCollapseIcon';\n\ntype IconProps = {\n className?: string;\n};\n\nexport const EditSquareIcon = ({ className }: IconProps) => (\n <svg\n className={className}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ verticalAlign: 'middle' }}\n >\n <path\n d=\"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H14L12 5H5V19H19V12L21 10V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM16.175 5.775L17.6 7.2L12 12.8V14H13.2L18.8 8.4L20.225 9.825L14.275 15.775C14.1083 15.9417 13.9167 16.0667 13.7 16.15C13.4833 16.2333 13.2583 16.275 13.025 16.275H11C10.7167 16.275 10.4792 16.1792 10.2875 15.9875C10.0958 15.7958 10 15.5583 10 15.275V13.25C10 13.0167 10.0417 12.7917 10.125 12.575C10.2083 12.3583 10.3333 12.1667 10.5 12L16.175 5.775ZM20.225 9.825L16.175 5.775L18.175 3.775C18.5583 3.39167 19.0292 3.2 19.5875 3.2C20.1458 3.2 20.6167 3.39167 21 3.775L22.225 5C22.6083 5.38333 22.8 5.85417 22.8 6.4125C22.8 6.97083 22.6083 7.44167 22.225 7.825L20.225 9.825Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nconst useStyles = makeStyles(theme => ({\n strip: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n paddingTop: theme.spacing(1.5),\n gap: theme.spacing(1.5),\n borderRight: '1px solid var(--pf-t--global--border--color--default)',\n width: 48,\n minWidth: 48,\n flexShrink: 0,\n backgroundColor: 'var(--pf-t--global--background--color--primary--default)',\n height: '100%',\n },\n iconButton: {\n padding: 8,\n minWidth: 0,\n lineHeight: 1,\n borderRadius: '50%',\n color: 'var(--pf-t--global--icon--color--regular)',\n '&:hover': {\n color: 'var(--pf-t--global--icon--color--hover)',\n backgroundColor:\n 'var(--pf-t--global--background--color--action--plain--hover)',\n },\n },\n newChatIconButton: {\n padding: 0,\n minWidth: 0,\n lineHeight: 1,\n color: 'var(--pf-t--global--color--brand--default)',\n '&:hover': {\n color: 'var(--pf-t--global--color--brand--hover)',\n },\n },\n}));\n\ntype CollapsedHistoryStripProps = {\n onExpand: () => void;\n onNewChat: () => void;\n newChatDisabled?: boolean;\n};\n\nexport const CollapsedHistoryStrip = ({\n onExpand,\n onNewChat,\n newChatDisabled = false,\n}: CollapsedHistoryStripProps) => {\n const classes = useStyles();\n const { t } = useTranslation();\n\n return (\n <div className={classes.strip}>\n <Tooltip content={t('tooltip.expandHistoryPanel')} position=\"right\">\n <Button\n variant=\"plain\"\n className={classes.iconButton}\n onClick={onExpand}\n aria-label={t('tooltip.expandHistoryPanel')}\n >\n <SidebarExpandIcon />\n </Button>\n </Tooltip>\n <Tooltip content={t('tooltip.quickNewChat')} position=\"right\">\n <Button\n variant=\"plain\"\n className={classes.newChatIconButton}\n onClick={onNewChat}\n aria-label={t('tooltip.quickNewChat')}\n isDisabled={newChatDisabled}\n >\n <EditSquareIcon />\n </Button>\n </Tooltip>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,cAAA,GAAiB,CAAC,EAAE,SAAA,EAAU,qBACzC,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA;AAAA,IACA,KAAA,EAAM,IAAA;AAAA,IACN,MAAA,EAAO,IAAA;AAAA,IACP,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,EAAK,MAAA;AAAA,IACL,KAAA,EAAM,4BAAA;AAAA,IACN,KAAA,EAAO,EAAE,aAAA,EAAe,QAAA,EAAS;AAAA,IAEjC,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,CAAA,EAAE,gzBAAA;AAAA,QACF,IAAA,EAAK;AAAA;AAAA;AACP;AACF;AAGF,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,UAAA,E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