Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions web-src/src/components/PromptSessionSideView.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,17 @@ export function PromptSessionSideView({
const { formatMessage } = useIntl();
const { user } = useShellContext();

function getTemplateDate() {
try {
const date = new Date(currentSession.name.split(' ').slice(-3).join(' '));
return Intl.DateTimeFormat(user.locale, { dateStyle: 'short', timeStyle: 'short' }).format(date);
} catch (error) {
return formatMessage(intlMessages.promptSessionSideView.empty);
}
}

const TEMPLATE_TITLE = currentSession.name.split(' ').slice(0, -3).join(' ');
const TEMPLATE_DATE = getTemplateDate();

return (
<Grid
Expand All @@ -92,16 +102,11 @@ export function PromptSessionSideView({
? <Flex UNSAFE_className={styles.promptFlexItems} UNSAFE_style={{ borderBottom: '1px solid rgb(224, 224, 224)' }} direction={'column'} justifyContent={'stretch'} alignItems={'stretch'} gridArea={'info'}>
<Flex UNSAFE_style={{ borderRadius: '8px', background: '#E0F2FF', padding: '10px' }} gap={'size-100'} alignItems={'center'}>
<GenAIIcon />
<Text UNSAFE_className={styles.promptName}>{`${TEMPLATE_TITLE} ${new Date(currentSession.name).toLocaleString(user.locale, {
month: 'numeric',
day: 'numeric',
year: 'numeric',
hour: 'numeric',
minute: 'numeric',
hour12: true,
})}` ?? 'Empty'}</Text>
<div dir="auto">
<Text UNSAFE_className={styles.promptName}>{`${TEMPLATE_TITLE} ${TEMPLATE_DATE}`}</Text>
</div>
</Flex>
<Text UNSAFE_style={{ padding: '10px' }}>{currentSession.description ?? 'Empty'}</Text>
<Text UNSAFE_style={{ padding: '10px' }}>{currentSession.description ?? formatMessage(intlMessages.promptSessionSideView.empty)}</Text>
</Flex>
: <div></div>
}
Expand Down
5 changes: 5 additions & 0 deletions web-src/src/components/PromptSessionSideView.l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,10 @@ export const intlMessages = {
id: 'promptSessionSideView.variationsGenerationLongWaitTimeToast',
description: 'This toast message notifies customers that their request is still in progress after more than 2 minutes of waiting.',
},
empty: {
defaultMessage: 'Empty',
id: 'promptSessionSideView.empty',
description: 'Displayed when there is nothing to display.',
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Abbrechen",
"promptSessionSideView.deleteActionLabel": "Löschen",
"promptSessionSideView.editPromptButtonLabel": "Prompt bearbeiten",
"promptSessionSideView.empty": "Leer",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>Der Zugriff auf diese Funktion unterliegt Ihrer Zustimmung zu den {legalTermsLink} und Folgendem:</p><ul><li>Alle Prompts sowie Kontext- oder Zusatzinformationen oder andere Eingaben, die Sie für diese Funktion bereitstellen, (a) müssen mit einem bestimmten Kontext verknüpft sein, zu dem Ihre Branding-Materialien, Website-Inhalte, Daten, Schemata für solche Daten, Vorlagen oder andere vertrauenswürdige Dokumente gehören können, und (b) dürfen keine personenbezogenen Informationen enthalten (personenbezogene Informationen umfassen alles, was mit einer bestimmten Person in Verbindung gebracht werden kann).</li><li>Sie sollten jede Ausgabe aus dieser Funktion auf ihre Genauigkeit überprüfen und sicherstellen, dass sie für Ihren Anwendungsfall geeignet ist.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Nutzungsbedingungen",
"promptSessionSideView.generateButtonLabel": "Generieren",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Cancel",
"promptSessionSideView.deleteActionLabel": "Delete",
"promptSessionSideView.editPromptButtonLabel": "Edit Prompt",
"promptSessionSideView.empty": "Empty",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>Access to this feature is subject to your agreement to the {legalTermsLink}, and the following:</p><ul><li>Any prompts, context, or supplemental information, or other input you provide to this feature (a) must be tied to specific context, which can include your branding materials, website content, data, schemas for such data, templates, or other trusted documents, and (b) must not contain any personal information (personal information includes anything that can be linked back to a specific individual).</li><li>You should review any output from this feature for accuracy and ensure that it is appropriate for youruse case.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Terms of use",
"promptSessionSideView.generateButtonLabel": "Generate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Cancelar",
"promptSessionSideView.deleteActionLabel": "Eliminar",
"promptSessionSideView.editPromptButtonLabel": "Editar indicación",
"promptSessionSideView.empty": "Vacío",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>El acceso a esta función está sujeto a su aceptación de las {legalTermsLink} y a lo siguiente:</p><ul><li>Cualquier indicación, contexto, información complementaria o entrada de otro tipo que proporcione a esta función (a) debe estar vinculada a un contexto específico, que puede incluir materiales de promoción de la marca, contenido del sitio web, datos, esquemas para dichos datos, plantillas u otros documentos de confianza, y (b) no debe contener información personal (se entiende por información personal cualquier dato que pueda asociarse a un individuo concreto).</li><li>Debe revisar cualquier resultado de esta función para verificar su precisión y asegurarse de que sea apropiado para su caso de uso.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Condiciones de uso",
"promptSessionSideView.generateButtonLabel": "Generar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Annuler",
"promptSessionSideView.deleteActionLabel": "Supprimer",
"promptSessionSideView.editPromptButtonLabel": "Modifier le prompt",
"promptSessionSideView.empty": "Vide",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>L’accès à cette fonctionnalité est soumis à votre acceptation des {legalTermsLink} et des éléments suivants :</p><ul><li>Les prompts, les informations contextuelles ou supplémentaires, ou les autres contributions que vous fournissez à cette fonctionnalité (a) doivent être liés à un contexte spécifique, qui peut inclure le matériel de branding, le contenu de votre site web, les données, les schémas pour ces données, les modèles ou autres documents approuvés, et (b) ne doivent contenir aucune information personnelle (les informations personnelles incluent tout ce qui peut être associé à une personne spécifique).</li><li>Vous devez vérifier l’exactitude des sorties de cette fonctionnalité et vous assurer qu’elles sont adaptées à votre cas d’utilisation.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Conditions d’utilisation",
"promptSessionSideView.generateButtonLabel": "Générer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Annulla",
"promptSessionSideView.deleteActionLabel": "Elimina",
"promptSessionSideView.editPromptButtonLabel": "Modifica prompt",
"promptSessionSideView.empty": "Vuoto",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>L’accesso a questa funzionalità è soggetto all’accettazione delle {legalTermsLink} e di quanto segue:</p><ul><li>Eventuali prompt, contesto, informazioni supplementari o altri input forniti dall’Utente a questa funzionalità (a) devono essere collegati a un contesto specifico, che può includere materiali di branding, contenuti del sito web, dati, schemi per tali dati, modelli o altri documenti attendibili e (b) non devono contenere informazioni personali (le informazioni personali includono tutto ciò che può essere collegato a un individuo specifico).</li><li>È necessario esaminare l'accuratezza di qualsiasi output di questa funzionalità e assicurarsi che sia appropriato per il proprio caso d'uso.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Condizioni di utilizzo",
"promptSessionSideView.generateButtonLabel": "Genera",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "キャンセル",
"promptSessionSideView.deleteActionLabel": "削除",
"promptSessionSideView.editPromptButtonLabel": "プロンプトを編集",
"promptSessionSideView.empty": "空",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>この機能にアクセスするには、{legalTermsLink}および以下の条項に同意することが条件になります。</p><ul><li>この機能に提供するプロンプト、コンテキスト、補足情報、またはその他の入力は、(a)特定のコンテキスト(ブランディング資素材、web サイトのコンテンツ、データ、そのようなデータのスキーマ、テンプレート、またはその他の信頼できるドキュメントなど)に結び付けられている必要があり、(b)いかなる個人情報も含んではなりません(個人情報には、特定の個人に結びつけることができるあらゆるものが含まれます)。</li><li>この機能からの出力が正確であることをレビューし、お客様のユースケースに適していることを確認する必要があります。</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "利用条件",
"promptSessionSideView.generateButtonLabel": "生成",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"__value__": "Edit Prompt",
"__desc__": "Label for Edit prompt button"
},
"promptSessionSideView.empty": {
"__value__": "Empty",
"__desc__": "Displayed when there is nothing to display"
},
"promptSessionSideView.generateButtonContextualHelpContent": {
"__value__": "<p>Access to this feature is subject to your agreement to the {legalTermsLink}, and the following:</p><ul><li>Any prompts, context, or supplemental information, or other input you provide to this feature (a) must be tied to specific context, which can include your branding materials, website content, data, schemas for such data, templates, or other trusted documents, and (b) must not contain any personal information (personal information includes anything that can be linked back to a specific individual).</li><li>You should review any output from this feature for accuracy and ensure that it is appropriate for youruse case.</li></ul>",
"__desc__": "Content for Generate button contextual info"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "취소",
"promptSessionSideView.deleteActionLabel": "삭제",
"promptSessionSideView.editPromptButtonLabel": "프롬프트 편집",
"promptSessionSideView.empty": "비어 있음",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>이 기능의 사용에는 Adobe Experience Cloud 생성형 AI 사용자 가이드라인 및 다음 사항에 대한 동의가 적용됩니다.</p><ul><li>이 기능에 제공하는 모든 프롬프트, 컨텍스트, 추가 정보 또는 기타 입력 사항은 (a) 특정 컨텍스트와 연결되어야 하며, 여기에는 브랜딩 자료, 웹 사이트 콘텐츠, 데이터, 해당 데이터에 대한 스키마, 템플릿 또는 기타 신뢰할 수 있는 문서가 포함될 수 있습니다. (b) 어떠한 개인 정보도 포함해서는 안 됩니다(개인 정보에는 특정 개인과 다시 연결될 수 있는 모든 항목이 포함됩니다).</li><li>이 기능을 통한 모든 출력 내용이 정확한지 검토하고 사용 사례에 적합한지 확인해야 합니다.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "사용 약관",
"promptSessionSideView.generateButtonLabel": "생성",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "Cancelar",
"promptSessionSideView.deleteActionLabel": "Excluir",
"promptSessionSideView.editPromptButtonLabel": "Editar prompt",
"promptSessionSideView.empty": "Vazio",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>O acesso a esse recurso está sujeito à sua concordância com as {legalTermsLink} e com o seguinte:</p><ul><li>Quaisquer solicitações, contexto ou informações complementares ou outras informações fornecidas para esse recurso (a) devem estar vinculadas a um contexto específico, que pode incluir materiais da sua marca, conteúdo do site, dados, esquemas para tais dados, modelos ou outros documentos confiáveis; e (b) não devem conter nenhuma informação pessoal (as informações pessoais incluem qualquer coisa que possa ser vinculada a um indivíduo específico).</li><li>Você deve revisar qualquer output desse recurso para verificar a precisão e garantir que seja apropriado para o seu caso de uso.</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "Termos de uso",
"promptSessionSideView.generateButtonLabel": "Gerar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "取消",
"promptSessionSideView.deleteActionLabel": "删除",
"promptSessionSideView.editPromptButtonLabel": "编辑提示",
"promptSessionSideView.empty": "空",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>访问此功能须遵守 Adobe Experience Cloud 生成式 AI 用户指南和以下规定:</p><ul><li>您向此功能提供的任何提示、上下文或补充信息或其他输入 (a) 必须与特定上下文相关,其中可以包括您的品牌材料、网站内容、数据、此类数据的架构、模板或其他受信任的文档,并且 (b) 不得包含任何个人信息(个人信息包括任何可以链接回特定个人的信息)。</li><li>您应该检查此功能的任何输出是否准确,并确保其适合您的用例。</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "使用条款",
"promptSessionSideView.generateButtonLabel": "生成",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"promptSessionSideView.cancelActionLabel": "取消",
"promptSessionSideView.deleteActionLabel": "刪除",
"promptSessionSideView.editPromptButtonLabel": "編輯提示",
"promptSessionSideView.empty": "空白",
"promptSessionSideView.generateButtonContextualHelpContent": "<p>存取此功能,表示您同意遵守《{legalTermsLink}》及以下條款:</p><ul><li>您提供給此功能的任何提示、背景資訊、補充資訊或其他輸入資料必須:(a) 與特定情境相關,例如您的品牌素材、網站內容、資料、這類資料的架構、範本或其他可信賴文件,且 (b) 不得包含任何個人詳細資訊 (包括可追溯至特定個人的任何資訊)。</li><li>您應自行審核確認此功能產生的任何輸出結果是否正確,並符合您的使用情境。</li></ul>",
"promptSessionSideView.generateButtonContextualHelpHeading": "使用條款",
"promptSessionSideView.generateButtonLabel": "產生",
Expand Down
Loading