@springbrand/message-panel 0.1.3-alpha.26 → 0.1.3-alpha.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/message-panel",
3
- "version": "0.1.3-alpha.26",
3
+ "version": "0.1.3-alpha.27",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -167,7 +167,7 @@ export function CamelChatError({
167
167
  }
168
168
 
169
169
  export function CamelChatRecovery({
170
- label = "模型响应暂时中断,正在重试…",
170
+ label = "The model response was interrupted. Retrying…",
171
171
  }: {
172
172
  label?: string;
173
173
  }) {
@@ -59,7 +59,7 @@ export const AttachmentPreview = forwardRef<
59
59
  attachment.status === "uploading"
60
60
  ? "上传中…"
61
61
  : attachment.status === "error"
62
- ? "上传失败"
62
+ ? "Upload failed"
63
63
  : [attachment.note, formatSize(attachment.size)].filter(Boolean).join(" · ");
64
64
  return (
65
65
  <div
@@ -211,10 +211,10 @@ function ComposerInner<TAttachment>(
211
211
  );
212
212
  const invalid = selected.filter((file) => !valid.includes(file));
213
213
  if (all.length > selected.length) {
214
- onValidationError?.(`最多只能添加 ${maxFiles ?? 1} 个附件`, all);
214
+ onValidationError?.(`You can add up to ${maxFiles ?? 1} attachments`, all);
215
215
  }
216
216
  if (invalid.length) {
217
- onValidationError?.("存在不支持或超过大小限制的文件", invalid);
217
+ onValidationError?.("Some files are unsupported or exceed the size limit", invalid);
218
218
  }
219
219
  if (valid.length) void onFilesAdded?.(valid);
220
220
  },
@@ -277,7 +277,7 @@ function MessagePanelInner<T>(
277
277
  ? slots.error(error)
278
278
  : slots.error ?? (
279
279
  <PanelStatus kind="error">
280
- {error instanceof Error ? error.message : "这一轮出错了,请重试。"}
280
+ {error instanceof Error ? error.message : "This turn failed. Please try again."}
281
281
  </PanelStatus>
282
282
  ))}
283
283
  <Conversation>
@@ -1115,7 +1115,7 @@ export function DefaultPartRenderer({
1115
1115
  );
1116
1116
  }
1117
1117
  if (kind === "error") {
1118
- return <ErrorPart title={String(data.title ?? "Error")} body={String(data.body ?? data.message ?? "请求失败")} />;
1118
+ return <ErrorPart title={String(data.title ?? "Error")} body={String(data.body ?? data.message ?? "Request failed")} />;
1119
1119
  }
1120
1120
  if (kind === "image") {
1121
1121
  return <ImagePart src={String(record.src ?? record.url ?? data.src ?? data.url ?? "")} alt={String(record.alt ?? record.filename ?? data.alt ?? data.filename ?? "图片")} onPreview={() => context.actions.onPreview?.(part)} />;