@red-hat-developer-hub/backstage-plugin-lightspeed 2.6.0 → 2.6.1
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 +6 -0
- package/dist/alpha/LightspeedFAB.esm.js.map +1 -1
- package/dist/alpha/LightspeedProvider.esm.js.map +1 -1
- package/dist/alpha.esm.js +1 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/api/LightspeedApiClient.esm.js +1 -1
- package/dist/api/LightspeedApiClient.esm.js.map +1 -1
- package/dist/api/NotebooksApiClient.esm.js.map +1 -1
- package/dist/api/api.esm.js.map +1 -1
- package/dist/api/notebooksApi.esm.js.map +1 -1
- package/dist/components/Attachment.esm.js +2 -2
- package/dist/components/Attachment.esm.js.map +1 -1
- package/dist/components/AttachmentContext.esm.js +1 -1
- package/dist/components/AttachmentContext.esm.js.map +1 -1
- package/dist/components/DeleteModal.esm.js.map +1 -1
- package/dist/components/FilePreview.esm.js.map +1 -1
- package/dist/components/LightSpeedChat.esm.js +16 -16
- package/dist/components/LightSpeedChat.esm.js.map +1 -1
- package/dist/components/LightspeedChatBox.esm.js +5 -5
- package/dist/components/LightspeedChatBox.esm.js.map +1 -1
- package/dist/components/LightspeedChatBoxHeader.esm.js +1 -1
- package/dist/components/LightspeedChatBoxHeader.esm.js.map +1 -1
- package/dist/components/LightspeedChatContainer.esm.js.map +1 -1
- package/dist/components/LightspeedChatModelsState.esm.js.map +1 -1
- package/dist/components/LightspeedDrawerContext.esm.js +1 -1
- package/dist/components/LightspeedDrawerContext.esm.js.map +1 -1
- package/dist/components/LightspeedDrawerProvider.esm.js.map +1 -1
- package/dist/components/LightspeedDrawerStateExposer.esm.js.map +1 -1
- package/dist/components/LightspeedFAB.esm.js.map +1 -1
- package/dist/components/LightspeedIcon.esm.js.map +1 -1
- package/dist/components/LightspeedPage.esm.js.map +1 -1
- package/dist/components/McpServersSettings.esm.js +3 -3
- package/dist/components/McpServersSettings.esm.js.map +1 -1
- package/dist/components/McpSettingsIcon.esm.js.map +1 -1
- package/dist/components/PermissionRequiredIcon.esm.js.map +1 -1
- package/dist/components/PermissionRequiredState.esm.js.map +1 -1
- package/dist/components/RenameConversationModal.esm.js.map +1 -1
- package/dist/components/Router.esm.js.map +1 -1
- package/dist/components/ToolCallContent.esm.js +3 -3
- package/dist/components/ToolCallContent.esm.js.map +1 -1
- package/dist/components/Trans.esm.js.map +1 -1
- package/dist/components/notebooks/AddDocumentModal.esm.js.map +1 -1
- package/dist/components/notebooks/DeleteNotebookModal.esm.js.map +1 -1
- package/dist/components/notebooks/DocumentSidebar.esm.js +2 -2
- package/dist/components/notebooks/DocumentSidebar.esm.js.map +1 -1
- package/dist/components/notebooks/FileListItem.esm.js.map +1 -1
- package/dist/components/notebooks/FileTypeIcon.esm.js.map +1 -1
- package/dist/components/notebooks/NotebookCard.esm.js +1 -1
- package/dist/components/notebooks/NotebookCard.esm.js.map +1 -1
- package/dist/components/notebooks/NotebookView.esm.js +3 -3
- package/dist/components/notebooks/NotebookView.esm.js.map +1 -1
- package/dist/components/notebooks/NotebooksTab.esm.js.map +1 -1
- package/dist/components/notebooks/OverwriteConfirmModal.esm.js.map +1 -1
- package/dist/components/notebooks/RenameNotebookModal.esm.js.map +1 -1
- package/dist/components/notebooks/SidebarCollapseIcon.esm.js.map +1 -1
- package/dist/components/notebooks/UploadResourceScreen.esm.js +1 -1
- package/dist/components/notebooks/UploadResourceScreen.esm.js.map +1 -1
- package/dist/const.esm.js.map +1 -1
- package/dist/dev.esm.js.map +1 -1
- package/dist/hooks/notebooks/useCreateNotebook.esm.js.map +1 -1
- package/dist/hooks/notebooks/useCreateNotebookMessage.esm.js.map +1 -1
- package/dist/hooks/notebooks/useDeleteNotebook.esm.js.map +1 -1
- package/dist/hooks/notebooks/useDocumentStatusPolling.esm.js.map +1 -1
- package/dist/hooks/notebooks/useLightspeedNotebooksPermission.esm.js.map +1 -1
- package/dist/hooks/notebooks/useNotebookDocuments.esm.js.map +1 -1
- package/dist/hooks/notebooks/useNotebookSession.esm.js.map +1 -1
- package/dist/hooks/notebooks/useNotebookSessions.esm.js.map +1 -1
- package/dist/hooks/notebooks/useRenameNotebook.esm.js.map +1 -1
- package/dist/hooks/notebooks/useUploadDocument.esm.js.map +1 -1
- package/dist/hooks/toolCallsCacheStore.esm.js +1 -1
- package/dist/hooks/toolCallsCacheStore.esm.js.map +1 -1
- package/dist/hooks/useAllModels.esm.js.map +1 -1
- package/dist/hooks/useAutoScroll.esm.js +1 -1
- package/dist/hooks/useAutoScroll.esm.js.map +1 -1
- package/dist/hooks/useBackstageUserIdentity.esm.js.map +1 -1
- package/dist/hooks/useBufferedMessages.esm.js.map +1 -1
- package/dist/hooks/useCaptureFeedback.esm.js.map +1 -1
- package/dist/hooks/useConversationMessages.esm.js +1 -1
- package/dist/hooks/useConversationMessages.esm.js.map +1 -1
- package/dist/hooks/useConversations.esm.js.map +1 -1
- package/dist/hooks/useCreateCoversationMessage.esm.js.map +1 -1
- package/dist/hooks/useDeleteConversation.esm.js.map +1 -1
- package/dist/hooks/useDisplayModeSettings.esm.js +1 -1
- package/dist/hooks/useDisplayModeSettings.esm.js.map +1 -1
- package/dist/hooks/useFeedbackActions.esm.js +3 -3
- package/dist/hooks/useFeedbackActions.esm.js.map +1 -1
- package/dist/hooks/useFeedbackState.esm.js.map +1 -1
- package/dist/hooks/useFeedbackStatus.esm.js.map +1 -1
- package/dist/hooks/useIsMobile.esm.js.map +1 -1
- package/dist/hooks/useLastOpenedConversation.esm.js.map +1 -1
- package/dist/hooks/useLightspeedDeletePermission.esm.js.map +1 -1
- package/dist/hooks/useLightspeedDrawerContext.esm.js +1 -1
- package/dist/hooks/useLightspeedDrawerContext.esm.js.map +1 -1
- package/dist/hooks/useLightspeedProviderState.esm.js +2 -2
- package/dist/hooks/useLightspeedProviderState.esm.js.map +1 -1
- package/dist/hooks/useLightspeedUpdatePermission.esm.js.map +1 -1
- package/dist/hooks/useLightspeedViewPermission.esm.js.map +1 -1
- package/dist/hooks/usePinnedChatsSettings.esm.js +2 -2
- package/dist/hooks/usePinnedChatsSettings.esm.js.map +1 -1
- package/dist/hooks/useQuestionValidation.esm.js.map +1 -1
- package/dist/hooks/useRenameConversation.esm.js.map +1 -1
- package/dist/hooks/useSortSettings.esm.js +2 -2
- package/dist/hooks/useSortSettings.esm.js.map +1 -1
- package/dist/hooks/useStopConversation.esm.js.map +1 -1
- package/dist/hooks/useTranslation.esm.js.map +1 -1
- package/dist/hooks/useWelcomePrompts.esm.js.map +1 -1
- package/dist/plugin.esm.js +2 -2
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/index.esm.js.map +1 -1
- package/dist/translations/it.esm.js.map +1 -1
- package/dist/translations/ja.esm.js.map +1 -1
- package/dist/translations/ref.esm.js.map +1 -1
- package/dist/types.esm.js.map +1 -1
- package/dist/utils/attachment-utils.esm.js.map +1 -1
- package/dist/utils/formatToolResponseForMarkdown.esm.js.map +1 -1
- package/dist/utils/lightspeed-chatbox-utils.esm.js +4 -4
- package/dist/utils/lightspeed-chatbox-utils.esm.js.map +1 -1
- package/dist/utils/notebook-upload-utils.esm.js +1 -1
- package/dist/utils/notebook-upload-utils.esm.js.map +1 -1
- package/dist/utils/notebooks-utils.esm.js +1 -1
- package/dist/utils/notebooks-utils.esm.js.map +1 -1
- package/dist/utils/prompt-utils.esm.js.map +1 -1
- package/dist/utils/queryClient.esm.js.map +1 -1
- package/dist/utils/reasoningParser.esm.js.map +1 -1
- package/dist/utils/toolCallMapper.esm.js +2 -2
- package/dist/utils/toolCallMapper.esm.js.map +1 -1
- package/dist/utils/user-utils.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { LightspeedDrawerContext } from '../components/LightspeedDrawerContext.e
|
|
|
3
3
|
|
|
4
4
|
const useLightspeedDrawerContext = () => {
|
|
5
5
|
const context = useContext(LightspeedDrawerContext);
|
|
6
|
-
if (context ===
|
|
6
|
+
if (context === void 0) {
|
|
7
7
|
throw new Error(
|
|
8
8
|
"useLightspeedDrawerContext must be used within a LightspeedDrawerProvider"
|
|
9
9
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLightspeedDrawerContext.esm.js","sources":["../../src/hooks/useLightspeedDrawerContext.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 { useContext } from 'react';\n\nimport { LightspeedDrawerContext } from '../components/LightspeedDrawerContext';\n\n/**\n * Hook to access the LightspeedDrawerContext\n * @public\n */\nexport const useLightspeedDrawerContext = () => {\n const context = useContext(LightspeedDrawerContext);\n if (context === undefined) {\n throw new Error(\n 'useLightspeedDrawerContext must be used within a LightspeedDrawerProvider',\n );\n }\n return context;\n};\n"],"names":[],"mappings":";;;AAwBO,MAAM,6BAA6B,MAAM;AAC9C,
|
|
1
|
+
{"version":3,"file":"useLightspeedDrawerContext.esm.js","sources":["../../src/hooks/useLightspeedDrawerContext.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 { useContext } from 'react';\n\nimport { LightspeedDrawerContext } from '../components/LightspeedDrawerContext';\n\n/**\n * Hook to access the LightspeedDrawerContext\n * @public\n */\nexport const useLightspeedDrawerContext = () => {\n const context = useContext(LightspeedDrawerContext);\n if (context === undefined) {\n throw new Error(\n 'useLightspeedDrawerContext must be used within a LightspeedDrawerProvider',\n );\n }\n return context;\n};\n"],"names":[],"mappings":";;;AAwBO,MAAM,6BAA6B,MAAM;AAC9C,EAAA,MAAM,OAAA,GAAU,WAAW,uBAAuB,CAAA;AAClD,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACA,EAAA,OAAO,OAAA;AACT;;;;"}
|
|
@@ -22,7 +22,7 @@ function useLightspeedProviderState() {
|
|
|
22
22
|
const [displayModeState, setDisplayModeState] = useState(persistedDisplayMode);
|
|
23
23
|
const [isOpen, setIsOpen] = useState(false);
|
|
24
24
|
const [drawerWidth, setDrawerWidth] = useState(400);
|
|
25
|
-
const [currentConversationIdState, setCurrentConversationIdState] = useState(
|
|
25
|
+
const [currentConversationIdState, setCurrentConversationIdState] = useState(void 0);
|
|
26
26
|
const [draftMessage, setDraftMessageState] = useState("");
|
|
27
27
|
const [draftFileContents, setDraftFileContentsState] = useState([]);
|
|
28
28
|
const openedViaFABRef = useRef(false);
|
|
@@ -71,7 +71,7 @@ function useLightspeedProviderState() {
|
|
|
71
71
|
if (conversationId) {
|
|
72
72
|
setCurrentConversationIdState(conversationId);
|
|
73
73
|
} else if (isLightspeedRoute) {
|
|
74
|
-
setCurrentConversationIdState(
|
|
74
|
+
setCurrentConversationIdState(void 0);
|
|
75
75
|
}
|
|
76
76
|
if (isLightspeedRoute) {
|
|
77
77
|
if (leavingLightspeedForNonEmbeddedShellRef.current && persistedDisplayMode !== ChatbotDisplayMode.embedded) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLightspeedProviderState.esm.js","sources":["../../src/hooks/useLightspeedProviderState.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 { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocation, useMatch, useNavigate } from 'react-router-dom';\n\nimport { ChatbotDisplayMode } from '@patternfly/chatbot';\n\nimport { useAppDrawer } from '@red-hat-developer-hub/backstage-plugin-app-react';\n\nimport type { LightspeedDrawerContextType } from '../components/LightspeedDrawerContext';\nimport { LIGHTSPEED_APP_DRAWER_ID } from '../const';\nimport type { FileContent } from '../types';\nimport { useBackstageUserIdentity } from './useBackstageUserIdentity';\nimport { useDisplayModeSettings } from './useDisplayModeSettings';\n\nconst LIGHTSPEED_PATH = '/lightspeed';\n\nfunction lightspeedRoutePath(conversationId?: string): string {\n return conversationId\n ? `${LIGHTSPEED_PATH}/conversation/${conversationId}`\n : LIGHTSPEED_PATH;\n}\n\n/**\n * Encapsulates LightspeedDrawerProvider state, routing, and ApplicationDrawer sync.\n *\n * @internal\n */\nexport function useLightspeedProviderState(): {\n contextValue: LightspeedDrawerContextType;\n shouldRenderOverlayModal: boolean;\n closeChatbot: () => void;\n} {\n const navigate = useNavigate();\n const location = useLocation();\n const { openDrawer, closeDrawer } = useAppDrawer();\n const user = useBackstageUserIdentity();\n const {\n displayMode: persistedDisplayMode,\n setDisplayMode: setPersistedDisplayMode,\n } = useDisplayModeSettings(user, ChatbotDisplayMode.default);\n\n const [displayModeState, setDisplayModeState] =\n useState<ChatbotDisplayMode>(persistedDisplayMode);\n const [isOpen, setIsOpen] = useState(false);\n const [drawerWidth, setDrawerWidth] = useState(400);\n const [currentConversationIdState, setCurrentConversationIdState] = useState<\n string | undefined\n >(undefined);\n const [draftMessage, setDraftMessageState] = useState('');\n const [draftFileContents, setDraftFileContentsState] = useState<\n FileContent[]\n >([]);\n const openedViaFABRef = useRef(false);\n const dockedAfterLeavingFullscreenRef = useRef(false);\n /** True while navigating off /lightspeed after user chose overlay/docked (URL can lag persisted mode). */\n const leavingLightspeedForNonEmbeddedShellRef = useRef(false);\n /** True until overlay/docked LightspeedChat consumes it (new mount after leaving fullscreen route). */\n const pendingOverlayThreadHandoffRef = useRef(false);\n\n const isLightspeedRouteRef = useRef(false);\n const persistedDisplayModeRef = useRef(persistedDisplayMode);\n\n const isLightspeedRoute = location.pathname.startsWith(LIGHTSPEED_PATH);\n isLightspeedRouteRef.current = isLightspeedRoute;\n persistedDisplayModeRef.current = persistedDisplayMode;\n const conversationMatch = useMatch(\n `${LIGHTSPEED_PATH}/conversation/:conversationId`,\n );\n const conversationId = conversationMatch?.params?.conversationId;\n\n const syncShellDrawerForMode = useCallback(\n (mode: ChatbotDisplayMode) => {\n if (mode === ChatbotDisplayMode.docked) {\n if (isLightspeedRoute) {\n dockedAfterLeavingFullscreenRef.current = true;\n } else {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n } else {\n dockedAfterLeavingFullscreenRef.current = false;\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n },\n [closeDrawer, isLightspeedRoute, openDrawer],\n );\n\n const navigateBackOrGoToCatalog = useCallback(() => {\n if (!openedViaFABRef.current) {\n navigate('/catalog');\n openedViaFABRef.current = true;\n return;\n }\n navigate(-1);\n }, [navigate]);\n\n /**\n * Leaving /lightspeed for overlay/docked must not use navigate(-1): after the first FAB\n * open, navigateBackOrGoToCatalog uses -1 and can land back on /lightspeed (fullscreen).\n */\n const leaveLightspeedRouteForShellDisplayMode = useCallback(() => {\n navigate('/catalog', { replace: true });\n }, [navigate]);\n\n useEffect(() => {\n if (!isLightspeedRoute) {\n leavingLightspeedForNonEmbeddedShellRef.current = false;\n }\n\n if (conversationId) {\n setCurrentConversationIdState(conversationId);\n } else if (isLightspeedRoute) {\n // On `/lightspeed` without a `:conversationId` segment, URL implies a fresh thread.\n // When navigating to another app route (overlay/docked), keep the last id so display\n // mode switches and re-entry to fullscreen stay on the active conversation.\n setCurrentConversationIdState(undefined);\n }\n\n if (isLightspeedRoute) {\n if (\n leavingLightspeedForNonEmbeddedShellRef.current &&\n persistedDisplayMode !== ChatbotDisplayMode.embedded\n ) {\n setDisplayModeState(persistedDisplayMode);\n } else {\n setDisplayModeState(ChatbotDisplayMode.embedded);\n }\n setIsOpen(true);\n if (!dockedAfterLeavingFullscreenRef.current) {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n } else if (persistedDisplayMode === ChatbotDisplayMode.embedded) {\n // Off /lightspeed there is no fullscreen surface; use overlay so FAB stays available.\n // (Persisted preference remains \"fullscreen\" for the next open.)\n setDisplayModeState(ChatbotDisplayMode.default);\n } else {\n setDisplayModeState(persistedDisplayMode);\n }\n }, [closeDrawer, conversationId, isLightspeedRoute, persistedDisplayMode]);\n\n useEffect(() => {\n if (\n !isLightspeedRoute &&\n isOpen &&\n displayModeState === ChatbotDisplayMode.docked\n ) {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n dockedAfterLeavingFullscreenRef.current = false;\n }\n }, [displayModeState, isLightspeedRoute, isOpen, openDrawer]);\n\n const openChatbot = useCallback(() => {\n openedViaFABRef.current = true;\n const rawMode = persistedDisplayMode || ChatbotDisplayMode.default;\n\n if (rawMode === ChatbotDisplayMode.embedded) {\n if (!isLightspeedRoute) {\n navigate(lightspeedRoutePath(currentConversationIdState));\n }\n setDisplayModeState(ChatbotDisplayMode.embedded);\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n setIsOpen(true);\n return;\n }\n\n setDisplayModeState(rawMode);\n\n if (rawMode === ChatbotDisplayMode.docked) {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n } else {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n\n setIsOpen(true);\n }, [\n closeDrawer,\n currentConversationIdState,\n isLightspeedRoute,\n navigate,\n openDrawer,\n persistedDisplayMode,\n ]);\n\n const closeChatbot = useCallback(() => {\n dockedAfterLeavingFullscreenRef.current = false;\n if (displayModeState === ChatbotDisplayMode.embedded && isLightspeedRoute) {\n navigateBackOrGoToCatalog();\n }\n if (displayModeState === ChatbotDisplayMode.docked) {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n setIsOpen(false);\n }, [\n closeDrawer,\n displayModeState,\n isLightspeedRoute,\n navigateBackOrGoToCatalog,\n ]);\n\n const toggleChatbot = useCallback(() => {\n if (isOpen) {\n closeChatbot();\n } else {\n openChatbot();\n }\n }, [isOpen, openChatbot, closeChatbot]);\n\n const setCurrentConversationId = useCallback(\n (id: string | undefined) => {\n setCurrentConversationIdState(id);\n // Refs: first-stream completion calls onStart after unmount / mode change; a stale\n // embedded + /lightspeed closure would navigate back to fullscreen without this.\n if (\n persistedDisplayModeRef.current === ChatbotDisplayMode.embedded &&\n isLightspeedRouteRef.current\n ) {\n navigate(lightspeedRoutePath(id), { replace: true });\n }\n },\n [navigate],\n );\n\n const setDraftMessage = useCallback((message: string) => {\n setDraftMessageState(message);\n }, []);\n\n const setDraftFileContents = useCallback((files: FileContent[]) => {\n setDraftFileContentsState(files);\n }, []);\n\n const consumePendingOverlayThreadHandoff = useCallback(() => {\n if (!pendingOverlayThreadHandoffRef.current) {\n return false;\n }\n pendingOverlayThreadHandoffRef.current = false;\n return true;\n }, []);\n\n const setDisplayMode = useCallback(\n (mode: ChatbotDisplayMode, conversationIdParam?: string) => {\n if (mode === displayModeState) {\n return;\n }\n setPersistedDisplayMode(mode);\n syncShellDrawerForMode(mode);\n\n if (mode === ChatbotDisplayMode.embedded) {\n const convId = conversationIdParam ?? currentConversationIdState;\n navigate(lightspeedRoutePath(convId));\n setIsOpen(true);\n } else {\n if (isLightspeedRoute) {\n leavingLightspeedForNonEmbeddedShellRef.current = true;\n pendingOverlayThreadHandoffRef.current = true;\n leaveLightspeedRouteForShellDisplayMode();\n }\n setIsOpen(true);\n }\n },\n [\n currentConversationIdState,\n displayModeState,\n isLightspeedRoute,\n leaveLightspeedRouteForShellDisplayMode,\n navigate,\n setPersistedDisplayMode,\n syncShellDrawerForMode,\n ],\n );\n\n const shouldRenderOverlayModal =\n isOpen &&\n displayModeState === ChatbotDisplayMode.default &&\n !isLightspeedRoute;\n\n const contextValue = useMemo(\n () => ({\n isChatbotActive: isOpen,\n toggleChatbot,\n displayMode: displayModeState,\n setDisplayMode,\n drawerWidth,\n setDrawerWidth,\n currentConversationId: currentConversationIdState,\n setCurrentConversationId,\n draftMessage,\n setDraftMessage,\n draftFileContents,\n setDraftFileContents,\n consumePendingOverlayThreadHandoff,\n }),\n [\n isOpen,\n toggleChatbot,\n displayModeState,\n setDisplayMode,\n drawerWidth,\n currentConversationIdState,\n setCurrentConversationId,\n draftMessage,\n setDraftMessage,\n draftFileContents,\n setDraftFileContents,\n consumePendingOverlayThreadHandoff,\n ],\n );\n\n return {\n contextValue,\n shouldRenderOverlayModal,\n closeChatbot,\n };\n}\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,eAAkB,GAAA,aAAA;AAExB,SAAS,oBAAoB,cAAiC,EAAA;AAC5D,EAAA,OAAO,cACH,GAAA,CAAA,EAAG,eAAe,CAAA,cAAA,EAAiB,cAAc,CACjD,CAAA,GAAA,eAAA;AACN;AAOO,SAAS,0BAId,GAAA;AACA,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAA,MAAM,EAAE,UAAA,EAAY,WAAY,EAAA,GAAI,YAAa,EAAA;AACjD,EAAA,MAAM,OAAO,wBAAyB,EAAA;AACtC,EAAM,MAAA;AAAA,IACJ,WAAa,EAAA,oBAAA;AAAA,IACb,cAA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,MACA,QAAA;AAAA,MACA,uBAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAA,MAAM,wBACJ,GAAA,MAAA,IACA,gBAAqB,KAAA,kBAAA,CAAmB,WACxC,CAAC,iBAAA;AAEH,EAAA,MAAM,YAAe,GAAA,OAAA;AAAA,IACnB,OAAO;AAAA,MACL,eAAiB,EAAA,MAAA;AAAA,MACjB,aAAA;AAAA,MACA,WAAa,EAAA,gBAAA;AAAA,MACb,cAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAA;AAAA,MACA,qBAAuB,EAAA,0BAAA;AAAA,MACvB,wBAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,MAAA;AAAA,MACA,aAAA;AAAA,MACA,gBAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,0BAAA;AAAA,MACA,wBAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAO,OAAA;AAAA,IACL,YAAA;AAAA,IACA,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"useLightspeedProviderState.esm.js","sources":["../../src/hooks/useLightspeedProviderState.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 { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocation, useMatch, useNavigate } from 'react-router-dom';\n\nimport { ChatbotDisplayMode } from '@patternfly/chatbot';\n\nimport { useAppDrawer } from '@red-hat-developer-hub/backstage-plugin-app-react';\n\nimport type { LightspeedDrawerContextType } from '../components/LightspeedDrawerContext';\nimport { LIGHTSPEED_APP_DRAWER_ID } from '../const';\nimport type { FileContent } from '../types';\nimport { useBackstageUserIdentity } from './useBackstageUserIdentity';\nimport { useDisplayModeSettings } from './useDisplayModeSettings';\n\nconst LIGHTSPEED_PATH = '/lightspeed';\n\nfunction lightspeedRoutePath(conversationId?: string): string {\n return conversationId\n ? `${LIGHTSPEED_PATH}/conversation/${conversationId}`\n : LIGHTSPEED_PATH;\n}\n\n/**\n * Encapsulates LightspeedDrawerProvider state, routing, and ApplicationDrawer sync.\n *\n * @internal\n */\nexport function useLightspeedProviderState(): {\n contextValue: LightspeedDrawerContextType;\n shouldRenderOverlayModal: boolean;\n closeChatbot: () => void;\n} {\n const navigate = useNavigate();\n const location = useLocation();\n const { openDrawer, closeDrawer } = useAppDrawer();\n const user = useBackstageUserIdentity();\n const {\n displayMode: persistedDisplayMode,\n setDisplayMode: setPersistedDisplayMode,\n } = useDisplayModeSettings(user, ChatbotDisplayMode.default);\n\n const [displayModeState, setDisplayModeState] =\n useState<ChatbotDisplayMode>(persistedDisplayMode);\n const [isOpen, setIsOpen] = useState(false);\n const [drawerWidth, setDrawerWidth] = useState(400);\n const [currentConversationIdState, setCurrentConversationIdState] = useState<\n string | undefined\n >(undefined);\n const [draftMessage, setDraftMessageState] = useState('');\n const [draftFileContents, setDraftFileContentsState] = useState<\n FileContent[]\n >([]);\n const openedViaFABRef = useRef(false);\n const dockedAfterLeavingFullscreenRef = useRef(false);\n /** True while navigating off /lightspeed after user chose overlay/docked (URL can lag persisted mode). */\n const leavingLightspeedForNonEmbeddedShellRef = useRef(false);\n /** True until overlay/docked LightspeedChat consumes it (new mount after leaving fullscreen route). */\n const pendingOverlayThreadHandoffRef = useRef(false);\n\n const isLightspeedRouteRef = useRef(false);\n const persistedDisplayModeRef = useRef(persistedDisplayMode);\n\n const isLightspeedRoute = location.pathname.startsWith(LIGHTSPEED_PATH);\n isLightspeedRouteRef.current = isLightspeedRoute;\n persistedDisplayModeRef.current = persistedDisplayMode;\n const conversationMatch = useMatch(\n `${LIGHTSPEED_PATH}/conversation/:conversationId`,\n );\n const conversationId = conversationMatch?.params?.conversationId;\n\n const syncShellDrawerForMode = useCallback(\n (mode: ChatbotDisplayMode) => {\n if (mode === ChatbotDisplayMode.docked) {\n if (isLightspeedRoute) {\n dockedAfterLeavingFullscreenRef.current = true;\n } else {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n } else {\n dockedAfterLeavingFullscreenRef.current = false;\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n },\n [closeDrawer, isLightspeedRoute, openDrawer],\n );\n\n const navigateBackOrGoToCatalog = useCallback(() => {\n if (!openedViaFABRef.current) {\n navigate('/catalog');\n openedViaFABRef.current = true;\n return;\n }\n navigate(-1);\n }, [navigate]);\n\n /**\n * Leaving /lightspeed for overlay/docked must not use navigate(-1): after the first FAB\n * open, navigateBackOrGoToCatalog uses -1 and can land back on /lightspeed (fullscreen).\n */\n const leaveLightspeedRouteForShellDisplayMode = useCallback(() => {\n navigate('/catalog', { replace: true });\n }, [navigate]);\n\n useEffect(() => {\n if (!isLightspeedRoute) {\n leavingLightspeedForNonEmbeddedShellRef.current = false;\n }\n\n if (conversationId) {\n setCurrentConversationIdState(conversationId);\n } else if (isLightspeedRoute) {\n // On `/lightspeed` without a `:conversationId` segment, URL implies a fresh thread.\n // When navigating to another app route (overlay/docked), keep the last id so display\n // mode switches and re-entry to fullscreen stay on the active conversation.\n setCurrentConversationIdState(undefined);\n }\n\n if (isLightspeedRoute) {\n if (\n leavingLightspeedForNonEmbeddedShellRef.current &&\n persistedDisplayMode !== ChatbotDisplayMode.embedded\n ) {\n setDisplayModeState(persistedDisplayMode);\n } else {\n setDisplayModeState(ChatbotDisplayMode.embedded);\n }\n setIsOpen(true);\n if (!dockedAfterLeavingFullscreenRef.current) {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n } else if (persistedDisplayMode === ChatbotDisplayMode.embedded) {\n // Off /lightspeed there is no fullscreen surface; use overlay so FAB stays available.\n // (Persisted preference remains \"fullscreen\" for the next open.)\n setDisplayModeState(ChatbotDisplayMode.default);\n } else {\n setDisplayModeState(persistedDisplayMode);\n }\n }, [closeDrawer, conversationId, isLightspeedRoute, persistedDisplayMode]);\n\n useEffect(() => {\n if (\n !isLightspeedRoute &&\n isOpen &&\n displayModeState === ChatbotDisplayMode.docked\n ) {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n dockedAfterLeavingFullscreenRef.current = false;\n }\n }, [displayModeState, isLightspeedRoute, isOpen, openDrawer]);\n\n const openChatbot = useCallback(() => {\n openedViaFABRef.current = true;\n const rawMode = persistedDisplayMode || ChatbotDisplayMode.default;\n\n if (rawMode === ChatbotDisplayMode.embedded) {\n if (!isLightspeedRoute) {\n navigate(lightspeedRoutePath(currentConversationIdState));\n }\n setDisplayModeState(ChatbotDisplayMode.embedded);\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n setIsOpen(true);\n return;\n }\n\n setDisplayModeState(rawMode);\n\n if (rawMode === ChatbotDisplayMode.docked) {\n openDrawer(LIGHTSPEED_APP_DRAWER_ID);\n } else {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n\n setIsOpen(true);\n }, [\n closeDrawer,\n currentConversationIdState,\n isLightspeedRoute,\n navigate,\n openDrawer,\n persistedDisplayMode,\n ]);\n\n const closeChatbot = useCallback(() => {\n dockedAfterLeavingFullscreenRef.current = false;\n if (displayModeState === ChatbotDisplayMode.embedded && isLightspeedRoute) {\n navigateBackOrGoToCatalog();\n }\n if (displayModeState === ChatbotDisplayMode.docked) {\n closeDrawer(LIGHTSPEED_APP_DRAWER_ID);\n }\n setIsOpen(false);\n }, [\n closeDrawer,\n displayModeState,\n isLightspeedRoute,\n navigateBackOrGoToCatalog,\n ]);\n\n const toggleChatbot = useCallback(() => {\n if (isOpen) {\n closeChatbot();\n } else {\n openChatbot();\n }\n }, [isOpen, openChatbot, closeChatbot]);\n\n const setCurrentConversationId = useCallback(\n (id: string | undefined) => {\n setCurrentConversationIdState(id);\n // Refs: first-stream completion calls onStart after unmount / mode change; a stale\n // embedded + /lightspeed closure would navigate back to fullscreen without this.\n if (\n persistedDisplayModeRef.current === ChatbotDisplayMode.embedded &&\n isLightspeedRouteRef.current\n ) {\n navigate(lightspeedRoutePath(id), { replace: true });\n }\n },\n [navigate],\n );\n\n const setDraftMessage = useCallback((message: string) => {\n setDraftMessageState(message);\n }, []);\n\n const setDraftFileContents = useCallback((files: FileContent[]) => {\n setDraftFileContentsState(files);\n }, []);\n\n const consumePendingOverlayThreadHandoff = useCallback(() => {\n if (!pendingOverlayThreadHandoffRef.current) {\n return false;\n }\n pendingOverlayThreadHandoffRef.current = false;\n return true;\n }, []);\n\n const setDisplayMode = useCallback(\n (mode: ChatbotDisplayMode, conversationIdParam?: string) => {\n if (mode === displayModeState) {\n return;\n }\n setPersistedDisplayMode(mode);\n syncShellDrawerForMode(mode);\n\n if (mode === ChatbotDisplayMode.embedded) {\n const convId = conversationIdParam ?? currentConversationIdState;\n navigate(lightspeedRoutePath(convId));\n setIsOpen(true);\n } else {\n if (isLightspeedRoute) {\n leavingLightspeedForNonEmbeddedShellRef.current = true;\n pendingOverlayThreadHandoffRef.current = true;\n leaveLightspeedRouteForShellDisplayMode();\n }\n setIsOpen(true);\n }\n },\n [\n currentConversationIdState,\n displayModeState,\n isLightspeedRoute,\n leaveLightspeedRouteForShellDisplayMode,\n navigate,\n setPersistedDisplayMode,\n syncShellDrawerForMode,\n ],\n );\n\n const shouldRenderOverlayModal =\n isOpen &&\n displayModeState === ChatbotDisplayMode.default &&\n !isLightspeedRoute;\n\n const contextValue = useMemo(\n () => ({\n isChatbotActive: isOpen,\n toggleChatbot,\n displayMode: displayModeState,\n setDisplayMode,\n drawerWidth,\n setDrawerWidth,\n currentConversationId: currentConversationIdState,\n setCurrentConversationId,\n draftMessage,\n setDraftMessage,\n draftFileContents,\n setDraftFileContents,\n consumePendingOverlayThreadHandoff,\n }),\n [\n isOpen,\n toggleChatbot,\n displayModeState,\n setDisplayMode,\n drawerWidth,\n currentConversationIdState,\n setCurrentConversationId,\n draftMessage,\n setDraftMessage,\n draftFileContents,\n setDraftFileContents,\n consumePendingOverlayThreadHandoff,\n ],\n );\n\n return {\n contextValue,\n shouldRenderOverlayModal,\n closeChatbot,\n };\n}\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,eAAA,GAAkB,aAAA;AAExB,SAAS,oBAAoB,cAAA,EAAiC;AAC5D,EAAA,OAAO,cAAA,GACH,CAAA,EAAG,eAAe,CAAA,cAAA,EAAiB,cAAc,CAAA,CAAA,GACjD,eAAA;AACN;AAOO,SAAS,0BAAA,GAId;AACA,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,EAAE,UAAA,EAAY,WAAA,EAAY,GAAI,YAAA,EAAa;AACjD,EAAA,MAAM,OAAO,wBAAA,EAAyB;AACtC,EAAA,MAAM;AAAA,IACJ,WAAA,EAAa,oBAAA;AAAA,IACb,cAAA,EAAgB;AAAA,GAClB,GAAI,sBAAA,CAAuB,IAAA,EAAM,kBAAA,CAAmB,OAAO,CAAA;AAE3D,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAC1C,SAA6B,oBAAoB,CAAA;AACnD,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA;AAC1C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,GAAG,CAAA;AAClD,EAAA,MAAM,CAAC,0BAAA,EAA4B,6BAA6B,CAAA,GAAI,SAElE,MAAS,CAAA;AACX,EAAA,MAAM,CAAC,YAAA,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,OAAA;AAAA,IACnB,OAAO;AAAA,MACL,eAAA,EAAiB,MAAA;AAAA,MACjB,aAAA;AAAA,MACA,WAAA,EAAa,gBAAA;AAAA,MACb,cAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAA;AAAA,MACA,qBAAA,EAAuB,0BAAA;AAAA,MACvB,wBAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,MAAA;AAAA,MACA,aAAA;AAAA,MACA,gBAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,0BAAA;AAAA,MACA,wBAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLightspeedUpdatePermission.esm.js","sources":["../../src/hooks/useLightspeedUpdatePermission.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 { usePermission } from '@backstage/plugin-permission-react';\n\nimport { lightspeedChatUpdatePermission } from '@red-hat-developer-hub/backstage-plugin-lightspeed-common';\n\nexport const useLightspeedUpdatePermission = () => {\n const lightspeedUpdatePermissionResult = usePermission({\n permission: lightspeedChatUpdatePermission,\n });\n\n return lightspeedUpdatePermissionResult;\n};\n"],"names":[],"mappings":";;;AAoBO,MAAM,gCAAgC,MAAM;AACjD,EAAA,MAAM,mCAAmC,
|
|
1
|
+
{"version":3,"file":"useLightspeedUpdatePermission.esm.js","sources":["../../src/hooks/useLightspeedUpdatePermission.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 { usePermission } from '@backstage/plugin-permission-react';\n\nimport { lightspeedChatUpdatePermission } from '@red-hat-developer-hub/backstage-plugin-lightspeed-common';\n\nexport const useLightspeedUpdatePermission = () => {\n const lightspeedUpdatePermissionResult = usePermission({\n permission: lightspeedChatUpdatePermission,\n });\n\n return lightspeedUpdatePermissionResult;\n};\n"],"names":[],"mappings":";;;AAoBO,MAAM,gCAAgC,MAAM;AACjD,EAAA,MAAM,mCAAmC,aAAA,CAAc;AAAA,IACrD,UAAA,EAAY;AAAA,GACb,CAAA;AAED,EAAA,OAAO,gCAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLightspeedViewPermission.esm.js","sources":["../../src/hooks/useLightspeedViewPermission.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 { usePermission } from '@backstage/plugin-permission-react';\n\nimport {\n lightspeedChatCreatePermission,\n lightspeedChatReadPermission,\n} from '@red-hat-developer-hub/backstage-plugin-lightspeed-common';\n\nexport const useLightspeedViewPermission = () => {\n const canReadChats = usePermission({\n permission: lightspeedChatReadPermission,\n });\n\n const canCreateChats = usePermission({\n permission: lightspeedChatCreatePermission,\n });\n\n return {\n loading: canReadChats.loading || canCreateChats.loading,\n allowed: canReadChats.allowed && canCreateChats.allowed,\n };\n};\n"],"names":[],"mappings":";;;AAuBO,MAAM,8BAA8B,MAAM;AAC/C,EAAA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useLightspeedViewPermission.esm.js","sources":["../../src/hooks/useLightspeedViewPermission.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 { usePermission } from '@backstage/plugin-permission-react';\n\nimport {\n lightspeedChatCreatePermission,\n lightspeedChatReadPermission,\n} from '@red-hat-developer-hub/backstage-plugin-lightspeed-common';\n\nexport const useLightspeedViewPermission = () => {\n const canReadChats = usePermission({\n permission: lightspeedChatReadPermission,\n });\n\n const canCreateChats = usePermission({\n permission: lightspeedChatCreatePermission,\n });\n\n return {\n loading: canReadChats.loading || canCreateChats.loading,\n allowed: canReadChats.allowed && canCreateChats.allowed,\n };\n};\n"],"names":[],"mappings":";;;AAuBO,MAAM,8BAA8B,MAAM;AAC/C,EAAA,MAAM,eAAe,aAAA,CAAc;AAAA,IACjC,UAAA,EAAY;AAAA,GACb,CAAA;AAED,EAAA,MAAM,iBAAiB,aAAA,CAAc;AAAA,IACnC,UAAA,EAAY;AAAA,GACb,CAAA;AAED,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,YAAA,CAAa,OAAA,IAAW,cAAA,CAAe,OAAA;AAAA,IAChD,OAAA,EAAS,YAAA,CAAa,OAAA,IAAW,cAAA,CAAe;AAAA,GAClD;AACF;;;;"}
|
|
@@ -15,12 +15,12 @@ const usePinnedChatsSettings = (user) => {
|
|
|
15
15
|
if (!user) {
|
|
16
16
|
setIsPinningChatsEnabled(true);
|
|
17
17
|
setPinnedChats([]);
|
|
18
|
-
return
|
|
18
|
+
return void 0;
|
|
19
19
|
}
|
|
20
20
|
if (isGuestUser(user)) {
|
|
21
21
|
setIsPinningChatsEnabled(true);
|
|
22
22
|
setPinnedChats([]);
|
|
23
|
-
return
|
|
23
|
+
return void 0;
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
26
|
const enabledSnapshot = bucket.snapshot(PINNED_ENABLED_KEY);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePinnedChatsSettings.esm.js","sources":["../../src/hooks/usePinnedChatsSettings.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 { useCallback, useEffect, useState } from 'react';\n\nimport { storageApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { isGuestUser } from '../utils/user-utils';\n\nconst BUCKET_NAME = 'lightspeed';\nconst PINNED_ENABLED_KEY = 'pinnedChatsEnabled';\nconst PINNED_CHATS_KEY = 'pinnedChats';\n\ntype UsePinnedChatsSettingsReturn = {\n isPinningChatsEnabled: boolean;\n pinnedChats: string[];\n handlePinningChatsToggle: (enabled: boolean) => void;\n pinChat: (convId: string) => void;\n unpinChat: (convId: string) => void;\n};\n\n/**\n * Hook to manage pinned chats settings with persistence using Backstage StorageApi.\n * Settings are automatically scoped per-user by the StorageApi backend when using\n * database persistence. For guest users, settings are only kept in local state\n * and not persisted.\n *\n * @param user - The user entity ref (e.g., \"user:default/john\")\n * @returns Object containing pinned chats state and management functions\n */\nexport const usePinnedChatsSettings = (\n user: string | undefined,\n): UsePinnedChatsSettingsReturn => {\n const storageApi = useApi(storageApiRef);\n const bucket = storageApi.forBucket(BUCKET_NAME);\n\n const [isPinningChatsEnabled, setIsPinningChatsEnabled] = useState(true);\n const [pinnedChats, setPinnedChats] = useState<string[]>([]);\n\n // Determine if we should persist settings (not for guest users)\n const shouldPersist = !isGuestUser(user);\n\n // Initialize from storage and subscribe to changes\n useEffect(() => {\n if (!user) {\n setIsPinningChatsEnabled(true);\n setPinnedChats([]);\n return undefined;\n }\n\n // For guest users, use default values without loading from storage\n if (isGuestUser(user)) {\n setIsPinningChatsEnabled(true);\n setPinnedChats([]);\n return undefined;\n }\n\n // Load initial values from snapshot (works for browser mode)\n try {\n const enabledSnapshot = bucket.snapshot<boolean>(PINNED_ENABLED_KEY);\n const chatsSnapshot = bucket.snapshot<string[]>(PINNED_CHATS_KEY);\n\n setIsPinningChatsEnabled(enabledSnapshot.value ?? true);\n setPinnedChats(chatsSnapshot.value ?? []);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error reading pinned chats settings from storage:', error);\n }\n\n // Subscribe to changes (needed for database mode cross-tab sync)\n const enabledSubscription = bucket\n .observe$<boolean>(PINNED_ENABLED_KEY)\n .subscribe({\n next: snapshot => {\n setIsPinningChatsEnabled(snapshot.value ?? true);\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing pinnedChatsEnabled:', error);\n },\n });\n\n const chatsSubscription = bucket\n .observe$<string[]>(PINNED_CHATS_KEY)\n .subscribe({\n next: snapshot => {\n setPinnedChats(snapshot.value ?? []);\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing pinnedChats:', error);\n },\n });\n\n return () => {\n enabledSubscription.unsubscribe();\n chatsSubscription.unsubscribe();\n };\n }, [bucket, user]);\n\n // Toggle pinning feature on/off\n const handlePinningChatsToggle = useCallback(\n (enabled: boolean) => {\n if (!user) return;\n\n setIsPinningChatsEnabled(enabled);\n\n // Clear pinned chats when disabling\n if (!enabled) {\n setPinnedChats([]);\n }\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_ENABLED_KEY, enabled);\n\n // Clear pinned chats in storage when disabling\n if (!enabled) {\n bucket.set(PINNED_CHATS_KEY, []);\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving pinning toggle state:', error);\n }\n }\n },\n [bucket, user, shouldPersist],\n );\n\n // Pin a chat\n const pinChat = useCallback(\n (convId: string) => {\n if (!user) return;\n\n setPinnedChats(prev => {\n const updated = [...prev, convId];\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_CHATS_KEY, updated);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving pinned chat:', error);\n }\n }\n\n return updated;\n });\n },\n [bucket, user, shouldPersist],\n );\n\n // Unpin a chat\n const unpinChat = useCallback(\n (convId: string) => {\n if (!user) return;\n\n setPinnedChats(prev => {\n const updated = prev.filter(id => id !== convId);\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_CHATS_KEY, updated);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving unpinned chat:', error);\n }\n }\n\n return updated;\n });\n },\n [bucket, user, shouldPersist],\n );\n\n return {\n isPinningChatsEnabled,\n pinnedChats,\n handlePinningChatsToggle,\n pinChat,\n unpinChat,\n };\n};\n"],"names":[],"mappings":";;;;AAqBA,MAAM,
|
|
1
|
+
{"version":3,"file":"usePinnedChatsSettings.esm.js","sources":["../../src/hooks/usePinnedChatsSettings.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 { useCallback, useEffect, useState } from 'react';\n\nimport { storageApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { isGuestUser } from '../utils/user-utils';\n\nconst BUCKET_NAME = 'lightspeed';\nconst PINNED_ENABLED_KEY = 'pinnedChatsEnabled';\nconst PINNED_CHATS_KEY = 'pinnedChats';\n\ntype UsePinnedChatsSettingsReturn = {\n isPinningChatsEnabled: boolean;\n pinnedChats: string[];\n handlePinningChatsToggle: (enabled: boolean) => void;\n pinChat: (convId: string) => void;\n unpinChat: (convId: string) => void;\n};\n\n/**\n * Hook to manage pinned chats settings with persistence using Backstage StorageApi.\n * Settings are automatically scoped per-user by the StorageApi backend when using\n * database persistence. For guest users, settings are only kept in local state\n * and not persisted.\n *\n * @param user - The user entity ref (e.g., \"user:default/john\")\n * @returns Object containing pinned chats state and management functions\n */\nexport const usePinnedChatsSettings = (\n user: string | undefined,\n): UsePinnedChatsSettingsReturn => {\n const storageApi = useApi(storageApiRef);\n const bucket = storageApi.forBucket(BUCKET_NAME);\n\n const [isPinningChatsEnabled, setIsPinningChatsEnabled] = useState(true);\n const [pinnedChats, setPinnedChats] = useState<string[]>([]);\n\n // Determine if we should persist settings (not for guest users)\n const shouldPersist = !isGuestUser(user);\n\n // Initialize from storage and subscribe to changes\n useEffect(() => {\n if (!user) {\n setIsPinningChatsEnabled(true);\n setPinnedChats([]);\n return undefined;\n }\n\n // For guest users, use default values without loading from storage\n if (isGuestUser(user)) {\n setIsPinningChatsEnabled(true);\n setPinnedChats([]);\n return undefined;\n }\n\n // Load initial values from snapshot (works for browser mode)\n try {\n const enabledSnapshot = bucket.snapshot<boolean>(PINNED_ENABLED_KEY);\n const chatsSnapshot = bucket.snapshot<string[]>(PINNED_CHATS_KEY);\n\n setIsPinningChatsEnabled(enabledSnapshot.value ?? true);\n setPinnedChats(chatsSnapshot.value ?? []);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error reading pinned chats settings from storage:', error);\n }\n\n // Subscribe to changes (needed for database mode cross-tab sync)\n const enabledSubscription = bucket\n .observe$<boolean>(PINNED_ENABLED_KEY)\n .subscribe({\n next: snapshot => {\n setIsPinningChatsEnabled(snapshot.value ?? true);\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing pinnedChatsEnabled:', error);\n },\n });\n\n const chatsSubscription = bucket\n .observe$<string[]>(PINNED_CHATS_KEY)\n .subscribe({\n next: snapshot => {\n setPinnedChats(snapshot.value ?? []);\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing pinnedChats:', error);\n },\n });\n\n return () => {\n enabledSubscription.unsubscribe();\n chatsSubscription.unsubscribe();\n };\n }, [bucket, user]);\n\n // Toggle pinning feature on/off\n const handlePinningChatsToggle = useCallback(\n (enabled: boolean) => {\n if (!user) return;\n\n setIsPinningChatsEnabled(enabled);\n\n // Clear pinned chats when disabling\n if (!enabled) {\n setPinnedChats([]);\n }\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_ENABLED_KEY, enabled);\n\n // Clear pinned chats in storage when disabling\n if (!enabled) {\n bucket.set(PINNED_CHATS_KEY, []);\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving pinning toggle state:', error);\n }\n }\n },\n [bucket, user, shouldPersist],\n );\n\n // Pin a chat\n const pinChat = useCallback(\n (convId: string) => {\n if (!user) return;\n\n setPinnedChats(prev => {\n const updated = [...prev, convId];\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_CHATS_KEY, updated);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving pinned chat:', error);\n }\n }\n\n return updated;\n });\n },\n [bucket, user, shouldPersist],\n );\n\n // Unpin a chat\n const unpinChat = useCallback(\n (convId: string) => {\n if (!user) return;\n\n setPinnedChats(prev => {\n const updated = prev.filter(id => id !== convId);\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(PINNED_CHATS_KEY, updated);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving unpinned chat:', error);\n }\n }\n\n return updated;\n });\n },\n [bucket, user, shouldPersist],\n );\n\n return {\n isPinningChatsEnabled,\n pinnedChats,\n handlePinningChatsToggle,\n pinChat,\n unpinChat,\n };\n};\n"],"names":[],"mappings":";;;;AAqBA,MAAM,WAAA,GAAc,YAAA;AACpB,MAAM,kBAAA,GAAqB,oBAAA;AAC3B,MAAM,gBAAA,GAAmB,aAAA;AAmBlB,MAAM,sBAAA,GAAyB,CACpC,IAAA,KACiC;AACjC,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,SAAA,CAAU,WAAW,CAAA;AAE/C,EAAA,MAAM,CAAC,qBAAA,EAAuB,wBAAwB,CAAA,GAAI,SAAS,IAAI,CAAA;AACvE,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,QAAA,CAAmB,EAAE,CAAA;AAG3D,EAAA,MAAM,aAAA,GAAgB,CAAC,WAAA,CAAY,IAAI,CAAA;AAGvC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,wBAAA,CAAyB,IAAI,CAAA;AAC7B,MAAA,cAAA,CAAe,EAAE,CAAA;AACjB,MAAA,OAAO,MAAA;AAAA,IACT;AAGA,IAAA,IAAI,WAAA,CAAY,IAAI,CAAA,EAAG;AACrB,MAAA,wBAAA,CAAyB,IAAI,CAAA;AAC7B,MAAA,cAAA,CAAe,EAAE,CA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AChB,CAAC,MAAA,KAAmB;AAClB,MAAA,IAAI,CAAC,IAAA,EAAM;AAEX,MAAA,cAAA,CAAe,CAAA,IAAA,KAAQ;AACrB,QAAA,MAAM,OAAA,GAAU,IAAA,CAAK,MAAA,CAAO,CAAA,EAAA,KAAM,OAAO,MAAM,CAAA;AAG/C,QAAA,IAAI,aAAA,EAAe;AACjB,UAAA,IAAI;AACF,YAAA,MAAA,CAAO,GAAA,CAAI,kBAAkB,OAAO,CAAA;AAAA,UACtC,SAAS,KAAA,EAAO;AAEd,YAAA,OAAA,CAAQ,KAAA,CAAM,+BAA+B,KAAK,CAAA;AAAA,UACpD;AAAA,QACF;AAEA,QAAA,OAAO,OAAA;AAAA,MACT,CAAC,CAAA;AAAA,IACH,CAAA;AAAA,IACA,CAAC,MAAA,EAAQ,IAAA,EAAM,aAAa;AAAA,GAC9B;AAEA,EAAA,OAAO;AAAA,IACL,qBAAA;AAAA,IACA,WAAA;AAAA,IACA,wBAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuestionValidation.esm.js","sources":["../../src/hooks/useQuestionValidation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport { useQuery, type UseQueryResult } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\n\nexport const useTopicRestrictionStatus = (): UseQueryResult<boolean, Error> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n return useQuery({\n queryKey: ['topicRestrictionStatus'],\n queryFn: async () => {\n return await lightspeedApi.isTopicRestrictionEnabled();\n },\n });\n};\n"],"names":[],"mappings":";;;;AAsBO,MAAM,4BAA4B,MAAsC;AAC7E,
|
|
1
|
+
{"version":3,"file":"useQuestionValidation.esm.js","sources":["../../src/hooks/useQuestionValidation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport { useQuery, type UseQueryResult } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\n\nexport const useTopicRestrictionStatus = (): UseQueryResult<boolean, Error> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n return useQuery({\n queryKey: ['topicRestrictionStatus'],\n queryFn: async () => {\n return await lightspeedApi.isTopicRestrictionEnabled();\n },\n });\n};\n"],"names":[],"mappings":";;;;AAsBO,MAAM,4BAA4B,MAAsC;AAC7E,EAAA,MAAM,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAC7C,EAAA,OAAO,QAAA,CAAS;AAAA,IACd,QAAA,EAAU,CAAC,wBAAwB,CAAA;AAAA,IACnC,SAAS,YAAY;AACnB,MAAA,OAAO,MAAM,cAAc,yBAAA,EAA0B;AAAA,IACvD;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenameConversation.esm.js","sources":["../../src/hooks/useRenameConversation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport {\n useMutation,\n useQueryClient,\n type UseMutationResult,\n} from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\nimport { ConversationList } from '../types';\n\ntype RenameVariables = {\n conversation_id: string;\n newName: string;\n invalidateCache?: boolean;\n};\n\ntype RenameContext = {\n previousConversations?: ConversationList;\n};\n\nexport const useRenameConversation = (): UseMutationResult<\n void,\n Error,\n RenameVariables,\n RenameContext\n> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: async (props: {\n conversation_id: string;\n newName: string;\n invalidateCache?: boolean;\n }) => {\n await lightspeedApi.renameConversation(\n props.conversation_id,\n props.newName,\n );\n },\n onMutate: async props => {\n await queryClient.cancelQueries({ queryKey: ['conversations'] });\n\n const previousConversations = queryClient.getQueryData<ConversationList>([\n 'conversations',\n ]);\n\n queryClient.setQueryData(['conversations'], (old: ConversationList) =>\n old.map(c =>\n c.conversation_id === props.conversation_id\n ? { ...c, topic_summary: props.newName }\n : c,\n ),\n );\n\n return { previousConversations };\n },\n onSuccess: (_, props) => {\n if (props.invalidateCache) {\n queryClient.invalidateQueries({ queryKey: ['conversations'] });\n }\n },\n onError: (_, __, context) => {\n queryClient.setQueryData(\n ['conversations'],\n context?.previousConversations,\n );\n return { success: false };\n },\n });\n};\n"],"names":[],"mappings":";;;;AAqCO,MAAM,wBAAwB,MAKhC;AACH,
|
|
1
|
+
{"version":3,"file":"useRenameConversation.esm.js","sources":["../../src/hooks/useRenameConversation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport {\n useMutation,\n useQueryClient,\n type UseMutationResult,\n} from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\nimport { ConversationList } from '../types';\n\ntype RenameVariables = {\n conversation_id: string;\n newName: string;\n invalidateCache?: boolean;\n};\n\ntype RenameContext = {\n previousConversations?: ConversationList;\n};\n\nexport const useRenameConversation = (): UseMutationResult<\n void,\n Error,\n RenameVariables,\n RenameContext\n> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: async (props: {\n conversation_id: string;\n newName: string;\n invalidateCache?: boolean;\n }) => {\n await lightspeedApi.renameConversation(\n props.conversation_id,\n props.newName,\n );\n },\n onMutate: async props => {\n await queryClient.cancelQueries({ queryKey: ['conversations'] });\n\n const previousConversations = queryClient.getQueryData<ConversationList>([\n 'conversations',\n ]);\n\n queryClient.setQueryData(['conversations'], (old: ConversationList) =>\n old.map(c =>\n c.conversation_id === props.conversation_id\n ? { ...c, topic_summary: props.newName }\n : c,\n ),\n );\n\n return { previousConversations };\n },\n onSuccess: (_, props) => {\n if (props.invalidateCache) {\n queryClient.invalidateQueries({ queryKey: ['conversations'] });\n }\n },\n onError: (_, __, context) => {\n queryClient.setQueryData(\n ['conversations'],\n context?.previousConversations,\n );\n return { success: false };\n },\n });\n};\n"],"names":[],"mappings":";;;;AAqCO,MAAM,wBAAwB,MAKhC;AACH,EAAA,MAAM,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAC7C,EAAA,MAAM,cAAc,cAAA,EAAe;AAE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14
14
|
setSelectedSort("newest");
|
|
15
|
-
return
|
|
15
|
+
return void 0;
|
|
16
16
|
}
|
|
17
17
|
if (isGuestUser(user)) {
|
|
18
18
|
setSelectedSort("newest");
|
|
19
|
-
return
|
|
19
|
+
return void 0;
|
|
20
20
|
}
|
|
21
21
|
try {
|
|
22
22
|
const sortSnapshot = bucket.snapshot(SORT_ORDER_KEY);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSortSettings.esm.js","sources":["../../src/hooks/useSortSettings.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 { useCallback, useEffect, useState } from 'react';\n\nimport { storageApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { SortOption } from '../utils/lightspeed-chatbox-utils';\nimport { isGuestUser } from '../utils/user-utils';\n\nconst BUCKET_NAME = 'lightspeed';\nconst SORT_ORDER_KEY = 'sortOrder';\n\ntype UseSortSettingsReturn = {\n selectedSort: SortOption;\n handleSortChange: (sortOption: SortOption) => void;\n};\n\n/**\n * Hook to manage sort order settings with persistence using Backstage StorageApi.\n * Settings are automatically scoped per-user by the StorageApi backend when using\n * database persistence. For guest users, settings are only kept in local state\n * and not persisted.\n *\n * @param user - The user entity ref (e.g., \"user:default/john\")\n * @returns Object containing sort state and management function\n */\nexport const useSortSettings = (\n user: string | undefined,\n): UseSortSettingsReturn => {\n const storageApi = useApi(storageApiRef);\n const bucket = storageApi.forBucket(BUCKET_NAME);\n\n const [selectedSort, setSelectedSort] = useState<SortOption>('newest');\n\n // Determine if we should persist settings (not for guest users)\n const shouldPersist = !isGuestUser(user);\n\n // Initialize from storage and subscribe to changes\n useEffect(() => {\n if (!user) {\n setSelectedSort('newest');\n return undefined;\n }\n\n // For guest users, use default values without loading from storage\n if (isGuestUser(user)) {\n setSelectedSort('newest');\n return undefined;\n }\n\n // Load initial value from snapshot (works for browser mode)\n try {\n const sortSnapshot = bucket.snapshot<SortOption>(SORT_ORDER_KEY);\n setSelectedSort(sortSnapshot.value ?? 'newest');\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error reading sort order from storage:', error);\n }\n\n // Subscribe to changes (needed for database mode cross-tab sync)\n const sortSubscription = bucket\n .observe$<SortOption>(SORT_ORDER_KEY)\n .subscribe({\n next: snapshot => {\n setSelectedSort(snapshot.value ?? 'newest');\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing sortOrder:', error);\n },\n });\n\n return () => {\n sortSubscription.unsubscribe();\n };\n }, [bucket, user]);\n\n // Change sort order\n const handleSortChange = useCallback(\n (sortOption: SortOption) => {\n if (!user) return;\n\n setSelectedSort(sortOption);\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(SORT_ORDER_KEY, sortOption);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving sort order:', error);\n }\n }\n },\n [bucket, user, shouldPersist],\n );\n\n return {\n selectedSort,\n handleSortChange,\n };\n};\n"],"names":[],"mappings":";;;;AAsBA,MAAM,
|
|
1
|
+
{"version":3,"file":"useSortSettings.esm.js","sources":["../../src/hooks/useSortSettings.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 { useCallback, useEffect, useState } from 'react';\n\nimport { storageApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { SortOption } from '../utils/lightspeed-chatbox-utils';\nimport { isGuestUser } from '../utils/user-utils';\n\nconst BUCKET_NAME = 'lightspeed';\nconst SORT_ORDER_KEY = 'sortOrder';\n\ntype UseSortSettingsReturn = {\n selectedSort: SortOption;\n handleSortChange: (sortOption: SortOption) => void;\n};\n\n/**\n * Hook to manage sort order settings with persistence using Backstage StorageApi.\n * Settings are automatically scoped per-user by the StorageApi backend when using\n * database persistence. For guest users, settings are only kept in local state\n * and not persisted.\n *\n * @param user - The user entity ref (e.g., \"user:default/john\")\n * @returns Object containing sort state and management function\n */\nexport const useSortSettings = (\n user: string | undefined,\n): UseSortSettingsReturn => {\n const storageApi = useApi(storageApiRef);\n const bucket = storageApi.forBucket(BUCKET_NAME);\n\n const [selectedSort, setSelectedSort] = useState<SortOption>('newest');\n\n // Determine if we should persist settings (not for guest users)\n const shouldPersist = !isGuestUser(user);\n\n // Initialize from storage and subscribe to changes\n useEffect(() => {\n if (!user) {\n setSelectedSort('newest');\n return undefined;\n }\n\n // For guest users, use default values without loading from storage\n if (isGuestUser(user)) {\n setSelectedSort('newest');\n return undefined;\n }\n\n // Load initial value from snapshot (works for browser mode)\n try {\n const sortSnapshot = bucket.snapshot<SortOption>(SORT_ORDER_KEY);\n setSelectedSort(sortSnapshot.value ?? 'newest');\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error reading sort order from storage:', error);\n }\n\n // Subscribe to changes (needed for database mode cross-tab sync)\n const sortSubscription = bucket\n .observe$<SortOption>(SORT_ORDER_KEY)\n .subscribe({\n next: snapshot => {\n setSelectedSort(snapshot.value ?? 'newest');\n },\n error: error => {\n // eslint-disable-next-line no-console\n console.error('Error observing sortOrder:', error);\n },\n });\n\n return () => {\n sortSubscription.unsubscribe();\n };\n }, [bucket, user]);\n\n // Change sort order\n const handleSortChange = useCallback(\n (sortOption: SortOption) => {\n if (!user) return;\n\n setSelectedSort(sortOption);\n\n // Only persist for non-guest users\n if (shouldPersist) {\n try {\n bucket.set(SORT_ORDER_KEY, sortOption);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error saving sort order:', error);\n }\n }\n },\n [bucket, user, shouldPersist],\n );\n\n return {\n selectedSort,\n handleSortChange,\n };\n};\n"],"names":[],"mappings":";;;;AAsBA,MAAM,WAAA,GAAc,YAAA;AACpB,MAAM,cAAA,GAAiB,WAAA;AAgBhB,MAAM,eAAA,GAAkB,CAC7B,IAAA,KAC0B;AAC1B,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,SAAA,CAAU,WAAW,CAAA;AAE/C,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAAqB,QAAQ,CAAA;AAGrE,EAAA,MAAM,aAAA,GAAgB,CAAC,WAAA,CAAY,IAAI,CAAA;AAGvC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,eAAA,CAAgB,QAAQ,CAAA;AACxB,MAAA,OAAO,MAAA;AAAA,IACT;AAGA,IAAA,IAAI,WAAA,CAAY,IAAI,CAAA,EAAG;AACrB,MAAA,eAAA,CAAgB,QAAQ,CAAA;AACxB,MAAA,OAAO,MAAA;AAAA,IACT;AAGA,IAAA,IAAI;AACF,MAAA,MAAM,YAAA,GAAe,MAAA,CAAO,QAAA,CAAqB,cAAc,CAAA;AAC/D,MAAA,eAAA,CAAgB,YAAA,CAAa,SAAS,QAAQ,CAAA;AAAA,IAChD,SAAS,KAAA,EAAO;AAEd,MAAA,OAAA,CAAQ,KAAA,CAAM,0CAA0C,KAAK,CAAA;AAAA,IAC/D;AAGA,IAAA,MAAM,gBAAA,GAAmB,MAAA,CACtB,QAAA,CAAqB,cAAc,EACnC,SAAA,CAAU;AAAA,MACT,MAAM,CAAA,QAAA,KAAY;AAChB,QAAA,eAAA,CAAgB,QAAA,CAAS,SAAS,QAAQ,CAAA;AAAA,MAC5C,CAAA;AAAA,MACA,OAAO,CAAA,KAAA,KAAS;AAEd,QAAA,OAAA,CAAQ,KAAA,CAAM,8BAA8B,KAAK,CAAA;AAAA,MACnD;AAAA,KACD,CAAA;AAEH,IAAA,OAAO,MAAM;AACX,MAAA,gBAAA,CAAiB,WAAA,EAAY;AAAA,IAC/B,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAA,EAAQ,IAAI,CAAC,CAAA;AAGjB,EAAA,MAAM,gBAAA,GAAmB,WAAA;AAAA,IACvB,CAAC,UAAA,KAA2B;AAC1B,MAAA,IAAI,CAAC,IAAA,EAAM;AAEX,MAAA,eAAA,CAAgB,UAAU,CAAA;AAG1B,MAAA,IAAI,aAAA,EAAe;AACjB,QAAA,IAAI;AACF,UAAA,MAAA,CAAO,GAAA,CAAI,gBAAgB,UAAU,CAAA;AAAA,QACvC,SAAS,KAAA,EAAO;AAEd,UAAA,OAAA,CAAQ,KAAA,CAAM,4BAA4B,KAAK,CAAA;AAAA,QACjD;AAAA,MACF;AAAA,IACF,CAAA;AAAA,IACA,CAAC,MAAA,EAAQ,IAAA,EAAM,aAAa;AAAA,GAC9B;AAEA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStopConversation.esm.js","sources":["../../src/hooks/useStopConversation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport { useMutation, type UseMutationResult } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\n\nexport const useStopConversation = (): UseMutationResult<\n { success: boolean },\n Error,\n string\n> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n\n return useMutation({\n mutationFn: async (requestId: string) => {\n return await lightspeedApi.stopMessage(requestId);\n },\n onError: error => {\n // eslint-disable-next-line no-console\n console.warn(error);\n },\n });\n};\n"],"names":[],"mappings":";;;;AAsBO,MAAM,sBAAsB,MAI9B;AACH,
|
|
1
|
+
{"version":3,"file":"useStopConversation.esm.js","sources":["../../src/hooks/useStopConversation.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 { useApi } from '@backstage/core-plugin-api';\n\nimport { useMutation, type UseMutationResult } from '@tanstack/react-query';\n\nimport { lightspeedApiRef } from '../api/api';\n\nexport const useStopConversation = (): UseMutationResult<\n { success: boolean },\n Error,\n string\n> => {\n const lightspeedApi = useApi(lightspeedApiRef);\n\n return useMutation({\n mutationFn: async (requestId: string) => {\n return await lightspeedApi.stopMessage(requestId);\n },\n onError: error => {\n // eslint-disable-next-line no-console\n console.warn(error);\n },\n });\n};\n"],"names":[],"mappings":";;;;AAsBO,MAAM,sBAAsB,MAI9B;AACH,EAAA,MAAM,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAE7C,EAAA,OAAO,WAAA,CAAY;AAAA,IACjB,UAAA,EAAY,OAAO,SAAA,KAAsB;AACvC,MAAA,OAAO,MAAM,aAAA,CAAc,WAAA,CAAY,SAAS,CAAA;AAAA,IAClD,CAAA;AAAA,IACA,SAAS,CAAA,KAAA,KAAS;AAEhB,MAAA,OAAA,CAAQ,KAAK,KAAK,CAAA;AAAA,IACpB;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslation.esm.js","sources":["../../src/hooks/useTranslation.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 {\n TranslationFunction,\n useTranslationRef,\n} from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from '../translations/ref';\n\nexport const useTranslation = (): {\n t: TranslationFunction<typeof lightspeedTranslationRef.T>;\n} => useTranslationRef(lightspeedTranslationRef);\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"useTranslation.esm.js","sources":["../../src/hooks/useTranslation.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 {\n TranslationFunction,\n useTranslationRef,\n} from '@backstage/core-plugin-api/alpha';\n\nimport { lightspeedTranslationRef } from '../translations/ref';\n\nexport const useTranslation = (): {\n t: TranslationFunction<typeof lightspeedTranslationRef.T>;\n} => useTranslationRef(lightspeedTranslationRef);\n"],"names":[],"mappings":";;;AAuBO,MAAM,cAAA,GAAiB,MAEzB,iBAAA,CAAkB,wBAAwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWelcomePrompts.esm.js","sources":["../../src/hooks/useWelcomePrompts.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 { useMemo } from 'react';\n\nimport { ConfigApi, configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { DEFAULT_SAMPLE_PROMPTS, RHDH_SAMPLE_PROMPTS } from '../const';\nimport { SamplePrompt, SamplePrompts } from '../types';\nimport { getRandomSamplePrompts } from '../utils/prompt-utils';\nimport { useTopicRestrictionStatus } from './useQuestionValidation';\nimport { useTranslation } from './useTranslation';\n\nexport const useWelcomePrompts = (): SamplePrompts => {\n const configApi: ConfigApi = useApi(configApiRef);\n const { t } = useTranslation();\n const { data: questionValidationEnabled } = useTopicRestrictionStatus();\n\n return useMemo(() => {\n // Transform translation keys to actual prompts\n const translatePrompts = (prompts: SamplePrompts): SamplePrompts => {\n return prompts.map((prompt: SamplePrompt) => {\n if ('titleKey' in prompt && 'messageKey' in prompt) {\n return {\n title: t(prompt.titleKey as any, { defaultValue: prompt.titleKey }),\n message: t(prompt.messageKey as any, {\n defaultValue: prompt.messageKey,\n }),\n };\n }\n return prompt as { title: string; message: string };\n });\n };\n\n const DEFAULT_PROMPTS = questionValidationEnabled\n ? translatePrompts(RHDH_SAMPLE_PROMPTS)\n : translatePrompts([...DEFAULT_SAMPLE_PROMPTS, ...RHDH_SAMPLE_PROMPTS]);\n\n const userConfiguredPrompts: SamplePrompts = (\n configApi?.getOptionalConfigArray('lightspeed.prompts') ?? []\n ).map(config => ({\n title: config.getString('title') ?? '',\n message: config.getString('message') ?? '',\n }));\n return getRandomSamplePrompts(userConfiguredPrompts, DEFAULT_PROMPTS);\n }, [configApi, t, questionValidationEnabled]);\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,oBAAoB,MAAqB;AACpD,
|
|
1
|
+
{"version":3,"file":"useWelcomePrompts.esm.js","sources":["../../src/hooks/useWelcomePrompts.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 { useMemo } from 'react';\n\nimport { ConfigApi, configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { DEFAULT_SAMPLE_PROMPTS, RHDH_SAMPLE_PROMPTS } from '../const';\nimport { SamplePrompt, SamplePrompts } from '../types';\nimport { getRandomSamplePrompts } from '../utils/prompt-utils';\nimport { useTopicRestrictionStatus } from './useQuestionValidation';\nimport { useTranslation } from './useTranslation';\n\nexport const useWelcomePrompts = (): SamplePrompts => {\n const configApi: ConfigApi = useApi(configApiRef);\n const { t } = useTranslation();\n const { data: questionValidationEnabled } = useTopicRestrictionStatus();\n\n return useMemo(() => {\n // Transform translation keys to actual prompts\n const translatePrompts = (prompts: SamplePrompts): SamplePrompts => {\n return prompts.map((prompt: SamplePrompt) => {\n if ('titleKey' in prompt && 'messageKey' in prompt) {\n return {\n title: t(prompt.titleKey as any, { defaultValue: prompt.titleKey }),\n message: t(prompt.messageKey as any, {\n defaultValue: prompt.messageKey,\n }),\n };\n }\n return prompt as { title: string; message: string };\n });\n };\n\n const DEFAULT_PROMPTS = questionValidationEnabled\n ? translatePrompts(RHDH_SAMPLE_PROMPTS)\n : translatePrompts([...DEFAULT_SAMPLE_PROMPTS, ...RHDH_SAMPLE_PROMPTS]);\n\n const userConfiguredPrompts: SamplePrompts = (\n configApi?.getOptionalConfigArray('lightspeed.prompts') ?? []\n ).map(config => ({\n title: config.getString('title') ?? '',\n message: config.getString('message') ?? '',\n }));\n return getRandomSamplePrompts(userConfiguredPrompts, DEFAULT_PROMPTS);\n }, [configApi, t, questionValidationEnabled]);\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,oBAAoB,MAAqB;AACpD,EAAA,MAAM,SAAA,GAAuB,OAAO,YAAY,CAAA;AAChD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,EAAE,IAAA,EAAM,yBAAA,EAA0B,GAAI,yBAAA,EAA0B;AAEtE,EAAA,OAAO,QAAQ,MAAM;AAEnB,IAAA,MAAM,gBAAA,GAAmB,CAAC,OAAA,KAA0C;AAClE,MAAA,OAAO,OAAA,CAAQ,GAAA,CAAI,CAAC,MAAA,KAAyB;AAC3C,QAAA,IAAI,UAAA,IAAc,MAAA,IAAU,YAAA,IAAgB,MAAA,EAAQ;AAClD,UAAA,OAAO;AAAA,YACL,KAAA,EAAO,EAAE,MAAA,CAAO,QAAA,EAAiB,EAAE,YAAA,EAAc,MAAA,CAAO,UAAU,CAAA;AAAA,YAClE,OAAA,EAAS,CAAA,CAAE,MAAA,CAAO,UAAA,EAAmB;AAAA,cACnC,cAAc,MAAA,CAAO;AAAA,aACtB;AAAA,WACH;AAAA,QACF;AACA,QAAA,OAAO,MAAA;AAAA,MACT,CAAC,CAAA;AAAA,IACH,CAAA;AAEA,IAAA,MAAM,eAAA,GAAkB,yBAAA,GACpB,gBAAA,CAAiB,mBAAmB,CAAA,GACpC,gBAAA,CAAiB,CAAC,GAAG,sBAAA,EAAwB,GAAG,mBAAmB,CAAC,CAAA;AAExE,IAAA,MAAM,qBAAA,GAAA,CACJ,WAAW,sBAAA,CAAuB,oBAAoB,KAAK,EAAC,EAC5D,IAAI,CAAA,MAAA,MAAW;AAAA,MACf,KAAA,EAAO,MAAA,CAAO,SAAA,CAAU,OAAO,CAAA,IAAK,EAAA;AAAA,MACpC,OAAA,EAAS,MAAA,CAAO,SAAA,CAAU,SAAS,CAAA,IAAK;AAAA,KAC1C,CAAE,CAAA;AACF,IAAA,OAAO,sBAAA,CAAuB,uBAAuB,eAAe,CAAA;AAAA,EACtE,CAAA,EAAG,CAAC,SAAA,EAAW,CAAA,EAAG,yBAAyB,CAAC,CAAA;AAC9C;;;;"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '@patternfly/react-core/dist/styles/base-no-reset.css';
|
|
2
2
|
import '@patternfly/chatbot/dist/css/main.css';
|
|
3
|
-
import { createPlugin, createApiFactory,
|
|
3
|
+
import { createPlugin, createApiFactory, fetchApiRef, configApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
4
4
|
import { lightspeedApiRef } from './api/api.esm.js';
|
|
5
5
|
import { LightspeedApiClient } from './api/LightspeedApiClient.esm.js';
|
|
6
6
|
import { notebooksApiRef } from './api/notebooksApi.esm.js';
|
|
7
7
|
import { NotebooksApiClient } from './api/NotebooksApiClient.esm.js';
|
|
8
|
-
import {
|
|
8
|
+
import { notebookViewRouteRef, notebooksRouteRef, addConversationRouteRef, rootRouteRef } from './routes.esm.js';
|
|
9
9
|
|
|
10
10
|
const lightspeedPlugin = createPlugin({
|
|
11
11
|
id: "lightspeed",
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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 '@patternfly/react-core/dist/styles/base-no-reset.css';\nimport '@patternfly/chatbot/dist/css/main.css';\n\nimport { PropsWithChildren } from 'react';\n\nimport {\n configApiRef,\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { lightspeedApiRef } from './api/api';\nimport { LightspeedApiClient } from './api/LightspeedApiClient';\nimport { notebooksApiRef } from './api/notebooksApi';\nimport { NotebooksApiClient } from './api/NotebooksApiClient';\nimport {\n addConversationRouteRef,\n notebooksRouteRef,\n notebookViewRouteRef,\n rootRouteRef,\n} from './routes';\n\n/**\n * Lightspeed Plugin\n * @public\n */\nexport const lightspeedPlugin = createPlugin({\n id: 'lightspeed',\n routes: {\n root: rootRouteRef,\n lightspeedConversation: addConversationRouteRef,\n lightspeedNotebooks: notebooksRouteRef,\n lightspeedNotebookView: notebookViewRouteRef,\n },\n apis: [\n createApiFactory({\n api: lightspeedApiRef,\n deps: {\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, fetchApi }) =>\n new LightspeedApiClient({ configApi, fetchApi }),\n }),\n createApiFactory({\n api: notebooksApiRef,\n deps: {\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, fetchApi }) =>\n new NotebooksApiClient({ configApi, fetchApi }),\n }),\n ],\n});\n\n/**\n * Lightspeed Page Router\n * @public\n */\nexport const LightspeedPage = lightspeedPlugin.provide(\n createRoutableExtension({\n name: 'LightspeedPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * Lightspeed Drawer Provider\n *\n * @public\n */\nexport const LightspeedDrawerProvider: React.ComponentType<PropsWithChildren> =\n lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedDrawerProvider',\n component: {\n lazy: () =>\n import('./components/LightspeedDrawerProvider').then(\n m => m.LightspeedDrawerProvider,\n ),\n },\n }),\n );\n\n/**\n * Lightspeed FAB for global floating action button fot LightspeedAI\n *\n * @public\n */\nexport const LightspeedFAB: React.ComponentType = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedFAB',\n component: {\n lazy: () =>\n import('./components/LightspeedFAB').then(m => m.LightspeedFAB),\n },\n }),\n);\n\n/**\n * Lightspeed Drawer State Exposer exposes its drawer state\n *\n * @public\n */\nexport const LightspeedDrawerStateExposer = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedDrawerStateExposer',\n component: {\n lazy: () =>\n import('./components/LightspeedDrawerStateExposer').then(\n m => m.LightspeedDrawerStateExposer,\n ),\n },\n }),\n);\n\n/**\n * Lightspeed Chat Container component extension\n *\n * @public\n */\nexport const LightspeedChatContainer = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedChatContainer',\n component: {\n lazy: () =>\n import('./components/LightspeedChatContainer').then(\n m => m.LightspeedChatContainer,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;AA6CO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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 '@patternfly/react-core/dist/styles/base-no-reset.css';\nimport '@patternfly/chatbot/dist/css/main.css';\n\nimport { PropsWithChildren } from 'react';\n\nimport {\n configApiRef,\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { lightspeedApiRef } from './api/api';\nimport { LightspeedApiClient } from './api/LightspeedApiClient';\nimport { notebooksApiRef } from './api/notebooksApi';\nimport { NotebooksApiClient } from './api/NotebooksApiClient';\nimport {\n addConversationRouteRef,\n notebooksRouteRef,\n notebookViewRouteRef,\n rootRouteRef,\n} from './routes';\n\n/**\n * Lightspeed Plugin\n * @public\n */\nexport const lightspeedPlugin = createPlugin({\n id: 'lightspeed',\n routes: {\n root: rootRouteRef,\n lightspeedConversation: addConversationRouteRef,\n lightspeedNotebooks: notebooksRouteRef,\n lightspeedNotebookView: notebookViewRouteRef,\n },\n apis: [\n createApiFactory({\n api: lightspeedApiRef,\n deps: {\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, fetchApi }) =>\n new LightspeedApiClient({ configApi, fetchApi }),\n }),\n createApiFactory({\n api: notebooksApiRef,\n deps: {\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, fetchApi }) =>\n new NotebooksApiClient({ configApi, fetchApi }),\n }),\n ],\n});\n\n/**\n * Lightspeed Page Router\n * @public\n */\nexport const LightspeedPage = lightspeedPlugin.provide(\n createRoutableExtension({\n name: 'LightspeedPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * Lightspeed Drawer Provider\n *\n * @public\n */\nexport const LightspeedDrawerProvider: React.ComponentType<PropsWithChildren> =\n lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedDrawerProvider',\n component: {\n lazy: () =>\n import('./components/LightspeedDrawerProvider').then(\n m => m.LightspeedDrawerProvider,\n ),\n },\n }),\n );\n\n/**\n * Lightspeed FAB for global floating action button fot LightspeedAI\n *\n * @public\n */\nexport const LightspeedFAB: React.ComponentType = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedFAB',\n component: {\n lazy: () =>\n import('./components/LightspeedFAB').then(m => m.LightspeedFAB),\n },\n }),\n);\n\n/**\n * Lightspeed Drawer State Exposer exposes its drawer state\n *\n * @public\n */\nexport const LightspeedDrawerStateExposer = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedDrawerStateExposer',\n component: {\n lazy: () =>\n import('./components/LightspeedDrawerStateExposer').then(\n m => m.LightspeedDrawerStateExposer,\n ),\n },\n }),\n);\n\n/**\n * Lightspeed Chat Container component extension\n *\n * @public\n */\nexport const LightspeedChatContainer = lightspeedPlugin.provide(\n createComponentExtension({\n name: 'LightspeedChatContainer',\n component: {\n lazy: () =>\n import('./components/LightspeedChatContainer').then(\n m => m.LightspeedChatContainer,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;AA6CO,MAAM,mBAAmB,YAAA,CAAa;AAAA,EAC3C,EAAA,EAAI,YAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,YAAA;AAAA,IACN,sBAAA,EAAwB,uBAAA;AAAA,IACxB,mBAAA,EAAqB,iBAAA;AAAA,IACrB,sBAAA,EAAwB;AAAA,GAC1B;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,gBAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,SAAA,EAAW,YAAA;AAAA,QACX,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,SAAA,EAAW,QAAA,EAAS,KAC9B,IAAI,mBAAA,CAAoB,EAAE,SAAA,EAAW,QAAA,EAAU;AAAA,KAClD,CAAA;AAAA,IACD,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,eAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,SAAA,EAAW,YAAA;AAAA,QACX,QAAA,EAAU;AAAA,O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AAE,IAAA;AAAA,QAC7C,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.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 { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'lightspeed',\n});\n\nexport const addConversationRouteRef = createSubRouteRef({\n id: 'lightspeed-conversation',\n parent: rootRouteRef,\n path: '/conversation/:conversationId',\n});\n\nexport const notebooksRouteRef = createSubRouteRef({\n id: 'lightspeed-notebooks',\n parent: rootRouteRef,\n path: '/notebooks',\n});\n\nexport const notebookViewRouteRef = createSubRouteRef({\n id: 'lightspeed-notebook-view',\n parent: rootRouteRef,\n path: '/notebooks/:notebookId',\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.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 { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'lightspeed',\n});\n\nexport const addConversationRouteRef = createSubRouteRef({\n id: 'lightspeed-conversation',\n parent: rootRouteRef,\n path: '/conversation/:conversationId',\n});\n\nexport const notebooksRouteRef = createSubRouteRef({\n id: 'lightspeed-notebooks',\n parent: rootRouteRef,\n path: '/notebooks',\n});\n\nexport const notebookViewRouteRef = createSubRouteRef({\n id: 'lightspeed-notebook-view',\n parent: rootRouteRef,\n path: '/notebooks/:notebookId',\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;AAEM,MAAM,0BAA0B,iBAAA,CAAkB;AAAA,EACvD,EAAA,EAAI,yBAAA;AAAA,EACJ,MAAA,EAAQ,YAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAC;AAEM,MAAM,oBAAoB,iBAAA,CAAkB;AAAA,EACjD,EAAA,EAAI,sBAAA;AAAA,EACJ,MAAA,EAAQ,YAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAC;AAEM,MAAM,uBAAuB,iBAAA,CAAkB;AAAA,EACpD,EAAA,EAAI,0BAAA;AAAA,EACJ,MAAA,EAAQ,YAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAC;;;;"}
|
|
@@ -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 * de translation for plugin.lightspeed.\n * @public\n */\nconst lightspeedTranslationDe = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'KI-gestützter Entwicklungsassistent',\n 'tabs.ariaLabel': 'Lightspeed-Ansichten',\n 'tabs.chat': 'Chat',\n 'tabs.notebooks': 'Notizbücher',\n 'tabs.notebooks.empty': 'Inhalte der Notizbücher kommen hierhin.',\n 'notebooks.title': 'Meine Notizbücher',\n 'notebooks.empty.title': 'Keine erstellten Notizbücher',\n 'notebooks.empty.description':\n 'Erstellen Sie ein neues Notizbuch, um Ihre Quellen zu organisieren und KI-gestützte Erkenntnisse zu gewinnen.',\n 'notebooks.empty.action': 'Neues Notizbuch erstellen',\n 'notebooks.documents': 'Dokumente',\n 'notebooks.actions.rename': 'Umbenennen',\n 'notebooks.actions.delete': 'Löschen',\n 'notebooks.rename.title': '{{name}} umbenennen?',\n 'notebooks.rename.description':\n 'Bitte geben Sie den neuen Namen für dieses Notizbuch ein und klicken Sie auf „Senden“, um fortzufahren.',\n 'notebooks.rename.label': 'Neuer Name',\n 'notebooks.rename.placeholder': 'Neuer Name',\n 'notebooks.rename.action': 'Senden',\n 'notebooks.delete.title': '{{name}} löschen?',\n 'notebooks.delete.message':\n 'Dieses Notizbuch wird hier nicht mehr angezeigt. Dadurch werden auch zugehörige Aktivitäten wie Eingaben, Antworten und Feedback aus Ihrer Lightspeed-Aktivität gelöscht.',\n 'notebooks.delete.action': 'Löschen',\n 'notebooks.delete.toast': 'Notizbuch gelöscht!',\n 'notebooks.updated.today': 'Heute aktualisiert',\n 'notebooks.updated.yesterday': 'Vor 1 Tag aktualisiert',\n 'notebooks.updated.days': 'Vor {{days}} Tagen aktualisiert',\n 'notebooks.updated.on': 'Aktualisiert am',\n\n // Notebook view\n 'notebook.view.title': 'Unbenanntes Notizbuch',\n 'notebook.view.close': 'Notizbuch schließen',\n 'notebook.view.documents.count': '{{count}} Dokumente',\n 'notebook.view.documents.add': 'Hinzufügen',\n 'notebook.view.upload.heading':\n 'Laden Sie eine Ressource hoch, um zu beginnen',\n 'notebook.view.upload.action': 'Ressource hochladen',\n 'notebook.view.input.placeholder': 'Fragen Sie zu Ihren Dokumenten...',\n 'notebook.view.input.disabledTooltip':\n 'Wählen Sie mindestens eine geladene Ressource aus, um den Chat zu starten',\n 'notebook.view.sidebar.collapse': 'Seitenleiste einklappen',\n 'notebook.view.sidebar.expand': 'Seitenleiste ausklappen',\n 'notebook.view.sidebar.resize': 'Größe der Seitenleiste ändern',\n 'notebook.view.documents.uploading': 'Dokument wird hochgeladen',\n 'notebook.view.documents.maxReached':\n 'Maximal 10 Dokumente sind erlaubt. Löschen Sie ein Dokument, um ein neues hochzuladen.',\n 'notebook.upload.success': '{{fileName}} erfolgreich hochgeladen.',\n 'notebook.upload.failed': 'Hochladen von {{fileName}} fehlgeschlagen.',\n\n // Notebook upload modal\n 'notebook.upload.modal.title': 'Dokument zum Notizbuch hinzufügen',\n 'notebook.upload.modal.dragDropTitle': 'Dateien hierher ziehen und ablegen',\n 'notebook.upload.modal.browseButton': 'Hochladen',\n 'notebook.upload.modal.separator': 'oder',\n 'notebook.upload.modal.infoText':\n 'Akzeptierte Dateitypen: .md, .txt, .pdf, .json, .yaml, .log',\n 'notebook.upload.modal.selectedFiles':\n '{{count}} von {{max}} Dateien ausgewählt',\n 'notebook.upload.modal.addButton': 'Hinzufügen ({{count}})',\n 'notebook.upload.modal.removeFile': '{{fileName}} entfernen',\n 'notebook.upload.error.unsupportedType':\n 'Upload-Fehler: Nicht unterstützte Dateitypen gefunden. Bitte laden Sie nur unterstützte Dateitypen hoch.',\n 'notebook.upload.error.fileTooLarge':\n 'Upload-Fehler: Dateigröße überschreitet das Limit von 25 MB.',\n 'notebook.upload.error.tooManyFiles':\n 'Upload-Fehler: Maximal {{max}} Dateien erlaubt.',\n\n // Notebook overwrite modal\n 'notebook.overwrite.modal.title': 'Dateien überschreiben?',\n 'notebook.overwrite.modal.description':\n 'Die folgenden Dateien existieren bereits in diesem Notizbuch. Möchten Sie sie mit den neuen Versionen überschreiben?',\n 'notebook.overwrite.modal.action': 'Überschreiben',\n 'notebook.document.delete': 'Löschen',\n\n 'prompts.codeReadability.title': 'Hilfe zur Code-Lesbarkeit erhalten',\n 'prompts.codeReadability.message':\n 'Können Sie mir Techniken vorschlagen, mit denen ich meinen Code lesbarer und wartungsfreundlicher gestalten kann?',\n 'prompts.debugging.title': 'Hilfe beim Debuggen erhalten',\n 'prompts.debugging.message':\n 'Meine Anwendung gibt beim Versuch einer Verbindung zur Datenbank einen Fehler aus. Können Sie mir helfen, das Problem zu identifizieren?',\n 'prompts.developmentConcept.title': 'Ein Entwicklungskonzept erläutern',\n 'prompts.developmentConcept.message':\n 'Können Sie erklären, wie eine Microservices-Architektur funktioniert und welche Vorteile sie gegenüber einem monolithischen Design bietet?',\n 'prompts.codeOptimization.title':\n 'Vorschläge zur Codeoptimierung unterbreiten',\n 'prompts.codeOptimization.message':\n 'Können Sie gängige Methoden zur Codeoptimierung vorschlagen, um eine bessere Performance zu erzielen?',\n 'prompts.documentation.title': 'Zusammenfassung von Dokumentation',\n 'prompts.documentation.message':\n 'Können Sie die Dokumentation zur Implementierung der OAuth 2.0-Authentifizierung in einer Webanwendung zusammenfassen?',\n 'prompts.gitWorkflows.title': 'Workflows mit Git',\n 'prompts.gitWorkflows.message':\n 'Ich möchte Änderungen am Code in einem anderen Branch vornehmen, ohne meine bestehende Arbeit zu verlieren. Wie geht man dabei mit Git vor?',\n 'prompts.testingStrategies.title': 'Teststrategien vorschlagen',\n 'prompts.testingStrategies.message':\n 'Können Sie mir einige gängige Teststrategien empfehlen, die meine Anwendung robust und fehlerfrei machen?',\n 'prompts.sortingAlgorithms.title':\n 'Sortieralgorithmen verständlich erklären',\n 'prompts.sortingAlgorithms.message':\n 'Können Sie den Unterschied zwischen Quicksort und Mergesort erklären und wann man welchen Algorithmus verwendet?',\n 'prompts.eventDriven.title': 'Ereignisgesteuerte Architektur verstehen',\n 'prompts.eventDriven.message':\n 'Können Sie erklären, was ereignisgesteuerte Architektur bedeutet und wann ihre Verwendung in der Softwareentwicklung von Vorteil ist?',\n 'prompts.tekton.title': 'Mit Tekton deployen',\n 'prompts.tekton.message':\n 'Können Sie mir helfen, das Deployment meiner Anwendung mithilfe von Tekton-Pipelines zu automatisieren?',\n 'prompts.openshift.title': 'OpenShift-Deployment erstellen',\n 'prompts.openshift.message':\n 'Können Sie mich bei der Erstellung eines neuen Deployments in OpenShift für eine containerisierte Anwendung unterstützen?',\n 'prompts.rhdh.title': 'Erste Schritte mit dem Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Können Sie mich bei den ersten Schritten zur Nutzung des Developer Hub als Entwickler unterstützen, z. B. beim Erkunden des Softwarekatalogs und beim Hinzufügen meines Dienstes?',\n 'conversation.delete.confirm.title': 'Chat löschen?',\n 'conversation.delete.confirm.message':\n 'Dieser Chat wird hier nicht mehr angezeigt. Dadurch werden auch zugehörige Aktivitäten wie Prompts, Antworten und Feedback aus Ihrer Lightspeed-Aktivität gelöscht.',\n 'conversation.delete.confirm.action': 'Löschen',\n 'conversation.rename.confirm.title': 'Chat umbenennen?',\n 'conversation.rename.confirm.action': 'Umbenennen',\n 'conversation.rename.placeholder': 'Chatname',\n 'permission.required.title': 'Fehlende Berechtigungen',\n 'permission.required.description':\n 'Um <subject/> anzuzeigen, wenden Sie sich an Ihren Administrator, um die Berechtigung <permissions/> zu erhalten.',\n 'permission.subject.plugin': 'das Lightspeed-Plugin',\n 'permission.subject.notebooks': 'die Lightspeed-Notizbücher',\n 'permission.notebooks.goBack': 'Zurück',\n 'lcore.notConfigured.title': 'Verbinden Sie ein LLM, um zu starten',\n 'lcore.notConfigured.description':\n 'Lightspeed erfordert ein registriertes LLM. Wenden Sie sich an den Plattformadministrator Ihrer Organisation, um die Einrichtung abzuschließen.',\n 'lcore.notConfigured.developerLightspeedDocs':\n 'Developer Lightspeed wird konfiguriert',\n 'lcore.notConfigured.backendDocs': 'Lightspeed-Backend einrichten',\n 'lcore.loadError.title': 'Modelle konnten nicht geladen werden',\n 'lcore.loadError.description':\n 'Das Lightspeed-Backend hat keine Modellliste zurückgegeben. Prüfen Sie, ob der Dienst läuft und erreichbar ist, und versuchen Sie es erneut.',\n 'disclaimer.withValidation':\n 'Diese Funktion nutzt KI-Technologie. Geben Sie bei Ihrer Eingabe keine persönlichen oder sonstigen sensiblen Informationen an. Interaktionen können dazu genutzt werden, die Produkte oder Dienstleistungen von Red Hat zu verbessern.',\n 'disclaimer.withoutValidation':\n 'Diese Funktion nutzt KI-Technologie. Geben Sie bei Ihrer Eingabe keine persönlichen oder sonstigen sensiblen Informationen an. Interaktionen können dazu genutzt werden, die Produkte oder Dienstleistungen von Red Hat zu verbessern.',\n 'footer.accuracy.label':\n 'KI-generierte Inhalte sollten vor der Verwendung stets überprüft werden.',\n 'common.cancel': 'Abbrechen',\n 'common.close': 'Schließen',\n 'common.readMore': 'Mehr lesen',\n 'common.retry': 'Erneut versuchen',\n 'common.loading': 'Wird geladen',\n 'common.noSearchResults': 'Keine Ergebnisse, die der Suche entsprechen',\n 'menu.newConversation': 'Neuer Chat',\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Suchen',\n 'chatbox.provider.other': 'Andere',\n 'chatbox.emptyState.noPinnedChats': 'Keine angehefteten Chats',\n 'chatbox.emptyState.noRecentChats': 'Keine letzten Chats',\n 'chatbox.emptyState.noResults.title': 'Keine Ergebnisse gefunden',\n 'chatbox.emptyState.noResults.body':\n 'Passen Sie Ihre Suchanfrage an, und versuchen Sie es erneut. Überprüfen Sie Ihre Rechtschreibung, oder versuchen Sie es mit einem allgemeineren Begriff.',\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: .txt, .yaml und .json. Die maximale Dateigröße beträgt 25 MB.',\n 'aria.chatbotSelector': 'Chatbot-Auswahl',\n 'aria.important': 'Wichtig',\n 'aria.chatHistoryMenu': 'Chatverlauf-Menü',\n 'aria.closeDrawerPanel': 'Drawer-Fenster schließen',\n 'aria.search.placeholder': 'Suchen',\n 'aria.searchPreviousConversations': 'Vorherige Unterhaltungen durchsuchen',\n 'aria.resize': 'Größe ändern',\n 'aria.options.label': 'Optionen',\n 'aria.scroll.down': 'Zurück zum Ende',\n 'aria.scroll.up': 'Zurück zum Anfang',\n 'aria.settings.label': 'Chatbot-Optionen',\n 'aria.close': 'Chatbot schließen',\n 'modal.edit': 'Bearbeiten',\n 'modal.save': 'Speichern',\n 'modal.close': 'Schließen',\n 'modal.cancel': 'Abbrechen',\n 'conversation.delete': 'Löschen',\n 'conversation.rename': 'Umbenennen',\n 'conversation.addToPinnedChats': 'Anheften',\n 'conversation.removeFromPinnedChats': 'Lösen',\n 'conversation.announcement.userMessage':\n 'Nachricht vom Benutzer: {{prompt}}. Nachricht vom Bot wird geladen.',\n 'user.guest': 'Gast',\n 'conversation.announcement.responseStopped': 'Antwort angehalten.',\n 'user.loading': '...',\n 'tooltip.attach': 'Anhängen',\n 'tooltip.send': 'Senden',\n 'tooltip.microphone.active': 'Überwachen beenden',\n 'tooltip.microphone.inactive': 'Mikrofon verwenden',\n 'button.newChat': 'Neuer Chat',\n 'tooltip.chatHistoryMenu': 'Chatverlauf-Menü',\n 'tooltip.responseRecorded': 'Antwort aufgezeichnet',\n 'tooltip.backToTop': 'Zurück zum Anfang',\n 'tooltip.backToBottom': 'Zurück zum Ende',\n 'tooltip.settings': 'Chatbot-Optionen',\n 'tooltip.close': 'Schließen',\n 'modal.title.preview': 'Anhang in der Vorschau anzeigen',\n 'modal.title.edit': 'Anhang bearbeiten',\n 'icon.lightspeed.alt': 'Lightspeed-Symbol',\n 'icon.permissionRequired.alt': \"Symbol für 'Berechtigung erforderlich'\",\n 'message.options.label': 'Optionen',\n 'file.upload.error.alreadyExists': 'Datei existiert bereits.',\n 'file.upload.error.multipleFiles':\n 'Es wurden mehr als eine Datei hochgeladen.',\n 'file.upload.error.unsupportedType':\n 'Nicht unterstützter Dateityp. Unterstützte Typen: .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 'Datei konnte nicht gelesen werden: {{errorMessage}}',\n 'error.context.fileAttachment':\n 'useFileAttachmentContext muss innerhalb eines FileAttachmentContextProvider liegen',\n 'feedback.form.title': 'Warum haben Sie diese Bewertung gewählt?',\n 'feedback.form.textAreaPlaceholder':\n 'Geben Sie optional zusätzliches Feedback an',\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': 'Überwachung',\n 'feedback.tooltips.listen': 'Überwachen',\n 'feedback.quickResponses.positive.helpful': 'Hilfreiche Informationen',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Leicht verständlich',\n 'feedback.quickResponses.positive.resolvedIssue':\n 'Mein Problem wurde gelöst',\n 'feedback.quickResponses.negative.didntAnswer':\n 'Meine Frage wurde 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 'conversation.category.pinnedChats': 'Angeheftet',\n 'conversation.category.recent': 'Neueste',\n 'settings.pinned.enable': 'Angeheftete Chats aktivieren',\n 'settings.pinned.disable': 'Angeheftete Chats deaktivieren',\n 'settings.pinned.enabled.description':\n 'Angeheftete Chats sind derzeit aktiviert',\n 'settings.pinned.disabled.description':\n 'Angeheftete Chats sind derzeit deaktiviert.',\n 'settings.mcp.label': 'MCP-Einstellungen',\n 'mcp.settings.title': 'MCP-Server',\n 'mcp.settings.selectedCount':\n '{{selectedCount}} von {{totalCount}} ausgewählt',\n 'mcp.settings.closeAriaLabel': 'MCP-Einstellungen schließen',\n 'mcp.settings.readOnlyAccess':\n 'Sie haben schreibgeschützten Zugriff auf MCP-Server.',\n 'mcp.settings.tableAriaLabel': 'MCP-Server-Tabelle',\n 'mcp.settings.enabled': 'Aktiviert',\n 'mcp.settings.name': 'Name',\n 'mcp.settings.status': 'Status',\n 'mcp.settings.edit': 'Bearbeiten',\n 'mcp.settings.loading': 'MCP-Server werden geladen...',\n 'mcp.settings.noneAvailable': 'Keine MCP-Server verfügbar.',\n 'mcp.settings.status.disabled': 'Deaktiviert',\n 'mcp.settings.status.tokenRequired': 'Token erforderlich',\n 'mcp.settings.status.failed': 'Fehlgeschlagen',\n 'mcp.settings.status.oneTool': '{{count}} Tool',\n 'mcp.settings.status.manyTools': '{{count}} Tools',\n 'mcp.settings.status.unknown': 'Unbekannt',\n 'mcp.settings.toggleServerAriaLabel': '{{serverName}} umschalten',\n 'mcp.settings.editServerAriaLabel': '{{serverName}} bearbeiten',\n 'mcp.settings.configureServerTitle': 'Server {{serverName}} konfigurieren',\n 'mcp.settings.closeConfigureModalAriaLabel':\n 'Konfigurationsdialog schließen',\n 'mcp.settings.modalDescription':\n 'Anmeldedaten werden verschlüsselt gespeichert und sind auf Ihr Profil beschränkt. Lightspeed arbeitet mit genau Ihren Berechtigungen.',\n 'mcp.settings.savedToken': 'Gespeicherter Token',\n 'mcp.settings.personalAccessToken': 'Persönlicher Zugriffstoken',\n 'mcp.settings.usingAdminCredential':\n 'Administratoranmeldedaten werden verwendet. Geben Sie einen persönlichen Token ein, um ihn für Ihr Konto zu überschreiben.',\n 'mcp.settings.enterToken': 'Geben Sie Ihren Token ein',\n 'mcp.settings.removePersonalToken': 'Persönlichen Token entfernen',\n 'mcp.settings.token.clearAriaLabel': 'Tokeneingabe löschen',\n 'mcp.settings.token.validating': 'Token wird validiert...',\n 'mcp.settings.token.savingAndValidating':\n 'Token wird gespeichert und validiert...',\n 'mcp.settings.token.urlUnavailableForValidation':\n 'Token kann nicht validiert werden, da die Server-URL nicht verfügbar ist.',\n 'mcp.settings.token.invalidCredentials':\n 'Ungültige Anmeldedaten. Überprüfen Sie Server-URL und Token.',\n 'mcp.settings.token.validationFailed':\n 'Validierung fehlgeschlagen. Überprüfen Sie Server-URL und Token.',\n 'mcp.settings.token.connectionSuccessful': 'Verbindung erfolgreich',\n 'toolCall.header': 'Antwort des Tools: {{toolName}}',\n 'toolCall.thinking': 'Hat {{seconds}} Sekunden nachgedacht',\n 'toolCall.executionTime': 'Ausführungszeit: ',\n 'toolCall.parameters': 'Parameter',\n 'toolCall.response': 'Antwort',\n 'toolCall.showMore': 'Mehr anzeigen',\n 'toolCall.showLess': 'Weniger anzeigen',\n 'toolCall.loading': 'Tool wird ausgeführt...',\n 'toolCall.executing': 'Tool wird ausgeführt...',\n 'toolCall.copyResponse': 'Antwort kopieren',\n 'toolCall.summary': 'Hier ist eine Zusammenfassung Ihrer Antwort.',\n 'toolCall.mcpServer': 'MCP-Server',\n 'settings.displayMode.label': 'Anzeigemodus',\n 'settings.displayMode.overlay': 'Overlay',\n 'settings.displayMode.docked': 'An Fenster andocken',\n 'settings.displayMode.fullscreen': 'Vollbild',\n 'sort.label': 'Unterhaltungen sortieren',\n 'sort.newest': 'Datum (neuestes zuerst)',\n 'sort.oldest': 'Datum (ältestes zuerst)',\n 'sort.alphabeticalAsc': 'Name (A-Z)',\n 'sort.alphabeticalDesc': 'Name (Z-A)',\n 'reasoning.thinking': 'Denkvorgang anzeigen',\n },\n});\n\nexport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CAA2C,EAAA,wBAAA;AAAA,IAC3C,iBAAmB,EAAA,iCAAA;AAAA,IACnB,mBAAqB,EAAA,sCAAA;AAAA,IACrB,wBAA0B,EAAA,sBAAA;AAAA,IAC1B,qBAAuB,EAAA,WAAA;AAAA,IACvB,mBAAqB,EAAA,SAAA;AAAA,IACrB,mBAAqB,EAAA,eAAA;AAAA,IACrB,mBAAqB,EAAA,kBAAA;AAAA,IACrB,kBAAoB,EAAA,4BAAA;AAAA,IACpB,oBAAsB,EAAA,4BAAA;AAAA,IACtB,uBAAyB,EAAA,kBAAA;AAAA,IACzB,kBAAoB,EAAA,8CAAA;AAAA,IACpB,oBAAsB,EAAA,YAAA;AAAA,IACtB,4BAA8B,EAAA,cAAA;AAAA,IAC9B,8BAAgC,EAAA,SAAA;AAAA,IAChC,6BAA+B,EAAA,qBAAA;AAAA,IAC/B,iCAAmC,EAAA,UAAA;AAAA,IACnC,YAAc,EAAA,0BAAA;AAAA,IACd,aAAe,EAAA,yBAAA;AAAA,IACf,aAAe,EAAA,4BAAA;AAAA,IACf,sBAAwB,EAAA,YAAA;AAAA,IACxB,uBAAyB,EAAA,YAAA;AAAA,IACzB,oBAAsB,EAAA;AAAA;AAE1B,CAAC;;;;"}
|
|
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 * de translation for plugin.lightspeed.\n * @public\n */\nconst lightspeedTranslationDe = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'KI-gestützter Entwicklungsassistent',\n 'tabs.ariaLabel': 'Lightspeed-Ansichten',\n 'tabs.chat': 'Chat',\n 'tabs.notebooks': 'Notizbücher',\n 'tabs.notebooks.empty': 'Inhalte der Notizbücher kommen hierhin.',\n 'notebooks.title': 'Meine Notizbücher',\n 'notebooks.empty.title': 'Keine erstellten Notizbücher',\n 'notebooks.empty.description':\n 'Erstellen Sie ein neues Notizbuch, um Ihre Quellen zu organisieren und KI-gestützte Erkenntnisse zu gewinnen.',\n 'notebooks.empty.action': 'Neues Notizbuch erstellen',\n 'notebooks.documents': 'Dokumente',\n 'notebooks.actions.rename': 'Umbenennen',\n 'notebooks.actions.delete': 'Löschen',\n 'notebooks.rename.title': '{{name}} umbenennen?',\n 'notebooks.rename.description':\n 'Bitte geben Sie den neuen Namen für dieses Notizbuch ein und klicken Sie auf „Senden“, um fortzufahren.',\n 'notebooks.rename.label': 'Neuer Name',\n 'notebooks.rename.placeholder': 'Neuer Name',\n 'notebooks.rename.action': 'Senden',\n 'notebooks.delete.title': '{{name}} löschen?',\n 'notebooks.delete.message':\n 'Dieses Notizbuch wird hier nicht mehr angezeigt. Dadurch werden auch zugehörige Aktivitäten wie Eingaben, Antworten und Feedback aus Ihrer Lightspeed-Aktivität gelöscht.',\n 'notebooks.delete.action': 'Löschen',\n 'notebooks.delete.toast': 'Notizbuch gelöscht!',\n 'notebooks.updated.today': 'Heute aktualisiert',\n 'notebooks.updated.yesterday': 'Vor 1 Tag aktualisiert',\n 'notebooks.updated.days': 'Vor {{days}} Tagen aktualisiert',\n 'notebooks.updated.on': 'Aktualisiert am',\n\n // Notebook view\n 'notebook.view.title': 'Unbenanntes Notizbuch',\n 'notebook.view.close': 'Notizbuch schließen',\n 'notebook.view.documents.count': '{{count}} Dokumente',\n 'notebook.view.documents.add': 'Hinzufügen',\n 'notebook.view.upload.heading':\n 'Laden Sie eine Ressource hoch, um zu beginnen',\n 'notebook.view.upload.action': 'Ressource hochladen',\n 'notebook.view.input.placeholder': 'Fragen Sie zu Ihren Dokumenten...',\n 'notebook.view.input.disabledTooltip':\n 'Wählen Sie mindestens eine geladene Ressource aus, um den Chat zu starten',\n 'notebook.view.sidebar.collapse': 'Seitenleiste einklappen',\n 'notebook.view.sidebar.expand': 'Seitenleiste ausklappen',\n 'notebook.view.sidebar.resize': 'Größe der Seitenleiste ändern',\n 'notebook.view.documents.uploading': 'Dokument wird hochgeladen',\n 'notebook.view.documents.maxReached':\n 'Maximal 10 Dokumente sind erlaubt. Löschen Sie ein Dokument, um ein neues hochzuladen.',\n 'notebook.upload.success': '{{fileName}} erfolgreich hochgeladen.',\n 'notebook.upload.failed': 'Hochladen von {{fileName}} fehlgeschlagen.',\n\n // Notebook upload modal\n 'notebook.upload.modal.title': 'Dokument zum Notizbuch hinzufügen',\n 'notebook.upload.modal.dragDropTitle': 'Dateien hierher ziehen und ablegen',\n 'notebook.upload.modal.browseButton': 'Hochladen',\n 'notebook.upload.modal.separator': 'oder',\n 'notebook.upload.modal.infoText':\n 'Akzeptierte Dateitypen: .md, .txt, .pdf, .json, .yaml, .log',\n 'notebook.upload.modal.selectedFiles':\n '{{count}} von {{max}} Dateien ausgewählt',\n 'notebook.upload.modal.addButton': 'Hinzufügen ({{count}})',\n 'notebook.upload.modal.removeFile': '{{fileName}} entfernen',\n 'notebook.upload.error.unsupportedType':\n 'Upload-Fehler: Nicht unterstützte Dateitypen gefunden. Bitte laden Sie nur unterstützte Dateitypen hoch.',\n 'notebook.upload.error.fileTooLarge':\n 'Upload-Fehler: Dateigröße überschreitet das Limit von 25 MB.',\n 'notebook.upload.error.tooManyFiles':\n 'Upload-Fehler: Maximal {{max}} Dateien erlaubt.',\n\n // Notebook overwrite modal\n 'notebook.overwrite.modal.title': 'Dateien überschreiben?',\n 'notebook.overwrite.modal.description':\n 'Die folgenden Dateien existieren bereits in diesem Notizbuch. Möchten Sie sie mit den neuen Versionen überschreiben?',\n 'notebook.overwrite.modal.action': 'Überschreiben',\n 'notebook.document.delete': 'Löschen',\n\n 'prompts.codeReadability.title': 'Hilfe zur Code-Lesbarkeit erhalten',\n 'prompts.codeReadability.message':\n 'Können Sie mir Techniken vorschlagen, mit denen ich meinen Code lesbarer und wartungsfreundlicher gestalten kann?',\n 'prompts.debugging.title': 'Hilfe beim Debuggen erhalten',\n 'prompts.debugging.message':\n 'Meine Anwendung gibt beim Versuch einer Verbindung zur Datenbank einen Fehler aus. Können Sie mir helfen, das Problem zu identifizieren?',\n 'prompts.developmentConcept.title': 'Ein Entwicklungskonzept erläutern',\n 'prompts.developmentConcept.message':\n 'Können Sie erklären, wie eine Microservices-Architektur funktioniert und welche Vorteile sie gegenüber einem monolithischen Design bietet?',\n 'prompts.codeOptimization.title':\n 'Vorschläge zur Codeoptimierung unterbreiten',\n 'prompts.codeOptimization.message':\n 'Können Sie gängige Methoden zur Codeoptimierung vorschlagen, um eine bessere Performance zu erzielen?',\n 'prompts.documentation.title': 'Zusammenfassung von Dokumentation',\n 'prompts.documentation.message':\n 'Können Sie die Dokumentation zur Implementierung der OAuth 2.0-Authentifizierung in einer Webanwendung zusammenfassen?',\n 'prompts.gitWorkflows.title': 'Workflows mit Git',\n 'prompts.gitWorkflows.message':\n 'Ich möchte Änderungen am Code in einem anderen Branch vornehmen, ohne meine bestehende Arbeit zu verlieren. Wie geht man dabei mit Git vor?',\n 'prompts.testingStrategies.title': 'Teststrategien vorschlagen',\n 'prompts.testingStrategies.message':\n 'Können Sie mir einige gängige Teststrategien empfehlen, die meine Anwendung robust und fehlerfrei machen?',\n 'prompts.sortingAlgorithms.title':\n 'Sortieralgorithmen verständlich erklären',\n 'prompts.sortingAlgorithms.message':\n 'Können Sie den Unterschied zwischen Quicksort und Mergesort erklären und wann man welchen Algorithmus verwendet?',\n 'prompts.eventDriven.title': 'Ereignisgesteuerte Architektur verstehen',\n 'prompts.eventDriven.message':\n 'Können Sie erklären, was ereignisgesteuerte Architektur bedeutet und wann ihre Verwendung in der Softwareentwicklung von Vorteil ist?',\n 'prompts.tekton.title': 'Mit Tekton deployen',\n 'prompts.tekton.message':\n 'Können Sie mir helfen, das Deployment meiner Anwendung mithilfe von Tekton-Pipelines zu automatisieren?',\n 'prompts.openshift.title': 'OpenShift-Deployment erstellen',\n 'prompts.openshift.message':\n 'Können Sie mich bei der Erstellung eines neuen Deployments in OpenShift für eine containerisierte Anwendung unterstützen?',\n 'prompts.rhdh.title': 'Erste Schritte mit dem Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Können Sie mich bei den ersten Schritten zur Nutzung des Developer Hub als Entwickler unterstützen, z. B. beim Erkunden des Softwarekatalogs und beim Hinzufügen meines Dienstes?',\n 'conversation.delete.confirm.title': 'Chat löschen?',\n 'conversation.delete.confirm.message':\n 'Dieser Chat wird hier nicht mehr angezeigt. Dadurch werden auch zugehörige Aktivitäten wie Prompts, Antworten und Feedback aus Ihrer Lightspeed-Aktivität gelöscht.',\n 'conversation.delete.confirm.action': 'Löschen',\n 'conversation.rename.confirm.title': 'Chat umbenennen?',\n 'conversation.rename.confirm.action': 'Umbenennen',\n 'conversation.rename.placeholder': 'Chatname',\n 'permission.required.title': 'Fehlende Berechtigungen',\n 'permission.required.description':\n 'Um <subject/> anzuzeigen, wenden Sie sich an Ihren Administrator, um die Berechtigung <permissions/> zu erhalten.',\n 'permission.subject.plugin': 'das Lightspeed-Plugin',\n 'permission.subject.notebooks': 'die Lightspeed-Notizbücher',\n 'permission.notebooks.goBack': 'Zurück',\n 'lcore.notConfigured.title': 'Verbinden Sie ein LLM, um zu starten',\n 'lcore.notConfigured.description':\n 'Lightspeed erfordert ein registriertes LLM. Wenden Sie sich an den Plattformadministrator Ihrer Organisation, um die Einrichtung abzuschließen.',\n 'lcore.notConfigured.developerLightspeedDocs':\n 'Developer Lightspeed wird konfiguriert',\n 'lcore.notConfigured.backendDocs': 'Lightspeed-Backend einrichten',\n 'lcore.loadError.title': 'Modelle konnten nicht geladen werden',\n 'lcore.loadError.description':\n 'Das Lightspeed-Backend hat keine Modellliste zurückgegeben. Prüfen Sie, ob der Dienst läuft und erreichbar ist, und versuchen Sie es erneut.',\n 'disclaimer.withValidation':\n 'Diese Funktion nutzt KI-Technologie. Geben Sie bei Ihrer Eingabe keine persönlichen oder sonstigen sensiblen Informationen an. Interaktionen können dazu genutzt werden, die Produkte oder Dienstleistungen von Red Hat zu verbessern.',\n 'disclaimer.withoutValidation':\n 'Diese Funktion nutzt KI-Technologie. Geben Sie bei Ihrer Eingabe keine persönlichen oder sonstigen sensiblen Informationen an. Interaktionen können dazu genutzt werden, die Produkte oder Dienstleistungen von Red Hat zu verbessern.',\n 'footer.accuracy.label':\n 'KI-generierte Inhalte sollten vor der Verwendung stets überprüft werden.',\n 'common.cancel': 'Abbrechen',\n 'common.close': 'Schließen',\n 'common.readMore': 'Mehr lesen',\n 'common.retry': 'Erneut versuchen',\n 'common.loading': 'Wird geladen',\n 'common.noSearchResults': 'Keine Ergebnisse, die der Suche entsprechen',\n 'menu.newConversation': 'Neuer Chat',\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Suchen',\n 'chatbox.provider.other': 'Andere',\n 'chatbox.emptyState.noPinnedChats': 'Keine angehefteten Chats',\n 'chatbox.emptyState.noRecentChats': 'Keine letzten Chats',\n 'chatbox.emptyState.noResults.title': 'Keine Ergebnisse gefunden',\n 'chatbox.emptyState.noResults.body':\n 'Passen Sie Ihre Suchanfrage an, und versuchen Sie es erneut. Überprüfen Sie Ihre Rechtschreibung, oder versuchen Sie es mit einem allgemeineren Begriff.',\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: .txt, .yaml und .json. Die maximale Dateigröße beträgt 25 MB.',\n 'aria.chatbotSelector': 'Chatbot-Auswahl',\n 'aria.important': 'Wichtig',\n 'aria.chatHistoryMenu': 'Chatverlauf-Menü',\n 'aria.closeDrawerPanel': 'Drawer-Fenster schließen',\n 'aria.search.placeholder': 'Suchen',\n 'aria.searchPreviousConversations': 'Vorherige Unterhaltungen durchsuchen',\n 'aria.resize': 'Größe ändern',\n 'aria.options.label': 'Optionen',\n 'aria.scroll.down': 'Zurück zum Ende',\n 'aria.scroll.up': 'Zurück zum Anfang',\n 'aria.settings.label': 'Chatbot-Optionen',\n 'aria.close': 'Chatbot schließen',\n 'modal.edit': 'Bearbeiten',\n 'modal.save': 'Speichern',\n 'modal.close': 'Schließen',\n 'modal.cancel': 'Abbrechen',\n 'conversation.delete': 'Löschen',\n 'conversation.rename': 'Umbenennen',\n 'conversation.addToPinnedChats': 'Anheften',\n 'conversation.removeFromPinnedChats': 'Lösen',\n 'conversation.announcement.userMessage':\n 'Nachricht vom Benutzer: {{prompt}}. Nachricht vom Bot wird geladen.',\n 'user.guest': 'Gast',\n 'conversation.announcement.responseStopped': 'Antwort angehalten.',\n 'user.loading': '...',\n 'tooltip.attach': 'Anhängen',\n 'tooltip.send': 'Senden',\n 'tooltip.microphone.active': 'Überwachen beenden',\n 'tooltip.microphone.inactive': 'Mikrofon verwenden',\n 'button.newChat': 'Neuer Chat',\n 'tooltip.chatHistoryMenu': 'Chatverlauf-Menü',\n 'tooltip.responseRecorded': 'Antwort aufgezeichnet',\n 'tooltip.backToTop': 'Zurück zum Anfang',\n 'tooltip.backToBottom': 'Zurück zum Ende',\n 'tooltip.settings': 'Chatbot-Optionen',\n 'tooltip.close': 'Schließen',\n 'modal.title.preview': 'Anhang in der Vorschau anzeigen',\n 'modal.title.edit': 'Anhang bearbeiten',\n 'icon.lightspeed.alt': 'Lightspeed-Symbol',\n 'icon.permissionRequired.alt': \"Symbol für 'Berechtigung erforderlich'\",\n 'message.options.label': 'Optionen',\n 'file.upload.error.alreadyExists': 'Datei existiert bereits.',\n 'file.upload.error.multipleFiles':\n 'Es wurden mehr als eine Datei hochgeladen.',\n 'file.upload.error.unsupportedType':\n 'Nicht unterstützter Dateityp. Unterstützte Typen: .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 'Datei konnte nicht gelesen werden: {{errorMessage}}',\n 'error.context.fileAttachment':\n 'useFileAttachmentContext muss innerhalb eines FileAttachmentContextProvider liegen',\n 'feedback.form.title': 'Warum haben Sie diese Bewertung gewählt?',\n 'feedback.form.textAreaPlaceholder':\n 'Geben Sie optional zusätzliches Feedback an',\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': 'Überwachung',\n 'feedback.tooltips.listen': 'Überwachen',\n 'feedback.quickResponses.positive.helpful': 'Hilfreiche Informationen',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Leicht verständlich',\n 'feedback.quickResponses.positive.resolvedIssue':\n 'Mein Problem wurde gelöst',\n 'feedback.quickResponses.negative.didntAnswer':\n 'Meine Frage wurde 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 'conversation.category.pinnedChats': 'Angeheftet',\n 'conversation.category.recent': 'Neueste',\n 'settings.pinned.enable': 'Angeheftete Chats aktivieren',\n 'settings.pinned.disable': 'Angeheftete Chats deaktivieren',\n 'settings.pinned.enabled.description':\n 'Angeheftete Chats sind derzeit aktiviert',\n 'settings.pinned.disabled.description':\n 'Angeheftete Chats sind derzeit deaktiviert.',\n 'settings.mcp.label': 'MCP-Einstellungen',\n 'mcp.settings.title': 'MCP-Server',\n 'mcp.settings.selectedCount':\n '{{selectedCount}} von {{totalCount}} ausgewählt',\n 'mcp.settings.closeAriaLabel': 'MCP-Einstellungen schließen',\n 'mcp.settings.readOnlyAccess':\n 'Sie haben schreibgeschützten Zugriff auf MCP-Server.',\n 'mcp.settings.tableAriaLabel': 'MCP-Server-Tabelle',\n 'mcp.settings.enabled': 'Aktiviert',\n 'mcp.settings.name': 'Name',\n 'mcp.settings.status': 'Status',\n 'mcp.settings.edit': 'Bearbeiten',\n 'mcp.settings.loading': 'MCP-Server werden geladen...',\n 'mcp.settings.noneAvailable': 'Keine MCP-Server verfügbar.',\n 'mcp.settings.status.disabled': 'Deaktiviert',\n 'mcp.settings.status.tokenRequired': 'Token erforderlich',\n 'mcp.settings.status.failed': 'Fehlgeschlagen',\n 'mcp.settings.status.oneTool': '{{count}} Tool',\n 'mcp.settings.status.manyTools': '{{count}} Tools',\n 'mcp.settings.status.unknown': 'Unbekannt',\n 'mcp.settings.toggleServerAriaLabel': '{{serverName}} umschalten',\n 'mcp.settings.editServerAriaLabel': '{{serverName}} bearbeiten',\n 'mcp.settings.configureServerTitle': 'Server {{serverName}} konfigurieren',\n 'mcp.settings.closeConfigureModalAriaLabel':\n 'Konfigurationsdialog schließen',\n 'mcp.settings.modalDescription':\n 'Anmeldedaten werden verschlüsselt gespeichert und sind auf Ihr Profil beschränkt. Lightspeed arbeitet mit genau Ihren Berechtigungen.',\n 'mcp.settings.savedToken': 'Gespeicherter Token',\n 'mcp.settings.personalAccessToken': 'Persönlicher Zugriffstoken',\n 'mcp.settings.usingAdminCredential':\n 'Administratoranmeldedaten werden verwendet. Geben Sie einen persönlichen Token ein, um ihn für Ihr Konto zu überschreiben.',\n 'mcp.settings.enterToken': 'Geben Sie Ihren Token ein',\n 'mcp.settings.removePersonalToken': 'Persönlichen Token entfernen',\n 'mcp.settings.token.clearAriaLabel': 'Tokeneingabe löschen',\n 'mcp.settings.token.validating': 'Token wird validiert...',\n 'mcp.settings.token.savingAndValidating':\n 'Token wird gespeichert und validiert...',\n 'mcp.settings.token.urlUnavailableForValidation':\n 'Token kann nicht validiert werden, da die Server-URL nicht verfügbar ist.',\n 'mcp.settings.token.invalidCredentials':\n 'Ungültige Anmeldedaten. Überprüfen Sie Server-URL und Token.',\n 'mcp.settings.token.validationFailed':\n 'Validierung fehlgeschlagen. Überprüfen Sie Server-URL und Token.',\n 'mcp.settings.token.connectionSuccessful': 'Verbindung erfolgreich',\n 'toolCall.header': 'Antwort des Tools: {{toolName}}',\n 'toolCall.thinking': 'Hat {{seconds}} Sekunden nachgedacht',\n 'toolCall.executionTime': 'Ausführungszeit: ',\n 'toolCall.parameters': 'Parameter',\n 'toolCall.response': 'Antwort',\n 'toolCall.showMore': 'Mehr anzeigen',\n 'toolCall.showLess': 'Weniger anzeigen',\n 'toolCall.loading': 'Tool wird ausgeführt...',\n 'toolCall.executing': 'Tool wird ausgeführt...',\n 'toolCall.copyResponse': 'Antwort kopieren',\n 'toolCall.summary': 'Hier ist eine Zusammenfassung Ihrer Antwort.',\n 'toolCall.mcpServer': 'MCP-Server',\n 'settings.displayMode.label': 'Anzeigemodus',\n 'settings.displayMode.overlay': 'Overlay',\n 'settings.displayMode.docked': 'An Fenster andocken',\n 'settings.displayMode.fullscreen': 'Vollbild',\n 'sort.label': 'Unterhaltungen sortieren',\n 'sort.newest': 'Datum (neuestes zuerst)',\n 'sort.oldest': 'Datum (ältestes zuerst)',\n 'sort.alphabeticalAsc': 'Name (A-Z)',\n 'sort.alphabeticalDesc': 'Name (Z-A)',\n 'reasoning.thinking': 'Denkvorgang anzeigen',\n },\n});\n\nexport default lightspeedTranslationDe;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAAA,CAA0B;AA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