Compare commits

..

No commits in common. "eb8cab3f5af811f5b9e6a12b777262e3464f0cf1" and "b17aec4a1a5c08acb78433b1fd391e42c2733bb7" have entirely different histories.

2 changed files with 4 additions and 25 deletions

View File

@ -580,18 +580,12 @@ export default {
el.scrollTop = el.scrollHeight
},
taskRowResultTrim(row) {
return String(row?.result ?? '').trim()
},
taskStatusText(row) {
// 0 2 1+http(s) 1 http
if (row.status === 2) return '已失败/已取消'
if (row.status === 0) return '执行中'
if (row.status === 1) {
const r = this.taskRowResultTrim(row)
if (!r) return '失败'
if (this.isHttpOrHttpsUrl(r)) return '已完成'
if (/^cgt/i.test(r)) return '任务执行中'
if (row.result && this.isHttpOrHttpsUrl(row.result)) return '已完成'
return '任务生成失败'
}
return '执行中'
@ -599,19 +593,12 @@ export default {
/** 是否展示完整「结果区」(视频 / 链接);其余状态仅紧凑展示在用户行右侧 */
isChatRowSuccessWithMedia(row) {
const r = this.taskRowResultTrim(row)
return row.status === 1 && !!r && this.isHttpOrHttpsUrl(r)
return row.status === 1 && row.result && this.isHttpOrHttpsUrl(row.result)
},
chatRowInlineStatusClass(row) {
if (row.status === 2) return 'vg-chat-inline-status--failed'
if (row.status === 1) {
const r = this.taskRowResultTrim(row)
if (!r) return 'vg-chat-inline-status--failed'
if (/^cgt/i.test(r)) return 'vg-chat-inline-status--running'
if (this.isHttpOrHttpsUrl(r)) return 'vg-chat-inline-status--running'
return 'vg-chat-inline-status--failed'
}
if (row.status === 1 && !this.isHttpOrHttpsUrl(row.result)) return 'vg-chat-inline-status--failed'
return 'vg-chat-inline-status--running'
},

View File

@ -67,14 +67,6 @@ public class TencentCosUtil {
try {
InputStream inputStream = file.getInputStream();
ObjectMetadata objectMetadata = new ObjectMetadata();
// 必须设置长度否则底层 OkHttp 会告警No content length specified并整段缓冲到内存 OOM
long contentLength = file.getSize();
if (contentLength >= 0) {
objectMetadata.setContentLength(contentLength);
}
if (file.getContentType() != null && !file.getContentType().isEmpty()) {
objectMetadata.setContentType(file.getContentType());
}
PutObjectRequest putObjectRequest = new PutObjectRequest(
bucketName,
key,