@red-hat-developer-hub/backstage-plugin-lightspeed 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/alpha.d.ts +0 -6
  3. package/dist/api/LightspeedApiClient.esm.js +20 -6
  4. package/dist/api/LightspeedApiClient.esm.js.map +1 -1
  5. package/dist/components/DeleteModal.esm.js +2 -3
  6. package/dist/components/DeleteModal.esm.js.map +1 -1
  7. package/dist/components/LightSpeedChat.esm.js +1 -11
  8. package/dist/components/LightSpeedChat.esm.js.map +1 -1
  9. package/dist/components/LightspeedChatBox.esm.js +48 -17
  10. package/dist/components/LightspeedChatBox.esm.js.map +1 -1
  11. package/dist/components/LightspeedDrawerProvider.esm.js +39 -26
  12. package/dist/components/LightspeedDrawerProvider.esm.js.map +1 -1
  13. package/dist/components/LightspeedDrawerStateExposer.esm.js +8 -2
  14. package/dist/components/LightspeedDrawerStateExposer.esm.js.map +1 -1
  15. package/dist/components/RenameConversationModal.esm.js +26 -8
  16. package/dist/components/RenameConversationModal.esm.js.map +1 -1
  17. package/dist/components/ToolCallContent.esm.js +25 -54
  18. package/dist/components/ToolCallContent.esm.js.map +1 -1
  19. package/dist/hooks/useDisplayModeSettings.esm.js +57 -0
  20. package/dist/hooks/useDisplayModeSettings.esm.js.map +1 -0
  21. package/dist/translations/de.esm.js +1 -7
  22. package/dist/translations/de.esm.js.map +1 -1
  23. package/dist/translations/es.esm.js +1 -7
  24. package/dist/translations/es.esm.js.map +1 -1
  25. package/dist/translations/fr.esm.js +1 -7
  26. package/dist/translations/fr.esm.js.map +1 -1
  27. package/dist/translations/it.esm.js +1 -7
  28. package/dist/translations/it.esm.js.map +1 -1
  29. package/dist/translations/ja.esm.js +1 -7
  30. package/dist/translations/ja.esm.js.map +1 -1
  31. package/dist/translations/ref.esm.js +1 -7
  32. package/dist/translations/ref.esm.js.map +1 -1
  33. package/dist/utils/lightspeed-chatbox-utils.esm.js +13 -23
  34. package/dist/utils/lightspeed-chatbox-utils.esm.js.map +1 -1
  35. package/dist/utils/reasoningParser.esm.js +18 -31
  36. package/dist/utils/reasoningParser.esm.js.map +1 -1
  37. package/dist/utils/toolCallMapper.esm.js +2 -2
  38. package/dist/utils/toolCallMapper.esm.js.map +1 -1
  39. package/package.json +2 -2
@@ -36,17 +36,11 @@ const lightspeedTranslationJa = createTranslationMessages({
36
36
  "conversation.rename.confirm.title": "\u30C1\u30E3\u30C3\u30C8\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u307E\u3059\u304B?",
37
37
  "conversation.rename.confirm.action": "\u540D\u524D\u306E\u5909\u66F4",
38
38
  "conversation.rename.placeholder": "\u30C1\u30E3\u30C3\u30C8\u540D",
39
- "conversation.action.error": "\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {{error}}",
40
39
  "permission.required.title": "\u6A29\u9650\u306E\u4E0D\u8DB3",
41
40
  "permission.required.description": "lightspeed \u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u7BA1\u7406\u8005\u306B\u9023\u7D61\u3057\u3066 <b>lightspeed.chat.read</b> \u304A\u3088\u3073 <b>lightspeed.chat.create</b> \u6A29\u9650\u3092\u4ED8\u4E0E\u3057\u3066\u3082\u3089\u3046\u3088\u3046\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
42
41
  "disclaimer.withValidation": "\u3053\u306E\u6A5F\u80FD\u306F AI \u30C6\u30AF\u30CE\u30ED\u30B8\u30FC\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u5165\u529B\u5185\u5BB9\u306B\u500B\u4EBA\u60C5\u5831\u3084\u305D\u306E\u4ED6\u306E\u6A5F\u5BC6\u60C5\u5831\u3092\u542B\u3081\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3084\u308A\u53D6\u308A\u306E\u5185\u5BB9\u306F\u3001Red Hat \u306E\u88FD\u54C1\u3084\u30B5\u30FC\u30D3\u30B9\u3092\u6539\u5584\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002",
43
42
  "disclaimer.withoutValidation": "\u3053\u306E\u6A5F\u80FD\u306F AI \u30C6\u30AF\u30CE\u30ED\u30B8\u30FC\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u5165\u529B\u5185\u5BB9\u306B\u500B\u4EBA\u60C5\u5831\u3084\u305D\u306E\u4ED6\u306E\u6A5F\u5BC6\u60C5\u5831\u3092\u542B\u3081\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u3084\u308A\u53D6\u308A\u306E\u5185\u5BB9\u306F\u3001Red Hat \u306E\u88FD\u54C1\u3084\u30B5\u30FC\u30D3\u30B9\u3092\u6539\u5584\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002",
44
43
  "footer.accuracy.label": "AI \u306B\u3088\u3063\u3066\u751F\u6210\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\u3001\u4F7F\u7528\u3059\u308B\u524D\u306B\u5FC5\u305A\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
45
- "footer.accuracy.popover.title": "\u6B63\u78BA\u6027\u306E\u78BA\u8A8D",
46
- "footer.accuracy.popover.description": "Developer Lightspeed \u306F\u6B63\u78BA\u6027\u3092\u671F\u3059\u3088\u3046\u52AA\u3081\u3066\u304A\u308A\u307E\u3059\u304C\u3001\u8AA4\u308A\u304C\u751F\u3058\u308B\u53EF\u80FD\u6027\u306F\u5E38\u306B\u3042\u308A\u307E\u3059\u3002\u7279\u306B\u610F\u601D\u6C7A\u5B9A\u3084\u884C\u52D5\u306B\u95A2\u308F\u308B\u91CD\u8981\u306A\u60C5\u5831\u306B\u3064\u3044\u3066\u306F\u3001\u4FE1\u983C\u3067\u304D\u308B\u60C5\u5831\u6E90\u3067\u305D\u306E\u60C5\u5831\u3092\u78BA\u8A8D\u3059\u308B\u3053\u3068\u3092\u63A8\u5968\u3057\u307E\u3059\u3002",
47
- "footer.accuracy.popover.image.alt": "\u811A\u6CE8\u30DD\u30C3\u30D7\u30AA\u30FC\u30D0\u30FC\u306E\u30B5\u30F3\u30D7\u30EB\u753B\u50CF",
48
- "footer.accuracy.popover.cta.label": "\u4E86\u89E3\u3057\u307E\u3057\u305F",
49
- "footer.accuracy.popover.link.label": "\u8A73\u7D30",
50
44
  "common.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB",
51
45
  "common.close": "\u9589\u3058\u308B",
52
46
  "common.readMore": "\u3055\u3089\u306B\u8868\u793A\u3059\u308B",
@@ -61,7 +55,7 @@ const lightspeedTranslationJa = createTranslationMessages({
61
55
  "chatbox.emptyState.noResults.body": "\u691C\u7D22\u30AF\u30A8\u30EA\u30FC\u3092\u8ABF\u6574\u3057\u3066\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30B9\u30DA\u30EB\u3092\u78BA\u8A8D\u3059\u308B\u304B\u3001\u3088\u308A\u4E00\u822C\u7684\u306A\u7528\u8A9E\u3092\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
62
56
  "chatbox.welcome.greeting": "\u3053\u3093\u306B\u3061\u306F\u3001{{userName}}",
63
57
  "chatbox.welcome.description": "\u4ECA\u65E5\u306F\u4F55\u3092\u304A\u624B\u4F1D\u3044\u3057\u307E\u3057\u3087\u3046\u304B?",
64
- "chatbox.message.placeholder": "\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u4FE1\u3057\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066 JSON\u3001YAML\u3001\u307E\u305F\u306F TXT \u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3059...",
58
+ "chatbox.message.placeholder": "Lightspeed\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
65
59
  "chatbox.fileUpload.failed": "\u30D5\u30A1\u30A4\u30EB\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
66
60
  "chatbox.fileUpload.infoText": "\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30D5\u30A1\u30A4\u30EB\u306E\u7A2E\u985E\u306F\u3001.txt\u3001.yaml\u3001.json \u3067\u3059\u3002\u6700\u5927\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u306F 25 MB \u3067\u3059\u3002",
67
61
  "aria.chatbotSelector": "\u30C1\u30E3\u30C3\u30C8\u30DC\u30C3\u30C8\u30BB\u30EC\u30AF\u30BF\u30FC",
@@ -1 +1 @@
1
- {"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.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 * Japanese translation for plugin.lightspeed.\n * @public\n */\nconst lightspeedTranslationJa = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI 搭載開発アシスタント',\n 'prompts.codeReadability.title': 'コードの可読性に関するヘルプを利用する',\n 'prompts.codeReadability.message':\n 'コードの可読性と保守性を高めるための手法を提案してくれませんか?',\n 'prompts.debugging.title': 'デバッグに関するヘルプを利用する',\n 'prompts.debugging.message':\n 'アプリケーションがデータベースに接続しようとするとエラーが発生します。問題の特定を手伝ってくれませんか?',\n 'prompts.developmentConcept.title': '開発コンセプトを説明する',\n 'prompts.developmentConcept.message':\n 'マイクロサービスアーキテクチャーの仕組みと、モノリシックな設計と比べた利点について説明してくれませんか?',\n 'prompts.codeOptimization.title': 'コードの最適化を提案する',\n 'prompts.codeOptimization.message':\n 'コードを最適化してパフォーマンスを向上させるための一般的な方法を提案してくれませんか?',\n 'prompts.documentation.title': 'ドキュメントの要約',\n 'prompts.documentation.message':\n 'Web アプリケーションでの OAuth 2.0 認証の実装に関するドキュメントを要約してくれませんか?',\n 'prompts.gitWorkflows.title': 'Git を使用したワークフロー',\n 'prompts.gitWorkflows.message':\n '既存の作業内容を失うことなく、別のブランチのコードに変更を加えたいです。Git を使用してこれを行うにはどうすればよいですか?',\n 'prompts.testingStrategies.title': 'テスト方法を提案する',\n 'prompts.testingStrategies.message':\n '堅牢でエラーのないアプリケーションを構築するための一般的なテスト方法をいくつか提案してくれませんか?',\n 'prompts.sortingAlgorithms.title':\n 'ソートのアルゴリズムをわかりやすく説明する',\n 'prompts.sortingAlgorithms.message':\n 'クイックソートとマージソートのアルゴリズムの違いと、それぞれの使用タイミングについて説明してくれませんか?',\n 'prompts.eventDriven.title': 'イベント駆動型アーキテクチャーを理解する',\n 'prompts.eventDriven.message':\n 'イベント駆動型アーキテクチャーとは何か、またそれをソフトウェア開発でどのようなときに使用すると有益かを説明してくれませんか?',\n 'prompts.tekton.title': 'Tekton を使用したデプロイ',\n 'prompts.tekton.message':\n 'Tekton パイプラインを使用してアプリケーションのデプロイを自動化するのを手伝ってくれませんか?',\n 'prompts.openshift.title': 'OpenShift デプロイメントの作成',\n 'prompts.openshift.message':\n 'コンテナー化されたアプリケーション用に OpenShift で新しいデプロイメントを作成する手順を説明してくれませんか?',\n 'prompts.rhdh.title': 'Red Hat Developer Hub を使い始める',\n 'prompts.rhdh.message':\n 'ソフトウェアカタログの探索やサービスの追加など、開発者が Developer Hub を利用する際にまず何をすべきか教えてくれませんか?',\n 'conversation.delete.confirm.title': 'チャットを削除しますか?',\n 'conversation.delete.confirm.message':\n 'このチャットはここに表示されなくなります。Lightspeed Activity からのプロンプト、回答、フィードバックなど、関連アクティビティーも削除されます。',\n 'conversation.delete.confirm.action': '削除',\n 'conversation.rename.confirm.title': 'チャットの名前を変更しますか?',\n 'conversation.rename.confirm.action': '名前の変更',\n 'conversation.rename.placeholder': 'チャット名',\n 'conversation.action.error': 'エラーが発生しました: {{error}}',\n 'permission.required.title': '権限の不足',\n 'permission.required.description':\n 'lightspeed プラグインを表示するには、管理者に連絡して <b>lightspeed.chat.read</b> および <b>lightspeed.chat.create</b> 権限を付与してもらうよう依頼してください。',\n 'disclaimer.withValidation':\n 'この機能は AI テクノロジーを使用します。入力内容に個人情報やその他の機密情報を含めないでください。やり取りの内容は、Red Hat の製品やサービスを改善するために使用される場合があります。',\n 'disclaimer.withoutValidation':\n 'この機能は AI テクノロジーを使用します。入力内容に個人情報やその他の機密情報を含めないでください。やり取りの内容は、Red Hat の製品やサービスを改善するために使用される場合があります。',\n 'footer.accuracy.label':\n 'AI によって生成されたコンテンツは、使用する前に必ず確認してください。',\n 'footer.accuracy.popover.title': '正確性の確認',\n 'footer.accuracy.popover.description':\n 'Developer Lightspeed は正確性を期すよう努めておりますが、誤りが生じる可能性は常にあります。特に意思決定や行動に関わる重要な情報については、信頼できる情報源でその情報を確認することを推奨します。',\n 'footer.accuracy.popover.image.alt': '脚注ポップオーバーのサンプル画像',\n 'footer.accuracy.popover.cta.label': '了解しました',\n 'footer.accuracy.popover.link.label': '詳細',\n 'common.cancel': 'キャンセル',\n 'common.close': '閉じる',\n 'common.readMore': 'さらに表示する',\n 'common.noSearchResults': '検索に一致する結果がありません',\n 'menu.newConversation': '新しいチャット',\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': '検索',\n 'chatbox.provider.other': 'その他',\n 'chatbox.emptyState.noPinnedChats': '固定したチャットがありません',\n 'chatbox.emptyState.noRecentChats': '最近のチャットがありません',\n 'chatbox.emptyState.noResults.title': '結果が見つかりません',\n 'chatbox.emptyState.noResults.body':\n '検索クエリーを調整して再試行してください。スペルを確認するか、より一般的な用語をお試しください。',\n 'chatbox.welcome.greeting': 'こんにちは、{{userName}}',\n 'chatbox.welcome.description': '今日は何をお手伝いしましょうか?',\n 'chatbox.message.placeholder':\n 'メッセージを送信し、必要に応じて JSON、YAML、または TXT ファイルをアップロードします...',\n 'chatbox.fileUpload.failed': 'ファイルのアップロードに失敗しました',\n 'chatbox.fileUpload.infoText':\n 'サポートされているファイルの種類は、.txt、.yaml、.json です。最大ファイルサイズは 25 MB です。',\n 'aria.chatbotSelector': 'チャットボットセレクター',\n 'aria.important': '重要',\n 'aria.chatHistoryMenu': 'チャット履歴メニュー',\n 'aria.closeDrawerPanel': 'ドロワーパネルを閉じる',\n 'aria.search.placeholder': '検索',\n 'aria.searchPreviousConversations': '以前の会話の検索',\n 'aria.resize': 'サイズ変更',\n 'aria.options.label': 'オプション',\n 'aria.scroll.down': '一番下に戻る',\n 'aria.scroll.up': '一番上に戻る',\n 'aria.settings.label': 'チャットボットのオプション',\n 'modal.edit': '編集',\n 'modal.save': '保存',\n 'modal.close': '閉じる',\n 'modal.cancel': 'キャンセル',\n 'conversation.delete': '削除',\n 'conversation.rename': '名前の変更',\n 'conversation.addToPinnedChats': '固定',\n 'conversation.removeFromPinnedChats': '固定解除',\n 'conversation.announcement.userMessage':\n 'ユーザーからのメッセージ: {{prompt}}。ボットからのメッセージを読み込んでいます。',\n 'user.guest': 'ゲスト',\n 'user.loading': '...',\n 'tooltip.attach': '割り当て',\n 'tooltip.send': '送信',\n 'tooltip.microphone.active': '聞き取りを停止',\n 'tooltip.microphone.inactive': 'マイクを使用する',\n 'button.newChat': '新しいチャット',\n 'tooltip.chatHistoryMenu': 'チャット履歴メニュー',\n 'tooltip.responseRecorded': '回答が記録されました',\n 'tooltip.backToTop': '一番上に戻る',\n 'tooltip.backToBottom': '一番下に戻る',\n 'tooltip.settings': 'チャットボットのオプション',\n 'modal.title.preview': '添付ファイルのプレビュー',\n 'modal.title.edit': '添付ファイルの編集',\n 'icon.lightspeed.alt': 'lightspeed アイコン',\n 'icon.permissionRequired.alt': '権限不足アイコン',\n 'message.options.label': 'オプション',\n 'file.upload.error.alreadyExists': 'ファイルがすでに存在します。',\n 'file.upload.error.multipleFiles': '複数のファイルをアップロードしました。',\n 'file.upload.error.unsupportedType':\n 'サポートされていないファイルタイプです。サポートされているタイプは、.txt、.yaml、.json です。',\n 'file.upload.error.fileTooLarge':\n 'ファイルサイズが大きすぎます。ファイルサイズが 25 MB 未満であることを確認してください。',\n 'file.upload.error.readFailed':\n 'ファイルの読み取りに失敗しました: {{errorMessage}}',\n 'error.context.fileAttachment':\n 'useFileAttachmentContext が FileAttachmentContextProvider 内に収まっている必要があります',\n 'feedback.form.title': 'なぜこの評価を選んだのですか?',\n 'feedback.form.textAreaPlaceholder':\n 'その他ご意見をお聞かせください (任意)',\n 'feedback.form.submitWord': '送信',\n 'feedback.tooltips.goodResponse': '回答内容が良い',\n 'feedback.tooltips.badResponse': '回答内容が悪い',\n 'feedback.tooltips.copied': 'コピー済み',\n 'feedback.tooltips.copy': 'コピー',\n 'feedback.tooltips.listening': '聞き取り中',\n 'feedback.tooltips.listen': '聞き取り',\n 'feedback.quickResponses.positive.helpful': '情報が役に立つ',\n 'feedback.quickResponses.positive.easyToUnderstand': 'わかりやすい',\n 'feedback.quickResponses.positive.resolvedIssue': '問題が解決した',\n 'feedback.quickResponses.negative.didntAnswer':\n '質問に対する答えが得られなかった',\n 'feedback.quickResponses.negative.hardToUnderstand': 'わかりにくい',\n 'feedback.quickResponses.negative.notHelpful': '役に立たない',\n 'feedback.completion.title': 'フィードバックを送信しました',\n 'feedback.completion.body':\n 'ご回答を受け取りました。ご意見をお聞かせいただきありがとうございました!',\n 'conversation.category.pinnedChats': '固定',\n 'conversation.category.recent': '最近',\n 'settings.pinned.enable': 'チャットの固定の有効化',\n 'settings.pinned.disable': 'チャットの固定の無効化',\n 'settings.pinned.enabled.description': 'チャットの固定は現在有効です',\n 'settings.pinned.disabled.description': 'チャットの固定は現在無効です',\n // Display modes\n 'settings.displayMode.label': '表示モード',\n 'settings.displayMode.overlay': 'オーバーレイ',\n 'settings.displayMode.docked': 'ウィンドウにドッキング',\n 'settings.displayMode.fullscreen': 'フルスクリーン',\n\n // Tool calling\n 'toolCall.header': 'ツールの応答: {{toolName}}',\n 'toolCall.thinking': '{{seconds}} 秒間考えました',\n 'toolCall.executionTime': '実行時間: ',\n 'toolCall.parameters': 'パラメーター',\n 'toolCall.response': '応答',\n 'toolCall.showMore': 'さらに表示',\n 'toolCall.showLess': '表示を減らす',\n 'toolCall.loading': 'ツールを実行中...',\n 'toolCall.executing': 'ツールを実行中...',\n 'toolCall.copyResponse': '応答をコピー',\n 'toolCall.summary': '応答の概要は次のとおりです',\n 'toolCall.mcpServer': 'MCP サーバー',\n\n // Sort options\n 'sort.label': '会話を並べ替え',\n 'sort.newest': '日付(新しい順)',\n 'sort.oldest': '日付(古い順)',\n 'sort.alphabeticalAsc': '名前(A-Z)',\n 'sort.alphabeticalDesc': '名前(Z-A)',\n\n // Deep thinking\n 'reasoning.thinking': '思考を表示',\n },\n});\n\nexport default lightspeedTranslationJa;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,iEAAA;AAAA,IACjB,+BAAiC,EAAA,oHAAA;AAAA,IACjC,iCACE,EAAA,6LAAA;AAAA,IACF,yBAA2B,EAAA,kGAAA;AAAA,IAC3B,2BACE,EAAA,qTAAA;AAAA,IACF,kCAAoC,EAAA,0EAAA;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qNAAA;AAAA,IACF,mCAAqC,EAAA,cAAA;AAAA,IACrC,8BAAgC,EAAA,cAAA;AAAA,IAChC,wBAA0B,EAAA,oEAAA;AAAA,IAC1B,yBAA2B,EAAA,oEAAA;AAAA,IAC3B,qCAAuC,EAAA,sFAAA;AAAA,IACvC,sCAAwC,EAAA,sFAAA;AAAA;AAAA,IAExC,4BAA8B,EAAA,gCAAA;AAAA,IAC9B,8BAAgC,EAAA,sCAAA;AAAA,IAChC,6BAA+B,EAAA,oEAAA;AAAA,IAC/B,iCAAmC,EAAA,4CAAA;AAAA;AAAA,IAGnC,iBAAmB,EAAA,oDAAA;AAAA,IACnB,mBAAqB,EAAA,wDAAA;AAAA,IACrB,wBAA0B,EAAA,4BAAA;AAAA,IAC1B,qBAAuB,EAAA,sCAAA;AAAA,IACvB,mBAAqB,EAAA,cAAA;AAAA,IACrB,mBAAqB,EAAA,gCAAA;AAAA,IACrB,mBAAqB,EAAA,sCAAA;AAAA,IACrB,kBAAoB,EAAA,+CAAA;AAAA,IACpB,oBAAsB,EAAA,+CAAA;AAAA,IACtB,uBAAyB,EAAA,sCAAA;AAAA,IACzB,kBAAoB,EAAA,gFAAA;AAAA,IACpB,oBAAsB,EAAA,8BAAA;AAAA;AAAA,IAGtB,YAAc,EAAA,4CAAA;AAAA,IACd,aAAe,EAAA,kDAAA;AAAA,IACf,aAAe,EAAA,4CAAA;AAAA,IACf,sBAAwB,EAAA,6BAAA;AAAA,IACxB,uBAAyB,EAAA,6BAAA;AAAA;AAAA,IAGzB,oBAAsB,EAAA;AAAA;AAE1B,CAAC;;;;"}
1
+ {"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.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 * Japanese translation for plugin.lightspeed.\n * @public\n */\nconst lightspeedTranslationJa = createTranslationMessages({\n ref: lightspeedTranslationRef,\n messages: {\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI 搭載開発アシスタント',\n 'prompts.codeReadability.title': 'コードの可読性に関するヘルプを利用する',\n 'prompts.codeReadability.message':\n 'コードの可読性と保守性を高めるための手法を提案してくれませんか?',\n 'prompts.debugging.title': 'デバッグに関するヘルプを利用する',\n 'prompts.debugging.message':\n 'アプリケーションがデータベースに接続しようとするとエラーが発生します。問題の特定を手伝ってくれませんか?',\n 'prompts.developmentConcept.title': '開発コンセプトを説明する',\n 'prompts.developmentConcept.message':\n 'マイクロサービスアーキテクチャーの仕組みと、モノリシックな設計と比べた利点について説明してくれませんか?',\n 'prompts.codeOptimization.title': 'コードの最適化を提案する',\n 'prompts.codeOptimization.message':\n 'コードを最適化してパフォーマンスを向上させるための一般的な方法を提案してくれませんか?',\n 'prompts.documentation.title': 'ドキュメントの要約',\n 'prompts.documentation.message':\n 'Web アプリケーションでの OAuth 2.0 認証の実装に関するドキュメントを要約してくれませんか?',\n 'prompts.gitWorkflows.title': 'Git を使用したワークフロー',\n 'prompts.gitWorkflows.message':\n '既存の作業内容を失うことなく、別のブランチのコードに変更を加えたいです。Git を使用してこれを行うにはどうすればよいですか?',\n 'prompts.testingStrategies.title': 'テスト方法を提案する',\n 'prompts.testingStrategies.message':\n '堅牢でエラーのないアプリケーションを構築するための一般的なテスト方法をいくつか提案してくれませんか?',\n 'prompts.sortingAlgorithms.title':\n 'ソートのアルゴリズムをわかりやすく説明する',\n 'prompts.sortingAlgorithms.message':\n 'クイックソートとマージソートのアルゴリズムの違いと、それぞれの使用タイミングについて説明してくれませんか?',\n 'prompts.eventDriven.title': 'イベント駆動型アーキテクチャーを理解する',\n 'prompts.eventDriven.message':\n 'イベント駆動型アーキテクチャーとは何か、またそれをソフトウェア開発でどのようなときに使用すると有益かを説明してくれませんか?',\n 'prompts.tekton.title': 'Tekton を使用したデプロイ',\n 'prompts.tekton.message':\n 'Tekton パイプラインを使用してアプリケーションのデプロイを自動化するのを手伝ってくれませんか?',\n 'prompts.openshift.title': 'OpenShift デプロイメントの作成',\n 'prompts.openshift.message':\n 'コンテナー化されたアプリケーション用に OpenShift で新しいデプロイメントを作成する手順を説明してくれませんか?',\n 'prompts.rhdh.title': 'Red Hat Developer Hub を使い始める',\n 'prompts.rhdh.message':\n 'ソフトウェアカタログの探索やサービスの追加など、開発者が Developer Hub を利用する際にまず何をすべきか教えてくれませんか?',\n 'conversation.delete.confirm.title': 'チャットを削除しますか?',\n 'conversation.delete.confirm.message':\n 'このチャットはここに表示されなくなります。Lightspeed Activity からのプロンプト、回答、フィードバックなど、関連アクティビティーも削除されます。',\n 'conversation.delete.confirm.action': '削除',\n 'conversation.rename.confirm.title': 'チャットの名前を変更しますか?',\n 'conversation.rename.confirm.action': '名前の変更',\n 'conversation.rename.placeholder': 'チャット名',\n 'permission.required.title': '権限の不足',\n 'permission.required.description':\n 'lightspeed プラグインを表示するには、管理者に連絡して <b>lightspeed.chat.read</b> および <b>lightspeed.chat.create</b> 権限を付与してもらうよう依頼してください。',\n 'disclaimer.withValidation':\n 'この機能は AI テクノロジーを使用します。入力内容に個人情報やその他の機密情報を含めないでください。やり取りの内容は、Red Hat の製品やサービスを改善するために使用される場合があります。',\n 'disclaimer.withoutValidation':\n 'この機能は AI テクノロジーを使用します。入力内容に個人情報やその他の機密情報を含めないでください。やり取りの内容は、Red Hat の製品やサービスを改善するために使用される場合があります。',\n 'footer.accuracy.label':\n 'AI によって生成されたコンテンツは、使用する前に必ず確認してください。',\n 'common.cancel': 'キャンセル',\n 'common.close': '閉じる',\n 'common.readMore': 'さらに表示する',\n 'common.noSearchResults': '検索に一致する結果がありません',\n 'menu.newConversation': '新しいチャット',\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': '検索',\n 'chatbox.provider.other': 'その他',\n 'chatbox.emptyState.noPinnedChats': '固定したチャットがありません',\n 'chatbox.emptyState.noRecentChats': '最近のチャットがありません',\n 'chatbox.emptyState.noResults.title': '結果が見つかりません',\n 'chatbox.emptyState.noResults.body':\n '検索クエリーを調整して再試行してください。スペルを確認するか、より一般的な用語をお試しください。',\n 'chatbox.welcome.greeting': 'こんにちは、{{userName}}',\n 'chatbox.welcome.description': '今日は何をお手伝いしましょうか?',\n 'chatbox.message.placeholder': 'Lightspeedのプロンプトを入力してください',\n 'chatbox.fileUpload.failed': 'ファイルのアップロードに失敗しました',\n 'chatbox.fileUpload.infoText':\n 'サポートされているファイルの種類は、.txt、.yaml、.json です。最大ファイルサイズは 25 MB です。',\n 'aria.chatbotSelector': 'チャットボットセレクター',\n 'aria.important': '重要',\n 'aria.chatHistoryMenu': 'チャット履歴メニュー',\n 'aria.closeDrawerPanel': 'ドロワーパネルを閉じる',\n 'aria.search.placeholder': '検索',\n 'aria.searchPreviousConversations': '以前の会話の検索',\n 'aria.resize': 'サイズ変更',\n 'aria.options.label': 'オプション',\n 'aria.scroll.down': '一番下に戻る',\n 'aria.scroll.up': '一番上に戻る',\n 'aria.settings.label': 'チャットボットのオプション',\n 'modal.edit': '編集',\n 'modal.save': '保存',\n 'modal.close': '閉じる',\n 'modal.cancel': 'キャンセル',\n 'conversation.delete': '削除',\n 'conversation.rename': '名前の変更',\n 'conversation.addToPinnedChats': '固定',\n 'conversation.removeFromPinnedChats': '固定解除',\n 'conversation.announcement.userMessage':\n 'ユーザーからのメッセージ: {{prompt}}。ボットからのメッセージを読み込んでいます。',\n 'user.guest': 'ゲスト',\n 'user.loading': '...',\n 'tooltip.attach': '割り当て',\n 'tooltip.send': '送信',\n 'tooltip.microphone.active': '聞き取りを停止',\n 'tooltip.microphone.inactive': 'マイクを使用する',\n 'button.newChat': '新しいチャット',\n 'tooltip.chatHistoryMenu': 'チャット履歴メニュー',\n 'tooltip.responseRecorded': '回答が記録されました',\n 'tooltip.backToTop': '一番上に戻る',\n 'tooltip.backToBottom': '一番下に戻る',\n 'tooltip.settings': 'チャットボットのオプション',\n 'modal.title.preview': '添付ファイルのプレビュー',\n 'modal.title.edit': '添付ファイルの編集',\n 'icon.lightspeed.alt': 'lightspeed アイコン',\n 'icon.permissionRequired.alt': '権限不足アイコン',\n 'message.options.label': 'オプション',\n 'file.upload.error.alreadyExists': 'ファイルがすでに存在します。',\n 'file.upload.error.multipleFiles': '複数のファイルをアップロードしました。',\n 'file.upload.error.unsupportedType':\n 'サポートされていないファイルタイプです。サポートされているタイプは、.txt、.yaml、.json です。',\n 'file.upload.error.fileTooLarge':\n 'ファイルサイズが大きすぎます。ファイルサイズが 25 MB 未満であることを確認してください。',\n 'file.upload.error.readFailed':\n 'ファイルの読み取りに失敗しました: {{errorMessage}}',\n 'error.context.fileAttachment':\n 'useFileAttachmentContext が FileAttachmentContextProvider 内に収まっている必要があります',\n 'feedback.form.title': 'なぜこの評価を選んだのですか?',\n 'feedback.form.textAreaPlaceholder':\n 'その他ご意見をお聞かせください (任意)',\n 'feedback.form.submitWord': '送信',\n 'feedback.tooltips.goodResponse': '回答内容が良い',\n 'feedback.tooltips.badResponse': '回答内容が悪い',\n 'feedback.tooltips.copied': 'コピー済み',\n 'feedback.tooltips.copy': 'コピー',\n 'feedback.tooltips.listening': '聞き取り中',\n 'feedback.tooltips.listen': '聞き取り',\n 'feedback.quickResponses.positive.helpful': '情報が役に立つ',\n 'feedback.quickResponses.positive.easyToUnderstand': 'わかりやすい',\n 'feedback.quickResponses.positive.resolvedIssue': '問題が解決した',\n 'feedback.quickResponses.negative.didntAnswer':\n '質問に対する答えが得られなかった',\n 'feedback.quickResponses.negative.hardToUnderstand': 'わかりにくい',\n 'feedback.quickResponses.negative.notHelpful': '役に立たない',\n 'feedback.completion.title': 'フィードバックを送信しました',\n 'feedback.completion.body':\n 'ご回答を受け取りました。ご意見をお聞かせいただきありがとうございました!',\n 'conversation.category.pinnedChats': '固定',\n 'conversation.category.recent': '最近',\n 'settings.pinned.enable': 'チャットの固定の有効化',\n 'settings.pinned.disable': 'チャットの固定の無効化',\n 'settings.pinned.enabled.description': 'チャットの固定は現在有効です',\n 'settings.pinned.disabled.description': 'チャットの固定は現在無効です',\n // Display modes\n 'settings.displayMode.label': '表示モード',\n 'settings.displayMode.overlay': 'オーバーレイ',\n 'settings.displayMode.docked': 'ウィンドウにドッキング',\n 'settings.displayMode.fullscreen': 'フルスクリーン',\n\n // Tool calling\n 'toolCall.header': 'ツールの応答: {{toolName}}',\n 'toolCall.thinking': '{{seconds}} 秒間考えました',\n 'toolCall.executionTime': '実行時間: ',\n 'toolCall.parameters': 'パラメーター',\n 'toolCall.response': '応答',\n 'toolCall.showMore': 'さらに表示',\n 'toolCall.showLess': '表示を減らす',\n 'toolCall.loading': 'ツールを実行中...',\n 'toolCall.executing': 'ツールを実行中...',\n 'toolCall.copyResponse': '応答をコピー',\n 'toolCall.summary': '応答の概要は次のとおりです',\n 'toolCall.mcpServer': 'MCP サーバー',\n\n // Sort options\n 'sort.label': '会話を並べ替え',\n 'sort.newest': '日付(新しい順)',\n 'sort.oldest': '日付(古い順)',\n 'sort.alphabeticalAsc': '名前(A-Z)',\n 'sort.alphabeticalDesc': '名前(Z-A)',\n\n // Deep thinking\n 'reasoning.thinking': '思考を表示',\n },\n});\n\nexport default lightspeedTranslationJa;\n"],"names":[],"mappings":";;;AAwBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,YAAc,EAAA,YAAA;AAAA,IACd,eAAiB,EAAA,iEAAA;AAAA,IACjB,+BAAiC,EAAA,oHAAA;AAAA,IACjC,iCACE,EAAA,6LAAA;AAAA,IACF,yBAA2B,EAAA,kG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,EAAA,oEAAA;AAAA,IAC3B,qCAAuC,EAAA,sFAAA;AAAA,IACvC,sCAAwC,EAAA,sFAAA;AAAA;AAAA,IAExC,4BAA8B,EAAA,gCAAA;AAAA,IAC9B,8BAAgC,EAAA,sCAAA;AAAA,IAChC,6BAA+B,EAAA,oEAAA;AAAA,IAC/B,iCAAmC,EAAA,4CAAA;AAAA;AAAA,IAGnC,iBAAmB,EAAA,oDAAA;AAAA,IACnB,mBAAqB,EAAA,wDAAA;AAAA,IACrB,wBAA0B,EAAA,4BAAA;AAAA,IAC1B,qBAAuB,EAAA,sCAAA;AAAA,IACvB,mBAAqB,EAAA,cAAA;AAAA,IACrB,mBAAqB,EAAA,gCAAA;AAAA,IACrB,mBAAqB,EAAA,sCAAA;AAAA,IACrB,kBAAoB,EAAA,+CAAA;AAAA,IACpB,oBAAsB,EAAA,+CAAA;AAAA,IACtB,uBAAyB,EAAA,sCAAA;AAAA,IACzB,kBAAoB,EAAA,gFAAA;AAAA,IACpB,oBAAsB,EAAA,8BAAA;AAAA;AAAA,IAGtB,YAAc,EAAA,4CAAA;AAAA,IACd,aAAe,EAAA,kDAAA;AAAA,IACf,aAAe,EAAA,4CAAA;AAAA,IACf,sBAAwB,EAAA,6BAAA;AAAA,IACxB,uBAAyB,EAAA,6BAAA;AAAA;AAAA,IAGzB,oBAAsB,EAAA;AAAA;AAE1B,CAAC;;;;"}
@@ -37,7 +37,6 @@ const lightspeedMessages = {
37
37
  "conversation.rename.confirm.title": "Rename chat?",
38
38
  "conversation.rename.confirm.action": "Rename",
39
39
  "conversation.rename.placeholder": "Chat name",
40
- "conversation.action.error": "Error occured: {{error}}",
41
40
  // Permissions
42
41
  "permission.required.title": "Missing permissions",
43
42
  "permission.required.description": "To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.",
@@ -46,11 +45,6 @@ const lightspeedMessages = {
46
45
  "disclaimer.withoutValidation": "This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.",
47
46
  // Footer and feedback
48
47
  "footer.accuracy.label": "Always review AI generated content prior to use.",
49
- "footer.accuracy.popover.title": "Verify accuracy",
50
- "footer.accuracy.popover.description": "While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.",
51
- "footer.accuracy.popover.image.alt": "Example image for footnote popover",
52
- "footer.accuracy.popover.cta.label": "Got it",
53
- "footer.accuracy.popover.link.label": "Learn more",
54
48
  // Common actions
55
49
  "common.cancel": "Cancel",
56
50
  "common.close": "Close",
@@ -68,7 +62,7 @@ const lightspeedMessages = {
68
62
  "chatbox.emptyState.noResults.body": "Adjust your search query and try again. Check your spelling or try a more general term.",
69
63
  "chatbox.welcome.greeting": "Hello, {{userName}}",
70
64
  "chatbox.welcome.description": "How can I help you today?",
71
- "chatbox.message.placeholder": "Send a message and optionally upload a JSON, YAML, or TXT file...",
65
+ "chatbox.message.placeholder": "Enter a prompt for Lightspeed",
72
66
  "chatbox.fileUpload.failed": "File upload failed",
73
67
  "chatbox.fileUpload.infoText": "Supported file types are: .txt, .yaml, and .json. The maximum file size is 25 MB.",
74
68
  // Accessibility and ARIA labels
@@ -1 +1 @@
1
- {"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @alpha\n */\nexport const lightspeedMessages = {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI-powered development assistant',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Get Help On Code Readability',\n 'prompts.codeReadability.message':\n 'Can you suggest techniques I can use to make my code more readable and maintainable?',\n 'prompts.debugging.title': 'Get Help With Debugging',\n 'prompts.debugging.message':\n 'My application is throwing an error when trying to connect to the database. Can you help me identify the issue?',\n 'prompts.developmentConcept.title': 'Explain a Development Concept',\n 'prompts.developmentConcept.message':\n 'Can you explain how microservices architecture works and its advantages over a monolithic design?',\n 'prompts.codeOptimization.title': 'Suggest Code Optimizations',\n 'prompts.codeOptimization.message':\n 'Can you suggest common ways to optimize code to achieve better performance?',\n 'prompts.documentation.title': 'Documentation Summary',\n 'prompts.documentation.message':\n 'Can you summarize the documentation for implementing OAuth 2.0 authentication in a web app?',\n 'prompts.gitWorkflows.title': 'Workflows With Git',\n 'prompts.gitWorkflows.message':\n 'I want to make changes to code on another branch without losing my existing work. What is the procedure to do this using Git?',\n 'prompts.testingStrategies.title': 'Suggest Testing Strategies',\n 'prompts.testingStrategies.message':\n 'Can you recommend some common testing strategies that will make my application robust and error-free?',\n 'prompts.sortingAlgorithms.title': 'Demystify Sorting Algorithms',\n 'prompts.sortingAlgorithms.message':\n 'Can you explain the difference between a quicksort and a merge sort algorithm, and when to use each?',\n 'prompts.eventDriven.title': 'Understand Event-Driven Architecture',\n 'prompts.eventDriven.message':\n \"Can you explain what event-driven architecture is and when it's beneficial to use it in software development?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Deploy With Tekton',\n 'prompts.tekton.message':\n 'Can you help me automate the deployment of my application using Tekton pipelines?',\n 'prompts.openshift.title': 'Create An OpenShift Deployment',\n 'prompts.openshift.message':\n 'Can you guide me through creating a new deployment in OpenShift for a containerized application?',\n 'prompts.rhdh.title': 'Getting Started with Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Can you guide me through the first steps to start using Developer Hub as a developer, like exploring the Software Catalog and adding my service?',\n\n // Conversation history\n 'conversation.delete.confirm.title': 'Delete chat?',\n 'conversation.delete.confirm.message':\n \"You'll no longer see this chat here. This will also delete related activity like prompts, responses, and feedback from your Lightspeed Activity.\",\n 'conversation.delete.confirm.action': 'Delete',\n 'conversation.rename.confirm.title': 'Rename chat?',\n 'conversation.rename.confirm.action': 'Rename',\n 'conversation.rename.placeholder': 'Chat name',\n 'conversation.action.error': 'Error occured: {{error}}',\n\n // Permissions\n 'permission.required.title': 'Missing permissions',\n 'permission.required.description':\n 'To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n 'disclaimer.withoutValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n\n // Footer and feedback\n 'footer.accuracy.label': 'Always review AI generated content prior to use.',\n 'footer.accuracy.popover.title': 'Verify accuracy',\n 'footer.accuracy.popover.description':\n \"While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.\",\n 'footer.accuracy.popover.image.alt': 'Example image for footnote popover',\n 'footer.accuracy.popover.cta.label': 'Got it',\n 'footer.accuracy.popover.link.label': 'Learn more',\n\n // Common actions\n 'common.cancel': 'Cancel',\n 'common.close': 'Close',\n 'common.readMore': 'Read more',\n 'common.noSearchResults': 'No result matches the search',\n\n // Menu items\n 'menu.newConversation': 'New Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Search',\n 'chatbox.provider.other': 'Other',\n 'chatbox.emptyState.noPinnedChats': 'No pinned chats',\n 'chatbox.emptyState.noRecentChats': 'No recent chats',\n 'chatbox.emptyState.noResults.title': 'No results found',\n 'chatbox.emptyState.noResults.body':\n 'Adjust your search query and try again. Check your spelling or try a more general term.',\n 'chatbox.welcome.greeting': 'Hello, {{userName}}',\n 'chatbox.welcome.description': 'How can I help you today?',\n 'chatbox.message.placeholder':\n 'Send a message and optionally upload a JSON, YAML, or TXT file...',\n 'chatbox.fileUpload.failed': 'File upload failed',\n 'chatbox.fileUpload.infoText':\n 'Supported file types are: .txt, .yaml, and .json. The maximum file size is 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot selector',\n 'aria.important': 'Important',\n 'aria.chatHistoryMenu': 'Chat history menu',\n 'aria.closeDrawerPanel': 'Close drawer panel',\n 'aria.search.placeholder': 'Search',\n 'aria.searchPreviousConversations': 'Search previous conversations',\n 'aria.resize': 'Resize',\n 'aria.options.label': 'Options',\n 'aria.scroll.down': 'Back to bottom',\n 'aria.scroll.up': 'Back to top',\n 'aria.settings.label': 'Chatbot options',\n 'aria.close': 'Close chatbot',\n\n // Modal actions\n 'modal.edit': 'Edit',\n 'modal.save': 'Save',\n 'modal.close': 'Close',\n 'modal.cancel': 'Cancel',\n\n // Conversation actions\n 'conversation.delete': 'Delete',\n 'conversation.rename': 'Rename',\n 'conversation.addToPinnedChats': 'Pin',\n 'conversation.removeFromPinnedChats': 'Unpin',\n 'conversation.announcement.userMessage':\n 'Message from User: {{prompt}}. Message from Bot is loading.',\n\n // User states\n 'user.guest': 'Guest',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Attach',\n 'tooltip.send': 'Send',\n 'tooltip.microphone.active': 'Stop listening',\n 'tooltip.microphone.inactive': 'Use microphone',\n 'button.newChat': 'New chat',\n 'tooltip.chatHistoryMenu': 'Chat history menu',\n 'tooltip.responseRecorded': 'Response recorded',\n 'tooltip.backToTop': 'Back to top',\n 'tooltip.backToBottom': 'Back to bottom',\n 'tooltip.settings': 'Chatbot options',\n 'tooltip.close': 'Close',\n\n // Modal titles\n 'modal.title.preview': 'Preview attachment',\n 'modal.title.edit': 'Edit attachment',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'lightspeed icon',\n 'icon.permissionRequired.alt': 'permission required icon',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'File already exists.',\n 'file.upload.error.multipleFiles': 'Uploaded more than one file.',\n 'file.upload.error.unsupportedType':\n 'Unsupported file type. Supported types are: .txt, .yaml, and .json.',\n 'file.upload.error.fileTooLarge':\n 'Your file size is too large. Please ensure that your file is less than 25 MB.',\n 'file.upload.error.readFailed': 'Failed to read file: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext must be within a FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Why did you choose this rating?',\n 'feedback.form.textAreaPlaceholder': 'Provide optional additional feedback',\n 'feedback.form.submitWord': 'Submit',\n 'feedback.tooltips.goodResponse': 'Good Response',\n 'feedback.tooltips.badResponse': 'Bad Response',\n 'feedback.tooltips.copied': 'Copied',\n 'feedback.tooltips.copy': 'Copy',\n 'feedback.tooltips.listening': 'Listening',\n 'feedback.tooltips.listen': 'Listen',\n 'feedback.quickResponses.positive.helpful': 'Helpful information',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Easy to understand',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolved my issue',\n 'feedback.quickResponses.negative.didntAnswer': \"Didn't answer my question\",\n 'feedback.quickResponses.negative.hardToUnderstand': 'Hard to understand',\n 'feedback.quickResponses.negative.notHelpful': 'Not Helpful',\n 'feedback.completion.title': 'Feedback submitted',\n 'feedback.completion.body':\n \"We've received your response. Thank you for sharing your feedback!\",\n\n // Conversation categorization\n 'conversation.category.pinnedChats': 'Pinned',\n 'conversation.category.recent': 'Recent',\n\n // lightspeed settings\n 'settings.pinned.enable': 'Enable pinned chats',\n 'settings.pinned.disable': 'Disable pinned chats',\n 'settings.pinned.enabled.description': 'Pinned chats are currently enabled',\n 'settings.pinned.disabled.description': 'Pinned chats are currently disabled',\n\n // Tool calling\n 'toolCall.header': 'Tool response: {{toolName}}',\n 'toolCall.thinking': 'Thought for {{seconds}} seconds',\n 'toolCall.executionTime': 'Execution time: ',\n 'toolCall.parameters': 'Parameters',\n 'toolCall.response': 'Response',\n 'toolCall.showMore': 'show more',\n 'toolCall.showLess': 'show less',\n 'toolCall.loading': 'Executing tool...',\n 'toolCall.executing': 'Executing tool...',\n 'toolCall.copyResponse': 'Copy response',\n 'toolCall.summary': \"Here's a summary of your response\",\n 'toolCall.mcpServer': 'MCP Server',\n // Display modes\n 'settings.displayMode.label': 'Display mode',\n 'settings.displayMode.overlay': 'Overlay',\n 'settings.displayMode.docked': 'Dock to window',\n 'settings.displayMode.fullscreen': 'Fullscreen',\n\n // Sort options\n 'sort.label': 'Sort conversations',\n 'sort.newest': 'Date (newest first)',\n 'sort.oldest': 'Date (oldest first)',\n 'sort.alphabeticalAsc': 'Name (A-Z)',\n 'sort.alphabeticalDesc': 'Name (Z-A)',\n // Deep thinking\n 'reasoning.thinking': 'Show thinking',\n};\n\n/**\n * Translation Reference for Developer Lightspeed\n * @alpha\n **/\nexport const lightspeedTranslationRef = createTranslationRef({\n id: 'plugin.lightspeed',\n messages: lightspeedMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA;AAAA,EAEhC,YAAc,EAAA,YAAA;AAAA,EACd,eAAiB,EAAA,kCAAA;AAAA;AAAA,EAGjB,+BAAiC,EAAA,8BAAA;AAAA,EACjC,iCACE,EAAA,sFAAA;AAAA,EACF,yBAA2B,EAAA,yBAAA;AAAA,EAC3B,2BACE,EAAA,iHAAA;AAAA,EACF,kCAAoC,EAAA,+BAAA;AAAA,EACpC,oCACE,EAAA,mGAAA;AAAA,EACF,gCAAkC,EAAA,4BAAA;AAAA,EAClC,kCACE,EAAA,6EAAA;AAAA,EACF,6BAA+B,EAAA,uBAAA;AAAA,EAC/B,+BACE,EAAA,6FAAA;AAAA,EACF,4BAA8B,EAAA,oBAAA;AA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GF,mCAAqC,EAAA,QAAA;AAAA,EACrC,8BAAgC,EAAA,QAAA;AAAA;AAAA,EAGhC,wBAA0B,EAAA,qBAAA;AAAA,EAC1B,yBAA2B,EAAA,sBAAA;AAAA,EAC3B,qCAAuC,EAAA,oCAAA;AAAA,EACvC,sCAAwC,EAAA,qCAAA;AAAA;AAAA,EAGxC,iBAAmB,EAAA,6BAAA;AAAA,EACnB,mBAAqB,EAAA,iCAAA;AAAA,EACrB,wBAA0B,EAAA,kBAAA;AAAA,EAC1B,qBAAuB,EAAA,YAAA;AAAA,EACvB,mBAAqB,EAAA,UAAA;AAAA,EACrB,mBAAqB,EAAA,WAAA;AAAA,EACrB,mBAAqB,EAAA,WAAA;AAAA,EACrB,kBAAoB,EAAA,mBAAA;AAAA,EACpB,oBAAsB,EAAA,mBAAA;AAAA,EACtB,uBAAyB,EAAA,eAAA;AAAA,EACzB,kBAAoB,EAAA,mCAAA;AAAA,EACpB,oBAAsB,EAAA,YAAA;AAAA;AAAA,EAEtB,4BAA8B,EAAA,cAAA;AAAA,EAC9B,8BAAgC,EAAA,SAAA;AAAA,EAChC,6BAA+B,EAAA,gBAAA;AAAA,EAC/B,iCAAmC,EAAA,YAAA;AAAA;AAAA,EAGnC,YAAc,EAAA,oBAAA;AAAA,EACd,aAAe,EAAA,qBAAA;AAAA,EACf,aAAe,EAAA,qBAAA;AAAA,EACf,sBAAwB,EAAA,YAAA;AAAA,EACxB,uBAAyB,EAAA,YAAA;AAAA;AAAA,EAEzB,oBAAsB,EAAA;AACxB;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @alpha\n */\nexport const lightspeedMessages = {\n // Page titles and headers\n 'page.title': 'Lightspeed',\n 'page.subtitle': 'AI-powered development assistant',\n\n // Sample prompts - General Development\n 'prompts.codeReadability.title': 'Get Help On Code Readability',\n 'prompts.codeReadability.message':\n 'Can you suggest techniques I can use to make my code more readable and maintainable?',\n 'prompts.debugging.title': 'Get Help With Debugging',\n 'prompts.debugging.message':\n 'My application is throwing an error when trying to connect to the database. Can you help me identify the issue?',\n 'prompts.developmentConcept.title': 'Explain a Development Concept',\n 'prompts.developmentConcept.message':\n 'Can you explain how microservices architecture works and its advantages over a monolithic design?',\n 'prompts.codeOptimization.title': 'Suggest Code Optimizations',\n 'prompts.codeOptimization.message':\n 'Can you suggest common ways to optimize code to achieve better performance?',\n 'prompts.documentation.title': 'Documentation Summary',\n 'prompts.documentation.message':\n 'Can you summarize the documentation for implementing OAuth 2.0 authentication in a web app?',\n 'prompts.gitWorkflows.title': 'Workflows With Git',\n 'prompts.gitWorkflows.message':\n 'I want to make changes to code on another branch without losing my existing work. What is the procedure to do this using Git?',\n 'prompts.testingStrategies.title': 'Suggest Testing Strategies',\n 'prompts.testingStrategies.message':\n 'Can you recommend some common testing strategies that will make my application robust and error-free?',\n 'prompts.sortingAlgorithms.title': 'Demystify Sorting Algorithms',\n 'prompts.sortingAlgorithms.message':\n 'Can you explain the difference between a quicksort and a merge sort algorithm, and when to use each?',\n 'prompts.eventDriven.title': 'Understand Event-Driven Architecture',\n 'prompts.eventDriven.message':\n \"Can you explain what event-driven architecture is and when it's beneficial to use it in software development?\",\n\n // Sample prompts - RHDH Specific\n 'prompts.tekton.title': 'Deploy With Tekton',\n 'prompts.tekton.message':\n 'Can you help me automate the deployment of my application using Tekton pipelines?',\n 'prompts.openshift.title': 'Create An OpenShift Deployment',\n 'prompts.openshift.message':\n 'Can you guide me through creating a new deployment in OpenShift for a containerized application?',\n 'prompts.rhdh.title': 'Getting Started with Red Hat Developer Hub',\n 'prompts.rhdh.message':\n 'Can you guide me through the first steps to start using Developer Hub as a developer, like exploring the Software Catalog and adding my service?',\n\n // Conversation history\n 'conversation.delete.confirm.title': 'Delete chat?',\n 'conversation.delete.confirm.message':\n \"You'll no longer see this chat here. This will also delete related activity like prompts, responses, and feedback from your Lightspeed Activity.\",\n 'conversation.delete.confirm.action': 'Delete',\n 'conversation.rename.confirm.title': 'Rename chat?',\n 'conversation.rename.confirm.action': 'Rename',\n 'conversation.rename.placeholder': 'Chat name',\n\n // Permissions\n 'permission.required.title': 'Missing permissions',\n 'permission.required.description':\n 'To view lightspeed plugin, contact your administrator to give the <b>lightspeed.chat.read</b> and <b>lightspeed.chat.create</b> permissions.',\n\n // Disclaimers\n 'disclaimer.withValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n 'disclaimer.withoutValidation':\n \"This feature uses AI technology. Do not include any personal information or any other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.\",\n\n // Footer and feedback\n 'footer.accuracy.label': 'Always review AI generated content prior to use.',\n\n // Common actions\n 'common.cancel': 'Cancel',\n 'common.close': 'Close',\n 'common.readMore': 'Read more',\n 'common.noSearchResults': 'No result matches the search',\n\n // Menu items\n 'menu.newConversation': 'New Chat',\n\n // Chat-specific UI elements\n 'chatbox.header.title': 'Developer Lightspeed',\n 'chatbox.search.placeholder': 'Search',\n 'chatbox.provider.other': 'Other',\n 'chatbox.emptyState.noPinnedChats': 'No pinned chats',\n 'chatbox.emptyState.noRecentChats': 'No recent chats',\n 'chatbox.emptyState.noResults.title': 'No results found',\n 'chatbox.emptyState.noResults.body':\n 'Adjust your search query and try again. Check your spelling or try a more general term.',\n 'chatbox.welcome.greeting': 'Hello, {{userName}}',\n 'chatbox.welcome.description': 'How can I help you today?',\n 'chatbox.message.placeholder': 'Enter a prompt for Lightspeed',\n 'chatbox.fileUpload.failed': 'File upload failed',\n 'chatbox.fileUpload.infoText':\n 'Supported file types are: .txt, .yaml, and .json. The maximum file size is 25 MB.',\n\n // Accessibility and ARIA labels\n 'aria.chatbotSelector': 'Chatbot selector',\n 'aria.important': 'Important',\n 'aria.chatHistoryMenu': 'Chat history menu',\n 'aria.closeDrawerPanel': 'Close drawer panel',\n 'aria.search.placeholder': 'Search',\n 'aria.searchPreviousConversations': 'Search previous conversations',\n 'aria.resize': 'Resize',\n 'aria.options.label': 'Options',\n 'aria.scroll.down': 'Back to bottom',\n 'aria.scroll.up': 'Back to top',\n 'aria.settings.label': 'Chatbot options',\n 'aria.close': 'Close chatbot',\n\n // Modal actions\n 'modal.edit': 'Edit',\n 'modal.save': 'Save',\n 'modal.close': 'Close',\n 'modal.cancel': 'Cancel',\n\n // Conversation actions\n 'conversation.delete': 'Delete',\n 'conversation.rename': 'Rename',\n 'conversation.addToPinnedChats': 'Pin',\n 'conversation.removeFromPinnedChats': 'Unpin',\n 'conversation.announcement.userMessage':\n 'Message from User: {{prompt}}. Message from Bot is loading.',\n\n // User states\n 'user.guest': 'Guest',\n 'user.loading': '...',\n\n // Button tooltips and labels\n 'tooltip.attach': 'Attach',\n 'tooltip.send': 'Send',\n 'tooltip.microphone.active': 'Stop listening',\n 'tooltip.microphone.inactive': 'Use microphone',\n 'button.newChat': 'New chat',\n 'tooltip.chatHistoryMenu': 'Chat history menu',\n 'tooltip.responseRecorded': 'Response recorded',\n 'tooltip.backToTop': 'Back to top',\n 'tooltip.backToBottom': 'Back to bottom',\n 'tooltip.settings': 'Chatbot options',\n 'tooltip.close': 'Close',\n\n // Modal titles\n 'modal.title.preview': 'Preview attachment',\n 'modal.title.edit': 'Edit attachment',\n\n // Alt texts for icons\n 'icon.lightspeed.alt': 'lightspeed icon',\n 'icon.permissionRequired.alt': 'permission required icon',\n\n // Message utilities\n 'message.options.label': 'Options',\n\n // File attachment errors\n 'file.upload.error.alreadyExists': 'File already exists.',\n 'file.upload.error.multipleFiles': 'Uploaded more than one file.',\n 'file.upload.error.unsupportedType':\n 'Unsupported file type. Supported types are: .txt, .yaml, and .json.',\n 'file.upload.error.fileTooLarge':\n 'Your file size is too large. Please ensure that your file is less than 25 MB.',\n 'file.upload.error.readFailed': 'Failed to read file: {{errorMessage}}',\n\n // Developer error messages\n 'error.context.fileAttachment':\n 'useFileAttachmentContext must be within a FileAttachmentContextProvider',\n\n // Feedback actions\n 'feedback.form.title': 'Why did you choose this rating?',\n 'feedback.form.textAreaPlaceholder': 'Provide optional additional feedback',\n 'feedback.form.submitWord': 'Submit',\n 'feedback.tooltips.goodResponse': 'Good Response',\n 'feedback.tooltips.badResponse': 'Bad Response',\n 'feedback.tooltips.copied': 'Copied',\n 'feedback.tooltips.copy': 'Copy',\n 'feedback.tooltips.listening': 'Listening',\n 'feedback.tooltips.listen': 'Listen',\n 'feedback.quickResponses.positive.helpful': 'Helpful information',\n 'feedback.quickResponses.positive.easyToUnderstand': 'Easy to understand',\n 'feedback.quickResponses.positive.resolvedIssue': 'Resolved my issue',\n 'feedback.quickResponses.negative.didntAnswer': \"Didn't answer my question\",\n 'feedback.quickResponses.negative.hardToUnderstand': 'Hard to understand',\n 'feedback.quickResponses.negative.notHelpful': 'Not Helpful',\n 'feedback.completion.title': 'Feedback submitted',\n 'feedback.completion.body':\n \"We've received your response. Thank you for sharing your feedback!\",\n\n // Conversation categorization\n 'conversation.category.pinnedChats': 'Pinned',\n 'conversation.category.recent': 'Recent',\n\n // lightspeed settings\n 'settings.pinned.enable': 'Enable pinned chats',\n 'settings.pinned.disable': 'Disable pinned chats',\n 'settings.pinned.enabled.description': 'Pinned chats are currently enabled',\n 'settings.pinned.disabled.description': 'Pinned chats are currently disabled',\n\n // Tool calling\n 'toolCall.header': 'Tool response: {{toolName}}',\n 'toolCall.thinking': 'Thought for {{seconds}} seconds',\n 'toolCall.executionTime': 'Execution time: ',\n 'toolCall.parameters': 'Parameters',\n 'toolCall.response': 'Response',\n 'toolCall.showMore': 'show more',\n 'toolCall.showLess': 'show less',\n 'toolCall.loading': 'Executing tool...',\n 'toolCall.executing': 'Executing tool...',\n 'toolCall.copyResponse': 'Copy response',\n 'toolCall.summary': \"Here's a summary of your response\",\n 'toolCall.mcpServer': 'MCP Server',\n // Display modes\n 'settings.displayMode.label': 'Display mode',\n 'settings.displayMode.overlay': 'Overlay',\n 'settings.displayMode.docked': 'Dock to window',\n 'settings.displayMode.fullscreen': 'Fullscreen',\n\n // Sort options\n 'sort.label': 'Sort conversations',\n 'sort.newest': 'Date (newest first)',\n 'sort.oldest': 'Date (oldest first)',\n 'sort.alphabeticalAsc': 'Name (A-Z)',\n 'sort.alphabeticalDesc': 'Name (Z-A)',\n // Deep thinking\n 'reasoning.thinking': 'Show thinking',\n};\n\n/**\n * Translation Reference for Developer Lightspeed\n * @alpha\n **/\nexport const lightspeedTranslationRef = createTranslationRef({\n id: 'plugin.lightspeed',\n messages: lightspeedMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA;AAAA,EAEhC,YAAc,EAAA,YAAA;AAAA,EACd,eAAiB,EAAA,kCAAA;AAAA;AAAA,EAGjB,+BAAiC,EAAA,8BAAA;AAAA,EACjC,iCACE,EAAA,sFAAA;AAAA,EACF,yBAA2B,EAAA,yBAAA;AAAA,EAC3B,2BACE,EAAA,iHAAA;AAAA,EACF,kCAAoC,EAAA,+BAAA;AAAA,EACpC,oCACE,EAAA,mGAAA;AAAA,EACF,gCAAkC,EAAA,4BAAA;AAAA,EAClC,kCACE,EAAA,6EAAA;AAAA,EACF,6BAA+B,EAAA,uBAAA;AAAA,EAC/B,+BACE,EAAA,6FAAA;AAAA,EACF,4BAA8B,EAAA,oBAAA;AAAA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qCAAA;AAAA;AAAA,EAGxC,iBAAmB,EAAA,6BAAA;AAAA,EACnB,mBAAqB,EAAA,iCAAA;AAAA,EACrB,wBAA0B,EAAA,kBAAA;AAAA,EAC1B,qBAAuB,EAAA,YAAA;AAAA,EACvB,mBAAqB,EAAA,UAAA;AAAA,EACrB,mBAAqB,EAAA,WAAA;AAAA,EACrB,mBAAqB,EAAA,WAAA;AAAA,EACrB,kBAAoB,EAAA,mBAAA;AAAA,EACpB,oBAAsB,EAAA,mBAAA;AAAA,EACtB,uBAAyB,EAAA,eAAA;AAAA,EACzB,kBAAoB,EAAA,mCAAA;AAAA,EACpB,oBAAsB,EAAA,YAAA;AAAA;AAAA,EAEtB,4BAA8B,EAAA,cAAA;AAAA,EAC9B,8BAAgC,EAAA,SAAA;AAAA,EAChC,6BAA+B,EAAA,gBAAA;AAAA,EAC/B,iCAAmC,EAAA,YAAA;AAAA;AAAA,EAGnC,YAAc,EAAA,oBAAA;AAAA,EACd,aAAe,EAAA,qBAAA;AAAA,EACf,aAAe,EAAA,qBAAA;AAAA,EACf,sBAAwB,EAAA,YAAA;AAAA,EACxB,uBAAyB,EAAA,YAAA;AAAA;AAAA,EAEzB,oBAAsB,EAAA;AACxB;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
@@ -1,28 +1,8 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import PushPinIcon from '@mui/icons-material/PushPin';
3
3
 
4
- const getFootnoteProps = (additionalClassName, t) => ({
5
- label: t?.("footer.accuracy.label") || "Always review AI generated content prior to use.",
6
- popover: {
7
- popoverProps: {
8
- className: additionalClassName ?? ""
9
- },
10
- title: t?.("footer.accuracy.popover.title") || "Verify accuracy",
11
- description: t?.("footer.accuracy.popover.description") || `While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.`,
12
- bannerImage: {
13
- src: "https://cdn.dribbble.com/userupload/10651749/file/original-8a07b8e39d9e8bf002358c66fce1223e.gif",
14
- alt: t?.("footer.accuracy.popover.image.alt") || "Example image for footnote popover"
15
- },
16
- cta: {
17
- label: t?.("footer.accuracy.popover.cta.label") || "Got it",
18
- onClick: () => {
19
- }
20
- },
21
- link: {
22
- label: t?.("footer.accuracy.popover.link.label") || "Learn more",
23
- url: "https://www.redhat.com/"
24
- }
25
- }
4
+ const getFootnoteProps = (t) => ({
5
+ label: t?.("footer.accuracy.label") || "Always review AI generated content prior to use."
26
6
  });
27
7
  const getTimestampVariablesString = (v) => {
28
8
  if (v < 10) {
@@ -147,7 +127,17 @@ const getCategorizeMessages = (messages, pinnedChats, addProps, t, sortOption =
147
127
  if (pinnedChats.includes(c.conversation_id)) {
148
128
  categorizedMessages[pinnedChatsKey].push({
149
129
  ...message,
150
- icon: /* @__PURE__ */ jsx(PushPinIcon, {})
130
+ icon: /* @__PURE__ */ jsx(
131
+ PushPinIcon,
132
+ {
133
+ sx: {
134
+ width: "1rem",
135
+ height: "1rem",
136
+ display: "flex",
137
+ alignItems: "center"
138
+ }
139
+ }
140
+ )
151
141
  });
152
142
  } else {
153
143
  categorizedMessages[recentKey].push(message);
@@ -1 +1 @@
1
- {"version":3,"file":"lightspeed-chatbox-utils.esm.js","sources":["../../src/utils/lightspeed-chatbox-utils.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 */\nimport PushPinIcon from '@mui/icons-material/PushPin';\nimport { Conversation, SourcesCardProps } from '@patternfly/chatbot';\nimport { PopoverProps } from '@patternfly/react-core';\n\nimport {\n BaseMessage,\n ConversationList,\n ConversationSummary,\n LCSConversation,\n ReferencedDocument,\n ReferencedDocuments,\n ToolCall,\n} from '../types';\n\nexport const getFootnoteProps = (\n additionalClassName: string,\n t?: (key: string, params?: any) => string,\n) => ({\n label:\n t?.('footer.accuracy.label') ||\n 'Always review AI generated content prior to use.',\n popover: {\n popoverProps: {\n className: additionalClassName ?? '',\n } as PopoverProps,\n title: t?.('footer.accuracy.popover.title') || 'Verify accuracy',\n description:\n t?.('footer.accuracy.popover.description') ||\n `While Developer Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.`,\n bannerImage: {\n src: 'https://cdn.dribbble.com/userupload/10651749/file/original-8a07b8e39d9e8bf002358c66fce1223e.gif',\n alt:\n t?.('footer.accuracy.popover.image.alt') ||\n 'Example image for footnote popover',\n },\n cta: {\n label: t?.('footer.accuracy.popover.cta.label') || 'Got it',\n onClick: () => {},\n },\n link: {\n label: t?.('footer.accuracy.popover.link.label') || 'Learn more',\n url: 'https://www.redhat.com/',\n },\n },\n});\n\nexport const getTimestampVariablesString = (v: number) => {\n if (v < 10) {\n return `0${v}`;\n }\n return `${v}`;\n};\n\nexport const getTimestamp = (unix_timestamp: number) => {\n if (typeof unix_timestamp !== 'number' || Number.isNaN(unix_timestamp)) {\n // eslint-disable-next-line no-console\n console.error('Invalid Unix timestamp provided');\n return '';\n }\n\n const a = new Date(unix_timestamp);\n const month = getTimestampVariablesString(a.getMonth() + 1);\n const year = a.getFullYear();\n const date = getTimestampVariablesString(a.getDate());\n const hour = getTimestampVariablesString(a.getHours());\n const min = getTimestampVariablesString(a.getMinutes());\n const sec = getTimestampVariablesString(a.getSeconds());\n const time = `${date}/${month}/${year}, ${hour}:${min}:${sec}`;\n return time;\n};\n\nexport const splitJsonStrings = (jsonString: string): string[] => {\n const chunks = jsonString.split('}{');\n\n if (chunks.length <= 1) {\n return [jsonString];\n }\n\n return chunks.map((chunk, index, arr) => {\n if (index === 0) {\n return `${chunk}}`;\n } else if (index === arr.length - 1) {\n return `{${chunk}`;\n }\n return `{${chunk}}`;\n });\n};\n\ntype MessageProps = {\n content: string;\n timestamp: string;\n name?: string;\n avatar?: string | any;\n isLoading?: boolean;\n error?: {\n title: string;\n };\n sources?: SourcesCardProps;\n toolCalls?: ToolCall[];\n};\n\nexport const createMessage = ({\n role,\n name,\n avatar,\n isLoading = false,\n content,\n timestamp,\n error,\n sources,\n toolCalls,\n defaultUserName = 'Guest',\n}: MessageProps & { role: 'user' | 'bot'; defaultUserName?: string }) => ({\n role,\n name: name || defaultUserName,\n avatar,\n isLoading,\n content,\n timestamp,\n error,\n sources,\n toolCalls,\n});\n\nexport const createUserMessage = (\n props: MessageProps & { defaultUserName?: string },\n) =>\n createMessage({\n ...props,\n role: 'user',\n defaultUserName: props.defaultUserName,\n });\n\nexport const createBotMessage = (props: MessageProps) =>\n createMessage({\n ...props,\n role: 'bot',\n });\n\nexport const getConversationsData = (\n conversation: LCSConversation,\n): [BaseMessage, BaseMessage] => {\n const [userMessage, botMessage] = conversation.messages || [];\n return [\n {\n ...userMessage,\n timestamp: getTimestamp(\n conversation.started_at\n ? new Date(conversation.started_at).getTime()\n : Date.now(),\n ),\n },\n {\n ...botMessage,\n timestamp: getTimestamp(\n conversation.completed_at\n ? new Date(conversation.completed_at).getTime()\n : Date.now(),\n ),\n referenced_documents: botMessage?.referenced_documents ?? [],\n },\n ];\n};\n\nexport const transformDocumentsToSources = (\n referenced_documents: ReferencedDocuments,\n): SourcesCardProps | undefined => {\n if (!referenced_documents || referenced_documents?.length === 0) {\n return undefined;\n }\n return {\n sources: referenced_documents.map((doc: ReferencedDocument) => ({\n body: doc.doc_description,\n title: doc.doc_title,\n link: doc?.doc_url,\n isExternal: true,\n })),\n };\n};\n\nexport type SortOption =\n | 'newest'\n | 'oldest'\n | 'alphabeticalAsc'\n | 'alphabeticalDesc';\n\nconst sortConversations = (\n messages: ConversationList,\n sortOption: SortOption,\n): ConversationList => {\n return [...messages].sort((a, b) => {\n switch (sortOption) {\n case 'oldest':\n return a.last_message_timestamp - b.last_message_timestamp;\n case 'alphabeticalAsc':\n return a.topic_summary.localeCompare(b.topic_summary, undefined, {\n sensitivity: 'base',\n });\n case 'alphabeticalDesc':\n return b.topic_summary.localeCompare(a.topic_summary, undefined, {\n sensitivity: 'base',\n });\n case 'newest':\n default:\n return b.last_message_timestamp - a.last_message_timestamp;\n }\n });\n};\n\nexport const getCategorizeMessages = (\n messages: ConversationList,\n pinnedChats: string[],\n addProps: (c: ConversationSummary) => { [k: string]: any },\n t?: (key: string, params?: any) => string,\n sortOption: SortOption = 'newest',\n): { [k: string]: Conversation[] } => {\n const pinnedChatsKey = t?.('conversation.category.pinnedChats') || 'Pinned';\n const recentKey = t?.('conversation.category.recent') || 'Recent';\n const categorizedMessages: { [k: string]: Conversation[] } = {\n [pinnedChatsKey]: [],\n [recentKey]: [],\n };\n const sortedMessages = sortConversations(messages, sortOption);\n sortedMessages.forEach(c => {\n const message: Conversation = {\n id: c.conversation_id,\n text: c.topic_summary,\n label: t?.('message.options.label') || 'Options',\n additionalProps: {\n 'aria-label': t?.('aria.options.label') || 'Options',\n },\n ...addProps(c),\n };\n\n if (pinnedChats.includes(c.conversation_id)) {\n categorizedMessages[pinnedChatsKey].push({\n ...message,\n icon: <PushPinIcon />,\n });\n } else {\n categorizedMessages[recentKey].push(message);\n }\n });\n\n const filteredCategories = Object.keys(categorizedMessages).reduce(\n (result, category) => {\n result[category] = categorizedMessages[category];\n return result;\n },\n {} as any,\n );\n\n return filteredCategories;\n};\n"],"names":[],"mappings":";;;AA6Ba,MAAA,gBAAA,GAAmB,CAC9B,mBAAA,EACA,CACI,MAAA;AAAA,EACJ,KAAA,EACE,CAAI,GAAA,uBAAuB,CAC3B,IAAA,kDAAA;AAAA,EACF,OAAS,EAAA;AAAA,IACP,YAAc,EAAA;AAAA,MACZ,WAAW,mBAAuB,IAA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ACpB,CAAA;AAAA,KACI,MAAA;AACL,MAAoB,mBAAA,CAAA,SAAS,CAAE,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA;AAC7C,GACD,CAAA;AAED,EAAA,MAAM,kBAAqB,GAAA,MAAA,CAAO,IAAK,CAAA,mBAAmB,CAAE,CAAA,MAAA;AAAA,IAC1D,CAAC,QAAQ,QAAa,KAAA;AACpB,MAAO,MAAA,CAAA,QAAQ,CAAI,GAAA,mBAAA,CAAoB,QAAQ,CAAA;AAC/C,MAAO,OAAA,MAAA;AAAA,KACT;AAAA,IACA;AAAC,GACH;AAEA,EAAO,OAAA,kBAAA;AACT;;;;"}
1
+ {"version":3,"file":"lightspeed-chatbox-utils.esm.js","sources":["../../src/utils/lightspeed-chatbox-utils.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 */\nimport PushPinIcon from '@mui/icons-material/PushPin';\nimport { Conversation, SourcesCardProps } from '@patternfly/chatbot';\n\nimport {\n BaseMessage,\n ConversationList,\n ConversationSummary,\n LCSConversation,\n ReferencedDocument,\n ReferencedDocuments,\n ToolCall,\n} from '../types';\n\nexport const getFootnoteProps = (\n t?: (key: string, params?: any) => string,\n) => ({\n label:\n t?.('footer.accuracy.label') ||\n 'Always review AI generated content prior to use.',\n});\n\nexport const getTimestampVariablesString = (v: number) => {\n if (v < 10) {\n return `0${v}`;\n }\n return `${v}`;\n};\n\nexport const getTimestamp = (unix_timestamp: number) => {\n if (typeof unix_timestamp !== 'number' || Number.isNaN(unix_timestamp)) {\n // eslint-disable-next-line no-console\n console.error('Invalid Unix timestamp provided');\n return '';\n }\n\n const a = new Date(unix_timestamp);\n const month = getTimestampVariablesString(a.getMonth() + 1);\n const year = a.getFullYear();\n const date = getTimestampVariablesString(a.getDate());\n const hour = getTimestampVariablesString(a.getHours());\n const min = getTimestampVariablesString(a.getMinutes());\n const sec = getTimestampVariablesString(a.getSeconds());\n const time = `${date}/${month}/${year}, ${hour}:${min}:${sec}`;\n return time;\n};\n\nexport const splitJsonStrings = (jsonString: string): string[] => {\n const chunks = jsonString.split('}{');\n\n if (chunks.length <= 1) {\n return [jsonString];\n }\n\n return chunks.map((chunk, index, arr) => {\n if (index === 0) {\n return `${chunk}}`;\n } else if (index === arr.length - 1) {\n return `{${chunk}`;\n }\n return `{${chunk}}`;\n });\n};\n\ntype MessageProps = {\n content: string;\n timestamp: string;\n name?: string;\n avatar?: string | any;\n isLoading?: boolean;\n error?: {\n title: string;\n };\n sources?: SourcesCardProps;\n toolCalls?: ToolCall[];\n};\n\nexport const createMessage = ({\n role,\n name,\n avatar,\n isLoading = false,\n content,\n timestamp,\n error,\n sources,\n toolCalls,\n defaultUserName = 'Guest',\n}: MessageProps & { role: 'user' | 'bot'; defaultUserName?: string }) => ({\n role,\n name: name || defaultUserName,\n avatar,\n isLoading,\n content,\n timestamp,\n error,\n sources,\n toolCalls,\n});\n\nexport const createUserMessage = (\n props: MessageProps & { defaultUserName?: string },\n) =>\n createMessage({\n ...props,\n role: 'user',\n defaultUserName: props.defaultUserName,\n });\n\nexport const createBotMessage = (props: MessageProps) =>\n createMessage({\n ...props,\n role: 'bot',\n });\n\nexport const getConversationsData = (\n conversation: LCSConversation,\n): [BaseMessage, BaseMessage] => {\n const [userMessage, botMessage] = conversation.messages || [];\n return [\n {\n ...userMessage,\n timestamp: getTimestamp(\n conversation.started_at\n ? new Date(conversation.started_at).getTime()\n : Date.now(),\n ),\n },\n {\n ...botMessage,\n timestamp: getTimestamp(\n conversation.completed_at\n ? new Date(conversation.completed_at).getTime()\n : Date.now(),\n ),\n referenced_documents: botMessage?.referenced_documents ?? [],\n },\n ];\n};\n\nexport const transformDocumentsToSources = (\n referenced_documents: ReferencedDocuments,\n): SourcesCardProps | undefined => {\n if (!referenced_documents || referenced_documents?.length === 0) {\n return undefined;\n }\n return {\n sources: referenced_documents.map((doc: ReferencedDocument) => ({\n body: doc.doc_description,\n title: doc.doc_title,\n link: doc?.doc_url,\n isExternal: true,\n })),\n };\n};\n\nexport type SortOption =\n | 'newest'\n | 'oldest'\n | 'alphabeticalAsc'\n | 'alphabeticalDesc';\n\nconst sortConversations = (\n messages: ConversationList,\n sortOption: SortOption,\n): ConversationList => {\n return [...messages].sort((a, b) => {\n switch (sortOption) {\n case 'oldest':\n return a.last_message_timestamp - b.last_message_timestamp;\n case 'alphabeticalAsc':\n return a.topic_summary.localeCompare(b.topic_summary, undefined, {\n sensitivity: 'base',\n });\n case 'alphabeticalDesc':\n return b.topic_summary.localeCompare(a.topic_summary, undefined, {\n sensitivity: 'base',\n });\n case 'newest':\n default:\n return b.last_message_timestamp - a.last_message_timestamp;\n }\n });\n};\n\nexport const getCategorizeMessages = (\n messages: ConversationList,\n pinnedChats: string[],\n addProps: (c: ConversationSummary) => { [k: string]: any },\n t?: (key: string, params?: any) => string,\n sortOption: SortOption = 'newest',\n): { [k: string]: Conversation[] } => {\n const pinnedChatsKey = t?.('conversation.category.pinnedChats') || 'Pinned';\n const recentKey = t?.('conversation.category.recent') || 'Recent';\n const categorizedMessages: { [k: string]: Conversation[] } = {\n [pinnedChatsKey]: [],\n [recentKey]: [],\n };\n const sortedMessages = sortConversations(messages, sortOption);\n sortedMessages.forEach(c => {\n const message: Conversation = {\n id: c.conversation_id,\n text: c.topic_summary,\n label: t?.('message.options.label') || 'Options',\n additionalProps: {\n 'aria-label': t?.('aria.options.label') || 'Options',\n },\n ...addProps(c),\n };\n\n if (pinnedChats.includes(c.conversation_id)) {\n categorizedMessages[pinnedChatsKey].push({\n ...message,\n icon: (\n <PushPinIcon\n sx={{\n width: '1rem',\n height: '1rem',\n display: 'flex',\n alignItems: 'center',\n }}\n />\n ),\n });\n } else {\n categorizedMessages[recentKey].push(message);\n }\n });\n\n const filteredCategories = Object.keys(categorizedMessages).reduce(\n (result, category) => {\n result[category] = categorizedMessages[category];\n return result;\n },\n {} as any,\n );\n\n return filteredCategories;\n};\n"],"names":[],"mappings":";;;AA4Ba,MAAA,gBAAA,GAAmB,CAC9B,CACI,MAAA;AAAA,EACJ,KAAA,EACE,CAAI,GAAA,uBAAuB,CAC3B,IAAA;AACJ,CAAA;AAEa,MAAA,2BAAA,GAA8B,CAAC,CAAc,KAAA;AACxD,EAAA,IAAI,IAAI,EAAI,EAAA;AACV,IAAA,OAAO,IAAI,CAAC,CAAA,CAAA;AAAA;AAEd,EAAA,OAAO,GAAG,CAAC,CAAA,CAAA;AACb;AAEa,MAAA,YAAA,GAAe,CAAC,cAA2B,KAAA;AACtD,EAAA,IAAI,OAAO,cAAmB,KAAA,QAAA,IAAY,MAAO,CAAA,KAAA,CAAM,cAAc,CAAG,EAAA;AAEtE,IAAA,OAAA,CAAQ,MAAM,iCAAiC,CAAA;AAC/C,IAAO,OAAA,EAAA;AAAA;AAGT,EAAM,MAAA,CAAA,GAAI,IAAI,IAAA,CAAK,cAAc,CAAA;AACjC,EAAA,MAAM,KAAQ,GAAA,2BAAA,CAA4B,CAAE,CAAA,QAAA,KAAa,CAAC,CAAA;AAC1D,EAAM,MAAA,IAAA,GAAO,EAAE,WAAY,EAAA;AAC3B,EAAA,MAAM,IAAO,GAAA,2BAAA,CAA4B,CAAE,CAAA,OAAA,EAAS,CAAA;AACpD,EAAA,MAAM,IAAO,GAAA,2BAAA,CAA4B,CAAE,CAAA,QAAA,EAAU,CAAA;AACrD,EAAA,MAAM,GAAM,GAAA,2BAAA,CAA4B,CAAE,CAAA,UAAA,EAAY,CAAA;AACtD,EAAA,MAAM,GAAM,GAAA,2BAAA,CAA4B,CAAE,CAAA,UAAA,EAAY,CAAA;AACtD,EAAA,MAAM,IAAO,GAAA,CA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A,CAAA,SAAS,CAAE,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA;AAC7C,GACD,CAAA;AAED,EAAA,MAAM,kBAAqB,GAAA,MAAA,CAAO,IAAK,CAAA,mBAAmB,CAAE,CAAA,MAAA;AAAA,IAC1D,CAAC,QAAQ,QAAa,KAAA;AACpB,MAAO,MAAA,CAAA,QAAQ,CAAI,GAAA,mBAAA,CAAoB,QAAQ,CAAA;AAC/C,MAAO,OAAA,MAAA;AAAA,KACT;AAAA,IACA;AAAC,GACH;AAEA,EAAO,OAAA,kBAAA;AACT;;;;"}
@@ -1,9 +1,3 @@
1
- const isReasoningInProgress = (content) => {
2
- if (!content) return false;
3
- const hasOpeningTag = content.includes("<think>");
4
- const hasClosingTag = content.includes("</think>");
5
- return hasOpeningTag && !hasClosingTag;
6
- };
7
1
  const parseReasoning = (content) => {
8
2
  if (!content) {
9
3
  return {
@@ -13,34 +7,27 @@ const parseReasoning = (content) => {
13
7
  isReasoningInProgress: false
14
8
  };
15
9
  }
16
- const reasoningInProgress = isReasoningInProgress(content);
17
- const reasoningPattern = /<think>(.*?)<\/think>/s;
18
- const match = content.match(reasoningPattern);
19
- if (match) {
20
- const reasoning = (match[1] || "").trim();
21
- const mainContent = content.replace(reasoningPattern, "").trim();
22
- return {
23
- reasoning,
24
- mainContent,
25
- hasReasoning: true,
26
- isReasoningInProgress: false
27
- };
28
- }
29
- if (reasoningInProgress) {
30
- return {
31
- reasoning: null,
32
- mainContent: "",
33
- hasReasoning: false,
34
- isReasoningInProgress: true
35
- };
10
+ const lastOpenIndex = content.lastIndexOf("<think>");
11
+ const lastCloseIndex = content.lastIndexOf("</think>");
12
+ const isReasoningInProgress = lastOpenIndex !== -1 && lastOpenIndex > lastCloseIndex;
13
+ const reasoningPattern = /<think>(.*?)<\/think>/gs;
14
+ const matches = Array.from(content.matchAll(reasoningPattern));
15
+ const extractedReasoning = matches.map((m) => (m[1] || "").trim()).filter((reasoning) => reasoning.length > 0);
16
+ if (isReasoningInProgress && lastOpenIndex !== -1) {
17
+ const partial = content.substring(lastOpenIndex + "<think>".length).trim();
18
+ if (partial.length > 0) {
19
+ extractedReasoning.push(partial);
20
+ }
36
21
  }
22
+ const mainContent = content.replaceAll(reasoningPattern, "").trim();
23
+ const hasValidReasoning = extractedReasoning.length > 0;
37
24
  return {
38
- reasoning: null,
39
- mainContent: content,
40
- hasReasoning: false,
41
- isReasoningInProgress: false
25
+ reasoning: hasValidReasoning ? extractedReasoning.join("\n\n") : null,
26
+ mainContent: isReasoningInProgress ? "" : mainContent,
27
+ hasReasoning: hasValidReasoning,
28
+ isReasoningInProgress
42
29
  };
43
30
  };
44
31
 
45
- export { isReasoningInProgress, parseReasoning };
32
+ export { parseReasoning };
46
33
  //# sourceMappingURL=reasoningParser.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reasoningParser.esm.js","sources":["../../src/utils/reasoningParser.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\n/**\n * Parses a message content to extract redacted reasoning and main content.\n * Messages from models with deep thinking support may contain:\n * <think>Some reasoning...</think>Main response\n *\n * @param content - The message content that may contain reasoning tags\n * @returns An object with the extracted reasoning and cleaned main content\n */\nexport interface ParsedReasoning {\n reasoning: string | null;\n mainContent: string;\n hasReasoning: boolean;\n isReasoningInProgress: boolean;\n}\n\nexport const isReasoningInProgress = (content: string): boolean => {\n if (!content) return false;\n\n const hasOpeningTag = content.includes('<think>');\n const hasClosingTag = content.includes('</think>');\n\n return hasOpeningTag && !hasClosingTag;\n};\n\nexport const parseReasoning = (content: string): ParsedReasoning => {\n if (!content) {\n return {\n reasoning: null,\n mainContent: content,\n hasReasoning: false,\n isReasoningInProgress: false,\n };\n }\n\n const reasoningInProgress = isReasoningInProgress(content);\n\n const reasoningPattern = /<think>(.*?)<\\/think>/s;\n const match = content.match(reasoningPattern);\n\n if (match) {\n const reasoning = (match[1] || '').trim();\n const mainContent = content.replace(reasoningPattern, '').trim();\n\n return {\n reasoning,\n mainContent,\n hasReasoning: true,\n isReasoningInProgress: false,\n };\n }\n\n if (reasoningInProgress) {\n return {\n reasoning: null,\n mainContent: '',\n hasReasoning: false,\n isReasoningInProgress: true,\n };\n }\n\n return {\n reasoning: null,\n mainContent: content,\n hasReasoning: false,\n isReasoningInProgress: false,\n };\n};\n"],"names":[],"mappings":"AA+Ba,MAAA,qBAAA,GAAwB,CAAC,OAA6B,KAAA;AACjE,EAAI,IAAA,CAAC,SAAgB,OAAA,KAAA;AAErB,EAAM,MAAA,aAAA,GAAgB,OAAQ,CAAA,QAAA,CAAS,SAAS,CAAA;AAChD,EAAM,MAAA,aAAA,GAAgB,OAAQ,CAAA,QAAA,CAAS,UAAU,CAAA;AAEjD,EAAA,OAAO,iBAAiB,CAAC,aAAA;AAC3B;AAEa,MAAA,cAAA,GAAiB,CAAC,OAAqC,KAAA;AAClE,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAO,OAAA;AAAA,MACL,SAAW,EAAA,IAAA;AAAA,MACX,WAAa,EAAA,OAAA;AAAA,MACb,YAAc,EAAA,KAAA;AAAA,MACd,qBAAuB,EAAA;AAAA,KACzB;AAAA;AAGF,EAAM,MAAA,mBAAA,GAAsB,sBAAsB,OAAO,CAAA;AAEzD,EAAA,MAAM,gBAAmB,GAAA,wBAAA;AACzB,EAAM,MAAA,KAAA,GAAQ,OAAQ,CAAA,KAAA,CAAM,gBAAgB,CAAA;AAE5C,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,MAAM,SAAa,GAAA,CAAA,KAAA,CAAM,CAAC,CAAA,IAAK,IAAI,IAAK,EAAA;AACxC,IAAA,MAAM,cAAc,OAAQ,CAAA,OAAA,CAAQ,gBAAkB,EAAA,EAAE,EAAE,IAAK,EAAA;AAE/D,IAAO,OAAA;AAAA,MACL,SAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAc,EAAA,IAAA;AAAA,MACd,qBAAuB,EAAA;AAAA,KACzB;AAAA;AAGF,EAAA,IAAI,mBAAqB,EAAA;AACvB,IAAO,OAAA;AAAA,MACL,SAAW,EAAA,IAAA;AAAA,MACX,WAAa,EAAA,EAAA;AAAA,MACb,YAAc,EAAA,KAAA;AAAA,MACd,qBAAuB,EAAA;AAAA,KACzB;AAAA;AAGF,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,IAAA;AAAA,IACX,WAAa,EAAA,OAAA;AAAA,IACb,YAAc,EAAA,KAAA;AAAA,IACd,qBAAuB,EAAA;AAAA,GACzB;AACF;;;;"}
1
+ {"version":3,"file":"reasoningParser.esm.js","sources":["../../src/utils/reasoningParser.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\n/**\n * Parses a message content to extract redacted reasoning and main content.\n * Messages from models with deep thinking support may contain:\n * <think>Some reasoning...</think>Main response\n *\n * @param content - The message content that may contain reasoning tags\n * @returns An object with the extracted reasoning and cleaned main content\n */\nexport interface ParsedReasoning {\n reasoning: string | null;\n mainContent: string;\n hasReasoning: boolean;\n isReasoningInProgress: boolean;\n}\n\nexport const parseReasoning = (content: string): ParsedReasoning => {\n if (!content) {\n return {\n reasoning: null,\n mainContent: content,\n hasReasoning: false,\n isReasoningInProgress: false,\n };\n }\n\n const lastOpenIndex = content.lastIndexOf('<think>');\n const lastCloseIndex = content.lastIndexOf('</think>');\n\n const isReasoningInProgress =\n lastOpenIndex !== -1 && lastOpenIndex > lastCloseIndex;\n\n const reasoningPattern = /<think>(.*?)<\\/think>/gs;\n const matches = Array.from(content.matchAll(reasoningPattern));\n\n const extractedReasoning = matches\n .map(m => (m[1] || '').trim())\n .filter(reasoning => reasoning.length > 0);\n\n if (isReasoningInProgress && lastOpenIndex !== -1) {\n const partial = content.substring(lastOpenIndex + '<think>'.length).trim();\n if (partial.length > 0) {\n extractedReasoning.push(partial);\n }\n }\n\n const mainContent = content.replaceAll(reasoningPattern, '').trim();\n\n const hasValidReasoning = extractedReasoning.length > 0;\n\n return {\n reasoning: hasValidReasoning ? extractedReasoning.join('\\n\\n') : null,\n mainContent: isReasoningInProgress ? '' : mainContent,\n hasReasoning: hasValidReasoning,\n isReasoningInProgress: isReasoningInProgress,\n };\n};\n"],"names":[],"mappings":"AA+Ba,MAAA,cAAA,GAAiB,CAAC,OAAqC,KAAA;AAClE,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAO,OAAA;AAAA,MACL,SAAW,EAAA,IAAA;AAAA,MACX,WAAa,EAAA,OAAA;AAAA,MACb,YAAc,EAAA,KAAA;AAAA,MACd,qBAAuB,EAAA;AAAA,KACzB;AAAA;AAGF,EAAM,MAAA,aAAA,GAAgB,OAAQ,CAAA,WAAA,CAAY,SAAS,CAAA;AACnD,EAAM,MAAA,cAAA,GAAiB,OAAQ,CAAA,WAAA,CAAY,UAAU,CAAA;AAErD,EAAM,MAAA,qBAAA,GACJ,aAAkB,KAAA,EAAA,IAAM,aAAgB,GAAA,cAAA;AAE1C,EAAA,MAAM,gBAAmB,GAAA,yBAAA;AACzB,EAAA,MAAM,UAAU,KAAM,CAAA,IAAA,CAAK,OAAQ,CAAA,QAAA,CAAS,gBAAgB,CAAC,CAAA;AAE7D,EAAA,MAAM,kBAAqB,GAAA,OAAA,CACxB,GAAI,CAAA,CAAA,CAAA,KAAA,CAAM,EAAE,CAAC,CAAA,IAAK,EAAI,EAAA,IAAA,EAAM,CAC5B,CAAA,MAAA,CAAO,CAAa,SAAA,KAAA,SAAA,CAAU,SAAS,CAAC,CAAA;AAE3C,EAAI,IAAA,qBAAA,IAAyB,kBAAkB,EAAI,EAAA;AACjD,IAAA,MAAM,UAAU,OAAQ,CAAA,SAAA,CAAU,gBAAgB,SAAU,CAAA,MAAM,EAAE,IAAK,EAAA;AACzE,IAAI,IAAA,OAAA,CAAQ,SAAS,CAAG,EAAA;AACtB,MAAA,kBAAA,CAAmB,KAAK,OAAO,CAAA;AAAA;AACjC;AAGF,EAAA,MAAM,cAAc,OAAQ,CAAA,UAAA,CAAW,gBAAkB,EAAA,EAAE,EAAE,IAAK,EAAA;AAElE,EAAM,MAAA,iBAAA,GAAoB,mBAAmB,MAAS,GAAA,CAAA;AAEtD,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,iBAAA,GAAoB,kBAAmB,CAAA,IAAA,CAAK,MAAM,CAAI,GAAA,IAAA;AAAA,IACjE,WAAA,EAAa,wBAAwB,EAAK,GAAA,WAAA;AAAA,IAC1C,YAAc,EAAA,iBAAA;AAAA,IACd;AAAA,GACF;AACF;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { ToolCallContent } from '../components/ToolCallContent.esm.js';
3
3
 
4
- const mapToPatternFlyToolCall = (toolCall, t) => {
4
+ const mapToPatternFlyToolCall = (toolCall, t, role) => {
5
5
  return {
6
6
  titleText: t("toolCall.header", { toolName: toolCall.toolName }),
7
7
  isLoading: toolCall.isLoading,
8
8
  loadingText: t("toolCall.executing"),
9
- expandableContent: !toolCall.isLoading ? /* @__PURE__ */ jsx(ToolCallContent, { toolCall }) : undefined,
9
+ expandableContent: !toolCall.isLoading ? /* @__PURE__ */ jsx(ToolCallContent, { toolCall, role }) : undefined,
10
10
  actions: []
11
11
  };
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toolCallMapper.esm.js","sources":["../../src/utils/toolCallMapper.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 { ToolCallProps } from '@patternfly/chatbot';\n\nimport { ToolCallContent } from '../components/ToolCallContent';\nimport { ToolCall } from '../types';\n\n/**\n * Maps our internal ToolCall type to PatternFly's ToolCallProps\n */\nexport const mapToPatternFlyToolCall = (\n toolCall: ToolCall,\n t: (key: any, options?: any) => string,\n): ToolCallProps => {\n return {\n titleText: t('toolCall.header' as any, { toolName: toolCall.toolName }),\n isLoading: toolCall.isLoading,\n loadingText: t('toolCall.executing'),\n expandableContent: !toolCall.isLoading ? (\n <ToolCallContent toolCall={toolCall} />\n ) : undefined,\n actions: [],\n };\n};\n\nexport default mapToPatternFlyToolCall;\n"],"names":[],"mappings":";;;AAwBa,MAAA,uBAAA,GAA0B,CACrC,QAAA,EACA,CACkB,KAAA;AAClB,EAAO,OAAA;AAAA,IACL,WAAW,CAAE,CAAA,iBAAA,EAA0B,EAAE,QAAU,EAAA,QAAA,CAAS,UAAU,CAAA;AAAA,IACtE,WAAW,QAAS,CAAA,SAAA;AAAA,IACpB,WAAA,EAAa,EAAE,oBAAoB,CAAA;AAAA,IACnC,mBAAmB,CAAC,QAAA,CAAS,4BAC1B,GAAA,CAAA,eAAA,EAAA,EAAgB,UAAoB,CACnC,GAAA,SAAA;AAAA,IACJ,SAAS;AAAC,GACZ;AACF;;;;"}
1
+ {"version":3,"file":"toolCallMapper.esm.js","sources":["../../src/utils/toolCallMapper.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 { ToolCallProps } from '@patternfly/chatbot';\n\nimport { ToolCallContent } from '../components/ToolCallContent';\nimport { ToolCall } from '../types';\n\n/**\n * Maps our internal ToolCall type to PatternFly's ToolCallProps\n */\nexport const mapToPatternFlyToolCall = (\n toolCall: ToolCall,\n t: (key: any, options?: any) => string,\n role?: 'user' | 'bot',\n): ToolCallProps => {\n return {\n titleText: t('toolCall.header' as any, { toolName: toolCall.toolName }),\n isLoading: toolCall.isLoading,\n loadingText: t('toolCall.executing'),\n expandableContent: !toolCall.isLoading ? (\n <ToolCallContent toolCall={toolCall} role={role} />\n ) : undefined,\n actions: [],\n };\n};\n\nexport default mapToPatternFlyToolCall;\n"],"names":[],"mappings":";;;AAwBO,MAAM,uBAA0B,GAAA,CACrC,QACA,EAAA,CAAA,EACA,IACkB,KAAA;AAClB,EAAO,OAAA;AAAA,IACL,WAAW,CAAE,CAAA,iBAAA,EAA0B,EAAE,QAAU,EAAA,QAAA,CAAS,UAAU,CAAA;AAAA,IACtE,WAAW,QAAS,CAAA,SAAA;AAAA,IACpB,WAAA,EAAa,EAAE,oBAAoB,CAAA;AAAA,IACnC,iBAAA,EAAmB,CAAC,QAAS,CAAA,SAAA,uBAC1B,eAAgB,EAAA,EAAA,QAAA,EAAoB,MAAY,CAC/C,GAAA,SAAA;AAAA,IACJ,SAAS;AAAC,GACZ;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-lightspeed",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "main": "./dist/index.esm.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -70,7 +70,7 @@
70
70
  "@patternfly/chatbot": "6.5.0",
71
71
  "@patternfly/react-core": "6.4.0",
72
72
  "@patternfly/react-icons": "^6.3.1",
73
- "@red-hat-developer-hub/backstage-plugin-lightspeed-common": "^1.2.2",
73
+ "@red-hat-developer-hub/backstage-plugin-lightspeed-common": "^1.2.3",
74
74
  "@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0",
75
75
  "@tanstack/react-query": "^5.59.15",
76
76
  "monaco-editor": "^0.55.0",