@things-factory/ai-assistant 10.1.232 → 10.1.234

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.
@@ -689,7 +689,9 @@ export class OxAssistantChat extends LitElement {
689
689
  const params: any = { ...refusal }
690
690
  if (refusal.code === 'attachment-too-large') params.max = Math.round(refusal.maxBytes / 1024 / 1024)
691
691
  if (refusal.code === 'too-many-attachments') params.max = refusal.maxFiles
692
- if (refusal.code === 'attachment-kind-not-accepted') params.kinds = refusal.kinds.join(', ')
692
+ if (refusal.code === 'attachment-kind-not-accepted') {
693
+ params.kinds = refusal.kinds.map(kind => i18next.t(`ai-assistant.label.attachment-kind-${kind}`, { defaultValue: kind })).join(', ')
694
+ }
693
695
  return String(i18next.t(`ai-assistant.text.${refusal.code}`, { ...params, defaultValue: refusal.code }))
694
696
  }
695
697
 
@@ -4281,7 +4283,9 @@ export class OxAssistantChat extends LitElement {
4281
4283
  const inviteLabel = i18next.t('ai-assistant.button.invite', { defaultValue: 'Invite' })
4282
4284
  return html`
4283
4285
  <div class="roster" role="group" aria-label=${i18next.t('ai-assistant.label.participants', { defaultValue: 'People in this conversation' })}>
4284
- <span class="roster-count" title=${`${online} online / ${this.participants.length} total`}>
4286
+ <span
4287
+ class="roster-count"
4288
+ title=${i18next.t('ai-assistant.text.roster-count', { online, total: this.participants.length, defaultValue: '{online} online of {total}' })}>
4285
4289
  <md-icon>group</md-icon>${online}/${this.participants.length}
4286
4290
  </span>
4287
4291
  ${this.participants.map(p => {
@@ -4290,7 +4294,11 @@ export class OxAssistantChat extends LitElement {
4290
4294
  const removable = iOwn && p.role === 'member' && !!p.user?.id
4291
4295
  return html`<span
4292
4296
  class="roster-chip ${on ? 'online' : 'offline'}"
4293
- title=${`${name} · ${p.role}${on ? ' · online' : ''}`}>
4297
+ title=${[
4298
+ name,
4299
+ i18next.t(`ai-assistant.label.participant-role-${p.role}`, { defaultValue: p.role }),
4300
+ ...(on ? [i18next.t('ai-assistant.label.participant-online', { defaultValue: 'online' })] : [])
4301
+ ].join(' · ')}>
4294
4302
  <span class="roster-dot"></span><span class="roster-name">${name}</span>
4295
4303
  ${removable
4296
4304
  ? html`<button
@@ -499,8 +499,9 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
499
499
  params.max = Math.round(refusal.maxBytes / 1024 / 1024);
500
500
  if (refusal.code === 'too-many-attachments')
501
501
  params.max = refusal.maxFiles;
502
- if (refusal.code === 'attachment-kind-not-accepted')
503
- params.kinds = refusal.kinds.join(', ');
502
+ if (refusal.code === 'attachment-kind-not-accepted') {
503
+ params.kinds = refusal.kinds.map(kind => i18next.t(`ai-assistant.label.attachment-kind-${kind}`, { defaultValue: kind })).join(', ');
504
+ }
504
505
  return String(i18next.t(`ai-assistant.text.${refusal.code}`, { ...params, defaultValue: refusal.code }));
505
506
  }
506
507
  async onAttachFiles(files, table) {
@@ -3865,7 +3866,9 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
3865
3866
  const inviteLabel = i18next.t('ai-assistant.button.invite', { defaultValue: 'Invite' });
3866
3867
  return html `
3867
3868
  <div class="roster" role="group" aria-label=${i18next.t('ai-assistant.label.participants', { defaultValue: 'People in this conversation' })}>
3868
- <span class="roster-count" title=${`${online} online / ${this.participants.length} total`}>
3869
+ <span
3870
+ class="roster-count"
3871
+ title=${i18next.t('ai-assistant.text.roster-count', { online, total: this.participants.length, defaultValue: '{online} online of {total}' })}>
3869
3872
  <md-icon>group</md-icon>${online}/${this.participants.length}
3870
3873
  </span>
3871
3874
  ${this.participants.map(p => {
@@ -3874,7 +3877,11 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
3874
3877
  const removable = iOwn && p.role === 'member' && !!p.user?.id;
3875
3878
  return html `<span
3876
3879
  class="roster-chip ${on ? 'online' : 'offline'}"
3877
- title=${`${name} · ${p.role}${on ? ' · online' : ''}`}>
3880
+ title=${[
3881
+ name,
3882
+ i18next.t(`ai-assistant.label.participant-role-${p.role}`, { defaultValue: p.role }),
3883
+ ...(on ? [i18next.t('ai-assistant.label.participant-online', { defaultValue: 'online' })] : [])
3884
+ ].join(' · ')}>
3878
3885
  <span class="roster-dot"></span><span class="roster-name">${name}</span>
3879
3886
  ${removable
3880
3887
  ? html `<button