@red-hat-developer-hub/backstage-plugin-lightspeed 1.0.1 → 1.0.3
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 +28 -0
- package/dist/components/LightspeedPage.esm.js +38 -2
- package/dist/components/LightspeedPage.esm.js.map +1 -1
- package/dist/const.esm.js +1 -2
- package/dist/const.esm.js.map +1 -1
- package/dist/hooks/useConversationMessages.esm.js +1 -1
- package/dist/hooks/useConversationMessages.esm.js.map +1 -1
- package/dist/translations/de.esm.js +6 -6
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js +6 -6
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js +6 -6
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/ref.esm.js +6 -6
- package/dist/translations/ref.esm.js.map +1 -1
- package/dist/types.esm.js +0 -1
- package/dist/types.esm.js.map +1 -1
- package/dist/utils/attachment-utils.esm.js +1 -4
- package/dist/utils/attachment-utils.esm.js.map +1 -1
- package/dist/utils/lightspeed-chatbox-utils.esm.js +1 -1
- package/dist/utils/lightspeed-chatbox-utils.esm.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
## @red-hat-developer-hub/backstage-plugin-lightspeed
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5a26e61: Rever PF upgrade to reduce the bundle size
|
|
8
|
+
- @red-hat-developer-hub/backstage-plugin-lightspeed-common@1.0.3
|
|
9
|
+
|
|
10
|
+
## 1.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- ad1528c: Add localStorage persistence for last selected model
|
|
15
|
+
|
|
16
|
+
The Lightspeed plugin now remembers the user's last selected model across page refreshes, automatically restoring it when available.
|
|
17
|
+
|
|
18
|
+
- f686a9a: updated legal text
|
|
19
|
+
- be83b61: Upgrade patternfly chatbot
|
|
20
|
+
|
|
21
|
+
Monaco editor is used from npm package instead of cdn allowing us to remove custom csp rules
|
|
22
|
+
|
|
23
|
+
- c5fa204: Updated dependency `@types/express` to `4.17.25`.
|
|
24
|
+
Updated dependency `msw` to `2.11.6`.
|
|
25
|
+
Updated dependency `@patternfly/chatbot` to `6.4.1`.
|
|
26
|
+
Updated dependency `@patternfly/react-core` to `6.4.0`.
|
|
27
|
+
- 71bb80d: fix streaming response in lightspeed UI
|
|
28
|
+
- d8bb650: Remove unsupported file type from lightspeed
|
|
29
|
+
- @red-hat-developer-hub/backstage-plugin-lightspeed-common@1.0.2
|
|
30
|
+
|
|
3
31
|
## 1.0.1
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -23,6 +23,7 @@ const useStyles = makeStyles(
|
|
|
23
23
|
);
|
|
24
24
|
const THEME_DARK = "dark";
|
|
25
25
|
const THEME_DARK_CLASS = "pf-v6-theme-dark";
|
|
26
|
+
const LAST_SELECTED_MODEL_KEY = "lastSelectedModel";
|
|
26
27
|
const LightspeedPageInner = () => {
|
|
27
28
|
const classes = useStyles();
|
|
28
29
|
const { t } = useTranslation();
|
|
@@ -56,10 +57,45 @@ const LightspeedPageInner = () => {
|
|
|
56
57
|
}, [type]);
|
|
57
58
|
useEffect(() => {
|
|
58
59
|
if (modelsItems.length > 0) {
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
try {
|
|
61
|
+
const storedData = localStorage.getItem(LAST_SELECTED_MODEL_KEY);
|
|
62
|
+
const parsedData = storedData ? JSON.parse(storedData) : null;
|
|
63
|
+
const storedModel = parsedData?.model ? modelsItems.find((m) => m.value === parsedData.model) : null;
|
|
64
|
+
if (storedModel) {
|
|
65
|
+
setSelectedModel(storedModel.value);
|
|
66
|
+
setSelectedProvider(storedModel.provider);
|
|
67
|
+
} else {
|
|
68
|
+
setSelectedModel(modelsItems[0].value);
|
|
69
|
+
setSelectedProvider(modelsItems[0].provider);
|
|
70
|
+
}
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error(
|
|
73
|
+
"Error loading last selected model from localStorage:",
|
|
74
|
+
error
|
|
75
|
+
);
|
|
76
|
+
setSelectedModel(modelsItems[0].value);
|
|
77
|
+
setSelectedProvider(modelsItems[0].provider);
|
|
78
|
+
}
|
|
61
79
|
}
|
|
62
80
|
}, [modelsItems]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (selectedModel && selectedProvider) {
|
|
83
|
+
try {
|
|
84
|
+
localStorage.setItem(
|
|
85
|
+
LAST_SELECTED_MODEL_KEY,
|
|
86
|
+
JSON.stringify({
|
|
87
|
+
model: selectedModel,
|
|
88
|
+
provider: selectedProvider
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
} catch (error) {
|
|
92
|
+
console.error(
|
|
93
|
+
"Error saving last selected model to localStorage:",
|
|
94
|
+
error
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}, [selectedModel, selectedProvider]);
|
|
63
99
|
if (loading) {
|
|
64
100
|
return null;
|
|
65
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightspeedPage.esm.js","sources":["../../src/components/LightspeedPage.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 { useEffect, useMemo, useState } from 'react';\nimport { useAsync } from 'react-use';\n\nimport { Content, Header, Page } from '@backstage/core-components';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { createStyles, makeStyles, useTheme } from '@material-ui/core/styles';\nimport { QueryClientProvider } from '@tanstack/react-query';\n\nimport { useAllModels } from '../hooks/useAllModels';\nimport { useLightspeedViewPermission } from '../hooks/useLightspeedViewPermission';\nimport { useTopicRestrictionStatus } from '../hooks/useQuestionValidation';\nimport { useTranslation } from '../hooks/useTranslation';\nimport queryClient from '../utils/queryClient';\nimport FileAttachmentContextProvider from './AttachmentContext';\nimport { LightspeedChat } from './LightSpeedChat';\nimport PermissionRequiredState from './PermissionRequiredState';\n\nconst useStyles = makeStyles(() =>\n createStyles({\n container: {\n padding: '0px',\n },\n }),\n);\n\nconst THEME_DARK = 'dark';\nconst THEME_DARK_CLASS = 'pf-v6-theme-dark';\n\nconst LightspeedPageInner = () => {\n const classes = useStyles();\n const { t } = useTranslation();\n const {\n palette: { type },\n } = useTheme();\n\n const identityApi = useApi(identityApiRef);\n\n const { data: models } = useAllModels();\n\n const { allowed: hasViewAccess, loading } = useLightspeedViewPermission();\n\n const { value: profile, loading: profileLoading } = useAsync(\n async () => await identityApi.getProfileInfo(),\n );\n\n const [selectedModel, setSelectedModel] = useState('');\n const [selectedProvider, setSelectedProvider] = useState('');\n\n const { data: topicRestrictionEnabled } = useTopicRestrictionStatus();\n\n const modelsItems = useMemo(\n () =>\n models\n ? models\n .filter(model => model.model_type === 'llm')\n .map(m => ({\n label: m.provider_resource_id,\n value: m.provider_resource_id,\n provider: m.provider_id,\n }))\n : [],\n [models],\n );\n\n useEffect(() => {\n const htmlTagElement = document.documentElement;\n if (type === THEME_DARK) {\n htmlTagElement.classList.add(THEME_DARK_CLASS);\n } else {\n htmlTagElement.classList.remove(THEME_DARK_CLASS);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [type]);\n\n useEffect(() => {\n if (modelsItems.length > 0) {\n setSelectedModel(modelsItems[0].value);\n setSelectedProvider(modelsItems[0].provider);\n }\n }, [modelsItems]);\n\n if (loading) {\n return null;\n }\n\n return (\n <Page themeId=\"tool\">\n <Header\n title={t('page.title')}\n style={{ display: 'none' }}\n pageTitleOverride={t('page.title')}\n />\n <Content className={classes.container}>\n {!hasViewAccess ? (\n <PermissionRequiredState />\n ) : (\n <FileAttachmentContextProvider>\n <LightspeedChat\n selectedModel={selectedModel}\n selectedProvider={selectedProvider}\n topicRestrictionEnabled={topicRestrictionEnabled ?? false}\n handleSelectedModel={item => {\n setSelectedModel(item);\n setSelectedProvider(\n modelsItems.find((m: any) => m.value === item)?.provider ||\n '',\n );\n }}\n models={modelsItems}\n userName={profile?.displayName}\n avatar={profile?.picture}\n profileLoading={profileLoading}\n />\n </FileAttachmentContextProvider>\n )}\n </Content>\n </Page>\n );\n};\n\nexport const LightspeedPage = () => {\n return (\n <QueryClientProvider client={queryClient}>\n <LightspeedPageInner />\n </QueryClientProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAM,SAAY,GAAA,UAAA;AAAA,EAAW,MAC3B,YAAa,CAAA;AAAA,IACX,SAAW,EAAA;AAAA,MACT,OAAS,EAAA;AAAA;AACX,GACD;AACH,CAAA;AAEA,MAAM,UAAa,GAAA,MAAA;AACnB,MAAM,gBAAmB,GAAA,kBAAA;
|
|
1
|
+
{"version":3,"file":"LightspeedPage.esm.js","sources":["../../src/components/LightspeedPage.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 { useEffect, useMemo, useState } from 'react';\nimport { useAsync } from 'react-use';\n\nimport { Content, Header, Page } from '@backstage/core-components';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { createStyles, makeStyles, useTheme } from '@material-ui/core/styles';\nimport { QueryClientProvider } from '@tanstack/react-query';\n\nimport { useAllModels } from '../hooks/useAllModels';\nimport { useLightspeedViewPermission } from '../hooks/useLightspeedViewPermission';\nimport { useTopicRestrictionStatus } from '../hooks/useQuestionValidation';\nimport { useTranslation } from '../hooks/useTranslation';\nimport queryClient from '../utils/queryClient';\nimport FileAttachmentContextProvider from './AttachmentContext';\nimport { LightspeedChat } from './LightSpeedChat';\nimport PermissionRequiredState from './PermissionRequiredState';\n\nconst useStyles = makeStyles(() =>\n createStyles({\n container: {\n padding: '0px',\n },\n }),\n);\n\nconst THEME_DARK = 'dark';\nconst THEME_DARK_CLASS = 'pf-v6-theme-dark';\nconst LAST_SELECTED_MODEL_KEY = 'lastSelectedModel';\n\nconst LightspeedPageInner = () => {\n const classes = useStyles();\n const { t } = useTranslation();\n const {\n palette: { type },\n } = useTheme();\n\n const identityApi = useApi(identityApiRef);\n\n const { data: models } = useAllModels();\n\n const { allowed: hasViewAccess, loading } = useLightspeedViewPermission();\n\n const { value: profile, loading: profileLoading } = useAsync(\n async () => await identityApi.getProfileInfo(),\n );\n\n const [selectedModel, setSelectedModel] = useState('');\n const [selectedProvider, setSelectedProvider] = useState('');\n\n const { data: topicRestrictionEnabled } = useTopicRestrictionStatus();\n\n const modelsItems = useMemo(\n () =>\n models\n ? models\n .filter(model => model.model_type === 'llm')\n .map(m => ({\n label: m.provider_resource_id,\n value: m.provider_resource_id,\n provider: m.provider_id,\n }))\n : [],\n [models],\n );\n\n useEffect(() => {\n const htmlTagElement = document.documentElement;\n if (type === THEME_DARK) {\n htmlTagElement.classList.add(THEME_DARK_CLASS);\n } else {\n htmlTagElement.classList.remove(THEME_DARK_CLASS);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [type]);\n\n useEffect(() => {\n if (modelsItems.length > 0) {\n try {\n const storedData = localStorage.getItem(LAST_SELECTED_MODEL_KEY);\n const parsedData = storedData ? JSON.parse(storedData) : null;\n\n // Check if stored model exists in available models\n const storedModel = parsedData?.model\n ? modelsItems.find(m => m.value === parsedData.model)\n : null;\n\n if (storedModel) {\n setSelectedModel(storedModel.value);\n setSelectedProvider(storedModel.provider);\n } else {\n // Fallback to first model if stored model is not available\n setSelectedModel(modelsItems[0].value);\n setSelectedProvider(modelsItems[0].provider);\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\n 'Error loading last selected model from localStorage:',\n error,\n );\n // Fallback to first model on error\n setSelectedModel(modelsItems[0].value);\n setSelectedProvider(modelsItems[0].provider);\n }\n }\n }, [modelsItems]);\n\n // Save to localStorage whenever model or provider changes\n useEffect(() => {\n if (selectedModel && selectedProvider) {\n try {\n localStorage.setItem(\n LAST_SELECTED_MODEL_KEY,\n JSON.stringify({\n model: selectedModel,\n provider: selectedProvider,\n }),\n );\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\n 'Error saving last selected model to localStorage:',\n error,\n );\n }\n }\n }, [selectedModel, selectedProvider]);\n\n if (loading) {\n return null;\n }\n\n return (\n <Page themeId=\"tool\">\n <Header\n title={t('page.title')}\n style={{ display: 'none' }}\n pageTitleOverride={t('page.title')}\n />\n <Content className={classes.container}>\n {!hasViewAccess ? (\n <PermissionRequiredState />\n ) : (\n <FileAttachmentContextProvider>\n <LightspeedChat\n selectedModel={selectedModel}\n selectedProvider={selectedProvider}\n topicRestrictionEnabled={topicRestrictionEnabled ?? false}\n handleSelectedModel={item => {\n setSelectedModel(item);\n setSelectedProvider(\n modelsItems.find((m: any) => m.value === item)?.provider ||\n '',\n );\n }}\n models={modelsItems}\n userName={profile?.displayName}\n avatar={profile?.picture}\n profileLoading={profileLoading}\n />\n </FileAttachmentContextProvider>\n )}\n </Content>\n </Page>\n );\n};\n\nexport const LightspeedPage = () => {\n return (\n <QueryClientProvider client={queryClient}>\n <LightspeedPageInner />\n </QueryClientProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAM,SAAY,GAAA,UAAA;AAAA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AA,YACE,WAAA,CAAY,KAAK,CAAC,CAAA,KAAW,EAAE,KAAU,KAAA,IAAI,GAAG,QAC9C,IAAA;AAAA,WACJ;AAAA,SACF;AAAA,QACA,MAAQ,EAAA,WAAA;AAAA,QACR,UAAU,OAAS,EAAA,WAAA;AAAA,QACnB,QAAQ,OAAS,EAAA,OAAA;AAAA,QACjB;AAAA;AAAA,OAEJ,CAEJ,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ,CAAA;AAEO,MAAM,iBAAiB,MAAM;AAClC,EAAA,2BACG,mBAAoB,EAAA,EAAA,MAAA,EAAQ,WAC3B,EAAA,QAAA,kBAAA,GAAA,CAAC,uBAAoB,CACvB,EAAA,CAAA;AAEJ;;;;"}
|
package/dist/const.esm.js
CHANGED
|
@@ -5,8 +5,7 @@ const createPrompt = (titleKey, messageKey) => {
|
|
|
5
5
|
const supportedFileTypes = {
|
|
6
6
|
"text/plain": [".txt"],
|
|
7
7
|
"application/json": [".json"],
|
|
8
|
-
"application/yaml": [".yaml", ".yml"]
|
|
9
|
-
"application/xml": [".xml"]
|
|
8
|
+
"application/yaml": [".yaml", ".yml"]
|
|
10
9
|
};
|
|
11
10
|
const DEFAULT_SAMPLE_PROMPTS = [
|
|
12
11
|
createPrompt(
|
package/dist/const.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.esm.js","sources":["../src/const.ts"],"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 { SamplePrompts } from './types';\n\nexport const TEMP_CONVERSATION_ID = 'temp-conversation-id';\n\n// Translation keys for disclaimers\nexport const FUNCTION_DISCLAIMER_WITHOUT_QUESTION_VALIDATION_KEY =\n 'disclaimer.withoutValidation';\nexport const FUNCTION_DISCLAIMER_KEY = 'disclaimer.withValidation';\n\nconst createPrompt = (titleKey: string, messageKey: string) => {\n return { titleKey, messageKey };\n};\n\nexport const supportedFileTypes = {\n 'text/plain': ['.txt'],\n 'application/json': ['.json'],\n 'application/yaml': ['.yaml', '.yml'],\n
|
|
1
|
+
{"version":3,"file":"const.esm.js","sources":["../src/const.ts"],"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 { SamplePrompts } from './types';\n\nexport const TEMP_CONVERSATION_ID = 'temp-conversation-id';\n\n// Translation keys for disclaimers\nexport const FUNCTION_DISCLAIMER_WITHOUT_QUESTION_VALIDATION_KEY =\n 'disclaimer.withoutValidation';\nexport const FUNCTION_DISCLAIMER_KEY = 'disclaimer.withValidation';\n\nconst createPrompt = (titleKey: string, messageKey: string) => {\n return { titleKey, messageKey };\n};\n\nexport const supportedFileTypes = {\n 'text/plain': ['.txt'],\n 'application/json': ['.json'],\n 'application/yaml': ['.yaml', '.yml'],\n};\n\nexport const DEFAULT_SAMPLE_PROMPTS: SamplePrompts = [\n createPrompt(\n 'prompts.codeReadability.title',\n 'prompts.codeReadability.message',\n ),\n createPrompt('prompts.debugging.title', 'prompts.debugging.message'),\n createPrompt(\n 'prompts.developmentConcept.title',\n 'prompts.developmentConcept.message',\n ),\n createPrompt(\n 'prompts.codeOptimization.title',\n 'prompts.codeOptimization.message',\n ),\n createPrompt('prompts.documentation.title', 'prompts.documentation.message'),\n createPrompt('prompts.gitWorkflows.title', 'prompts.gitWorkflows.message'),\n createPrompt(\n 'prompts.testingStrategies.title',\n 'prompts.testingStrategies.message',\n ),\n createPrompt(\n 'prompts.sortingAlgorithms.title',\n 'prompts.sortingAlgorithms.message',\n ),\n createPrompt('prompts.eventDriven.title', 'prompts.eventDriven.message'),\n];\n\nexport const RHDH_SAMPLE_PROMPTS: SamplePrompts = [\n createPrompt('prompts.tekton.title', 'prompts.tekton.message'),\n createPrompt('prompts.openshift.title', 'prompts.openshift.message'),\n createPrompt('prompts.rhdh.title', 'prompts.rhdh.message'),\n];\n\n// Topic restriction valid provider IDs\nexport const VALID_TOPIC_RESTRICTION_PROVIDER_IDS = [\n 'lightspeed_question_validity-shield',\n];\n"],"names":[],"mappings":"AAkBO,MAAM,oBAAuB,GAAA;AAOpC,MAAM,YAAA,GAAe,CAAC,QAAA,EAAkB,UAAuB,KAAA;AAC7D,EAAO,OAAA,EAAE,UAAU,UAAW,EAAA;AAChC,CAAA;AAEO,MAAM,kBAAqB,GAAA;AAAA,EAChC,YAAA,EAAc,CAAC,MAAM,CAAA;AAAA,EACrB,kBAAA,EAAoB,CAAC,OAAO,CAAA;AAAA,EAC5B,kBAAA,EAAoB,CAAC,OAAA,EAAS,MAAM;AACtC;AAEO,MAAM,sBAAwC,GAAA;AAAA,EACnD,YAAA;AAAA,IACE,+BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,YAAA,CAAa,2BAA2B,2BAA2B,CAAA;AAAA,EACnE,YAAA;AAAA,IACE,kCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,YAAA;AAAA,IACE,gCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,YAAA,CAAa,+BAA+B,+BAA+B,CAAA;AAAA,EAC3E,YAAA,CAAa,8BAA8B,8BAA8B,CAAA;AAAA,EACzE,YAAA;AAAA,IACE,iCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,YAAA;AAAA,IACE,iCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,YAAA,CAAa,6BAA6B,6BAA6B;AACzE;AAEO,MAAM,mBAAqC,GAAA;AAAA,EAChD,YAAA,CAAa,wBAAwB,wBAAwB,CAAA;AAAA,EAC7D,YAAA,CAAa,2BAA2B,2BAA2B,CAAA;AAAA,EACnE,YAAA,CAAa,sBAAsB,sBAAsB;AAC3D;AAGO,MAAM,oCAAuC,GAAA;AAAA,EAClD;AACF;;;;"}
|
|
@@ -151,7 +151,7 @@ const useConversationMessages = (conversationId, userName, selectedModel, select
|
|
|
151
151
|
newConversationId = data?.conversation_id;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
if (event === "token"
|
|
154
|
+
if (event === "token") {
|
|
155
155
|
const content = data?.token || "";
|
|
156
156
|
finalMessages.push(content);
|
|
157
157
|
const [humanMessage, aiMessage] = streamingConversations.current[currentConversation];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConversationMessages.esm.js","sources":["../../src/hooks/useConversationMessages.ts"],"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 React from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { MessageProps } from '@patternfly/chatbot';\nimport { useQuery } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\nimport { ScrollContainerHandle } from '../components/LightspeedChatBox';\nimport { TEMP_CONVERSATION_ID } from '../const';\nimport botAvatar from '../images/bot-avatar.svg';\nimport userAvatar from '../images/user-avatar.svg';\nimport { Attachment, LCSConversation, ReferencedDocument } from '../types';\nimport {\n createBotMessage,\n createUserMessage,\n getConversationsData,\n getTimestamp,\n transformDocumentsToSources,\n} from '../utils/lightspeed-chatbox-utils';\nimport { useCreateConversationMessage } from './useCreateCoversationMessage';\n\n// Fetch all conversation messages\nexport const useFetchConversationMessages = (currentConversation: string) => {\n const lightspeedApi = useApi(lightspeedApiRef);\n return useQuery({\n queryKey: ['conversationMessages', currentConversation],\n queryFn: currentConversation\n ? async () => {\n const response =\n await lightspeedApi.getConversationMessages(currentConversation);\n\n return response;\n }\n : undefined,\n retry: false,\n });\n};\n\ntype Conversations = { [_key: string]: MessageProps[] };\n\n/**\n * Fetches all the messages for given conversation_id\n * @param conversationId\n * @param userName\n * @param selectedModel\n * @param selectedProvider\n * @param avatar\n *\n */\nexport const useConversationMessages = (\n conversationId: string,\n userName: string | undefined,\n selectedModel: string,\n selectedProvider: string,\n avatar: string = userAvatar,\n onComplete?: (message: string) => void,\n onStart?: (conversation_id: string) => void,\n) => {\n const { mutateAsync: createMessage } = useCreateConversationMessage();\n const scrollToBottomRef = React.useRef<ScrollContainerHandle>(null);\n\n const [currentConversation, setCurrentConversation] =\n React.useState(conversationId);\n const [conversations, setConversations] = React.useState<Conversations>({\n [currentConversation]: [],\n });\n const streamingConversations = React.useRef<Conversations>({\n [currentConversation]: [],\n });\n\n React.useEffect(() => {\n if (currentConversation !== conversationId) {\n setCurrentConversation(conversationId);\n setConversations(prev => {\n if (prev[conversationId]) return prev;\n\n return {\n ...prev,\n [conversationId]: [],\n };\n });\n }\n }, [currentConversation, conversationId]);\n\n const { data: conversationsData = [], ...queryProps } =\n useFetchConversationMessages(currentConversation);\n\n React.useEffect(() => {\n if (\n !Array.isArray(conversationsData) ||\n (conversationsData.length === 0 &&\n conversationId !== TEMP_CONVERSATION_ID)\n )\n return;\n\n const newConvoIndex: number[] = [];\n\n if (conversations) {\n const _conversations: { [key: string]: any[] } = {\n [currentConversation]: [],\n };\n\n let index = 0;\n for (let i = 0; i < conversationsData.length; i++) {\n const [userMessage, aiMessage] = getConversationsData(\n conversationsData[i] as unknown as LCSConversation,\n );\n\n _conversations[currentConversation].push(\n ...[\n createUserMessage({\n avatar,\n name: userName,\n content: userMessage.content,\n timestamp: userMessage.timestamp,\n }),\n createBotMessage({\n avatar: botAvatar,\n isLoading: false,\n name: conversationsData[i].model ?? selectedModel,\n content: aiMessage.content,\n timestamp: aiMessage.timestamp,\n sources: transformDocumentsToSources(\n aiMessage?.referenced_documents ?? [],\n ),\n }),\n ],\n );\n\n newConvoIndex.push(index);\n index++;\n }\n\n if (streamingConversations.current[currentConversation]) {\n _conversations[currentConversation].push(\n ...streamingConversations.current[currentConversation],\n );\n }\n\n setConversations(_conversations);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n conversationsData,\n userName,\n avatar,\n currentConversation,\n selectedModel,\n streamingConversations,\n ]);\n\n const handleInputPrompt = React.useCallback(\n async (prompt: string, attachments: Attachment[] = []) => {\n let newConversationId = '';\n\n const conversationTuple = [\n createUserMessage({\n avatar,\n name: userName,\n content: prompt,\n timestamp: getTimestamp(Date.now()) ?? '',\n }),\n createBotMessage({\n avatar: botAvatar,\n isLoading: true,\n name: selectedModel,\n content: '',\n timestamp: '',\n }),\n ];\n\n streamingConversations.current = {\n ...streamingConversations.current,\n [currentConversation]: conversationTuple,\n };\n\n setConversations((prevConv: Conversations) => {\n return {\n ...prevConv,\n [currentConversation]: [\n ...(prevConv?.[currentConversation] ?? []),\n ...conversationTuple,\n ],\n };\n });\n\n setTimeout(() => {\n scrollToBottomRef.current?.scrollToBottom();\n }, 0);\n const finalMessages: string[] = [];\n let buffer = '';\n\n try {\n const reader = await createMessage({\n prompt,\n selectedModel,\n selectedProvider,\n currentConversation,\n attachments,\n });\n\n const decoder = new TextDecoder('utf-8');\n const keepGoing = true;\n\n while (keepGoing) {\n const { value, done } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n\n // Process all complete messages separated by double newlines\n const parts = buffer.split('\\n\\n');\n buffer = parts.pop()!;\n\n for (const part of parts) {\n const lines = part\n .split('\\n')\n .filter(line => line.startsWith('data:'));\n\n const jsonString = lines\n .map(line => line.trim().slice(5).trim())\n .join('');\n try {\n const { event, data } = JSON.parse(jsonString);\n if (event === 'start') {\n if (currentConversation === TEMP_CONVERSATION_ID) {\n // If the conversation is temp, we need to set the new conversation id\n newConversationId = data?.conversation_id;\n }\n }\n\n if (event === 'token' && data?.role === 'inference') {\n const content = data?.token || '';\n\n finalMessages.push(content);\n\n // Store streaming message\n const [humanMessage, aiMessage] =\n streamingConversations.current[currentConversation];\n streamingConversations.current[currentConversation] = [\n humanMessage,\n { ...aiMessage, content: aiMessage.content + content },\n ];\n\n setConversations(prevConversations => {\n const conversation =\n prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex] };\n\n if ((lastMessage?.content ?? '').trim().length > 0) {\n lastMessage.isLoading = false;\n }\n lastMessage.content += content;\n lastMessage.name =\n data?.response_metadata?.model || selectedModel;\n lastMessage.timestamp = getTimestamp(\n // TODO: To be fixed in the query response\n data?.response_metadata?.created_at || Date.now(),\n );\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n return {\n ...prevConversations,\n [currentConversation]: updatedConversation,\n };\n });\n }\n\n if (event === 'end') {\n const documents = data?.referenced_documents || [];\n\n setConversations(prevConversations => {\n const conversation =\n prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n isLoading: false,\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex], isLoading: false };\n\n if (documents.length) {\n lastMessage.sources = {\n sources: documents.map((doc: ReferencedDocument) => ({\n title: doc.doc_title,\n link: doc.doc_url,\n body: doc.doc_description,\n })),\n };\n }\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n return {\n ...prevConversations,\n [currentConversation]: updatedConversation,\n };\n });\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('Error parsing JSON:', error);\n if (typeof onComplete === 'function') {\n onComplete('Invalid JSON received');\n }\n }\n }\n }\n } catch (e) {\n setConversations(prevConversations => {\n const conversation = prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex] };\n\n lastMessage.isLoading = false;\n lastMessage.content += e;\n lastMessage.error = {\n title: e.message,\n };\n lastMessage.timestamp = getTimestamp(Date.now());\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n finalMessages.push(`${e}`);\n\n return {\n ...prevConversations,\n [newConversationId.length > 0\n ? newConversationId\n : currentConversation]: updatedConversation,\n };\n });\n }\n // reset current streaming\n streamingConversations.current[currentConversation] = [];\n if (typeof onComplete === 'function') {\n onComplete(finalMessages.join(''));\n }\n // Swap temp conversation messages with new conversation\n\n if (currentConversation === TEMP_CONVERSATION_ID && newConversationId) {\n setConversations(prevConversations => {\n return {\n ...prevConversations,\n [newConversationId]: prevConversations[TEMP_CONVERSATION_ID],\n };\n });\n\n onStart?.(newConversationId);\n\n setConversations(prev => {\n const { temp, ...rest } = prev;\n return rest;\n });\n }\n },\n\n [\n avatar,\n userName,\n onComplete,\n onStart,\n selectedModel,\n selectedProvider,\n createMessage,\n currentConversation,\n ],\n );\n\n return {\n conversationMessages: conversations[currentConversation] ?? [],\n handleInputPrompt,\n conversations,\n scrollToBottomRef,\n ...queryProps,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;AAuCa,MAAA,4BAAA,GAA+B,CAAC,mBAAgC,KAAA;AAC3E,EAAM,MAAA,aAAA,GAAgB,OAAO,gBAAgB,CAAA;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AAC,CAAE,CAAA,CAAA;AAEzB,UAAO,OAAA;AAAA,YACL,GAAG,iBAAA;AAAA,YACH,CAAC,iBAAkB,CAAA,MAAA,GAAS,CACxB,GAAA,iBAAA,GACA,mBAAmB,GAAG;AAAA,WAC5B;AAAA,SACD,CAAA;AAAA;AAGH,MAAuB,sBAAA,CAAA,OAAA,CAAQ,mBAAmB,CAAA,GAAI,EAAC;AACvD,MAAI,IAAA,OAAO,eAAe,UAAY,EAAA;AACpC,QAAW,UAAA,CAAA,aAAA,CAAc,IAAK,CAAA,EAAE,CAAC,CAAA;AAAA;AAInC,MAAI,IAAA,mBAAA,KAAwB,wBAAwB,iBAAmB,EAAA;AACrE,QAAA,gBAAA,CAAiB,CAAqB,iBAAA,KAAA;AACpC,UAAO,OAAA;AAAA,YACL,GAAG,iBAAA;AAAA,YACH,CAAC,iBAAiB,GAAG,iBAAA,CAAkB,oBAAoB;AAAA,WAC7D;AAAA,SACD,CAAA;AAED,QAAA,OAAA,GAAU,iBAAiB,CAAA;AAE3B,QAAA,gBAAA,CAAiB,CAAQ,IAAA,KAAA;AACvB,UAAA,MAAM,EAAE,IAAA,EAAM,GAAG,IAAA,EAAS,GAAA,IAAA;AAC1B,UAAO,OAAA,IAAA;AAAA,SACR,CAAA;AAAA;AACH,KACF;AAAA,IAEA;AAAA,MACE,MAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,aAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAO,OAAA;AAAA,IACL,oBAAsB,EAAA,aAAA,CAAc,mBAAmB,CAAA,IAAK,EAAC;AAAA,IAC7D,iBAAA;AAAA,IACA,aAAA;AAAA,IACA,iBAAA;AAAA,IACA,GAAG;AAAA,GACL;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"useConversationMessages.esm.js","sources":["../../src/hooks/useConversationMessages.ts"],"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 React from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { MessageProps } from '@patternfly/chatbot';\nimport { useQuery } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\nimport { ScrollContainerHandle } from '../components/LightspeedChatBox';\nimport { TEMP_CONVERSATION_ID } from '../const';\nimport botAvatar from '../images/bot-avatar.svg';\nimport userAvatar from '../images/user-avatar.svg';\nimport { Attachment, LCSConversation, ReferencedDocument } from '../types';\nimport {\n createBotMessage,\n createUserMessage,\n getConversationsData,\n getTimestamp,\n transformDocumentsToSources,\n} from '../utils/lightspeed-chatbox-utils';\nimport { useCreateConversationMessage } from './useCreateCoversationMessage';\n\n// Fetch all conversation messages\nexport const useFetchConversationMessages = (currentConversation: string) => {\n const lightspeedApi = useApi(lightspeedApiRef);\n return useQuery({\n queryKey: ['conversationMessages', currentConversation],\n queryFn: currentConversation\n ? async () => {\n const response =\n await lightspeedApi.getConversationMessages(currentConversation);\n\n return response;\n }\n : undefined,\n retry: false,\n });\n};\n\ntype Conversations = { [_key: string]: MessageProps[] };\n\n/**\n * Fetches all the messages for given conversation_id\n * @param conversationId\n * @param userName\n * @param selectedModel\n * @param selectedProvider\n * @param avatar\n *\n */\nexport const useConversationMessages = (\n conversationId: string,\n userName: string | undefined,\n selectedModel: string,\n selectedProvider: string,\n avatar: string = userAvatar,\n onComplete?: (message: string) => void,\n onStart?: (conversation_id: string) => void,\n) => {\n const { mutateAsync: createMessage } = useCreateConversationMessage();\n const scrollToBottomRef = React.useRef<ScrollContainerHandle>(null);\n\n const [currentConversation, setCurrentConversation] =\n React.useState(conversationId);\n const [conversations, setConversations] = React.useState<Conversations>({\n [currentConversation]: [],\n });\n const streamingConversations = React.useRef<Conversations>({\n [currentConversation]: [],\n });\n\n React.useEffect(() => {\n if (currentConversation !== conversationId) {\n setCurrentConversation(conversationId);\n setConversations(prev => {\n if (prev[conversationId]) return prev;\n\n return {\n ...prev,\n [conversationId]: [],\n };\n });\n }\n }, [currentConversation, conversationId]);\n\n const { data: conversationsData = [], ...queryProps } =\n useFetchConversationMessages(currentConversation);\n\n React.useEffect(() => {\n if (\n !Array.isArray(conversationsData) ||\n (conversationsData.length === 0 &&\n conversationId !== TEMP_CONVERSATION_ID)\n )\n return;\n\n const newConvoIndex: number[] = [];\n\n if (conversations) {\n const _conversations: { [key: string]: any[] } = {\n [currentConversation]: [],\n };\n\n let index = 0;\n for (let i = 0; i < conversationsData.length; i++) {\n const [userMessage, aiMessage] = getConversationsData(\n conversationsData[i] as unknown as LCSConversation,\n );\n\n _conversations[currentConversation].push(\n ...[\n createUserMessage({\n avatar,\n name: userName,\n content: userMessage.content,\n timestamp: userMessage.timestamp,\n }),\n createBotMessage({\n avatar: botAvatar,\n isLoading: false,\n name: conversationsData[i].model ?? selectedModel,\n content: aiMessage.content,\n timestamp: aiMessage.timestamp,\n sources: transformDocumentsToSources(\n aiMessage?.referenced_documents ?? [],\n ),\n }),\n ],\n );\n\n newConvoIndex.push(index);\n index++;\n }\n\n if (streamingConversations.current[currentConversation]) {\n _conversations[currentConversation].push(\n ...streamingConversations.current[currentConversation],\n );\n }\n\n setConversations(_conversations);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n conversationsData,\n userName,\n avatar,\n currentConversation,\n selectedModel,\n streamingConversations,\n ]);\n\n const handleInputPrompt = React.useCallback(\n async (prompt: string, attachments: Attachment[] = []) => {\n let newConversationId = '';\n\n const conversationTuple = [\n createUserMessage({\n avatar,\n name: userName,\n content: prompt,\n timestamp: getTimestamp(Date.now()) ?? '',\n }),\n createBotMessage({\n avatar: botAvatar,\n isLoading: true,\n name: selectedModel,\n content: '',\n timestamp: '',\n }),\n ];\n\n streamingConversations.current = {\n ...streamingConversations.current,\n [currentConversation]: conversationTuple,\n };\n\n setConversations((prevConv: Conversations) => {\n return {\n ...prevConv,\n [currentConversation]: [\n ...(prevConv?.[currentConversation] ?? []),\n ...conversationTuple,\n ],\n };\n });\n\n setTimeout(() => {\n scrollToBottomRef.current?.scrollToBottom();\n }, 0);\n const finalMessages: string[] = [];\n let buffer = '';\n\n try {\n const reader = await createMessage({\n prompt,\n selectedModel,\n selectedProvider,\n currentConversation,\n attachments,\n });\n\n const decoder = new TextDecoder('utf-8');\n const keepGoing = true;\n\n while (keepGoing) {\n const { value, done } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n\n // Process all complete messages separated by double newlines\n const parts = buffer.split('\\n\\n');\n buffer = parts.pop()!;\n\n for (const part of parts) {\n const lines = part\n .split('\\n')\n .filter(line => line.startsWith('data:'));\n\n const jsonString = lines\n .map(line => line.trim().slice(5).trim())\n .join('');\n try {\n const { event, data } = JSON.parse(jsonString);\n if (event === 'start') {\n if (currentConversation === TEMP_CONVERSATION_ID) {\n // If the conversation is temp, we need to set the new conversation id\n newConversationId = data?.conversation_id;\n }\n }\n\n if (event === 'token') {\n const content = data?.token || '';\n\n finalMessages.push(content);\n\n // Store streaming message\n const [humanMessage, aiMessage] =\n streamingConversations.current[currentConversation];\n streamingConversations.current[currentConversation] = [\n humanMessage,\n { ...aiMessage, content: aiMessage.content + content },\n ];\n\n setConversations(prevConversations => {\n const conversation =\n prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex] };\n\n if ((lastMessage?.content ?? '').trim().length > 0) {\n lastMessage.isLoading = false;\n }\n lastMessage.content += content;\n lastMessage.name =\n data?.response_metadata?.model || selectedModel;\n lastMessage.timestamp = getTimestamp(\n // TODO: To be fixed in the query response\n data?.response_metadata?.created_at || Date.now(),\n );\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n return {\n ...prevConversations,\n [currentConversation]: updatedConversation,\n };\n });\n }\n\n if (event === 'end') {\n const documents = data?.referenced_documents || [];\n\n setConversations(prevConversations => {\n const conversation =\n prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n isLoading: false,\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex], isLoading: false };\n\n if (documents.length) {\n lastMessage.sources = {\n sources: documents.map((doc: ReferencedDocument) => ({\n title: doc.doc_title,\n link: doc.doc_url,\n body: doc.doc_description,\n })),\n };\n }\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n return {\n ...prevConversations,\n [currentConversation]: updatedConversation,\n };\n });\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('Error parsing JSON:', error);\n if (typeof onComplete === 'function') {\n onComplete('Invalid JSON received');\n }\n }\n }\n }\n } catch (e) {\n setConversations(prevConversations => {\n const conversation = prevConversations[currentConversation] ?? [];\n\n const lastMessageIndex = conversation.length - 1;\n const lastMessage =\n conversation.length === 0\n ? createBotMessage({\n content: '',\n timestamp: getTimestamp(Date.now()),\n })\n : { ...conversation[lastMessageIndex] };\n\n lastMessage.isLoading = false;\n lastMessage.content += e;\n lastMessage.error = {\n title: e.message,\n };\n lastMessage.timestamp = getTimestamp(Date.now());\n\n const updatedConversation = [\n ...conversation.slice(0, lastMessageIndex),\n lastMessage,\n ];\n\n finalMessages.push(`${e}`);\n\n return {\n ...prevConversations,\n [newConversationId.length > 0\n ? newConversationId\n : currentConversation]: updatedConversation,\n };\n });\n }\n // reset current streaming\n streamingConversations.current[currentConversation] = [];\n if (typeof onComplete === 'function') {\n onComplete(finalMessages.join(''));\n }\n // Swap temp conversation messages with new conversation\n\n if (currentConversation === TEMP_CONVERSATION_ID && newConversationId) {\n setConversations(prevConversations => {\n return {\n ...prevConversations,\n [newConversationId]: prevConversations[TEMP_CONVERSATION_ID],\n };\n });\n\n onStart?.(newConversationId);\n\n setConversations(prev => {\n const { temp, ...rest } = prev;\n return rest;\n });\n }\n },\n\n [\n avatar,\n userName,\n onComplete,\n onStart,\n selectedModel,\n selectedProvider,\n createMessage,\n currentConversation,\n ],\n );\n\n return {\n conversationMessages: conversations[currentConversation] ?? [],\n handleInputPrompt,\n conversations,\n scrollToBottomRef,\n ...queryProps,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;AAuCa,MAAA,4BAAA,GAA+B,CAAC,mBAAgC,KAAA;AAC3E,EAAM,MAAA,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAC7C,EAAA,OAAO,QAAS,CAAA;AAAA,IACd,QAAA,EAAU,CAAC,sBAAA,EAAwB,mBAAmB,CAAA;AAAA,IACtD,OAAA,EAAS,sBACL,YAAY;AACV,MAAA,MAAM,QACJ,GAAA,MAAM,aAAc,CAAA,uBAAA,CAAwB,mBAAmB,CAAA;AAEjE,MAAO,OAAA,QAAA;AAAA,KAET,GAAA,SAAA;AAAA,IACJ,KAAO,EAAA;AAAA,GACR,CAAA;AACH;AAaa,MAAA,uBAAA,GAA0B,CACrC,cACA,EAAA,QAAA,EACA,eACA,gBACA,EAAA,MAAA,GAAiB,UACjB,EAAA,UAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,EAAE,WAAA,EAAa,aAAc,EAAA,GAAI,4BAA6B,EAAA;AACpE,EAAM,MAAA,iBAAA,GAAoB,KAAM,CAAA,MAAA,CAA8B,IAAI,CAAA;AAElE,EAAA,MAAM,CAAC,mBAAqB,EAAA,sBAAsB,CAChD,GAAA,KAAA,CAAM,SAAS,cAAc,CAAA;AAC/B,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CA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S,GAAA,IAAA;AAC1B,UAAO,OAAA,IAAA;AAAA,SACR,CAAA;AAAA;AACH,KACF;AAAA,IAEA;AAAA,MACE,MAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,aAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAO,OAAA;AAAA,IACL,oBAAsB,EAAA,aAAA,CAAc,mBAAmB,CAAA,IAAK,EAAC;AAAA,IAC7D,iBAAA;AAAA,IACA,aAAA;AAAA,IACA,iBAAA;AAAA,IACA,GAAG;AAAA,GACL;AACF;;;;"}
|
|
@@ -41,10 +41,10 @@ const lightspeedTranslationDe = createTranslationMessages({
|
|
|
41
41
|
"permission.required.title": "Fehlende Berechtigungen",
|
|
42
42
|
"permission.required.description": "Um das Lightspeed-Plugin zu sehen, wenden Sie sich an Ihren Administrator, um die Berechtigungen <b>lightspeed.chat.read</b> und <b>lightspeed.chat.create</b> zu erhalten.",
|
|
43
43
|
// Disclaimers
|
|
44
|
-
"disclaimer.withValidation": "
|
|
45
|
-
"disclaimer.withoutValidation": "
|
|
44
|
+
"disclaimer.withValidation": "Diese Funktion verwendet KI-Technologie. Geben Sie keine pers\xF6nlichen Informationen oder andere sensible Informationen in Ihre Eingabe ein. Interaktionen k\xF6nnen zur Verbesserung der Produkte oder Dienstleistungen von Red Hat verwendet werden.",
|
|
45
|
+
"disclaimer.withoutValidation": "Diese Funktion verwendet KI-Technologie. Geben Sie keine pers\xF6nlichen Informationen oder andere sensible Informationen in Ihre Eingabe ein. Interaktionen k\xF6nnen zur Verbesserung der Produkte oder Dienstleistungen von Red Hat verwendet werden.",
|
|
46
46
|
// Footer and feedback
|
|
47
|
-
"footer.accuracy.label": "\xDCberpr\xFCfen Sie
|
|
47
|
+
"footer.accuracy.label": "\xDCberpr\xFCfen Sie KI-generierte Inhalte immer vor der Verwendung.",
|
|
48
48
|
"footer.accuracy.popover.title": "Genauigkeit \xFCberpr\xFCfen",
|
|
49
49
|
"footer.accuracy.popover.description": "Obwohl Developer Lightspeed sich um Genauigkeit bem\xFCht, besteht immer die M\xF6glichkeit von Fehlern. Es ist eine gute Praxis, kritische Informationen aus zuverl\xE4ssigen Quellen zu \xFCberpr\xFCfen, besonders wenn sie f\xFCr Entscheidungsfindung oder Handlungen entscheidend sind.",
|
|
50
50
|
"footer.accuracy.popover.image.alt": "Beispielbild f\xFCr Fu\xDFnoten-Popover",
|
|
@@ -59,9 +59,9 @@ const lightspeedTranslationDe = createTranslationMessages({
|
|
|
59
59
|
"chatbox.search.placeholder": "Fr\xFChere Chats durchsuchen...",
|
|
60
60
|
"chatbox.welcome.greeting": "Hallo, {{userName}}",
|
|
61
61
|
"chatbox.welcome.description": "Wie kann ich Ihnen heute helfen?",
|
|
62
|
-
"chatbox.message.placeholder": "Senden Sie eine Nachricht und laden Sie optional eine JSON-, YAML-,
|
|
62
|
+
"chatbox.message.placeholder": "Senden Sie eine Nachricht und laden Sie optional eine JSON-, YAML-, oder TXT-Datei hoch...",
|
|
63
63
|
"chatbox.fileUpload.failed": "Datei-Upload fehlgeschlagen",
|
|
64
|
-
"chatbox.fileUpload.infoText": "Unterst\xFCtzte Dateitypen sind: .txt, .yaml,
|
|
64
|
+
"chatbox.fileUpload.infoText": "Unterst\xFCtzte Dateitypen sind: .txt, .yaml, und .json. Die maximale Dateigr\xF6\xDFe betr\xE4gt 25 MB.",
|
|
65
65
|
// Accessibility and ARIA labels
|
|
66
66
|
"aria.chatbotSelector": "Chatbot-Auswahl",
|
|
67
67
|
"aria.important": "Wichtig",
|
|
@@ -93,7 +93,7 @@ const lightspeedTranslationDe = createTranslationMessages({
|
|
|
93
93
|
// File attachment errors
|
|
94
94
|
"file.upload.error.alreadyExists": "Die Datei existiert bereits.",
|
|
95
95
|
"file.upload.error.multipleFiles": "Mehr als eine Datei hochgeladen.",
|
|
96
|
-
"file.upload.error.unsupportedType": "Nicht unterst\xFCtzter Dateityp. Unterst\xFCtzte Typen sind: .txt, .yaml,
|
|
96
|
+
"file.upload.error.unsupportedType": "Nicht unterst\xFCtzter Dateityp. Unterst\xFCtzte Typen sind: .txt, .yaml, und .json.",
|
|
97
97
|
"file.upload.error.fileTooLarge": "Ihre Dateigr\xF6\xDFe ist zu gro\xDF. Bitte stellen Sie sicher, dass Ihre Datei kleiner als 25 MB ist.",
|
|
98
98
|
"file.upload.error.readFailed": "Fehler beim Lesen der Datei: {{errorMessage}}",
|
|
99
99
|
// Developer error messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * Deutsch translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationDe = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'KI-gestützter Entwicklungsassistent',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Hilfe zur Code-Lesbarkeit',\n 'prompts.codeReadability.message':\n 'Können Sie Techniken vorschlagen, die ich verwenden kann, um meinen Code lesbarer und wartbarer zu machen?',\n 'prompts.debugging.title': 'Hilfe beim Debugging',\n 'prompts.debugging.message':\n 'Meine Anwendung wirft einen Fehler beim Versuch, sich mit der Datenbank zu verbinden. Können Sie mir helfen, das Problem zu identifizieren?',\n 'prompts.developmentConcept.title': 'Entwicklungskonzept erklären',\n 'prompts.developmentConcept.message':\n 'Können Sie erklären, wie Microservices-Architektur funktioniert und welche Vorteile sie gegenüber einem monolithischen Design hat?',\n 'prompts.codeOptimization.title': 'Code-Optimierungen vorschlagen',\n 'prompts.codeOptimization.message':\n 'Können Sie gängige Möglichkeiten vorschlagen, Code zu optimieren, um bessere Leistung zu erzielen?',\n 'prompts.documentation.title': 'Dokumentationszusammenfassung',\n 'prompts.documentation.message':\n 'Können Sie die Dokumentation für die Implementierung von OAuth 2.0-Authentifizierung in einer Web-App zusammenfassen?',\n 'prompts.gitWorkflows.title': 'Arbeitsabläufe mit Git',\n 'prompts.gitWorkflows.message':\n 'Ich möchte Änderungen am Code in einem anderen Branch vornehmen, ohne meine bestehende Arbeit zu verlieren. Was ist das Verfahren, um dies mit Git zu tun?',\n 'prompts.testingStrategies.title': 'Teststrategien vorschlagen',\n 'prompts.testingStrategies.message':\n 'Können Sie gängige Teststrategien empfehlen, die meine Anwendung robust und fehlerfrei machen?',\n 'prompts.sortingAlgorithms.title': 'Sortieralgorithmen entmystifizieren',\n 'prompts.sortingAlgorithms.message':\n 'Können Sie den Unterschied zwischen einem Quicksort- und einem Mergesort-Algorithmus erklären und wann man welchen verwendet?',\n 'prompts.eventDriven.title': 'Event-getriebene Architektur verstehen',\n 'prompts.eventDriven.message':\n 'Können Sie erklären, was event-getriebene Architektur ist und wann es vorteilhaft ist, sie in der Softwareentwicklung zu verwenden?',\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Mit Tekton bereitstellen',\n 'prompts.tekton.message':\n 'Können Sie mir helfen, die Bereitstellung meiner Anwendung mit Tekton-Pipelines zu automatisieren?',\n 'prompts.openshift.title': 'OpenShift-Bereitstellung erstellen',\n 'prompts.openshift.message':\n 'Können Sie mich durch die Erstellung einer neuen Bereitstellung in OpenShift für eine containerisierte Anwendung führen?',\n 'prompts.rhdh.title': 'Erste Schritte mit Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Können Sie mich durch die ersten Schritte führen, um Developer Hub als Entwickler zu nutzen, wie das Erkunden des Software-Katalogs und das Hinzufügen meines Dienstes?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Chat löschen?',\n 'conversation.history.confirm.message':\n 'Sie werden diesen Chat hier nicht mehr sehen. Dies löscht auch verwandte Aktivitäten wie Prompts, Antworten und Feedback aus Ihrer Lightspeed-Aktivität.',\n 'conversation.history.confirm.delete': 'Löschen',\n\n // Permissions\n 'permission.required.title': 'Fehlende Berechtigungen',\n 'permission.required.description':\n 'Um das Lightspeed-Plugin zu sehen, wenden Sie sich an Ihren Administrator, um die Berechtigungen <b>lightspeed.chat.read</b> und <b>lightspeed.chat.create</b> zu erhalten.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n 'Developer Lightspeed kann Fragen zu vielen Themen beantworten, indem es Ihre konfigurierten Modelle verwendet. Die Antworten von Developer Lightspeed werden von der Red Hat Developer Hub-Dokumentation beeinflusst, aber Developer Lightspeed hat keinen Zugriff auf Ihren Software-Katalog, TechDocs oder Vorlagen usw. Developer Lightspeed verwendet Fragenvalidierung (Prompts), um sicherzustellen, dass Gespräche auf technische Themen fokussiert bleiben, die für Red Hat Developer Hub relevant sind, wie Backstage, Kubernetes und OpenShift. Geben Sie keine persönlichen oder sensiblen Informationen in Ihre Eingabe ein. Interaktionen mit Developer Lightspeed können überprüft und zur Verbesserung von Produkten oder Dienstleistungen verwendet werden.',\n 'disclaimer.withoutValidation':\n 'Developer Lightspeed kann Fragen zu vielen Themen beantworten, indem es Ihre konfigurierten Modelle verwendet. Die Antworten von Developer Lightspeed werden von der Red Hat Developer Hub-Dokumentation beeinflusst, aber Developer Lightspeed hat keinen Zugriff auf Ihren Software-Katalog, TechDocs oder Vorlagen usw. Geben Sie keine persönlichen oder sensiblen Informationen in Ihre Eingabe ein. Interaktionen mit Developer Lightspeed können überprüft und zur Verbesserung von Produkten oder Dienstleistungen verwendet werden.',\n\n // Footer and feedback\n 'footer.accuracy.label':\n 'Überprüfen Sie immer die Genauigkeit von KI/LLM-generierten Antworten vor der Verwendung.',\n 'footer.accuracy.popover.title': 'Genauigkeit überprüfen',\n 'footer.accuracy.popover.description':\n 'Obwohl Developer Lightspeed sich um Genauigkeit bemüht, besteht immer die Möglichkeit von Fehlern. Es ist eine gute Praxis, kritische Informationen aus zuverlässigen Quellen zu überprüfen, besonders wenn sie für Entscheidungsfindung oder Handlungen entscheidend sind.',\n 'footer.accuracy.popover.image.alt': 'Beispielbild für Fußnoten-Popover',\n 'footer.accuracy.popover.cta.label': 'Verstanden',\n 'footer.accuracy.popover.link.label': 'Mehr erfahren',\n\n // Common actions\n 'common.cancel': 'Abbrechen',\n\n // Menu items\n 'menu.newConversation': 'Neuer Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Frühere Chats durchsuchen...',\n 'chatbox.welcome.greeting': 'Hallo, {{userName}}',\n 'chatbox.welcome.description': 'Wie kann ich Ihnen heute helfen?',\n 'chatbox.message.placeholder':\n 'Senden Sie eine Nachricht und laden Sie optional eine JSON-, YAML-, TXT- oder XML-Datei hoch...',\n 'chatbox.fileUpload.failed': 'Datei-Upload fehlgeschlagen',\n 'chatbox.fileUpload.infoText':\n 'Unterstützte Dateitypen sind: .txt, .yaml, .json und .xml. Die maximale Dateigröße beträgt 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot-Auswahl',\n 'aria.important': 'Wichtig',\n\n // Modal actions\n 'modal.edit': 'Bearbeiten',\n 'modal.save': 'Speichern',\n 'modal.close': 'Schließen',\n 'modal.cancel': 'Abbrechen',\n\n // Conversation actions\n 'conversation.delete': 'Löschen',\n 'conversation.announcement.userMessage':\n 'Nachricht vom Benutzer: {{prompt}}. Nachricht vom Bot wird geladen.',\n\n // User states\n 'user.guest': 'Gast',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Anhängen',\n 'tooltip.send': 'Senden',\n 'tooltip.microphone.active': 'Aufhören zu hören',\n 'tooltip.microphone.inactive': 'Mikrofon verwenden',\n 'button.newChat': 'Neuer Chat',\n\n // Modal titles\n 'modal.title.preview': 'Anhang-Vorschau',\n 'modal.title.edit': 'Anhang bearbeiten',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'Lightspeed-Icon',\n 'icon.permissionRequired.alt': 'Berechtigung erforderlich Icon',\n\n // Message utilities\n 'message.options.label': 'Optionen',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'Die Datei existiert bereits.',\n 'file.upload.error.multipleFiles': 'Mehr als eine Datei hochgeladen.',\n 'file.upload.error.unsupportedType':\n 'Nicht unterstützter Dateityp. Unterstützte Typen sind: .txt, .yaml, .json und .xml.',\n 'file.upload.error.fileTooLarge':\n 'Ihre Dateigröße ist zu groß. Bitte stellen Sie sicher, dass Ihre Datei kleiner als 25 MB ist.',\n 'file.upload.error.readFailed':\n 'Fehler beim Lesen der Datei: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext muss innerhalb eines FileAttachmentContextProvider sein',\n\n // Feedback actions\n 'feedback.form.title': 'Warum haben Sie diese Bewertung gewählt?',\n 'feedback.form.textAreaPlaceholder':\n 'Geben Sie optionale zusätzliche Kommentare',\n 'feedback.form.submitWord': 'Absenden',\n 'feedback.tooltips.goodResponse': 'Gute Antwort',\n 'feedback.tooltips.badResponse': 'Schlechte Antwort',\n 'feedback.tooltips.copied': 'Kopiert',\n 'feedback.tooltips.copy': 'Kopieren',\n 'feedback.tooltips.listening': 'Höre zu',\n 'feedback.tooltips.listen': 'Zuhören',\n 'feedback.quickResponses.positive.helpful': 'Hilfreiche Informationen',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Einfach zu verstehen',\n 'feedback.quickResponses.positive.resolvedIssue': 'Hat mein Problem gelöst',\n 'feedback.quickResponses.negative.didntAnswer':\n 'Hat meine Frage nicht beantwortet',\n 'feedback.quickResponses.negative.hardToUnderstand': 'Schwer zu verstehen',\n 'feedback.quickResponses.negative.notHelpful': 'Nicht hilfreich',\n 'feedback.completion.title': 'Feedback übermittelt',\n 'feedback.completion.body':\n 'Wir haben Ihre Antwort erhalten. Vielen Dank für Ihr Feedback!',\n\n // Conversation categorization\n 'conversation.category.today': 'Heute',\n 'conversation.category.yesterday': 'Gestern',\n 'conversation.category.previous7Days': 'Letzte 7 Tage',\n 'conversation.category.previous30Days': 'Letzte 30 Tage',\n },\n});\n\nexport default lightspeedTranslationDe;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,wCAAA;AAAA;AAAA,IAGjB,+BAAiC,EAAA,2BAAA;AAAA,IACjC,iCACE,EAAA,+GAAA;AAAA,IACF,yBAA2B,EAAA,sBAAA;AAAA,IAC3B,2BACE,EAAA,gJAAA;AAAA,IACF,kCAAoC,EAAA,iCAAA;AAAA,IACpC,oCACE,EAAA,6IAAA;AAAA,IACF,gCAAkC,EAAA,gCAAA;AAAA,IAClC,kCACE,EAAA,6GAAA;AAAA,IACF,6BAA+B,EAAA,+BAAA;AAAA,IAC/B,+BACE,EAAA,6HAAA;AAAA,IACF,4BAA8B,EAAA,2BAAA;AAAA,IAC9B,8BACE,EAAA,kKAAA;AAAA,IACF,iCAAmC,EAAA,4BAAA;AAAA,IACnC,mCACE,EAAA,sGAAA;AAAA,IACF,iCAAmC,EAAA,qCAAA;AAAA,IACnC,mCACE,EAAA,qIAAA;AAAA,IACF,2BAA6B,EAAA,wCAAA;AAAA,IAC7B,6BACE,EAAA,2IAAA;AAAA;AAAA,IAGF,sBAAwB,EAAA,0BAAA;AAAA,IACxB,wBACE,EAAA,uGAAA;AAAA,IACF,yBAA2B,EAAA,oCAAA;AAAA,IAC3B,2BACE,EAAA,mIAAA;AAAA,IACF,oBAAsB,EA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.js","sources":["../../src/translations/de.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * Deutsch translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationDe = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'KI-gestützter Entwicklungsassistent',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Hilfe zur Code-Lesbarkeit',\n 'prompts.codeReadability.message':\n 'Können Sie Techniken vorschlagen, die ich verwenden kann, um meinen Code lesbarer und wartbarer zu machen?',\n 'prompts.debugging.title': 'Hilfe beim Debugging',\n 'prompts.debugging.message':\n 'Meine Anwendung wirft einen Fehler beim Versuch, sich mit der Datenbank zu verbinden. Können Sie mir helfen, das Problem zu identifizieren?',\n 'prompts.developmentConcept.title': 'Entwicklungskonzept erklären',\n 'prompts.developmentConcept.message':\n 'Können Sie erklären, wie Microservices-Architektur funktioniert und welche Vorteile sie gegenüber einem monolithischen Design hat?',\n 'prompts.codeOptimization.title': 'Code-Optimierungen vorschlagen',\n 'prompts.codeOptimization.message':\n 'Können Sie gängige Möglichkeiten vorschlagen, Code zu optimieren, um bessere Leistung zu erzielen?',\n 'prompts.documentation.title': 'Dokumentationszusammenfassung',\n 'prompts.documentation.message':\n 'Können Sie die Dokumentation für die Implementierung von OAuth 2.0-Authentifizierung in einer Web-App zusammenfassen?',\n 'prompts.gitWorkflows.title': 'Arbeitsabläufe mit Git',\n 'prompts.gitWorkflows.message':\n 'Ich möchte Änderungen am Code in einem anderen Branch vornehmen, ohne meine bestehende Arbeit zu verlieren. Was ist das Verfahren, um dies mit Git zu tun?',\n 'prompts.testingStrategies.title': 'Teststrategien vorschlagen',\n 'prompts.testingStrategies.message':\n 'Können Sie gängige Teststrategien empfehlen, die meine Anwendung robust und fehlerfrei machen?',\n 'prompts.sortingAlgorithms.title': 'Sortieralgorithmen entmystifizieren',\n 'prompts.sortingAlgorithms.message':\n 'Können Sie den Unterschied zwischen einem Quicksort- und einem Mergesort-Algorithmus erklären und wann man welchen verwendet?',\n 'prompts.eventDriven.title': 'Event-getriebene Architektur verstehen',\n 'prompts.eventDriven.message':\n 'Können Sie erklären, was event-getriebene Architektur ist und wann es vorteilhaft ist, sie in der Softwareentwicklung zu verwenden?',\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Mit Tekton bereitstellen',\n 'prompts.tekton.message':\n 'Können Sie mir helfen, die Bereitstellung meiner Anwendung mit Tekton-Pipelines zu automatisieren?',\n 'prompts.openshift.title': 'OpenShift-Bereitstellung erstellen',\n 'prompts.openshift.message':\n 'Können Sie mich durch die Erstellung einer neuen Bereitstellung in OpenShift für eine containerisierte Anwendung führen?',\n 'prompts.rhdh.title': 'Erste Schritte mit Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Können Sie mich durch die ersten Schritte führen, um Developer Hub als Entwickler zu nutzen, wie das Erkunden des Software-Katalogs und das Hinzufügen meines Dienstes?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Chat löschen?',\n 'conversation.history.confirm.message':\n 'Sie werden diesen Chat hier nicht mehr sehen. Dies löscht auch verwandte Aktivitäten wie Prompts, Antworten und Feedback aus Ihrer Lightspeed-Aktivität.',\n 'conversation.history.confirm.delete': 'Löschen',\n\n // Permissions\n 'permission.required.title': 'Fehlende Berechtigungen',\n 'permission.required.description':\n 'Um das Lightspeed-Plugin zu sehen, wenden Sie sich an Ihren Administrator, um die Berechtigungen <b>lightspeed.chat.read</b> und <b>lightspeed.chat.create</b> zu erhalten.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n 'Diese Funktion verwendet KI-Technologie. Geben Sie keine persönlichen Informationen oder andere sensible Informationen in Ihre Eingabe ein. Interaktionen können zur Verbesserung der Produkte oder Dienstleistungen von Red Hat verwendet werden.',\n 'disclaimer.withoutValidation':\n 'Diese Funktion verwendet KI-Technologie. Geben Sie keine persönlichen Informationen oder andere sensible Informationen in Ihre Eingabe ein. Interaktionen können zur Verbesserung der Produkte oder Dienstleistungen von Red Hat verwendet werden.',\n\n // Footer and feedback\n 'footer.accuracy.label':\n 'Überprüfen Sie KI-generierte Inhalte immer vor der Verwendung.',\n 'footer.accuracy.popover.title': 'Genauigkeit überprüfen',\n 'footer.accuracy.popover.description':\n 'Obwohl Developer Lightspeed sich um Genauigkeit bemüht, besteht immer die Möglichkeit von Fehlern. Es ist eine gute Praxis, kritische Informationen aus zuverlässigen Quellen zu überprüfen, besonders wenn sie für Entscheidungsfindung oder Handlungen entscheidend sind.',\n 'footer.accuracy.popover.image.alt': 'Beispielbild für Fußnoten-Popover',\n 'footer.accuracy.popover.cta.label': 'Verstanden',\n 'footer.accuracy.popover.link.label': 'Mehr erfahren',\n\n // Common actions\n 'common.cancel': 'Abbrechen',\n\n // Menu items\n 'menu.newConversation': 'Neuer Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Frühere Chats durchsuchen...',\n 'chatbox.welcome.greeting': 'Hallo, {{userName}}',\n 'chatbox.welcome.description': 'Wie kann ich Ihnen heute helfen?',\n 'chatbox.message.placeholder':\n 'Senden Sie eine Nachricht und laden Sie optional eine JSON-, YAML-, oder TXT-Datei hoch...',\n 'chatbox.fileUpload.failed': 'Datei-Upload fehlgeschlagen',\n 'chatbox.fileUpload.infoText':\n 'Unterstützte Dateitypen sind: .txt, .yaml, und .json. Die maximale Dateigröße beträgt 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot-Auswahl',\n 'aria.important': 'Wichtig',\n\n // Modal actions\n 'modal.edit': 'Bearbeiten',\n 'modal.save': 'Speichern',\n 'modal.close': 'Schließen',\n 'modal.cancel': 'Abbrechen',\n\n // Conversation actions\n 'conversation.delete': 'Löschen',\n 'conversation.announcement.userMessage':\n 'Nachricht vom Benutzer: {{prompt}}. Nachricht vom Bot wird geladen.',\n\n // User states\n 'user.guest': 'Gast',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Anhängen',\n 'tooltip.send': 'Senden',\n 'tooltip.microphone.active': 'Aufhören zu hören',\n 'tooltip.microphone.inactive': 'Mikrofon verwenden',\n 'button.newChat': 'Neuer Chat',\n\n // Modal titles\n 'modal.title.preview': 'Anhang-Vorschau',\n 'modal.title.edit': 'Anhang bearbeiten',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'Lightspeed-Icon',\n 'icon.permissionRequired.alt': 'Berechtigung erforderlich Icon',\n\n // Message utilities\n 'message.options.label': 'Optionen',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'Die Datei existiert bereits.',\n 'file.upload.error.multipleFiles': 'Mehr als eine Datei hochgeladen.',\n 'file.upload.error.unsupportedType':\n 'Nicht unterstützter Dateityp. Unterstützte Typen sind: .txt, .yaml, und .json.',\n 'file.upload.error.fileTooLarge':\n 'Ihre Dateigröße ist zu groß. Bitte stellen Sie sicher, dass Ihre Datei kleiner als 25 MB ist.',\n 'file.upload.error.readFailed':\n 'Fehler beim Lesen der Datei: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext muss innerhalb eines FileAttachmentContextProvider sein',\n\n // Feedback actions\n 'feedback.form.title': 'Warum haben Sie diese Bewertung gewählt?',\n 'feedback.form.textAreaPlaceholder':\n 'Geben Sie optionale zusätzliche Kommentare',\n 'feedback.form.submitWord': 'Absenden',\n 'feedback.tooltips.goodResponse': 'Gute Antwort',\n 'feedback.tooltips.badResponse': 'Schlechte Antwort',\n 'feedback.tooltips.copied': 'Kopiert',\n 'feedback.tooltips.copy': 'Kopieren',\n 'feedback.tooltips.listening': 'Höre zu',\n 'feedback.tooltips.listen': 'Zuhören',\n 'feedback.quickResponses.positive.helpful': 'Hilfreiche Informationen',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Einfach zu verstehen',\n 'feedback.quickResponses.positive.resolvedIssue': 'Hat mein Problem gelöst',\n 'feedback.quickResponses.negative.didntAnswer':\n 'Hat meine Frage nicht beantwortet',\n 'feedback.quickResponses.negative.hardToUnderstand': 'Schwer zu verstehen',\n 'feedback.quickResponses.negative.notHelpful': 'Nicht hilfreich',\n 'feedback.completion.title': 'Feedback übermittelt',\n 'feedback.completion.body':\n 'Wir haben Ihre Antwort erhalten. Vielen Dank für Ihr Feedback!',\n\n // Conversation categorization\n 'conversation.category.today': 'Heute',\n 'conversation.category.yesterday': 'Gestern',\n 'conversation.category.previous7Days': 'Letzte 7 Tage',\n 'conversation.category.previous30Days': 'Letzte 30 Tage',\n },\n});\n\nexport default lightspeedTranslationDe;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,wCAAA;AAAA;AAAA,IAGjB,+BAAiC,EAAA,2BAAA;AAAA,IACjC,iCACE,EAAA,+GAAA;AAAA,IACF,yBAA2B,EAAA,sBAAA;AAAA,IAC3B,2BACE,EAAA,gJAAA;AAAA,IACF,kCAAoC,EAAA,iCAAA;AAAA,IACpC,oCACE,EAAA,6IAAA;AAAA,IACF,gCAAkC,EAAA,gCAAA;AAAA,IAClC,kCACE,EAAA,6GAAA;AAAA,IACF,6BAA+B,EAAA,+BAAA;AAAA,IAC/B,+BACE,EAAA,6HAAA;AAAA,IACF,4BAA8B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A,sBAAA;AAAA,IACrD,gDAAkD,EAAA,4BAAA;AAAA,IAClD,8CACE,EAAA,mCAAA;AAAA,IACF,mDAAqD,EAAA,qBAAA;AAAA,IACrD,6CAA+C,EAAA,iBAAA;AAAA,IAC/C,2BAA6B,EAAA,yBAAA;AAAA,IAC7B,0BACE,EAAA,mEAAA;AAAA;AAAA,IAGF,6BAA+B,EAAA,OAAA;AAAA,IAC/B,iCAAmC,EAAA,SAAA;AAAA,IACnC,qCAAuC,EAAA,eAAA;AAAA,IACvC,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -41,10 +41,10 @@ const lightspeedTranslationEs = createTranslationMessages({
|
|
|
41
41
|
"permission.required.title": "Permisos faltantes",
|
|
42
42
|
"permission.required.description": "Para ver el plugin de lightspeed, contacta a tu administrador para que te d\xE9 los permisos <b>lightspeed.chat.read</b> y <b>lightspeed.chat.create</b>.",
|
|
43
43
|
// Disclaimers
|
|
44
|
-
"disclaimer.withValidation": "
|
|
45
|
-
"disclaimer.withoutValidation": "
|
|
44
|
+
"disclaimer.withValidation": "Esta funci\xF3n utiliza tecnolog\xEDa de IA. No incluyas informaci\xF3n personal ni otra informaci\xF3n sensible en tu entrada. Las interacciones pueden ser utilizadas para mejorar los productos o servicios de Red Hat.",
|
|
45
|
+
"disclaimer.withoutValidation": "Esta funci\xF3n utiliza tecnolog\xEDa de IA. No incluyas informaci\xF3n personal ni otra informaci\xF3n sensible en tu entrada. Las interacciones pueden ser utilizadas para mejorar los productos o servicios de Red Hat.",
|
|
46
46
|
// Footer and feedback
|
|
47
|
-
"footer.accuracy.label": "Siempre
|
|
47
|
+
"footer.accuracy.label": "Siempre revisa el contenido generado por IA antes de usarlo.",
|
|
48
48
|
"footer.accuracy.popover.title": "Verificar precisi\xF3n",
|
|
49
49
|
"footer.accuracy.popover.description": "Si bien Developer Lightspeed se esfuerza por la precisi\xF3n, siempre existe la posibilidad de errores. Es una buena pr\xE1ctica verificar informaci\xF3n cr\xEDtica de fuentes confiables, especialmente si es crucial para la toma de decisiones o acciones.",
|
|
50
50
|
"footer.accuracy.popover.image.alt": "Imagen de ejemplo para el popover de nota al pie",
|
|
@@ -59,9 +59,9 @@ const lightspeedTranslationEs = createTranslationMessages({
|
|
|
59
59
|
"chatbox.search.placeholder": "Buscar chats anteriores...",
|
|
60
60
|
"chatbox.welcome.greeting": "Hola, {{userName}}",
|
|
61
61
|
"chatbox.welcome.description": "\xBFC\xF3mo puedo ayudarte hoy?",
|
|
62
|
-
"chatbox.message.placeholder": "Env\xEDa un mensaje y opcionalmente sube un archivo JSON, YAML,
|
|
62
|
+
"chatbox.message.placeholder": "Env\xEDa un mensaje y opcionalmente sube un archivo JSON, YAML, o TXT...",
|
|
63
63
|
"chatbox.fileUpload.failed": "La carga del archivo fall\xF3",
|
|
64
|
-
"chatbox.fileUpload.infoText": "Los tipos de archivo soportados son: .txt, .yaml,
|
|
64
|
+
"chatbox.fileUpload.infoText": "Los tipos de archivo soportados son: .txt, .yaml, y .json. El tama\xF1o m\xE1ximo del archivo es 25 MB.",
|
|
65
65
|
// Accessibility and ARIA labels
|
|
66
66
|
"aria.chatbotSelector": "Selector de chatbot",
|
|
67
67
|
"aria.important": "Importante",
|
|
@@ -93,7 +93,7 @@ const lightspeedTranslationEs = createTranslationMessages({
|
|
|
93
93
|
// File attachment errors
|
|
94
94
|
"file.upload.error.alreadyExists": "El archivo ya existe.",
|
|
95
95
|
"file.upload.error.multipleFiles": "Se subi\xF3 m\xE1s de un archivo.",
|
|
96
|
-
"file.upload.error.unsupportedType": "Tipo de archivo no soportado. Los tipos soportados son: .txt, .yaml,
|
|
96
|
+
"file.upload.error.unsupportedType": "Tipo de archivo no soportado. Los tipos soportados son: .txt, .yaml, y .json.",
|
|
97
97
|
"file.upload.error.fileTooLarge": "El tama\xF1o de tu archivo es demasiado grande. Por favor aseg\xFArate de que tu archivo sea menor a 25 MB.",
|
|
98
98
|
"file.upload.error.readFailed": "Error al leer el archivo: {{errorMessage}}",
|
|
99
99
|
// Developer error messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * Spanish translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationEs = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'Asistente de desarrollo impulsado por IA',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title':\n 'Obtener ayuda sobre legibilidad del código',\n 'prompts.codeReadability.message':\n '¿Puedes sugerir técnicas que pueda usar para hacer mi código más legible y mantenible?',\n 'prompts.debugging.title': 'Obtener ayuda con depuración',\n 'prompts.debugging.message':\n 'Mi aplicación está lanzando un error al intentar conectarse a la base de datos. ¿Puedes ayudarme a identificar el problema?',\n 'prompts.developmentConcept.title': 'Explicar un concepto de desarrollo',\n 'prompts.developmentConcept.message':\n '¿Puedes explicar cómo funciona la arquitectura de microservicios y sus ventajas sobre un diseño monolítico?',\n 'prompts.codeOptimization.title': 'Sugerir optimizaciones de código',\n 'prompts.codeOptimization.message':\n '¿Puedes sugerir formas comunes de optimizar el código para lograr mejor rendimiento?',\n 'prompts.documentation.title': 'Resumen de documentación',\n 'prompts.documentation.message':\n '¿Puedes resumir la documentación para implementar autenticación OAuth 2.0 en una aplicación web?',\n 'prompts.gitWorkflows.title': 'Flujos de trabajo con Git',\n 'prompts.gitWorkflows.message':\n 'Quiero hacer cambios en el código en otra rama sin perder mi trabajo existente. ¿Cuál es el procedimiento para hacer esto usando Git?',\n 'prompts.testingStrategies.title': 'Sugerir estrategias de prueba',\n 'prompts.testingStrategies.message':\n '¿Puedes recomendar algunas estrategias de prueba comunes que harán que mi aplicación sea robusta y libre de errores?',\n 'prompts.sortingAlgorithms.title':\n 'Desmitificar algoritmos de ordenamiento',\n 'prompts.sortingAlgorithms.message':\n '¿Puedes explicar la diferencia entre un algoritmo de ordenamiento rápido y uno de ordenamiento por mezcla, y cuándo usar cada uno?',\n 'prompts.eventDriven.title':\n 'Entender la arquitectura impulsada por eventos',\n 'prompts.eventDriven.message':\n '¿Puedes explicar qué es la arquitectura impulsada por eventos y cuándo es beneficioso usarla en el desarrollo de software?',\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Implementar con Tekton',\n 'prompts.tekton.message':\n '¿Puedes ayudarme a automatizar la implementación de mi aplicación usando pipelines de Tekton?',\n 'prompts.openshift.title': 'Crear una implementación de OpenShift',\n 'prompts.openshift.message':\n '¿Puedes guiarme a través de la creación de una nueva implementación en OpenShift para una aplicación containerizada?',\n 'prompts.rhdh.title': 'Comenzar con Red Hat Developer Hub',\n 'prompts.rhdh.message':\n '¿Puedes guiarme a través de los primeros pasos para comenzar a usar Developer Hub como desarrollador, como explorar el Catálogo de Software y agregar mi servicio?',\n\n // Conversation history\n 'conversation.history.confirm.title': '¿Eliminar chat?',\n 'conversation.history.confirm.message':\n 'Ya no verás este chat aquí. Esto también eliminará la actividad relacionada como prompts, respuestas y comentarios de tu Actividad de Lightspeed.',\n 'conversation.history.confirm.delete': 'Eliminar',\n\n // Permissions\n 'permission.required.title': 'Permisos faltantes',\n 'permission.required.description':\n 'Para ver el plugin de lightspeed, contacta a tu administrador para que te dé los permisos <b>lightspeed.chat.read</b> y <b>lightspeed.chat.create</b>.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n 'Developer Lightspeed puede responder preguntas sobre muchos temas usando tus modelos configurados. Las respuestas de Developer Lightspeed están influenciadas por la documentación de Red Hat Developer Hub, pero Developer Lightspeed no tiene acceso a tu Catálogo de Software, TechDocs o Plantillas, etc. Developer Lightspeed usa validación de preguntas (prompts) para asegurar que las conversaciones permanezcan enfocadas en temas técnicos relevantes para Red Hat Developer Hub, como Backstage, Kubernetes y OpenShift. No incluyas información personal o sensible en tu entrada. Las interacciones con Developer Lightspeed pueden ser revisadas y usadas para mejorar productos o servicios.',\n 'disclaimer.withoutValidation':\n 'Developer Lightspeed puede responder preguntas sobre muchos temas usando tus modelos configurados. Las respuestas de Developer Lightspeed están influenciadas por la documentación de Red Hat Developer Hub, pero Developer Lightspeed no tiene acceso a tu Catálogo de Software, TechDocs o Plantillas, etc. No incluyas información personal o sensible en tu entrada. Las interacciones con Developer Lightspeed pueden ser revisadas y usadas para mejorar productos o servicios.',\n\n // Footer and feedback\n 'footer.accuracy.label':\n 'Siempre verifica la precisión de las respuestas generadas por IA/LLM antes de usarlas.',\n 'footer.accuracy.popover.title': 'Verificar precisión',\n 'footer.accuracy.popover.description':\n 'Si bien Developer Lightspeed se esfuerza por la precisión, siempre existe la posibilidad de errores. Es una buena práctica verificar información crítica de fuentes confiables, especialmente si es crucial para la toma de decisiones o acciones.',\n 'footer.accuracy.popover.image.alt':\n 'Imagen de ejemplo para el popover de nota al pie',\n 'footer.accuracy.popover.cta.label': 'Entendido',\n 'footer.accuracy.popover.link.label': 'Aprende más',\n\n // Common actions\n 'common.cancel': 'Cancelar',\n\n // Menu items\n 'menu.newConversation': 'Nuevo Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Buscar chats anteriores...',\n 'chatbox.welcome.greeting': 'Hola, {{userName}}',\n 'chatbox.welcome.description': '¿Cómo puedo ayudarte hoy?',\n 'chatbox.message.placeholder':\n 'Envía un mensaje y opcionalmente sube un archivo JSON, YAML, TXT o XML...',\n 'chatbox.fileUpload.failed': 'La carga del archivo falló',\n 'chatbox.fileUpload.infoText':\n 'Los tipos de archivo soportados son: .txt, .yaml, .json y .xml. El tamaño máximo del archivo es 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Selector de chatbot',\n 'aria.important': 'Importante',\n\n // Modal actions\n 'modal.edit': 'Editar',\n 'modal.save': 'Guardar',\n 'modal.close': 'Cerrar',\n 'modal.cancel': 'Cancelar',\n\n // Conversation actions\n 'conversation.delete': 'Eliminar',\n 'conversation.announcement.userMessage':\n 'Mensaje del Usuario: {{prompt}}. El mensaje del Bot está cargando.',\n\n // User states\n 'user.guest': 'Invitado',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Adjuntar',\n 'tooltip.send': 'Enviar',\n 'tooltip.microphone.active': 'Dejar de escuchar',\n 'tooltip.microphone.inactive': 'Usar micrófono',\n 'button.newChat': 'Nuevo chat',\n\n // Modal titles\n 'modal.title.preview': 'Vista previa del adjunto',\n 'modal.title.edit': 'Editar adjunto',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'icono de lightspeed',\n 'icon.permissionRequired.alt': 'icono de permiso requerido',\n\n // Message utilities\n 'message.options.label': 'Opciones',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'El archivo ya existe.',\n 'file.upload.error.multipleFiles': 'Se subió más de un archivo.',\n 'file.upload.error.unsupportedType':\n 'Tipo de archivo no soportado. Los tipos soportados son: .txt, .yaml, .json y .xml.',\n 'file.upload.error.fileTooLarge':\n 'El tamaño de tu archivo es demasiado grande. Por favor asegúrate de que tu archivo sea menor a 25 MB.',\n 'file.upload.error.readFailed':\n 'Error al leer el archivo: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext debe estar dentro de un FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': '¿Por qué elegiste esta calificación?',\n 'feedback.form.textAreaPlaceholder':\n 'Proporciona comentarios adicionales opcionales',\n 'feedback.form.submitWord': 'Enviar',\n 'feedback.tooltips.goodResponse': 'Buena Respuesta',\n 'feedback.tooltips.badResponse': 'Mala Respuesta',\n 'feedback.tooltips.copied': 'Copiado',\n 'feedback.tooltips.copy': 'Copiar',\n 'feedback.tooltips.listening': 'Escuchando',\n 'feedback.tooltips.listen': 'Escuchar',\n 'feedback.quickResponses.positive.helpful': 'Información útil',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Fácil de entender',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolvió mi problema',\n 'feedback.quickResponses.negative.didntAnswer': 'No respondió mi pregunta',\n 'feedback.quickResponses.negative.hardToUnderstand': 'Difícil de entender',\n 'feedback.quickResponses.negative.notHelpful': 'No fue útil',\n 'feedback.completion.title': 'Feedback enviado',\n 'feedback.completion.body':\n 'Hemos recibido tu respuesta. ¡Gracias por compartir tu feedback!',\n\n // Conversation categorization\n 'conversation.category.today': 'Hoy',\n 'conversation.category.yesterday': 'Ayer',\n 'conversation.category.previous7Days': 'Últimos 7 días',\n 'conversation.category.previous30Days': 'Últimos 30 días',\n },\n});\n\nexport default lightspeedTranslationEs;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,0CAAA;AAAA;AAAA,IAGjB,+BACE,EAAA,+CAAA;AAAA,IACF,iCACE,EAAA,oGAAA;AAAA,IACF,yBAA2B,EAAA,iCAAA;AAAA,IAC3B,2BACE,EAAA,sIAAA;AAAA,IACF,kCAAoC,EAAA,oCAAA;AAAA,IACpC,oCACE,EAAA,yHAAA;AAAA,IACF,gCAAkC,EAAA,qCAAA;AAAA,IAClC,kCACE,EAAA,4FAAA;AAAA,IACF,6BAA+B,EAAA,6BAAA;AAAA,IAC/B,+BACE,EAAA,8GAAA;AAAA,IACF,4BAA8B,EAA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,IACrD,gDAAkD,EAAA,yBAAA;AAAA,IAClD,8CAAgD,EAAA,6BAAA;AAAA,IAChD,mDAAqD,EAAA,wBAAA;AAAA,IACrD,6CAA+C,EAAA,gBAAA;AAAA,IAC/C,2BAA6B,EAAA,kBAAA;AAAA,IAC7B,0BACE,EAAA,qEAAA;AAAA;AAAA,IAGF,6BAA+B,EAAA,KAAA;AAAA,IAC/B,iCAAmC,EAAA,MAAA;AAAA,IACnC,qCAAuC,EAAA,sBAAA;AAAA,IACvC,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * Spanish translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationEs = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'Asistente de desarrollo impulsado por IA',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title':\n 'Obtener ayuda sobre legibilidad del código',\n 'prompts.codeReadability.message':\n '¿Puedes sugerir técnicas que pueda usar para hacer mi código más legible y mantenible?',\n 'prompts.debugging.title': 'Obtener ayuda con depuración',\n 'prompts.debugging.message':\n 'Mi aplicación está lanzando un error al intentar conectarse a la base de datos. ¿Puedes ayudarme a identificar el problema?',\n 'prompts.developmentConcept.title': 'Explicar un concepto de desarrollo',\n 'prompts.developmentConcept.message':\n '¿Puedes explicar cómo funciona la arquitectura de microservicios y sus ventajas sobre un diseño monolítico?',\n 'prompts.codeOptimization.title': 'Sugerir optimizaciones de código',\n 'prompts.codeOptimization.message':\n '¿Puedes sugerir formas comunes de optimizar el código para lograr mejor rendimiento?',\n 'prompts.documentation.title': 'Resumen de documentación',\n 'prompts.documentation.message':\n '¿Puedes resumir la documentación para implementar autenticación OAuth 2.0 en una aplicación web?',\n 'prompts.gitWorkflows.title': 'Flujos de trabajo con Git',\n 'prompts.gitWorkflows.message':\n 'Quiero hacer cambios en el código en otra rama sin perder mi trabajo existente. ¿Cuál es el procedimiento para hacer esto usando Git?',\n 'prompts.testingStrategies.title': 'Sugerir estrategias de prueba',\n 'prompts.testingStrategies.message':\n '¿Puedes recomendar algunas estrategias de prueba comunes que harán que mi aplicación sea robusta y libre de errores?',\n 'prompts.sortingAlgorithms.title':\n 'Desmitificar algoritmos de ordenamiento',\n 'prompts.sortingAlgorithms.message':\n '¿Puedes explicar la diferencia entre un algoritmo de ordenamiento rápido y uno de ordenamiento por mezcla, y cuándo usar cada uno?',\n 'prompts.eventDriven.title':\n 'Entender la arquitectura impulsada por eventos',\n 'prompts.eventDriven.message':\n '¿Puedes explicar qué es la arquitectura impulsada por eventos y cuándo es beneficioso usarla en el desarrollo de software?',\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Implementar con Tekton',\n 'prompts.tekton.message':\n '¿Puedes ayudarme a automatizar la implementación de mi aplicación usando pipelines de Tekton?',\n 'prompts.openshift.title': 'Crear una implementación de OpenShift',\n 'prompts.openshift.message':\n '¿Puedes guiarme a través de la creación de una nueva implementación en OpenShift para una aplicación containerizada?',\n 'prompts.rhdh.title': 'Comenzar con Red Hat Developer Hub',\n 'prompts.rhdh.message':\n '¿Puedes guiarme a través de los primeros pasos para comenzar a usar Developer Hub como desarrollador, como explorar el Catálogo de Software y agregar mi servicio?',\n\n // Conversation history\n 'conversation.history.confirm.title': '¿Eliminar chat?',\n 'conversation.history.confirm.message':\n 'Ya no verás este chat aquí. Esto también eliminará la actividad relacionada como prompts, respuestas y comentarios de tu Actividad de Lightspeed.',\n 'conversation.history.confirm.delete': 'Eliminar',\n\n // Permissions\n 'permission.required.title': 'Permisos faltantes',\n 'permission.required.description':\n 'Para ver el plugin de lightspeed, contacta a tu administrador para que te dé los permisos <b>lightspeed.chat.read</b> y <b>lightspeed.chat.create</b>.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n 'Esta función utiliza tecnología de IA. No incluyas información personal ni otra información sensible en tu entrada. Las interacciones pueden ser utilizadas para mejorar los productos o servicios de Red Hat.',\n 'disclaimer.withoutValidation':\n 'Esta función utiliza tecnología de IA. No incluyas información personal ni otra información sensible en tu entrada. Las interacciones pueden ser utilizadas para mejorar los productos o servicios de Red Hat.',\n\n // Footer and feedback\n 'footer.accuracy.label':\n 'Siempre revisa el contenido generado por IA antes de usarlo.',\n 'footer.accuracy.popover.title': 'Verificar precisión',\n 'footer.accuracy.popover.description':\n 'Si bien Developer Lightspeed se esfuerza por la precisión, siempre existe la posibilidad de errores. Es una buena práctica verificar información crítica de fuentes confiables, especialmente si es crucial para la toma de decisiones o acciones.',\n 'footer.accuracy.popover.image.alt':\n 'Imagen de ejemplo para el popover de nota al pie',\n 'footer.accuracy.popover.cta.label': 'Entendido',\n 'footer.accuracy.popover.link.label': 'Aprende más',\n\n // Common actions\n 'common.cancel': 'Cancelar',\n\n // Menu items\n 'menu.newConversation': 'Nuevo Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Buscar chats anteriores...',\n 'chatbox.welcome.greeting': 'Hola, {{userName}}',\n 'chatbox.welcome.description': '¿Cómo puedo ayudarte hoy?',\n 'chatbox.message.placeholder':\n 'Envía un mensaje y opcionalmente sube un archivo JSON, YAML, o TXT...',\n 'chatbox.fileUpload.failed': 'La carga del archivo falló',\n 'chatbox.fileUpload.infoText':\n 'Los tipos de archivo soportados son: .txt, .yaml, y .json. El tamaño máximo del archivo es 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Selector de chatbot',\n 'aria.important': 'Importante',\n\n // Modal actions\n 'modal.edit': 'Editar',\n 'modal.save': 'Guardar',\n 'modal.close': 'Cerrar',\n 'modal.cancel': 'Cancelar',\n\n // Conversation actions\n 'conversation.delete': 'Eliminar',\n 'conversation.announcement.userMessage':\n 'Mensaje del Usuario: {{prompt}}. El mensaje del Bot está cargando.',\n\n // User states\n 'user.guest': 'Invitado',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Adjuntar',\n 'tooltip.send': 'Enviar',\n 'tooltip.microphone.active': 'Dejar de escuchar',\n 'tooltip.microphone.inactive': 'Usar micrófono',\n 'button.newChat': 'Nuevo chat',\n\n // Modal titles\n 'modal.title.preview': 'Vista previa del adjunto',\n 'modal.title.edit': 'Editar adjunto',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'icono de lightspeed',\n 'icon.permissionRequired.alt': 'icono de permiso requerido',\n\n // Message utilities\n 'message.options.label': 'Opciones',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'El archivo ya existe.',\n 'file.upload.error.multipleFiles': 'Se subió más de un archivo.',\n 'file.upload.error.unsupportedType':\n 'Tipo de archivo no soportado. Los tipos soportados son: .txt, .yaml, y .json.',\n 'file.upload.error.fileTooLarge':\n 'El tamaño de tu archivo es demasiado grande. Por favor asegúrate de que tu archivo sea menor a 25 MB.',\n 'file.upload.error.readFailed':\n 'Error al leer el archivo: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext debe estar dentro de un FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': '¿Por qué elegiste esta calificación?',\n 'feedback.form.textAreaPlaceholder':\n 'Proporciona comentarios adicionales opcionales',\n 'feedback.form.submitWord': 'Enviar',\n 'feedback.tooltips.goodResponse': 'Buena Respuesta',\n 'feedback.tooltips.badResponse': 'Mala Respuesta',\n 'feedback.tooltips.copied': 'Copiado',\n 'feedback.tooltips.copy': 'Copiar',\n 'feedback.tooltips.listening': 'Escuchando',\n 'feedback.tooltips.listen': 'Escuchar',\n 'feedback.quickResponses.positive.helpful': 'Información útil',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Fácil de entender',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolvió mi problema',\n 'feedback.quickResponses.negative.didntAnswer': 'No respondió mi pregunta',\n 'feedback.quickResponses.negative.hardToUnderstand': 'Difícil de entender',\n 'feedback.quickResponses.negative.notHelpful': 'No fue útil',\n 'feedback.completion.title': 'Feedback enviado',\n 'feedback.completion.body':\n 'Hemos recibido tu respuesta. ¡Gracias por compartir tu feedback!',\n\n // Conversation categorization\n 'conversation.category.today': 'Hoy',\n 'conversation.category.yesterday': 'Ayer',\n 'conversation.category.previous7Days': 'Últimos 7 días',\n 'conversation.category.previous30Days': 'Últimos 30 días',\n },\n});\n\nexport default lightspeedTranslationEs;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,0CAAA;AAAA;AAAA,IAGjB,+BACE,EAAA,+CAAA;AAAA,IACF,iCACE,EAAA,oGAAA;AAAA,IACF,yBAA2B,EAAA,iCAAA;AAAA,IAC3B,2BACE,EAAA,sIAAA;AAAA,IACF,kCAAoC,EAAA,oCAAA;AAAA,IACpC,oCACE,EAAA,yHAAA;AAAA,IACF,gCAAkC,EAAA,qCAAA;AAAA,IAClC,kCACE,EAAA,4FAAA;AAAA,IACF,6BAA+B,EAAA,6BAAA;AAAA,IAC/B,+BACE,EAAA,8GAAA;AAAA,IACF,4BAA8B,EAAA,2BAAA;AAAA,IAC9B,8BACE,EAAA,gJAAA;AAAA,IACF,iCAAmC,EAAA,+BAAA;AA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AAqD,EAAA,wBAAA;AAAA,IACrD,6CAA+C,EAAA,gBAAA;AAAA,IAC/C,2BAA6B,EAAA,kBAAA;AAAA,IAC7B,0BACE,EAAA,qEAAA;AAAA;AAAA,IAGF,6BAA+B,EAAA,KAAA;AAAA,IAC/B,iCAAmC,EAAA,MAAA;AAAA,IACnC,qCAAuC,EAAA,sBAAA;AAAA,IACvC,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -41,10 +41,10 @@ const lightspeedTranslationFr = createTranslationMessages({
|
|
|
41
41
|
"permission.required.title": "Permissions manquantes",
|
|
42
42
|
"permission.required.description": "Pour voir le plugin lightspeed, contactez votre administrateur pour qu'il vous donne les permissions <b>lightspeed.chat.read</b> et <b>lightspeed.chat.create</b>.",
|
|
43
43
|
// Disclaimers
|
|
44
|
-
"disclaimer.withValidation": "
|
|
45
|
-
"disclaimer.withoutValidation": "
|
|
44
|
+
"disclaimer.withValidation": "Cette fonctionnalit\xE9 utilise la technologie IA. N'incluez pas d'informations personnelles ou d'autres informations sensibles dans votre saisie. Les interactions peuvent \xEAtre utilis\xE9es pour am\xE9liorer les produits ou services de Red Hat.",
|
|
45
|
+
"disclaimer.withoutValidation": "Cette fonctionnalit\xE9 utilise la technologie IA. N'incluez pas d'informations personnelles ou d'autres informations sensibles dans votre saisie. Les interactions peuvent \xEAtre utilis\xE9es pour am\xE9liorer les produits ou services de Red Hat.",
|
|
46
46
|
// Footer and feedback
|
|
47
|
-
"footer.accuracy.label": "
|
|
47
|
+
"footer.accuracy.label": "Toujours examiner le contenu g\xE9n\xE9r\xE9 par l'IA avant utilisation.",
|
|
48
48
|
"footer.accuracy.popover.title": "V\xE9rifier l'exactitude",
|
|
49
49
|
"footer.accuracy.popover.description": "Bien que Developer Lightspeed s'efforce d'\xEAtre exact, il y a toujours une possibilit\xE9 d'erreurs. C'est une bonne pratique de v\xE9rifier les informations critiques aupr\xE8s de sources fiables, surtout si c'est crucial pour la prise de d\xE9cision ou les actions.",
|
|
50
50
|
"footer.accuracy.popover.image.alt": "Image d'exemple pour le popover de note de bas de page",
|
|
@@ -59,9 +59,9 @@ const lightspeedTranslationFr = createTranslationMessages({
|
|
|
59
59
|
"chatbox.search.placeholder": "Rechercher dans les chats pr\xE9c\xE9dents...",
|
|
60
60
|
"chatbox.welcome.greeting": "Bonjour, {{userName}}",
|
|
61
61
|
"chatbox.welcome.description": "Comment puis-je vous aider aujourd'hui ?",
|
|
62
|
-
"chatbox.message.placeholder": "Envoyez un message et t\xE9l\xE9chargez optionnellement un fichier JSON, YAML,
|
|
62
|
+
"chatbox.message.placeholder": "Envoyez un message et t\xE9l\xE9chargez optionnellement un fichier JSON, YAML, ou TXT...",
|
|
63
63
|
"chatbox.fileUpload.failed": "Le t\xE9l\xE9chargement du fichier a \xE9chou\xE9",
|
|
64
|
-
"chatbox.fileUpload.infoText": "Les types de fichiers pris en charge sont : .txt, .yaml,
|
|
64
|
+
"chatbox.fileUpload.infoText": "Les types de fichiers pris en charge sont : .txt, .yaml, et .json. La taille maximale du fichier est de 25 Mo.",
|
|
65
65
|
// Accessibility and ARIA labels
|
|
66
66
|
"aria.chatbotSelector": "S\xE9lecteur de chatbot",
|
|
67
67
|
"aria.important": "Important",
|
|
@@ -93,7 +93,7 @@ const lightspeedTranslationFr = createTranslationMessages({
|
|
|
93
93
|
// File attachment errors
|
|
94
94
|
"file.upload.error.alreadyExists": "Le fichier existe d\xE9j\xE0.",
|
|
95
95
|
"file.upload.error.multipleFiles": "Plus d'un fichier a \xE9t\xE9 t\xE9l\xE9charg\xE9.",
|
|
96
|
-
"file.upload.error.unsupportedType": "Type de fichier non pris en charge. Les types pris en charge sont : .txt, .yaml,
|
|
96
|
+
"file.upload.error.unsupportedType": "Type de fichier non pris en charge. Les types pris en charge sont : .txt, .yaml, et .json.",
|
|
97
97
|
"file.upload.error.fileTooLarge": "La taille de votre fichier est trop importante. Veuillez vous assurer que votre fichier fait moins de 25 Mo.",
|
|
98
98
|
"file.upload.error.readFailed": "\xC9chec de la lecture du fichier : {{errorMessage}}",
|
|
99
99
|
// Developer error messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * French translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationFr = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': \"Assistant de développement alimenté par l'IA\",\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title':\n \"Obtenir de l'aide sur la lisibilité du code\",\n 'prompts.codeReadability.message':\n 'Pouvez-vous suggérer des techniques que je peux utiliser pour rendre mon code plus lisible et maintenable ?',\n 'prompts.debugging.title': \"Obtenir de l'aide pour le débogage\",\n 'prompts.debugging.message':\n \"Mon application lance une erreur lors de la tentative de connexion à la base de données. Pouvez-vous m'aider à identifier le problème ?\",\n 'prompts.developmentConcept.title': 'Expliquer un concept de développement',\n 'prompts.developmentConcept.message':\n \"Pouvez-vous expliquer comment fonctionne l'architecture des microservices et ses avantages par rapport à une conception monolithique ?\",\n 'prompts.codeOptimization.title': 'Suggérer des optimisations de code',\n 'prompts.codeOptimization.message':\n \"Pouvez-vous suggérer des moyens courants d'optimiser le code pour obtenir de meilleures performances ?\",\n 'prompts.documentation.title': 'Résumé de la documentation',\n 'prompts.documentation.message':\n \"Pouvez-vous résumer la documentation pour implémenter l'authentification OAuth 2.0 dans une application web ?\",\n 'prompts.gitWorkflows.title': 'Flux de travail avec Git',\n 'prompts.gitWorkflows.message':\n 'Je veux apporter des modifications au code sur une autre branche sans perdre mon travail existant. Quelle est la procédure pour faire cela en utilisant Git ?',\n 'prompts.testingStrategies.title': 'Suggérer des stratégies de test',\n 'prompts.testingStrategies.message':\n 'Pouvez-vous recommander des stratégies de test courantes qui rendront mon application robuste et sans erreur ?',\n 'prompts.sortingAlgorithms.title': 'Démystifier les algorithmes de tri',\n 'prompts.sortingAlgorithms.message':\n 'Pouvez-vous expliquer la différence entre un algorithme de tri rapide et un algorithme de tri par fusion, et quand utiliser chacun ?',\n 'prompts.eventDriven.title':\n \"Comprendre l'architecture orientée événements\",\n 'prompts.eventDriven.message':\n \"Pouvez-vous expliquer ce qu'est l'architecture orientée événements et quand il est bénéfique de l'utiliser dans le développement de logiciels ?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Déployer avec Tekton',\n 'prompts.tekton.message':\n \"Pouvez-vous m'aider à automatiser le déploiement de mon application en utilisant des pipelines Tekton ?\",\n 'prompts.openshift.title': 'Créer un déploiement OpenShift',\n 'prompts.openshift.message':\n \"Pouvez-vous me guider à travers la création d'un nouveau déploiement dans OpenShift pour une application conteneurisée ?\",\n 'prompts.rhdh.title': 'Commencer avec Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Pouvez-vous me guider à travers les premières étapes pour commencer à utiliser Developer Hub en tant que développeur, comme explorer le Catalogue de Logiciels et ajouter mon service ?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Supprimer le chat ?',\n 'conversation.history.confirm.message':\n \"Vous ne verrez plus ce chat ici. Cela supprimera également l'activité connexe comme les invites, les réponses et les commentaires de votre Activité Lightspeed.\",\n 'conversation.history.confirm.delete': 'Supprimer',\n\n // Permissions\n 'permission.required.title': 'Permissions manquantes',\n 'permission.required.description':\n \"Pour voir le plugin lightspeed, contactez votre administrateur pour qu'il vous donne les permissions <b>lightspeed.chat.read</b> et <b>lightspeed.chat.create</b>.\",\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"Developer Lightspeed peut répondre à des questions sur de nombreux sujets en utilisant vos modèles configurés. Les réponses de Developer Lightspeed sont influencées par la documentation de Red Hat Developer Hub, mais Developer Lightspeed n'a pas accès à votre Catalogue de Logiciels, TechDocs ou Modèles, etc. Developer Lightspeed utilise la validation des questions (invites) pour s'assurer que les conversations restent axées sur des sujets techniques pertinents pour Red Hat Developer Hub, tels que Backstage, Kubernetes et OpenShift. N'incluez pas d'informations personnelles ou sensibles dans votre saisie. Les interactions avec Developer Lightspeed peuvent être examinées et utilisées pour améliorer les produits ou services.\",\n 'disclaimer.withoutValidation':\n \"Developer Lightspeed peut répondre à des questions sur de nombreux sujets en utilisant vos modèles configurés. Les réponses de Developer Lightspeed sont influencées par la documentation de Red Hat Developer Hub, mais Developer Lightspeed n'a pas accès à votre Catalogue de Logiciels, TechDocs ou Modèles, etc. N'incluez pas d'informations personnelles ou sensibles dans votre saisie. Les interactions avec Developer Lightspeed peuvent être examinées et utilisées pour améliorer les produits ou services.\",\n\n // Footer and feedback\n 'footer.accuracy.label':\n \"Vérifiez toujours l'exactitude des réponses générées par l'IA/LLM avant de les utiliser.\",\n 'footer.accuracy.popover.title': \"Vérifier l'exactitude\",\n 'footer.accuracy.popover.description':\n \"Bien que Developer Lightspeed s'efforce d'être exact, il y a toujours une possibilité d'erreurs. C'est une bonne pratique de vérifier les informations critiques auprès de sources fiables, surtout si c'est crucial pour la prise de décision ou les actions.\",\n 'footer.accuracy.popover.image.alt':\n \"Image d'exemple pour le popover de note de bas de page\",\n 'footer.accuracy.popover.cta.label': 'Compris',\n 'footer.accuracy.popover.link.label': 'En savoir plus',\n\n // Common actions\n 'common.cancel': 'Annuler',\n\n // Menu items\n 'menu.newConversation': 'Nouveau Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Rechercher dans les chats précédents...',\n 'chatbox.welcome.greeting': 'Bonjour, {{userName}}',\n 'chatbox.welcome.description': \"Comment puis-je vous aider aujourd'hui ?\",\n 'chatbox.message.placeholder':\n 'Envoyez un message et téléchargez optionnellement un fichier JSON, YAML, TXT ou XML...',\n 'chatbox.fileUpload.failed': 'Le téléchargement du fichier a échoué',\n 'chatbox.fileUpload.infoText':\n 'Les types de fichiers pris en charge sont : .txt, .yaml, .json et .xml. La taille maximale du fichier est de 25 Mo.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Sélecteur de chatbot',\n 'aria.important': 'Important',\n\n // Modal actions\n 'modal.edit': 'Modifier',\n 'modal.save': 'Enregistrer',\n 'modal.close': 'Fermer',\n 'modal.cancel': 'Annuler',\n\n // Conversation actions\n 'conversation.delete': 'Supprimer',\n 'conversation.announcement.userMessage':\n \"Message de l'utilisateur : {{prompt}}. Le message du bot se charge.\",\n\n // User states\n 'user.guest': 'Invité',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Joindre',\n 'tooltip.send': 'Envoyer',\n 'tooltip.microphone.active': \"Arrêter d'écouter\",\n 'tooltip.microphone.inactive': 'Utiliser le microphone',\n 'button.newChat': 'Nouveau chat',\n\n // Modal titles\n 'modal.title.preview': 'Aperçu de la pièce jointe',\n 'modal.title.edit': 'Modifier la pièce jointe',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'icône lightspeed',\n 'icon.permissionRequired.alt': 'icône de permission requise',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'Le fichier existe déjà.',\n 'file.upload.error.multipleFiles': \"Plus d'un fichier a été téléchargé.\",\n 'file.upload.error.unsupportedType':\n 'Type de fichier non pris en charge. Les types pris en charge sont : .txt, .yaml, .json et .xml.',\n 'file.upload.error.fileTooLarge':\n 'La taille de votre fichier est trop importante. Veuillez vous assurer que votre fichier fait moins de 25 Mo.',\n 'file.upload.error.readFailed':\n 'Échec de la lecture du fichier : {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext doit être dans un FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Pourquoi avez-vous choisi cette évaluation ?',\n 'feedback.form.textAreaPlaceholder':\n 'Fournissez des commentaires supplémentaires optionnels',\n 'feedback.form.submitWord': 'Soumettre',\n 'feedback.tooltips.goodResponse': 'Bonne Réponse',\n 'feedback.tooltips.badResponse': 'Mauvaise Réponse',\n 'feedback.tooltips.copied': 'Copié',\n 'feedback.tooltips.copy': 'Copier',\n 'feedback.tooltips.listening': 'Écoute',\n 'feedback.tooltips.listen': 'Écouter',\n 'feedback.quickResponses.positive.helpful': 'Informations utiles',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Facile à comprendre',\n 'feedback.quickResponses.positive.resolvedIssue': 'A résolu mon problème',\n 'feedback.quickResponses.negative.didntAnswer':\n \"N'a pas répondu à ma question\",\n 'feedback.quickResponses.negative.hardToUnderstand':\n 'Difficile à comprendre',\n 'feedback.quickResponses.negative.notHelpful': 'Pas utile',\n 'feedback.completion.title': 'Feedback soumis',\n 'feedback.completion.body':\n 'Nous avons reçu votre réponse. Merci de partager votre feedback !',\n\n // Conversation categorization\n 'conversation.category.today': \"Aujourd'hui\",\n 'conversation.category.yesterday': 'Hier',\n 'conversation.category.previous7Days': '7 derniers jours',\n 'conversation.category.previous30Days': '30 derniers jours',\n },\n});\n\nexport default lightspeedTranslationFr;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,oDAAA;AAAA;AAAA,IAGjB,+BACE,EAAA,gDAAA;AAAA,IACF,iCACE,EAAA,gHAAA;AAAA,IACF,yBAA2B,EAAA,uCAAA;AAAA,IAC3B,2BACE,EAAA,qJ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iC,EAAA,qBAAA;AAAA,IACjC,0BAA4B,EAAA,UAAA;AAAA,IAC5B,wBAA0B,EAAA,QAAA;AAAA,IAC1B,6BAA+B,EAAA,WAAA;AAAA,IAC/B,0BAA4B,EAAA,YAAA;AAAA,IAC5B,0CAA4C,EAAA,qBAAA;AAAA,IAC5C,mDAAqD,EAAA,wBAAA;AAAA,IACrD,gDAAkD,EAAA,6BAAA;AAAA,IAClD,8CACE,EAAA,qCAAA;AAAA,IACF,mDACE,EAAA,2BAAA;AAAA,IACF,6CAA+C,EAAA,WAAA;AAAA,IAC/C,2BAA6B,EAAA,iBAAA;AAAA,IAC7B,0BACE,EAAA,yEAAA;AAAA;AAAA,IAGF,6BAA+B,EAAA,aAAA;AAAA,IAC/B,iCAAmC,EAAA,MAAA;AAAA,IACnC,qCAAuC,EAAA,kBAAA;AAAA,IACvC,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from './ref';\n\n/**\n * French translation for Developer Lightspeed.\n * @public\n */\nconst lightspeedTranslationFr = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': \"Assistant de développement alimenté par l'IA\",\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title':\n \"Obtenir de l'aide sur la lisibilité du code\",\n 'prompts.codeReadability.message':\n 'Pouvez-vous suggérer des techniques que je peux utiliser pour rendre mon code plus lisible et maintenable ?',\n 'prompts.debugging.title': \"Obtenir de l'aide pour le débogage\",\n 'prompts.debugging.message':\n \"Mon application lance une erreur lors de la tentative de connexion à la base de données. Pouvez-vous m'aider à identifier le problème ?\",\n 'prompts.developmentConcept.title': 'Expliquer un concept de développement',\n 'prompts.developmentConcept.message':\n \"Pouvez-vous expliquer comment fonctionne l'architecture des microservices et ses avantages par rapport à une conception monolithique ?\",\n 'prompts.codeOptimization.title': 'Suggérer des optimisations de code',\n 'prompts.codeOptimization.message':\n \"Pouvez-vous suggérer des moyens courants d'optimiser le code pour obtenir de meilleures performances ?\",\n 'prompts.documentation.title': 'Résumé de la documentation',\n 'prompts.documentation.message':\n \"Pouvez-vous résumer la documentation pour implémenter l'authentification OAuth 2.0 dans une application web ?\",\n 'prompts.gitWorkflows.title': 'Flux de travail avec Git',\n 'prompts.gitWorkflows.message':\n 'Je veux apporter des modifications au code sur une autre branche sans perdre mon travail existant. Quelle est la procédure pour faire cela en utilisant Git ?',\n 'prompts.testingStrategies.title': 'Suggérer des stratégies de test',\n 'prompts.testingStrategies.message':\n 'Pouvez-vous recommander des stratégies de test courantes qui rendront mon application robuste et sans erreur ?',\n 'prompts.sortingAlgorithms.title': 'Démystifier les algorithmes de tri',\n 'prompts.sortingAlgorithms.message':\n 'Pouvez-vous expliquer la différence entre un algorithme de tri rapide et un algorithme de tri par fusion, et quand utiliser chacun ?',\n 'prompts.eventDriven.title':\n \"Comprendre l'architecture orientée événements\",\n 'prompts.eventDriven.message':\n \"Pouvez-vous expliquer ce qu'est l'architecture orientée événements et quand il est bénéfique de l'utiliser dans le développement de logiciels ?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Déployer avec Tekton',\n 'prompts.tekton.message':\n \"Pouvez-vous m'aider à automatiser le déploiement de mon application en utilisant des pipelines Tekton ?\",\n 'prompts.openshift.title': 'Créer un déploiement OpenShift',\n 'prompts.openshift.message':\n \"Pouvez-vous me guider à travers la création d'un nouveau déploiement dans OpenShift pour une application conteneurisée ?\",\n 'prompts.rhdh.title': 'Commencer avec Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Pouvez-vous me guider à travers les premières étapes pour commencer à utiliser Developer Hub en tant que développeur, comme explorer le Catalogue de Logiciels et ajouter mon service ?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Supprimer le chat ?',\n 'conversation.history.confirm.message':\n \"Vous ne verrez plus ce chat ici. Cela supprimera également l'activité connexe comme les invites, les réponses et les commentaires de votre Activité Lightspeed.\",\n 'conversation.history.confirm.delete': 'Supprimer',\n\n // Permissions\n 'permission.required.title': 'Permissions manquantes',\n 'permission.required.description':\n \"Pour voir le plugin lightspeed, contactez votre administrateur pour qu'il vous donne les permissions <b>lightspeed.chat.read</b> et <b>lightspeed.chat.create</b>.\",\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"Cette fonctionnalité utilise la technologie IA. N'incluez pas d'informations personnelles ou d'autres informations sensibles dans votre saisie. Les interactions peuvent être utilisées pour améliorer les produits ou services de Red Hat.\",\n 'disclaimer.withoutValidation':\n \"Cette fonctionnalité utilise la technologie IA. N'incluez pas d'informations personnelles ou d'autres informations sensibles dans votre saisie. Les interactions peuvent être utilisées pour améliorer les produits ou services de Red Hat.\",\n\n // Footer and feedback\n 'footer.accuracy.label':\n \"Toujours examiner le contenu généré par l'IA avant utilisation.\",\n 'footer.accuracy.popover.title': \"Vérifier l'exactitude\",\n 'footer.accuracy.popover.description':\n \"Bien que Developer Lightspeed s'efforce d'être exact, il y a toujours une possibilité d'erreurs. C'est une bonne pratique de vérifier les informations critiques auprès de sources fiables, surtout si c'est crucial pour la prise de décision ou les actions.\",\n 'footer.accuracy.popover.image.alt':\n \"Image d'exemple pour le popover de note de bas de page\",\n 'footer.accuracy.popover.cta.label': 'Compris',\n 'footer.accuracy.popover.link.label': 'En savoir plus',\n\n // Common actions\n 'common.cancel': 'Annuler',\n\n // Menu items\n 'menu.newConversation': 'Nouveau Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Rechercher dans les chats précédents...',\n 'chatbox.welcome.greeting': 'Bonjour, {{userName}}',\n 'chatbox.welcome.description': \"Comment puis-je vous aider aujourd'hui ?\",\n 'chatbox.message.placeholder':\n 'Envoyez un message et téléchargez optionnellement un fichier JSON, YAML, ou TXT...',\n 'chatbox.fileUpload.failed': 'Le téléchargement du fichier a échoué',\n 'chatbox.fileUpload.infoText':\n 'Les types de fichiers pris en charge sont : .txt, .yaml, et .json. La taille maximale du fichier est de 25 Mo.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Sélecteur de chatbot',\n 'aria.important': 'Important',\n\n // Modal actions\n 'modal.edit': 'Modifier',\n 'modal.save': 'Enregistrer',\n 'modal.close': 'Fermer',\n 'modal.cancel': 'Annuler',\n\n // Conversation actions\n 'conversation.delete': 'Supprimer',\n 'conversation.announcement.userMessage':\n \"Message de l'utilisateur : {{prompt}}. Le message du bot se charge.\",\n\n // User states\n 'user.guest': 'Invité',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Joindre',\n 'tooltip.send': 'Envoyer',\n 'tooltip.microphone.active': \"Arrêter d'écouter\",\n 'tooltip.microphone.inactive': 'Utiliser le microphone',\n 'button.newChat': 'Nouveau chat',\n\n // Modal titles\n 'modal.title.preview': 'Aperçu de la pièce jointe',\n 'modal.title.edit': 'Modifier la pièce jointe',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'icône lightspeed',\n 'icon.permissionRequired.alt': 'icône de permission requise',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'Le fichier existe déjà.',\n 'file.upload.error.multipleFiles': \"Plus d'un fichier a été téléchargé.\",\n 'file.upload.error.unsupportedType':\n 'Type de fichier non pris en charge. Les types pris en charge sont : .txt, .yaml, et .json.',\n 'file.upload.error.fileTooLarge':\n 'La taille de votre fichier est trop importante. Veuillez vous assurer que votre fichier fait moins de 25 Mo.',\n 'file.upload.error.readFailed':\n 'Échec de la lecture du fichier : {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext doit être dans un FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Pourquoi avez-vous choisi cette évaluation ?',\n 'feedback.form.textAreaPlaceholder':\n 'Fournissez des commentaires supplémentaires optionnels',\n 'feedback.form.submitWord': 'Soumettre',\n 'feedback.tooltips.goodResponse': 'Bonne Réponse',\n 'feedback.tooltips.badResponse': 'Mauvaise Réponse',\n 'feedback.tooltips.copied': 'Copié',\n 'feedback.tooltips.copy': 'Copier',\n 'feedback.tooltips.listening': 'Écoute',\n 'feedback.tooltips.listen': 'Écouter',\n 'feedback.quickResponses.positive.helpful': 'Informations utiles',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Facile à comprendre',\n 'feedback.quickResponses.positive.resolvedIssue': 'A résolu mon problème',\n 'feedback.quickResponses.negative.didntAnswer':\n \"N'a pas répondu à ma question\",\n 'feedback.quickResponses.negative.hardToUnderstand':\n 'Difficile à comprendre',\n 'feedback.quickResponses.negative.notHelpful': 'Pas utile',\n 'feedback.completion.title': 'Feedback soumis',\n 'feedback.completion.body':\n 'Nous avons reçu votre réponse. Merci de partager votre feedback !',\n\n // Conversation categorization\n 'conversation.category.today': \"Aujourd'hui\",\n 'conversation.category.yesterday': 'Hier',\n 'conversation.category.previous7Days': '7 derniers jours',\n 'conversation.category.previous30Days': '30 derniers jours',\n },\n});\n\nexport default lightspeedTranslationFr;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,oDAAA;AAAA;AAAA,IAGjB,+BACE,EAAA,gDA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A,2DAAA;AAAA,IACF,0BAA4B,EAAA,WAAA;AAAA,IAC5B,gCAAkC,EAAA,kBAAA;AAAA,IAClC,+BAAiC,EAAA,qBAAA;AAAA,IACjC,0BAA4B,EAAA,UAAA;AAAA,IAC5B,wBAA0B,EAAA,QAAA;AAAA,IAC1B,6BAA+B,EAAA,WAAA;AAAA,IAC/B,0BAA4B,EAAA,YAAA;AAAA,IAC5B,0CAA4C,EAAA,qBAAA;AAAA,IAC5C,mDAAqD,EAAA,wBAAA;AAAA,IACrD,gDAAkD,EAAA,6BAAA;AAAA,IAClD,8CACE,EAAA,qCAAA;AAAA,IACF,mDACE,EAAA,2BAAA;AAAA,IACF,6CAA+C,EAAA,WAAA;AAAA,IAC/C,2BAA6B,EAAA,iBAAA;AAAA,IAC7B,0BACE,EAAA,yEAAA;AAAA;AAAA,IAGF,6BAA+B,EAAA,aAAA;AAAA,IAC/B,iCAAmC,EAAA,MAAA;AAAA,IACnC,qCAAuC,EAAA,kBAAA;AAAA,IACvC,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -38,10 +38,10 @@ const lightspeedMessages = {
|
|
|
38
38
|
"permission.required.title": "Missing permissions",
|
|
39
39
|
"permission.required.description": "To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.",
|
|
40
40
|
// Disclaimers
|
|
41
|
-
"disclaimer.withValidation": "
|
|
42
|
-
"disclaimer.withoutValidation": "
|
|
41
|
+
"disclaimer.withValidation": "This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.",
|
|
42
|
+
"disclaimer.withoutValidation": "This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.",
|
|
43
43
|
// Footer and feedback
|
|
44
|
-
"footer.accuracy.label": "Always
|
|
44
|
+
"footer.accuracy.label": "Always review AI generated content prior to use.",
|
|
45
45
|
"footer.accuracy.popover.title": "Verify accuracy",
|
|
46
46
|
"footer.accuracy.popover.description": "While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.",
|
|
47
47
|
"footer.accuracy.popover.image.alt": "Example image for footnote popover",
|
|
@@ -56,9 +56,9 @@ const lightspeedMessages = {
|
|
|
56
56
|
"chatbox.search.placeholder": "Search previous chats...",
|
|
57
57
|
"chatbox.welcome.greeting": "Hello, {{userName}}",
|
|
58
58
|
"chatbox.welcome.description": "How can I help you today?",
|
|
59
|
-
"chatbox.message.placeholder": "Send a message and optionally upload a JSON, YAML,
|
|
59
|
+
"chatbox.message.placeholder": "Send a message and optionally upload a JSON, YAML, or TXT file...",
|
|
60
60
|
"chatbox.fileUpload.failed": "File upload failed",
|
|
61
|
-
"chatbox.fileUpload.infoText": "Supported file types are: .txt, .yaml,
|
|
61
|
+
"chatbox.fileUpload.infoText": "Supported file types are: .txt, .yaml, and .json. The maximum file size is 25 MB.",
|
|
62
62
|
// Accessibility and ARIA labels
|
|
63
63
|
"aria.chatbotSelector": "Chatbot selector",
|
|
64
64
|
"aria.important": "Important",
|
|
@@ -90,7 +90,7 @@ const lightspeedMessages = {
|
|
|
90
90
|
// File attachment errors
|
|
91
91
|
"file.upload.error.alreadyExists": "File already exists.",
|
|
92
92
|
"file.upload.error.multipleFiles": "Uploaded more than one file.",
|
|
93
|
-
"file.upload.error.unsupportedType": "Unsupported file type. Supported types are: .txt, .yaml,
|
|
93
|
+
"file.upload.error.unsupportedType": "Unsupported file type. Supported types are: .txt, .yaml, and .json.",
|
|
94
94
|
"file.upload.error.fileTooLarge": "Your file size is too large. Please ensure that your file is less than 25 MB.",
|
|
95
95
|
"file.upload.error.readFailed": "Failed to read file: {{errorMessage}}",
|
|
96
96
|
// Developer error messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @alpha\n */\nexport const lightspeedMessages = {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI-powered development assistant',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Get Help On Code Readability',\n 'prompts.codeReadability.message':\n 'Can you suggest techniques I can use to make my code more readable and maintainable?',\n 'prompts.debugging.title': 'Get Help With Debugging',\n 'prompts.debugging.message':\n 'My application is throwing an error when trying to connect to the database. Can you help me identify the issue?',\n 'prompts.developmentConcept.title': 'Explain a Development Concept',\n 'prompts.developmentConcept.message':\n 'Can you explain how microservices architecture works and its advantages over a monolithic design?',\n 'prompts.codeOptimization.title': 'Suggest Code Optimizations',\n 'prompts.codeOptimization.message':\n 'Can you suggest common ways to optimize code to achieve better performance?',\n 'prompts.documentation.title': 'Documentation Summary',\n 'prompts.documentation.message':\n 'Can you summarize the documentation for implementing OAuth 2.0 authentication in a web app?',\n 'prompts.gitWorkflows.title': 'Workflows With Git',\n 'prompts.gitWorkflows.message':\n 'I want to make changes to code on another branch without losing my existing work. What is the procedure to do this using Git?',\n 'prompts.testingStrategies.title': 'Suggest Testing Strategies',\n 'prompts.testingStrategies.message':\n 'Can you recommend some common testing strategies that will make my application robust and error-free?',\n 'prompts.sortingAlgorithms.title': 'Demystify Sorting Algorithms',\n 'prompts.sortingAlgorithms.message':\n 'Can you explain the difference between a quicksort and a merge sort algorithm, and when to use each?',\n 'prompts.eventDriven.title': 'Understand Event-Driven Architecture',\n 'prompts.eventDriven.message':\n \"Can you explain what event-driven architecture is and when it's beneficial to use it in software development?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Deploy With Tekton',\n 'prompts.tekton.message':\n 'Can you help me automate the deployment of my application using Tekton pipelines?',\n 'prompts.openshift.title': 'Create An OpenShift Deployment',\n 'prompts.openshift.message':\n 'Can you guide me through creating a new deployment in OpenShift for a containerized application?',\n 'prompts.rhdh.title': 'Getting Started with Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Can you guide me through the first steps to start using Developer Hub as a developer, like exploring the Software Catalog and adding my service?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Delete chat?',\n 'conversation.history.confirm.message':\n \"You'll no longer see this chat here. This will also delete related activity like prompts, responses, and feedback from your Lightspeed Activity.\",\n 'conversation.history.confirm.delete': 'Delete',\n\n // Permissions\n 'permission.required.title': 'Missing permissions',\n 'permission.required.description':\n 'To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"Developer Lightspeed can answer questions on many topics using your configured models. Developer Lightspeed's responses are influenced by the Red Hat Developer Hub documentation but Developer Lightspeed does not have access to your Software Catalog, TechDocs, or Templates etc. Developer Lightspeed uses question (prompt) validation to ensure that conversations remain focused on technical topics relevant to Red Hat Developer Hub, such as Backstage, Kubernetes, and OpenShift. Do not include personal or sensitive information in your input. Interactions with Developer Lightspeed may be reviewed and used to improve products or services.\",\n 'disclaimer.withoutValidation':\n \"Developer Lightspeed can answer questions on many topics using your configured models. Developer Lightspeed's responses are influenced by the Red Hat Developer Hub documentation but Developer Lightspeed does not have access to your Software Catalog, TechDocs, or Templates etc. Do not include personal or sensitive information in your input. Interactions with Developer Lightspeed may be reviewed and used to improve products or services.\",\n\n // Footer and feedback\n 'footer.accuracy.label':\n 'Always check AI/LLM generated responses for accuracy prior to use.',\n 'footer.accuracy.popover.title': 'Verify accuracy',\n 'footer.accuracy.popover.description':\n \"While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.\",\n 'footer.accuracy.popover.image.alt': 'Example image for footnote popover',\n 'footer.accuracy.popover.cta.label': 'Got it',\n 'footer.accuracy.popover.link.label': 'Learn more',\n\n // Common actions\n 'common.cancel': 'Cancel',\n\n // Menu items\n 'menu.newConversation': 'New Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Search previous chats...',\n 'chatbox.welcome.greeting': 'Hello, {{userName}}',\n 'chatbox.welcome.description': 'How can I help you today?',\n 'chatbox.message.placeholder':\n 'Send a message and optionally upload a JSON, YAML, TXT, or XML file...',\n 'chatbox.fileUpload.failed': 'File upload failed',\n 'chatbox.fileUpload.infoText':\n 'Supported file types are: .txt, .yaml, .json and .xml. The maximum file size is 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot selector',\n 'aria.important': 'Important',\n\n // Modal actions\n 'modal.edit': 'Edit',\n 'modal.save': 'Save',\n 'modal.close': 'Close',\n 'modal.cancel': 'Cancel',\n\n // Conversation actions\n 'conversation.delete': 'Delete',\n 'conversation.announcement.userMessage':\n 'Message from User: {{prompt}}. Message from Bot is loading.',\n\n // User states\n 'user.guest': 'Guest',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Attach',\n 'tooltip.send': 'Send',\n 'tooltip.microphone.active': 'Stop listening',\n 'tooltip.microphone.inactive': 'Use microphone',\n 'button.newChat': 'New chat',\n\n // Modal titles\n 'modal.title.preview': 'Preview attachment',\n 'modal.title.edit': 'Edit attachment',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'lightspeed icon',\n 'icon.permissionRequired.alt': 'permission required icon',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'File already exists.',\n 'file.upload.error.multipleFiles': 'Uploaded more than one file.',\n 'file.upload.error.unsupportedType':\n 'Unsupported file type. Supported types are: .txt, .yaml, .json and .xml.',\n 'file.upload.error.fileTooLarge':\n 'Your file size is too large. Please ensure that your file is less than 25 MB.',\n 'file.upload.error.readFailed': 'Failed to read file: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext must be within a FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Why did you choose this rating?',\n 'feedback.form.textAreaPlaceholder': 'Provide optional additional feedback',\n 'feedback.form.submitWord': 'Submit',\n 'feedback.tooltips.goodResponse': 'Good Response',\n 'feedback.tooltips.badResponse': 'Bad Response',\n 'feedback.tooltips.copied': 'Copied',\n 'feedback.tooltips.copy': 'Copy',\n 'feedback.tooltips.listening': 'Listening',\n 'feedback.tooltips.listen': 'Listen',\n 'feedback.quickResponses.positive.helpful': 'Helpful information',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Easy to understand',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolved my issue',\n 'feedback.quickResponses.negative.didntAnswer': \"Didn't answer my question\",\n 'feedback.quickResponses.negative.hardToUnderstand': 'Hard to understand',\n 'feedback.quickResponses.negative.notHelpful': 'Not Helpful',\n 'feedback.completion.title': 'Feedback submitted',\n 'feedback.completion.body':\n \"We've received your response. Thank you for sharing your feedback!\",\n\n // Conversation categorization\n 'conversation.category.today': 'Today',\n 'conversation.category.yesterday': 'Yesterday',\n 'conversation.category.previous7Days': 'Previous 7 Days',\n 'conversation.category.previous30Days': 'Previous 30 Days',\n};\n\n/**\n * Translation Reference for Developer Lightspeed\n * @alpha\n **/\nexport const lightspeedTranslationRef = createTranslationRef({\n id: 'plugin.lightspeed',\n messages: lightspeedMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA;AAAA,EAEhC,YAAc,EAAA,YAAA;AAAA,EACd,eAAiB,EAAA,kCAAA;AAAA;AAAA,EAGjB,+BAAiC,EA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A,EACvB,mCAAqC,EAAA,sCAAA;AAAA,EACrC,0BAA4B,EAAA,QAAA;AAAA,EAC5B,gCAAkC,EAAA,eAAA;AAAA,EAClC,+BAAiC,EAAA,cAAA;AAAA,EACjC,0BAA4B,EAAA,QAAA;AAAA,EAC5B,wBAA0B,EAAA,MAAA;AAAA,EAC1B,6BAA+B,EAAA,WAAA;AAAA,EAC/B,0BAA4B,EAAA,QAAA;AAAA,EAC5B,0CAA4C,EAAA,qBAAA;AAAA,EAC5C,mDAAqD,EAAA,oBAAA;AAAA,EACrD,gDAAkD,EAAA,mBAAA;AAAA,EAClD,8CAAgD,EAAA,2BAAA;AAAA,EAChD,mDAAqD,EAAA,oBAAA;AAAA,EACrD,6CAA+C,EAAA,aAAA;AAAA,EAC/C,2BAA6B,EAAA,oBAAA;AAAA,EAC7B,0BACE,EAAA,oEAAA;AAAA;AAAA,EAGF,6BAA+B,EAAA,OAAA;AAAA,EAC/B,iCAAmC,EAAA,WAAA;AAAA,EACnC,qCAAuC,EAAA,iBAAA;AAAA,EACvC,sCAAwC,EAAA;AAC1C;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @alpha\n */\nexport const lightspeedMessages = {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI-powered development assistant',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Get Help On Code Readability',\n 'prompts.codeReadability.message':\n 'Can you suggest techniques I can use to make my code more readable and maintainable?',\n 'prompts.debugging.title': 'Get Help With Debugging',\n 'prompts.debugging.message':\n 'My application is throwing an error when trying to connect to the database. Can you help me identify the issue?',\n 'prompts.developmentConcept.title': 'Explain a Development Concept',\n 'prompts.developmentConcept.message':\n 'Can you explain how microservices architecture works and its advantages over a monolithic design?',\n 'prompts.codeOptimization.title': 'Suggest Code Optimizations',\n 'prompts.codeOptimization.message':\n 'Can you suggest common ways to optimize code to achieve better performance?',\n 'prompts.documentation.title': 'Documentation Summary',\n 'prompts.documentation.message':\n 'Can you summarize the documentation for implementing OAuth 2.0 authentication in a web app?',\n 'prompts.gitWorkflows.title': 'Workflows With Git',\n 'prompts.gitWorkflows.message':\n 'I want to make changes to code on another branch without losing my existing work. What is the procedure to do this using Git?',\n 'prompts.testingStrategies.title': 'Suggest Testing Strategies',\n 'prompts.testingStrategies.message':\n 'Can you recommend some common testing strategies that will make my application robust and error-free?',\n 'prompts.sortingAlgorithms.title': 'Demystify Sorting Algorithms',\n 'prompts.sortingAlgorithms.message':\n 'Can you explain the difference between a quicksort and a merge sort algorithm, and when to use each?',\n 'prompts.eventDriven.title': 'Understand Event-Driven Architecture',\n 'prompts.eventDriven.message':\n \"Can you explain what event-driven architecture is and when it's beneficial to use it in software development?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Deploy With Tekton',\n 'prompts.tekton.message':\n 'Can you help me automate the deployment of my application using Tekton pipelines?',\n 'prompts.openshift.title': 'Create An OpenShift Deployment',\n 'prompts.openshift.message':\n 'Can you guide me through creating a new deployment in OpenShift for a containerized application?',\n 'prompts.rhdh.title': 'Getting Started with Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Can you guide me through the first steps to start using Developer Hub as a developer, like exploring the Software Catalog and adding my service?',\n\n // Conversation history\n 'conversation.history.confirm.title': 'Delete chat?',\n 'conversation.history.confirm.message':\n \"You'll no longer see this chat here. This will also delete related activity like prompts, responses, and feedback from your Lightspeed Activity.\",\n 'conversation.history.confirm.delete': 'Delete',\n\n // Permissions\n 'permission.required.title': 'Missing permissions',\n 'permission.required.description':\n 'To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n 'disclaimer.withoutValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n\n // Footer and feedback\n 'footer.accuracy.label': 'Always review AI generated content prior to use.',\n 'footer.accuracy.popover.title': 'Verify accuracy',\n 'footer.accuracy.popover.description':\n \"While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.\",\n 'footer.accuracy.popover.image.alt': 'Example image for footnote popover',\n 'footer.accuracy.popover.cta.label': 'Got it',\n 'footer.accuracy.popover.link.label': 'Learn more',\n\n // Common actions\n 'common.cancel': 'Cancel',\n\n // Menu items\n 'menu.newConversation': 'New Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Search previous chats...',\n 'chatbox.welcome.greeting': 'Hello, {{userName}}',\n 'chatbox.welcome.description': 'How can I help you today?',\n 'chatbox.message.placeholder':\n 'Send a message and optionally upload a JSON, YAML, or TXT file...',\n 'chatbox.fileUpload.failed': 'File upload failed',\n 'chatbox.fileUpload.infoText':\n 'Supported file types are: .txt, .yaml, and .json. The maximum file size is 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot selector',\n 'aria.important': 'Important',\n\n // Modal actions\n 'modal.edit': 'Edit',\n 'modal.save': 'Save',\n 'modal.close': 'Close',\n 'modal.cancel': 'Cancel',\n\n // Conversation actions\n 'conversation.delete': 'Delete',\n 'conversation.announcement.userMessage':\n 'Message from User: {{prompt}}. Message from Bot is loading.',\n\n // User states\n 'user.guest': 'Guest',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Attach',\n 'tooltip.send': 'Send',\n 'tooltip.microphone.active': 'Stop listening',\n 'tooltip.microphone.inactive': 'Use microphone',\n 'button.newChat': 'New chat',\n\n // Modal titles\n 'modal.title.preview': 'Preview attachment',\n 'modal.title.edit': 'Edit attachment',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'lightspeed icon',\n 'icon.permissionRequired.alt': 'permission required icon',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'File already exists.',\n 'file.upload.error.multipleFiles': 'Uploaded more than one file.',\n 'file.upload.error.unsupportedType':\n 'Unsupported file type. Supported types are: .txt, .yaml, and .json.',\n 'file.upload.error.fileTooLarge':\n 'Your file size is too large. Please ensure that your file is less than 25 MB.',\n 'file.upload.error.readFailed': 'Failed to read file: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext must be within a FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Why did you choose this rating?',\n 'feedback.form.textAreaPlaceholder': 'Provide optional additional feedback',\n 'feedback.form.submitWord': 'Submit',\n 'feedback.tooltips.goodResponse': 'Good Response',\n 'feedback.tooltips.badResponse': 'Bad Response',\n 'feedback.tooltips.copied': 'Copied',\n 'feedback.tooltips.copy': 'Copy',\n 'feedback.tooltips.listening': 'Listening',\n 'feedback.tooltips.listen': 'Listen',\n 'feedback.quickResponses.positive.helpful': 'Helpful information',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Easy to understand',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolved my issue',\n 'feedback.quickResponses.negative.didntAnswer': \"Didn't answer my question\",\n 'feedback.quickResponses.negative.hardToUnderstand': 'Hard to understand',\n 'feedback.quickResponses.negative.notHelpful': 'Not Helpful',\n 'feedback.completion.title': 'Feedback submitted',\n 'feedback.completion.body':\n \"We've received your response. Thank you for sharing your feedback!\",\n\n // Conversation categorization\n 'conversation.category.today': 'Today',\n 'conversation.category.yesterday': 'Yesterday',\n 'conversation.category.previous7Days': 'Previous 7 Days',\n 'conversation.category.previous30Days': 'Previous 30 Days',\n};\n\n/**\n * Translation Reference for Developer Lightspeed\n * @alpha\n **/\nexport const lightspeedTranslationRef = createTranslationRef({\n id: 'plugin.lightspeed',\n messages: lightspeedMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA;AAAA,EAEhC,YAAc,EAAA,YAAA;AAAA,EACd,eAAiB,EAAA,kCAAA;AAAA;AAAA,EAGjB,+BAAiC,EAAA,8BAAA;AAAA,EACjC,iCACE,EAAA,sFAAA;AAAA,EACF,yBAA2B,EAAA,yBAAA;AAAA,EAC3B,2BACE,EAAA,iHAAA;AAAA,EACF,kCAAoC,EAAA,+BAAA;AAAA,EACpC,oCACE,EAAA,mGAAA;AAAA,EACF,gCAAkC,EAAA,4BAAA;AAAA,EAClC,kCACE,EAAA,6EAAA;AAAA,EACF,6BAA+B,EAAA,uBAAA;AAAA,EAC/B,+BACE,EAAA,6FAAA;AAAA,EACF,4BAA8B,EAAA,oBAAA;AAAA,EAC9B,8BACE,EAAA,+HAAA;AAAA,EACF,iCAAmC,EAAA,4BAAA;AAAA,EACnC,mCACE,EAAA,uGAAA;AAAA,EACF,iCAAmC,EAAA,8BAAA;AAAA,EACnC,mCACE,EAAA,sGAAA;AAAA,EACF,2BAA6B,EAAA,sCAAA;AAAA,EAC7B,6BACE,EAAA,+GAAA;AAAA;AAAA,EAGF,sBAAwB,EAAA,oBAAA;AAAA,EACxB,wBACE,EAAA,mFAAA;AAAA,EACF,yBAA2B,EAAA,gCAAA;AAAA,EAC3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C1C;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
package/dist/types.esm.js
CHANGED
|
@@ -2,7 +2,6 @@ var SupportedFileType = /* @__PURE__ */ ((SupportedFileType2) => {
|
|
|
2
2
|
SupportedFileType2["JSON"] = "application/json";
|
|
3
3
|
SupportedFileType2["YAML"] = "application/x-yaml";
|
|
4
4
|
SupportedFileType2["TEXT"] = "text/plain";
|
|
5
|
-
SupportedFileType2["XML"] = "text/xml";
|
|
6
5
|
return SupportedFileType2;
|
|
7
6
|
})(SupportedFileType || {});
|
|
8
7
|
|
package/dist/types.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"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 { SourcesCardProps } from '@patternfly/chatbot';\nimport { AlertProps } from '@patternfly/react-core';\n\nexport type Conversations = {\n [key: string]: {\n user: string;\n bot: string;\n model: string;\n loading: boolean;\n timestamp: string;\n botTimestamp: string;\n error?: AlertProps;\n };\n};\n\nexport type ReferencedDocument = {\n doc_title: string;\n doc_url: string;\n doc_description?: string;\n};\n\nexport type ReferencedDocuments = ReferencedDocument[];\n\nexport type LCSModelType = 'embedding' | 'llm';\nexport type LCSModelApiModelType = 'embedding' | 'llm';\n\nexport interface LCSModel {\n identifier: string;\n metadata: {\n embedding_dimension: number;\n };\n api_model_type: LCSModelApiModelType;\n provider_id: string;\n type: 'model';\n provider_resource_id: string;\n model_type: LCSModelType;\n}\nexport interface LCSConversation {\n provider: string;\n model: string;\n messages: BaseMessage[];\n started_at: string;\n completed_at: string;\n referenced_documents?: ReferencedDocuments;\n}\n\nexport interface LCSShield {\n identifier: string;\n provider_id: string;\n type: 'shield';\n params: {};\n provider_resource_id: string;\n}\nexport interface BaseMessage {\n name: string;\n type: string;\n id: number;\n content: string;\n model: string;\n timestamp: string;\n sources?: SourcesCardProps;\n referenced_documents?: ReferencedDocuments;\n error?: AlertProps;\n}\nexport type ConversationSummary = {\n conversation_id: string;\n last_message_timestamp: number;\n topic_summary: string;\n};\n\nexport enum SupportedFileType {\n JSON = 'application/json',\n YAML = 'application/x-yaml',\n TEXT = 'text/plain',\n
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"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 { SourcesCardProps } from '@patternfly/chatbot';\nimport { AlertProps } from '@patternfly/react-core';\n\nexport type Conversations = {\n [key: string]: {\n user: string;\n bot: string;\n model: string;\n loading: boolean;\n timestamp: string;\n botTimestamp: string;\n error?: AlertProps;\n };\n};\n\nexport type ReferencedDocument = {\n doc_title: string;\n doc_url: string;\n doc_description?: string;\n};\n\nexport type ReferencedDocuments = ReferencedDocument[];\n\nexport type LCSModelType = 'embedding' | 'llm';\nexport type LCSModelApiModelType = 'embedding' | 'llm';\n\nexport interface LCSModel {\n identifier: string;\n metadata: {\n embedding_dimension: number;\n };\n api_model_type: LCSModelApiModelType;\n provider_id: string;\n type: 'model';\n provider_resource_id: string;\n model_type: LCSModelType;\n}\nexport interface LCSConversation {\n provider: string;\n model: string;\n messages: BaseMessage[];\n started_at: string;\n completed_at: string;\n referenced_documents?: ReferencedDocuments;\n}\n\nexport interface LCSShield {\n identifier: string;\n provider_id: string;\n type: 'shield';\n params: {};\n provider_resource_id: string;\n}\nexport interface BaseMessage {\n name: string;\n type: string;\n id: number;\n content: string;\n model: string;\n timestamp: string;\n sources?: SourcesCardProps;\n referenced_documents?: ReferencedDocuments;\n error?: AlertProps;\n}\nexport type ConversationSummary = {\n conversation_id: string;\n last_message_timestamp: number;\n topic_summary: string;\n};\n\nexport enum SupportedFileType {\n JSON = 'application/json',\n YAML = 'application/x-yaml',\n TEXT = 'text/plain',\n}\nexport interface FileContent {\n content: string;\n type: string;\n name: string;\n}\n\nexport type Attachment = {\n attachment_type: string;\n content_type: string;\n content: string;\n};\n\nexport type ConversationList = ConversationSummary[];\n\nexport type SamplePrompt =\n | {\n title: string;\n message: string;\n }\n | {\n titleKey: string;\n messageKey: string;\n };\n\nexport type SamplePrompts = SamplePrompt[];\n\nexport type CaptureFeedback = {\n conversation_id: string;\n user_question: string;\n llm_response: string;\n user_feedback: string;\n sentiment: number;\n};\n"],"names":["SupportedFileType"],"mappings":"AAsFY,IAAA,iBAAA,qBAAAA,kBAAL,KAAA;AACL,EAAAA,mBAAA,MAAO,CAAA,GAAA,kBAAA;AACP,EAAAA,mBAAA,MAAO,CAAA,GAAA,oBAAA;AACP,EAAAA,mBAAA,MAAO,CAAA,GAAA,YAAA;AAHG,EAAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;;;;"}
|
|
@@ -4,8 +4,7 @@ const isSupportedFileType = (file) => {
|
|
|
4
4
|
const isJson = file.type === SupportedFileType.JSON;
|
|
5
5
|
const isYaml = file.type === SupportedFileType.YAML || file.name.endsWith(".yaml") || file.name.endsWith(".yml");
|
|
6
6
|
const isText = file.type === SupportedFileType.TEXT;
|
|
7
|
-
|
|
8
|
-
return isJson || isYaml || isText || isXml;
|
|
7
|
+
return isJson || isYaml || isText;
|
|
9
8
|
};
|
|
10
9
|
const readFileAsText = (file) => new Promise((resolve, reject) => {
|
|
11
10
|
const reader = new FileReader();
|
|
@@ -17,8 +16,6 @@ const sanitizeFileType = (fileContent) => {
|
|
|
17
16
|
switch (fileContent.type) {
|
|
18
17
|
case SupportedFileType.YAML:
|
|
19
18
|
return "application/yaml";
|
|
20
|
-
case SupportedFileType.XML:
|
|
21
|
-
return "application/xml";
|
|
22
19
|
default:
|
|
23
20
|
return fileContent.type;
|
|
24
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-utils.esm.js","sources":["../../src/utils/attachment-utils.ts"],"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 */\nimport { Attachment, FileContent, SupportedFileType } from '../types';\n\nexport const isSupportedFileType = (file: File) => {\n const isJson = file.type === SupportedFileType.JSON;\n const isYaml =\n file.type === SupportedFileType.YAML ||\n file.name.endsWith('.yaml') ||\n file.name.endsWith('.yml');\n const isText = file.type === SupportedFileType.TEXT;\n
|
|
1
|
+
{"version":3,"file":"attachment-utils.esm.js","sources":["../../src/utils/attachment-utils.ts"],"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 */\nimport { Attachment, FileContent, SupportedFileType } from '../types';\n\nexport const isSupportedFileType = (file: File) => {\n const isJson = file.type === SupportedFileType.JSON;\n const isYaml =\n file.type === SupportedFileType.YAML ||\n file.name.endsWith('.yaml') ||\n file.name.endsWith('.yml');\n const isText = file.type === SupportedFileType.TEXT;\n\n return isJson || isYaml || isText;\n};\n\nexport const readFileAsText = (file: File): Promise<string | null> =>\n new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => reject(reader.error);\n reader.readAsText(file);\n });\n\nexport const sanitizeFileType = (fileContent: FileContent): string => {\n switch (fileContent.type) {\n case SupportedFileType.YAML:\n return 'application/yaml';\n default:\n return fileContent.type;\n }\n};\n\nexport const getAttachments = (fileContents: FileContent[]): Attachment[] =>\n fileContents.map(file => ({\n attachment_type: 'api object',\n content_type: sanitizeFileType(file),\n content: fileContents.find(f => f.name === file.name)?.content || '',\n }));\n"],"names":[],"mappings":";;AAiBa,MAAA,mBAAA,GAAsB,CAAC,IAAe,KAAA;AACjD,EAAM,MAAA,MAAA,GAAS,IAAK,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAC/C,EAAA,MAAM,MACJ,GAAA,IAAA,CAAK,IAAS,KAAA,iBAAA,CAAkB,IAChC,IAAA,IAAA,CAAK,IAAK,CAAA,QAAA,CAAS,OAAO,CAAA,IAC1B,IAAK,CAAA,IAAA,CAAK,SAAS,MAAM,CAAA;AAC3B,EAAM,MAAA,MAAA,GAAS,IAAK,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAE/C,EAAA,OAAO,UAAU,MAAU,IAAA,MAAA;AAC7B;AAEO,MAAM,iBAAiB,CAAC,IAAA,KAC7B,IAAI,OAAQ,CAAA,CAAC,SAAS,MAAW,KAAA;AAC/B,EAAM,MAAA,MAAA,GAAS,IAAI,UAAW,EAAA;AAC9B,EAAA,MAAA,CAAO,MAAS,GAAA,MAAM,OAAQ,CAAA,MAAA,CAAO,MAAgB,CAAA;AACrD,EAAA,MAAA,CAAO,OAAU,GAAA,MAAM,MAAO,CAAA,MAAA,CAAO,KAAK,CAAA;AAC1C,EAAA,MAAA,CAAO,WAAW,IAAI,CAAA;AACxB,CAAC;AAEU,MAAA,gBAAA,GAAmB,CAAC,WAAqC,KAAA;AACpE,EAAA,QAAQ,YAAY,IAAM;AAAA,IACxB,KAAK,iBAAkB,CAAA,IAAA;AACrB,MAAO,OAAA,kBAAA;AAAA,IACT;AACE,MAAA,OAAO,WAAY,CAAA,IAAA;AAAA;AAEzB;AAEO,MAAM,cAAiB,GAAA,CAAC,YAC7B,KAAA,YAAA,CAAa,IAAI,CAAS,IAAA,MAAA;AAAA,EACxB,eAAiB,EAAA,YAAA;AAAA,EACjB,YAAA,EAAc,iBAAiB,IAAI,CAAA;AAAA,EACnC,OAAA,EAAS,aAAa,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,IAAS,KAAA,IAAA,CAAK,IAAI,CAAA,EAAG,OAAW,IAAA;AACpE,CAAE,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const getFootnoteProps = (additionalClassName, t) => ({
|
|
2
|
-
label: t?.("footer.accuracy.label") || "Always
|
|
2
|
+
label: t?.("footer.accuracy.label") || "Always review AI generated content prior to use.",
|
|
3
3
|
popover: {
|
|
4
4
|
popoverProps: {
|
|
5
5
|
className: additionalClassName ?? ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightspeed-chatbox-utils.esm.js","sources":["../../src/utils/lightspeed-chatbox-utils.ts"],"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 */\nimport { Conversation, SourcesCardProps } from '@patternfly/chatbot';\nimport { PopoverProps } from '@patternfly/react-core';\n\nimport {\n BaseMessage,\n ConversationList,\n ConversationSummary,\n LCSConversation,\n ReferencedDocument,\n ReferencedDocuments,\n} from '../types';\n\nexport const getFootnoteProps = (\n additionalClassName: string,\n t?: (key: string, params?: any) => string,\n) => ({\n label:\n t?.('footer.accuracy.label') ||\n 'Always check AI/LLM generated responses for accuracy prior to use.',\n popover: {\n popoverProps: {\n className: additionalClassName ?? '',\n } as PopoverProps,\n title: t?.('footer.accuracy.popover.title') || 'Verify accuracy',\n description:\n t?.('footer.accuracy.popover.description') ||\n `While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.`,\n bannerImage: {\n src: 'https://cdn.dribbble.com/userupload/10651749/file/original-8a07b8e39d9e8bf002358c66fce1223e.gif',\n alt:\n t?.('footer.accuracy.popover.image.alt') ||\n 'Example image for footnote popover',\n },\n cta: {\n label: t?.('footer.accuracy.popover.cta.label') || 'Got it',\n onClick: () => {},\n },\n link: {\n label: t?.('footer.accuracy.popover.link.label') || 'Learn more',\n url: 'https://www.redhat.com/',\n },\n },\n});\n\nexport const getTimestampVariablesString = (v: number) => {\n if (v < 10) {\n return `0${v}`;\n }\n return `${v}`;\n};\n\nexport const getTimestamp = (unix_timestamp: number) => {\n if (typeof unix_timestamp !== 'number' || isNaN(unix_timestamp)) {\n // eslint-disable-next-line no-console\n console.error('Invalid Unix timestamp provided');\n return '';\n }\n\n const a = new Date(unix_timestamp);\n const month = getTimestampVariablesString(a.getMonth() + 1);\n const year = a.getFullYear();\n const date = getTimestampVariablesString(a.getDate());\n const hour = getTimestampVariablesString(a.getHours());\n const min = getTimestampVariablesString(a.getMinutes());\n const sec = getTimestampVariablesString(a.getSeconds());\n const time = `${date}/${month}/${year}, ${hour}:${min}:${sec}`;\n return time;\n};\n\nexport const splitJsonStrings = (jsonString: string): string[] => {\n const chunks = jsonString.split('}{');\n\n if (chunks.length <= 1) {\n return [jsonString];\n }\n\n return chunks.map((chunk, index, arr) => {\n if (index === 0) {\n return `${chunk}}`;\n } else if (index === arr.length - 1) {\n return `{${chunk}`;\n }\n return `{${chunk}}`;\n });\n};\n\ntype MessageProps = {\n content: string;\n timestamp: string;\n name?: string;\n avatar?: string | any;\n isLoading?: boolean;\n error?: {\n title: string;\n };\n sources?: SourcesCardProps;\n};\n\nexport const createMessage = ({\n role,\n name,\n avatar,\n isLoading = false,\n content,\n timestamp,\n error,\n sources,\n defaultUserName = 'Guest',\n}: MessageProps & { role: 'user' | 'bot'; defaultUserName?: string }) => ({\n role,\n name: name || defaultUserName,\n avatar,\n isLoading,\n content,\n timestamp,\n error,\n sources,\n});\n\nexport const createUserMessage = (\n props: MessageProps & { defaultUserName?: string },\n) =>\n createMessage({\n ...props,\n role: 'user',\n defaultUserName: props.defaultUserName,\n });\n\nexport const createBotMessage = (props: MessageProps) =>\n createMessage({\n ...props,\n role: 'bot',\n });\n\nexport const getConversationsData = (\n conversation: LCSConversation,\n): [BaseMessage, BaseMessage] => {\n const [userMessage, botMessage] = conversation.messages || [];\n return [\n {\n ...userMessage,\n timestamp: getTimestamp(\n conversation.started_at\n ? new Date(conversation.started_at).getTime()\n : Date.now(),\n ),\n },\n {\n ...botMessage,\n timestamp: getTimestamp(\n conversation.completed_at\n ? new Date(conversation.completed_at).getTime()\n : Date.now(),\n ),\n referenced_documents: botMessage?.referenced_documents ?? [],\n },\n ];\n};\n\nexport const transformDocumentsToSources = (\n referenced_documents: ReferencedDocuments,\n): SourcesCardProps | undefined => {\n if (!referenced_documents || referenced_documents?.length === 0) {\n return undefined;\n }\n return {\n sources: referenced_documents.map((doc: ReferencedDocument) => ({\n body: doc.doc_description,\n title: doc.doc_title,\n link: doc?.doc_url,\n isExternal: true,\n })),\n };\n};\n\nexport const getDayDifference = (sourceTime: number, targetTime: number) => {\n const sourceDate = new Date(sourceTime);\n const targetDate = new Date(targetTime);\n\n sourceDate.setHours(0, 0, 0, 0);\n targetDate.setHours(0, 0, 0, 0);\n\n const timeDifference = sourceDate.getTime() - targetDate.getTime();\n\n return Math.floor(timeDifference / (1000 * 60 * 60 * 24));\n};\n\nexport const getCategorizeMessages = (\n messages: ConversationList,\n addProps: (c: ConversationSummary) => { [k: string]: any },\n t?: (key: string, params?: any) => string,\n): { [k: string]: Conversation[] } => {\n const now: any = new Date();\n const today = now.toDateString();\n\n const categorizedMessages: { [k: string]: Conversation[] } = {\n [t?.('conversation.category.today') || 'Today']: [],\n [t?.('conversation.category.yesterday') || 'Yesterday']: [],\n [t?.('conversation.category.previous7Days') || 'Previous 7 Days']: [],\n [t?.('conversation.category.previous30Days') || 'Previous 30 Days']: [],\n };\n messages\n .sort((a, b) => b.last_message_timestamp - a.last_message_timestamp)\n .forEach(c => {\n const messageDate = new Date(c.last_message_timestamp * 1000);\n const messageDayString = messageDate.toDateString();\n const dayDifference = getDayDifference(\n now,\n c.last_message_timestamp * 1000,\n );\n const message: Conversation = {\n id: c.conversation_id,\n text: c.topic_summary,\n label: t?.('message.options.label') || 'Options',\n ...addProps(c),\n };\n\n if (messageDayString === today) {\n categorizedMessages[t?.('conversation.category.today') || 'Today'].push(\n message,\n );\n } else if (dayDifference === 1) {\n categorizedMessages[\n t?.('conversation.category.yesterday') || 'Yesterday'\n ].push(message);\n } else if (dayDifference <= 7) {\n categorizedMessages[\n t?.('conversation.category.previous7Days') || 'Previous 7 Days'\n ].push(message);\n } else if (dayDifference <= 30) {\n categorizedMessages[\n t?.('conversation.category.previous30Days') || 'Previous 30 Days'\n ].push(message);\n } else {\n // handle month-wise grouping\n const monthYear = messageDate.toLocaleString('default', {\n month: 'long',\n year: 'numeric',\n });\n if (!categorizedMessages[monthYear]) {\n categorizedMessages[monthYear] = [];\n }\n categorizedMessages[monthYear].push(message);\n }\n });\n\n const filteredCategories = Object.keys(categorizedMessages).reduce(\n (result, category) => {\n if (categorizedMessages[category].length > 0) {\n result[category] = categorizedMessages[category];\n }\n return result;\n },\n {} as any,\n );\n\n return filteredCategories;\n};\n"],"names":[],"mappings":"AA2Ba,MAAA,gBAAA,GAAmB,CAC9B,mBAAA,EACA,CACI,MAAA;AAAA,EACJ,KAAA,EACE,CAAI,GAAA,uBAAuB,CAC3B,IAAA,oEAAA;AAAA,EACF,OAAS,EAAA;AAAA,IACP,YAAc,EAAA;AAAA,MACZ,WAAW,mBAAuB,IAAA;AAAA,KACpC;AAAA,IACA,KAAA,EAAO,CAAI,GAAA,+BAA+B,CAAK,IAAA,iBAAA;AAAA,IAC/C,WAAA,EACE,CAAI,GAAA,qCAAqC,CACzC,IAAA,CAAA,8NAAA,CAAA;AAAA,IACF,WAAa,EAAA;AAAA,MACX,GAAK,EAAA,iGAAA;AAAA,MACL,GAAA,EACE,CAAI,GAAA,mCAAmC,CACvC,IAAA;AAAA,KACJ;AAAA,IACA,GAAK,EAAA;AAAA,MACH,KAAA,EAAO,CAAI,GAAA,mCAAmC,CAAK,IAAA,QAAA;AAAA,MACnD,SAAS,MAAM;AAAA;AAAC,KAClB;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,CAAI,GAAA,oCAAoC,CAAK,IAAA,YAAA;AAAA,MACpD,GAAK,EAAA;AAAA;AACP;AAEJ,CAAA;AAEa,MAAA,2BAAA,GAA8B,CAAC,CAAc,KAAA;AACxD,EAAA,IAAI,IAAI,EAAI,EAAA;AACV,IAAA,OAAO,IAAI,CAAC,CAAA,CAAA;AAAA;AAEd,EAAA,OAAO,GAAG,CAAC,CAAA,CAAA;AACb;AAEa,MAAA,YAAA,GAAe,CAAC,cAA2B,KAAA;AACtD,EAAA,IAAI,OAAO,cAAA,KAAmB,QAAY,IAAA,KAAA,CAAM,cAAc,CAAG,EAAA;AAE/D,IAAA,OAAA,CAAQ,MAAM,iCAAiC,CAAA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AAA,MAAA,CAAO,IAAK,CAAA,mBAAmB,CAAE,CAAA,MAAA;AAAA,IAC1D,CAAC,QAAQ,QAAa,KAAA;AACpB,MAAA,IAAI,mBAAoB,CAAA,QAAQ,CAAE,CAAA,MAAA,GAAS,CAAG,EAAA;AAC5C,QAAO,MAAA,CAAA,QAAQ,CAAI,GAAA,mBAAA,CAAoB,QAAQ,CAAA;AAAA;AAEjD,MAAO,OAAA,MAAA;AAAA,KACT;AAAA,IACA;AAAC,GACH;AAEA,EAAO,OAAA,kBAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"lightspeed-chatbox-utils.esm.js","sources":["../../src/utils/lightspeed-chatbox-utils.ts"],"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 */\nimport { Conversation, SourcesCardProps } from '@patternfly/chatbot';\nimport { PopoverProps } from '@patternfly/react-core';\n\nimport {\n BaseMessage,\n ConversationList,\n ConversationSummary,\n LCSConversation,\n ReferencedDocument,\n ReferencedDocuments,\n} from '../types';\n\nexport const getFootnoteProps = (\n additionalClassName: string,\n t?: (key: string, params?: any) => string,\n) => ({\n label:\n t?.('footer.accuracy.label') ||\n 'Always review AI generated content prior to use.',\n popover: {\n popoverProps: {\n className: additionalClassName ?? '',\n } as PopoverProps,\n title: t?.('footer.accuracy.popover.title') || 'Verify accuracy',\n description:\n t?.('footer.accuracy.popover.description') ||\n `While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.`,\n bannerImage: {\n src: 'https://cdn.dribbble.com/userupload/10651749/file/original-8a07b8e39d9e8bf002358c66fce1223e.gif',\n alt:\n t?.('footer.accuracy.popover.image.alt') ||\n 'Example image for footnote popover',\n },\n cta: {\n label: t?.('footer.accuracy.popover.cta.label') || 'Got it',\n onClick: () => {},\n },\n link: {\n label: t?.('footer.accuracy.popover.link.label') || 'Learn more',\n url: 'https://www.redhat.com/',\n },\n },\n});\n\nexport const getTimestampVariablesString = (v: number) => {\n if (v < 10) {\n return `0${v}`;\n }\n return `${v}`;\n};\n\nexport const getTimestamp = (unix_timestamp: number) => {\n if (typeof unix_timestamp !== 'number' || isNaN(unix_timestamp)) {\n // eslint-disable-next-line no-console\n console.error('Invalid Unix timestamp provided');\n return '';\n }\n\n const a = new Date(unix_timestamp);\n const month = getTimestampVariablesString(a.getMonth() + 1);\n const year = a.getFullYear();\n const date = getTimestampVariablesString(a.getDate());\n const hour = getTimestampVariablesString(a.getHours());\n const min = getTimestampVariablesString(a.getMinutes());\n const sec = getTimestampVariablesString(a.getSeconds());\n const time = `${date}/${month}/${year}, ${hour}:${min}:${sec}`;\n return time;\n};\n\nexport const splitJsonStrings = (jsonString: string): string[] => {\n const chunks = jsonString.split('}{');\n\n if (chunks.length <= 1) {\n return [jsonString];\n }\n\n return chunks.map((chunk, index, arr) => {\n if (index === 0) {\n return `${chunk}}`;\n } else if (index === arr.length - 1) {\n return `{${chunk}`;\n }\n return `{${chunk}}`;\n });\n};\n\ntype MessageProps = {\n content: string;\n timestamp: string;\n name?: string;\n avatar?: string | any;\n isLoading?: boolean;\n error?: {\n title: string;\n };\n sources?: SourcesCardProps;\n};\n\nexport const createMessage = ({\n role,\n name,\n avatar,\n isLoading = false,\n content,\n timestamp,\n error,\n sources,\n defaultUserName = 'Guest',\n}: MessageProps & { role: 'user' | 'bot'; defaultUserName?: string }) => ({\n role,\n name: name || defaultUserName,\n avatar,\n isLoading,\n content,\n timestamp,\n error,\n sources,\n});\n\nexport const createUserMessage = (\n props: MessageProps & { defaultUserName?: string },\n) =>\n createMessage({\n ...props,\n role: 'user',\n defaultUserName: props.defaultUserName,\n });\n\nexport const createBotMessage = (props: MessageProps) =>\n createMessage({\n ...props,\n role: 'bot',\n });\n\nexport const getConversationsData = (\n conversation: LCSConversation,\n): [BaseMessage, BaseMessage] => {\n const [userMessage, botMessage] = conversation.messages || [];\n return [\n {\n ...userMessage,\n timestamp: getTimestamp(\n conversation.started_at\n ? new Date(conversation.started_at).getTime()\n : Date.now(),\n ),\n },\n {\n ...botMessage,\n timestamp: getTimestamp(\n conversation.completed_at\n ? new Date(conversation.completed_at).getTime()\n : Date.now(),\n ),\n referenced_documents: botMessage?.referenced_documents ?? [],\n },\n ];\n};\n\nexport const transformDocumentsToSources = (\n referenced_documents: ReferencedDocuments,\n): SourcesCardProps | undefined => {\n if (!referenced_documents || referenced_documents?.length === 0) {\n return undefined;\n }\n return {\n sources: referenced_documents.map((doc: ReferencedDocument) => ({\n body: doc.doc_description,\n title: doc.doc_title,\n link: doc?.doc_url,\n isExternal: true,\n })),\n };\n};\n\nexport const getDayDifference = (sourceTime: number, targetTime: number) => {\n const sourceDate = new Date(sourceTime);\n const targetDate = new Date(targetTime);\n\n sourceDate.setHours(0, 0, 0, 0);\n targetDate.setHours(0, 0, 0, 0);\n\n const timeDifference = sourceDate.getTime() - targetDate.getTime();\n\n return Math.floor(timeDifference / (1000 * 60 * 60 * 24));\n};\n\nexport const getCategorizeMessages = (\n messages: ConversationList,\n addProps: (c: ConversationSummary) => { [k: string]: any },\n t?: (key: string, params?: any) => string,\n): { [k: string]: Conversation[] } => {\n const now: any = new Date();\n const today = now.toDateString();\n\n const categorizedMessages: { [k: string]: Conversation[] } = {\n [t?.('conversation.category.today') || 'Today']: [],\n [t?.('conversation.category.yesterday') || 'Yesterday']: [],\n [t?.('conversation.category.previous7Days') || 'Previous 7 Days']: [],\n [t?.('conversation.category.previous30Days') || 'Previous 30 Days']: [],\n };\n messages\n .sort((a, b) => b.last_message_timestamp - a.last_message_timestamp)\n .forEach(c => {\n const messageDate = new Date(c.last_message_timestamp * 1000);\n const messageDayString = messageDate.toDateString();\n const dayDifference = getDayDifference(\n now,\n c.last_message_timestamp * 1000,\n );\n const message: Conversation = {\n id: c.conversation_id,\n text: c.topic_summary,\n label: t?.('message.options.label') || 'Options',\n ...addProps(c),\n };\n\n if (messageDayString === today) {\n categorizedMessages[t?.('conversation.category.today') || 'Today'].push(\n message,\n );\n } else if (dayDifference === 1) {\n categorizedMessages[\n t?.('conversation.category.yesterday') || 'Yesterday'\n ].push(message);\n } else if (dayDifference <= 7) {\n categorizedMessages[\n t?.('conversation.category.previous7Days') || 'Previous 7 Days'\n ].push(message);\n } else if (dayDifference <= 30) {\n categorizedMessages[\n t?.('conversation.category.previous30Days') || 'Previous 30 Days'\n ].push(message);\n } else {\n // handle month-wise grouping\n const monthYear = messageDate.toLocaleString('default', {\n month: 'long',\n year: 'numeric',\n });\n if (!categorizedMessages[monthYear]) {\n categorizedMessages[monthYear] = [];\n }\n categorizedMessages[monthYear].push(message);\n }\n });\n\n const filteredCategories = Object.keys(categorizedMessages).reduce(\n (result, category) => {\n if (categorizedMessages[category].length > 0) {\n result[category] = categorizedMessages[category];\n }\n return result;\n },\n {} as any,\n );\n\n return filteredCategories;\n};\n"],"names":[],"mappings":"AA2Ba,MAAA,gBAAA,GAAmB,CAC9B,mBAAA,EACA,CACI,MAAA;AAAA,EACJ,KAAA,EACE,CAAI,GAAA,uBAAuB,CAC3B,IAAA,kDAAA;AAAA,EACF,OAAS,EAAA;AAAA,IACP,YAAc,EAAA;AAAA,MACZ,WAAW,mBAAuB,IAAA;AAAA,KACpC;AAAA,IACA,KAAA,EAAO,CAAI,GAAA,+BAA+B,CAAK,IAAA,iBAAA;AAAA,IAC/C,WAAA,EACE,CAAI,GAAA,qCAAqC,CACzC,IAAA,CAAA,8NAAA,CAAA;AAAA,IACF,WAAa,EAAA;AAAA,MACX,GAAK,EAAA,iGAAA;AAAA,MACL,GAAA,EACE,CAAI,GAAA,mCAAmC,CACvC,IAAA;AAA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G,EAAA;AAC7B,MAAA,mBAAA,CACE,IAAI,qCAAqC,CAAA,IAAK,iBAChD,CAAA,CAAE,KAAK,OAAO,CAAA;AAAA,KAChB,MAAA,IAAW,iBAAiB,EAAI,EAAA;AAC9B,MAAA,mBAAA,CACE,IAAI,sCAAsC,CAAA,IAAK,kBACjD,CAAA,CAAE,KAAK,OAAO,CAAA;AAAA,KACT,MAAA;AAEL,MAAM,MAAA,SAAA,GAAY,WAAY,CAAA,cAAA,CAAe,SAAW,EAAA;AAAA,QACtD,KAAO,EAAA,MAAA;AAAA,QACP,IAAM,EAAA;AAAA,OACP,CAAA;AACD,MAAI,IAAA,CAAC,mBAAoB,CAAA,SAAS,CAAG,EAAA;AACnC,QAAoB,mBAAA,CAAA,SAAS,IAAI,EAAC;AAAA;AAEpC,MAAoB,mBAAA,CAAA,SAAS,CAAE,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA;AAC7C,GACD,CAAA;AAEH,EAAA,MAAM,kBAAqB,GAAA,MAAA,CAAO,IAAK,CAAA,mBAAmB,CAAE,CAAA,MAAA;AAAA,IAC1D,CAAC,QAAQ,QAAa,KAAA;AACpB,MAAA,IAAI,mBAAoB,CAAA,QAAQ,CAAE,CAAA,MAAA,GAAS,CAAG,EAAA;AAC5C,QAAO,MAAA,CAAA,QAAQ,CAAI,GAAA,mBAAA,CAAoB,QAAQ,CAAA;AAAA;AAEjD,MAAO,OAAA,MAAA;AAAA,KACT;AAAA,IACA;AAAC,GACH;AAEA,EAAO,OAAA,kBAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-lightspeed",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "./dist/index.esm.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@material-ui/core": "^4.9.13",
|
|
66
66
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
67
67
|
"@mui/icons-material": "^6.1.8",
|
|
68
|
-
"@patternfly/chatbot": "6.4.
|
|
69
|
-
"@patternfly/react-core": "6.4.0
|
|
68
|
+
"@patternfly/chatbot": "6.4.1",
|
|
69
|
+
"@patternfly/react-core": "6.4.0",
|
|
70
70
|
"@patternfly/react-icons": "^6.3.1",
|
|
71
|
-
"@red-hat-developer-hub/backstage-plugin-lightspeed-common": "^0.
|
|
71
|
+
"@red-hat-developer-hub/backstage-plugin-lightspeed-common": "^1.0.3",
|
|
72
72
|
"@tanstack/react-query": "^5.59.15",
|
|
73
73
|
"react-markdown": "^9.0.1",
|
|
74
74
|
"react-use": "^17.2.4"
|