fix: improve error message when exporting long conversations as image
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,7 @@ import {
|
||||
exportAsHtml,
|
||||
exportAsImage,
|
||||
exportAsMarkdown,
|
||||
ExportTooLongError,
|
||||
type ExportLabels,
|
||||
} from "@/lib/export-conversation"
|
||||
|
||||
@@ -1275,7 +1276,11 @@ export function ConversationDetailPanel() {
|
||||
toast.success(t("exportSuccess"))
|
||||
} catch (err) {
|
||||
updateTask(taskId, { status: "failed" })
|
||||
toast.error(t("exportFailed"))
|
||||
if (err instanceof ExportTooLongError) {
|
||||
toast.error(t("exportImageTooLong"))
|
||||
} else {
|
||||
toast.error(t("exportFailed"))
|
||||
}
|
||||
console.error("[ConversationDetailPanel] export image:", err)
|
||||
}
|
||||
}, [getExportData, t, addTask, updateTask])
|
||||
|
||||
Reference in New Issue
Block a user