task-98: 移除 similar-asin/appearance-patent 模块 Coze,状态机与共享组件改名 LLM
Build Backend JAR / build (push) Has been cancelled

- similarasin/appearancepatent 模块全部 Coze 工作流调用改走 direct-LLM(已确认唯一运行路径)
- 共享组件改名:CozeTaskQueueGate→TaskQueueGate、CozeGroupResultPropagator→GroupResultPropagator
- 状态机改名:biz_task_scope_state 的 coze_* 列→llm_*、stateJson coze 键→llm(V100 迁移已应用生产)
- 删除 biz_coze_credential 表、CozeCredential* 类、SimilarAsinCozeClient、AppearancePatentCozeClient→LlmClient
- 前端 brand 页 Coze 文案→LLM;Python 后端删除 cozepy 依赖与死配置
- 修复 TaskResultFileJobWorker 启动失败:TaskFileJobConfig 注册 ResultFileJobHandlerRegistry 与 13 个 handler bean(含 validateCoverage 启动校验)
This commit is contained in:
2026-09-01 02:19:45 +08:00
parent 0cc7380205
commit e2607ab723
109 changed files with 6903 additions and 4582 deletions
@@ -19,7 +19,7 @@
<div class="prompt-card">
<div class="section-title">新增条件要求</div>
<textarea v-model="aiPrompt" class="prompt-input" rows="8" placeholder="可选,留空则不向 Coze 传 prompt 字段;填写后将作为 prompt 透传" />
<textarea v-model="aiPrompt" class="prompt-input" rows="8" placeholder="可选,留空则不向 LLM 传 prompt 字段;填写后将作为 prompt 透传" />
</div>
<div class="run-row">
@@ -30,7 +30,7 @@
{{ pushing ? '推送中...' : '推送到 Python 队列' }}
</button>
</div>
<p class="loading-msg">Python 回传字段按 asin国家url标题提交后端接收分片后累计 50 条调用 Coze当前任务区展示 Coze 回流和结果组装进度</p>
<p class="loading-msg">Python 回传字段按 asin国家url标题提交后端接收分片后累计 50 条调用 LLM当前任务区展示 LLM 回流和结果组装进度</p>
<div v-if="visibleTaskSummary" class="parse-card">
<div>任务 ID{{ visibleTaskSummary.taskId }}</div>
@@ -170,7 +170,7 @@ const uploadedFiles = ref<UploadFileVo[]>([])
const parseResult = ref<AppearancePatentParseVo | null>(null)
type TaskSummary = Pick<AppearancePatentParseVo, 'taskId' | 'totalRows' | 'acceptedRows' | 'groupCount' | 'droppedRows'>
const queuedTaskSummary = ref<TaskSummary | null>(null)
// 不再注入默认 prompt:用户未填则一律空字符串,由后端决定是否给 Coze 透传 prompt 字段。
// 不再注入默认 prompt:用户未填则一律空字符串,由后端决定是否给 LLM 透传 prompt 字段。
const aiPrompt = ref('')
const parsing = ref(false)
const pushing = ref(false)
@@ -259,7 +259,7 @@ function queueAiPrompt() {
return aiPrompt.value.trim()
}
function effectiveCozeApiKey() {
function effectiveLlmApiKey() {
return getStoredApiSecret('appearance-patent').trim()
}
@@ -402,7 +402,7 @@ async function parseFiles() {
ElMessage.warning('请先选择 Excel')
return
}
if (!effectiveCozeApiKey()) {
if (!effectiveLlmApiKey()) {
ElMessage.warning('请先在左上角设置中填写外观专利密钥')
return
}
@@ -413,7 +413,7 @@ async function parseFiles() {
originalFilename: f.originalFilename,
relativePath: f.relativePath,
}))
const res = await parseAppearancePatent(files, effectiveAiPrompt(), effectiveCozeApiKey(), effectivePatentToken())
const res = await parseAppearancePatent(files, effectiveAiPrompt(), effectiveLlmApiKey(), effectivePatentToken())
parseResult.value = res
queuedTaskSummary.value = null
queuePayloadText.value = ''
@@ -437,7 +437,7 @@ async function pushToPythonQueue() {
ElMessage.error('当前环境未启用 pywebview enqueue_json')
return
}
if (!effectiveCozeApiKey()) {
if (!effectiveLlmApiKey()) {
ElMessage.warning('请先在左上角设置中填写外观专利密钥')
return
}
@@ -451,7 +451,7 @@ async function pushToPythonQueue() {
data: {
taskId,
prompt: queueAiPrompt(),
api_key: effectiveCozeApiKey(),
api_key: effectiveLlmApiKey(),
patent_token: effectivePatentToken(),
sourceFileCount: currentParseResult.sourceFileCount || 0,
totalRows: currentParseResult.totalRows || 0,
@@ -811,7 +811,7 @@ function pendingResultHint(item: AppearancePatentHistoryItem) {
if (!isResultPreparing(item)) return ''
const fileStatus = (item.fileStatus || '').toUpperCase()
if (fileStatus === 'RUNNING') {
return '任务已完成,正在等待 Coze 回流并组装结果文件,下载按钮稍后出现'
return '任务已完成,正在等待 LLM 回流并组装结果文件,下载按钮稍后出现'
}
if (fileStatus === 'PENDING') {
return '任务已完成,结果文件已入队,正在等待后端开始处理'
@@ -845,20 +845,20 @@ function displayFileProgressMessage(item: AppearancePatentHistoryItem, fallback:
}
function translateFileProgressMessage(message: string) {
const submittedMatch = message.match(/^Coze submitted (\d+) batches, completed (\d+), waiting for results$/)
const submittedMatch = message.match(/^LLM submitted (\d+) batches, completed (\d+), waiting for results$/)
if (submittedMatch) {
return `已提交 Coze ${submittedMatch[1]} 批,已完成 ${submittedMatch[2]} 批,等待结果回流`
return `已提交 LLM ${submittedMatch[1]} 批,已完成 ${submittedMatch[2]} 批,等待结果回流`
}
const completedMatch = message.match(/^Coze completed (\d+) batches, waiting for remaining Python data$/)
const completedMatch = message.match(/^LLM completed (\d+) batches, waiting for remaining Python data$/)
if (completedMatch) {
return `Coze 已完成 ${completedMatch[1]} 批,等待 Python 继续回传数据`
return `LLM 已完成 ${completedMatch[1]} 批,等待 Python 继续回传数据`
}
const translations: Record<string, string> = {
'Receiving Python data, waiting for 50 rows before Coze': '正在接收 Python 数据,累计 50 条后提交 Coze',
'Submitting Coze': '正在提交 Coze',
'Coze submitted, waiting for result': 'Coze 已提交,等待结果回流',
'Receiving Python data, waiting for 50 rows before LLM': '正在接收 Python 数据,累计 50 条后提交 LLM',
'Submitting LLM': '正在提交 LLM',
'LLM submitted, waiting for result': 'LLM 已提交,等待结果回流',
'Waiting for Python upload': '等待 Python 继续回传数据',
'Coze results ready, assembling xlsx': 'Coze 结果已回流,正在组装 xlsx',
'LLM results ready, assembling xlsx': 'LLM 结果已回流,正在组装 xlsx',
'Assembling xlsx': '正在组装 xlsx',
'Uploading result file': '正在上传结果文件',
'Result file generated': '结果文件已生成',