feat(i18n): replace expand/collapse Chinese text in Step4Report.vue
This commit is contained in:
parent
380e456d41
commit
1d358fc492
|
|
@ -392,9 +392,11 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch, onMounted, onUnmounted, nextTick, h, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getAgentLog, getConsoleLog } from '../api/report'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps({
|
||||
reportId: String,
|
||||
|
|
@ -962,6 +964,7 @@ const parseQuickSearch = (text) => {
|
|||
const InsightDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('facts') // 'facts', 'entities', 'relations', 'subqueries'
|
||||
const expandedFacts = ref(false)
|
||||
const expandedEntities = ref(false)
|
||||
|
|
@ -1055,7 +1058,7 @@ const InsightDisplay = {
|
|||
props.result.facts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedFacts.value = !expandedFacts.value }
|
||||
}, expandedFacts.value ? `收起 ▲` : `展开全部 ${props.result.facts.length} 条 ▼`)
|
||||
}, expandedFacts.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.facts.length }))
|
||||
]),
|
||||
|
||||
// Entities Tab
|
||||
|
|
@ -1076,7 +1079,7 @@ const InsightDisplay = {
|
|||
props.result.entities.length > 12 && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedEntities.value = !expandedEntities.value }
|
||||
}, expandedEntities.value ? `收起 ▲` : `展开全部 ${props.result.entities.length} 个 ▼`)
|
||||
}, expandedEntities.value ? t('step4.collapse') : t('step4.expandAllEntities', { count: props.result.entities.length }))
|
||||
]),
|
||||
|
||||
// Relations Tab
|
||||
|
|
@ -1101,7 +1104,7 @@ const InsightDisplay = {
|
|||
props.result.relations.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedRelations.value = !expandedRelations.value }
|
||||
}, expandedRelations.value ? `收起 ▲` : `展开全部 ${props.result.relations.length} 条 ▼`)
|
||||
}, expandedRelations.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.relations.length }))
|
||||
]),
|
||||
|
||||
// Sub-queries Tab
|
||||
|
|
@ -1133,6 +1136,7 @@ const InsightDisplay = {
|
|||
const PanoramaDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('active') // 'active', 'historical', 'entities'
|
||||
const expandedActive = ref(false)
|
||||
const expandedHistorical = ref(false)
|
||||
|
|
@ -1211,7 +1215,7 @@ const PanoramaDisplay = {
|
|||
props.result.activeFacts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedActive.value = !expandedActive.value }
|
||||
}, expandedActive.value ? `收起 ▲` : `展开全部 ${props.result.activeFacts.length} 条 ▼`)
|
||||
}, expandedActive.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.activeFacts.length }))
|
||||
]),
|
||||
|
||||
// Historical Facts Tab
|
||||
|
|
@ -1243,7 +1247,7 @@ const PanoramaDisplay = {
|
|||
props.result.historicalFacts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedHistorical.value = !expandedHistorical.value }
|
||||
}, expandedHistorical.value ? `收起 ▲` : `展开全部 ${props.result.historicalFacts.length} 条 ▼`)
|
||||
}, expandedHistorical.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.historicalFacts.length }))
|
||||
]),
|
||||
|
||||
// Entities Tab
|
||||
|
|
@ -1263,7 +1267,7 @@ const PanoramaDisplay = {
|
|||
props.result.entities.length > 8 && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedEntities.value = !expandedEntities.value }
|
||||
}, expandedEntities.value ? `收起 ▲` : `展开全部 ${props.result.entities.length} 个 ▼`)
|
||||
}, expandedEntities.value ? t('step4.collapse') : t('step4.expandAllEntities', { count: props.result.entities.length }))
|
||||
])
|
||||
])
|
||||
])
|
||||
|
|
@ -1577,6 +1581,7 @@ const InterviewDisplay = {
|
|||
const QuickSearchDisplay = {
|
||||
props: ['result', 'resultLength'],
|
||||
setup(props) {
|
||||
const { t } = useI18n()
|
||||
const activeTab = ref('facts') // 'facts', 'edges', 'nodes'
|
||||
const expandedFacts = ref(false)
|
||||
const INITIAL_SHOW_COUNT = 5
|
||||
|
|
@ -1656,7 +1661,7 @@ const QuickSearchDisplay = {
|
|||
props.result.facts.length > INITIAL_SHOW_COUNT && h('button', {
|
||||
class: 'expand-btn',
|
||||
onClick: () => { expandedFacts.value = !expandedFacts.value }
|
||||
}, expandedFacts.value ? `收起 ▲` : `展开全部 ${props.result.facts.length} 条 ▼`)
|
||||
}, expandedFacts.value ? t('step4.collapse') : t('step4.expandAll', { count: props.result.facts.length }))
|
||||
]),
|
||||
|
||||
// Edges Tab
|
||||
|
|
|
|||
102
locales/en.json
102
locales/en.json
|
|
@ -210,7 +210,10 @@
|
|||
"step4": {
|
||||
"generatingSection": "Generating {title}...",
|
||||
"goToInteraction": "Enter Deep Interaction",
|
||||
"waitingForReportAgent": "Waiting for Report Agent..."
|
||||
"waitingForReportAgent": "Waiting for Report Agent...",
|
||||
"collapse": "Collapse ▲",
|
||||
"expandAll": "Show all {count} ▼",
|
||||
"expandAllEntities": "Show all {count} ▼"
|
||||
},
|
||||
"step5": {
|
||||
"interactiveTools": "Interactive Tools",
|
||||
|
|
@ -527,5 +530,102 @@
|
|||
"enterStep": "Entering Step {step}: {name}",
|
||||
"returnToStep": "Returning to Step {step}: {name}",
|
||||
"customSimRounds": "Custom simulation rounds: {rounds} rounds"
|
||||
},
|
||||
"report": {
|
||||
"taskStarted": "Report generation task started",
|
||||
"planningStart": "Starting report outline planning",
|
||||
"fetchSimContext": "Fetching simulation context",
|
||||
"planningComplete": "Outline planning complete",
|
||||
"sectionStart": "Starting section generation: {title}",
|
||||
"reactThought": "ReACT round {iteration} thinking",
|
||||
"toolCall": "Calling tool: {toolName}",
|
||||
"toolResult": "Tool {toolName} returned result",
|
||||
"llmResponse": "LLM response (tool calls: {hasToolCalls}, final answer: {hasFinalAnswer})",
|
||||
"sectionContentDone": "Section {title} content generation complete",
|
||||
"sectionComplete": "Section {title} generation complete",
|
||||
"reportComplete": "Report generation complete",
|
||||
"errorOccurred": "Error occurred: {error}",
|
||||
"agentInitDone": "ReportAgent initialized: graph_id={graphId}, simulation_id={simulationId}",
|
||||
"executingTool": "Executing tool: {toolName}, params: {params}",
|
||||
"toolExecFailed": "Tool execution failed: {toolName}, error: {error}",
|
||||
"startPlanningOutline": "Starting report outline planning...",
|
||||
"outlinePlanDone": "Outline planning complete: {count} sections",
|
||||
"outlinePlanFailed": "Outline planning failed: {error}",
|
||||
"reactGenerateSection": "ReACT generating section: {title}",
|
||||
"sectionIterNone": "Section {title} iteration {iteration}: LLM returned None",
|
||||
"sectionConflict": "Section {title} round {iteration}: LLM output both tool call and Final Answer (conflict #{conflictCount})",
|
||||
"sectionConflictDowngrade": "Section {title}: {conflictCount} consecutive conflicts, downgrading to truncate and execute first tool call",
|
||||
"sectionGenDone": "Section {title} generation complete (tool calls: {count})",
|
||||
"multiToolOnlyFirst": "LLM attempted {total} tool calls, executing only the first: {toolName}",
|
||||
"sectionNoPrefix": "Section {title} missing 'Final Answer:' prefix, adopting LLM output as final content (tool calls: {count})",
|
||||
"sectionMaxIter": "Section {title} reached max iterations, forcing generation",
|
||||
"sectionForceFailed": "Section {title} force-finish LLM returned None, using default error message",
|
||||
"sectionGenFailedContent": "(This section failed to generate: LLM returned empty response, please retry later)",
|
||||
"outlineSavedToFile": "Outline saved to file: {reportId}/outline.json",
|
||||
"sectionSaved": "Section saved: {reportId}/section_{sectionNum}.md",
|
||||
"reportGenDone": "Report generation complete: {reportId}",
|
||||
"reportGenFailed": "Report generation failed: {error}",
|
||||
"agentChat": "Report Agent chat: {message}...",
|
||||
"fetchReportFailed": "Failed to fetch report content: {error}",
|
||||
"outlineSaved": "Outline saved: {reportId}",
|
||||
"sectionFileSaved": "Section saved: {reportId}/{fileSuffix}",
|
||||
"fullReportAssembled": "Full report assembled: {reportId}",
|
||||
"reportSaved": "Report saved: {reportId}",
|
||||
"reportFolderDeleted": "Report folder deleted: {reportId}",
|
||||
"redirectToQuickSearch": "search_graph redirected to quick_search",
|
||||
"redirectToInsightForge": "get_simulation_context redirected to insight_forge"
|
||||
},
|
||||
"console": {
|
||||
"zepToolsInitialized": "ZepToolsService initialized",
|
||||
"zepRetryAttempt": "Zep {operation} attempt {attempt} failed: {error}, retrying in {delay}s...",
|
||||
"zepAllRetriesFailed": "Zep {operation} failed after {retries} attempts: {error}",
|
||||
"graphSearch": "Graph search: graph_id={graphId}, query={query}...",
|
||||
"graphSearchOp": "Graph search (graph={graphId})",
|
||||
"searchComplete": "Search complete: found {count} relevant facts",
|
||||
"zepSearchApiFallback": "Zep Search API failed, falling back to local search: {error}",
|
||||
"usingLocalSearch": "Using local search: query={query}...",
|
||||
"localSearchComplete": "Local search complete: found {count} relevant facts",
|
||||
"localSearchFailed": "Local search failed: {error}",
|
||||
"fetchingAllNodes": "Fetching all nodes for graph {graphId}...",
|
||||
"fetchedNodes": "Fetched {count} nodes",
|
||||
"fetchingAllEdges": "Fetching all edges for graph {graphId}...",
|
||||
"fetchedEdges": "Fetched {count} edges",
|
||||
"fetchingNodeDetail": "Fetching node detail: {uuid}...",
|
||||
"fetchNodeDetailOp": "Fetch node detail (uuid={uuid}...)",
|
||||
"fetchNodeDetailFailed": "Failed to fetch node detail: {error}",
|
||||
"fetchingNodeEdges": "Fetching edges for node {uuid}...",
|
||||
"foundNodeEdges": "Found {count} edges related to node",
|
||||
"fetchNodeEdgesFailed": "Failed to fetch node edges: {error}",
|
||||
"fetchingEntitiesByType": "Fetching entities of type {type}...",
|
||||
"foundEntitiesByType": "Found {count} entities of type {type}",
|
||||
"fetchingEntitySummary": "Fetching relationship summary for entity {name}...",
|
||||
"fetchingGraphStats": "Fetching statistics for graph {graphId}...",
|
||||
"fetchingSimContext": "Fetching simulation context: {requirement}...",
|
||||
"insightForgeStart": "InsightForge deep insight retrieval: {query}...",
|
||||
"generatedSubQueries": "Generated {count} sub-queries",
|
||||
"insightForgeComplete": "InsightForge complete: {facts} facts, {entities} entities, {relationships} relationships",
|
||||
"generateSubQueriesFailed": "Failed to generate sub-queries: {error}, using defaults",
|
||||
"panoramaSearchStart": "PanoramaSearch broad search: {query}...",
|
||||
"panoramaSearchComplete": "PanoramaSearch complete: {active} active, {historical} historical",
|
||||
"quickSearchStart": "QuickSearch simple search: {query}...",
|
||||
"quickSearchComplete": "QuickSearch complete: {count} results",
|
||||
"interviewAgentsStart": "InterviewAgents deep interview (real API): {requirement}...",
|
||||
"profilesNotFound": "Profiles not found for simulation {simId}",
|
||||
"loadedProfiles": "Loaded {count} agent profiles",
|
||||
"selectedAgentsForInterview": "Selected {count} agents for interview: {indices}",
|
||||
"generatedInterviewQuestions": "Generated {count} interview questions",
|
||||
"callingBatchInterviewApi": "Calling batch interview API (dual platform): {count} agents",
|
||||
"interviewApiReturned": "Interview API returned: {count} results, success={success}",
|
||||
"interviewApiReturnedFailure": "Interview API returned failure: {error}",
|
||||
"interviewApiCallFailed": "Interview API call failed (env not running?): {error}",
|
||||
"interviewApiCallException": "Interview API call exception: {error}",
|
||||
"interviewAgentsComplete": "InterviewAgents complete: interviewed {count} agents (dual platform)",
|
||||
"loadedRedditProfiles": "Loaded {count} profiles from reddit_profiles.json",
|
||||
"readRedditProfilesFailed": "Failed to read reddit_profiles.json: {error}",
|
||||
"loadedTwitterProfiles": "Loaded {count} profiles from twitter_profiles.csv",
|
||||
"readTwitterProfilesFailed": "Failed to read twitter_profiles.csv: {error}",
|
||||
"llmSelectAgentFailed": "LLM agent selection failed, using default selection: {error}",
|
||||
"generateInterviewQuestionsFailed": "Failed to generate interview questions: {error}",
|
||||
"generateInterviewSummaryFailed": "Failed to generate interview summary: {error}"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
102
locales/zh.json
102
locales/zh.json
|
|
@ -210,7 +210,10 @@
|
|||
"step4": {
|
||||
"generatingSection": "正在生成{title}...",
|
||||
"goToInteraction": "进入深度互动",
|
||||
"waitingForReportAgent": "Waiting for Report Agent..."
|
||||
"waitingForReportAgent": "Waiting for Report Agent...",
|
||||
"collapse": "收起 ▲",
|
||||
"expandAll": "展开全部 {count} 条 ▼",
|
||||
"expandAllEntities": "展开全部 {count} 个 ▼"
|
||||
},
|
||||
"step5": {
|
||||
"interactiveTools": "Interactive Tools",
|
||||
|
|
@ -527,5 +530,102 @@
|
|||
"enterStep": "进入 Step {step}: {name}",
|
||||
"returnToStep": "返回 Step {step}: {name}",
|
||||
"customSimRounds": "自定义模拟轮数: {rounds} 轮"
|
||||
},
|
||||
"report": {
|
||||
"taskStarted": "报告生成任务开始",
|
||||
"planningStart": "开始规划报告大纲",
|
||||
"fetchSimContext": "获取模拟上下文信息",
|
||||
"planningComplete": "大纲规划完成",
|
||||
"sectionStart": "开始生成章节: {title}",
|
||||
"reactThought": "ReACT 第{iteration}轮思考",
|
||||
"toolCall": "调用工具: {toolName}",
|
||||
"toolResult": "工具 {toolName} 返回结果",
|
||||
"llmResponse": "LLM 响应 (工具调用: {hasToolCalls}, 最终答案: {hasFinalAnswer})",
|
||||
"sectionContentDone": "章节 {title} 内容生成完成",
|
||||
"sectionComplete": "章节 {title} 生成完成",
|
||||
"reportComplete": "报告生成完成",
|
||||
"errorOccurred": "发生错误: {error}",
|
||||
"agentInitDone": "ReportAgent 初始化完成: graph_id={graphId}, simulation_id={simulationId}",
|
||||
"executingTool": "执行工具: {toolName}, 参数: {params}",
|
||||
"toolExecFailed": "工具执行失败: {toolName}, 错误: {error}",
|
||||
"startPlanningOutline": "开始规划报告大纲...",
|
||||
"outlinePlanDone": "大纲规划完成: {count} 个章节",
|
||||
"outlinePlanFailed": "大纲规划失败: {error}",
|
||||
"reactGenerateSection": "ReACT生成章节: {title}",
|
||||
"sectionIterNone": "章节 {title} 第 {iteration} 次迭代: LLM 返回 None",
|
||||
"sectionConflict": "章节 {title} 第 {iteration} 轮: LLM 同时输出工具调用和 Final Answer(第 {conflictCount} 次冲突)",
|
||||
"sectionConflictDowngrade": "章节 {title}: 连续 {conflictCount} 次冲突,降级为截断执行第一个工具调用",
|
||||
"sectionGenDone": "章节 {title} 生成完成(工具调用: {count}次)",
|
||||
"multiToolOnlyFirst": "LLM 尝试调用 {total} 个工具,只执行第一个: {toolName}",
|
||||
"sectionNoPrefix": "章节 {title} 未检测到 'Final Answer:' 前缀,直接采纳LLM输出作为最终内容(工具调用: {count}次)",
|
||||
"sectionMaxIter": "章节 {title} 达到最大迭代次数,强制生成",
|
||||
"sectionForceFailed": "章节 {title} 强制收尾时 LLM 返回 None,使用默认错误提示",
|
||||
"sectionGenFailedContent": "(本章节生成失败:LLM 返回空响应,请稍后重试)",
|
||||
"outlineSavedToFile": "大纲已保存到文件: {reportId}/outline.json",
|
||||
"sectionSaved": "章节已保存: {reportId}/section_{sectionNum}.md",
|
||||
"reportGenDone": "报告生成完成: {reportId}",
|
||||
"reportGenFailed": "报告生成失败: {error}",
|
||||
"agentChat": "Report Agent对话: {message}...",
|
||||
"fetchReportFailed": "获取报告内容失败: {error}",
|
||||
"outlineSaved": "大纲已保存: {reportId}",
|
||||
"sectionFileSaved": "章节已保存: {reportId}/{fileSuffix}",
|
||||
"fullReportAssembled": "完整报告已组装: {reportId}",
|
||||
"reportSaved": "报告已保存: {reportId}",
|
||||
"reportFolderDeleted": "报告文件夹已删除: {reportId}",
|
||||
"redirectToQuickSearch": "search_graph 已重定向到 quick_search",
|
||||
"redirectToInsightForge": "get_simulation_context 已重定向到 insight_forge"
|
||||
},
|
||||
"console": {
|
||||
"zepToolsInitialized": "ZepToolsService 初始化完成",
|
||||
"zepRetryAttempt": "Zep {operation} 第 {attempt} 次尝试失败: {error}, {delay}秒后重试...",
|
||||
"zepAllRetriesFailed": "Zep {operation} 在 {retries} 次尝试后仍失败: {error}",
|
||||
"graphSearch": "图谱搜索: graph_id={graphId}, query={query}...",
|
||||
"graphSearchOp": "图谱搜索(graph={graphId})",
|
||||
"searchComplete": "搜索完成: 找到 {count} 条相关事实",
|
||||
"zepSearchApiFallback": "Zep Search API失败,降级为本地搜索: {error}",
|
||||
"usingLocalSearch": "使用本地搜索: query={query}...",
|
||||
"localSearchComplete": "本地搜索完成: 找到 {count} 条相关事实",
|
||||
"localSearchFailed": "本地搜索失败: {error}",
|
||||
"fetchingAllNodes": "获取图谱 {graphId} 的所有节点...",
|
||||
"fetchedNodes": "获取到 {count} 个节点",
|
||||
"fetchingAllEdges": "获取图谱 {graphId} 的所有边...",
|
||||
"fetchedEdges": "获取到 {count} 条边",
|
||||
"fetchingNodeDetail": "获取节点详情: {uuid}...",
|
||||
"fetchNodeDetailOp": "获取节点详情(uuid={uuid}...)",
|
||||
"fetchNodeDetailFailed": "获取节点详情失败: {error}",
|
||||
"fetchingNodeEdges": "获取节点 {uuid}... 的相关边",
|
||||
"foundNodeEdges": "找到 {count} 条与节点相关的边",
|
||||
"fetchNodeEdgesFailed": "获取节点边失败: {error}",
|
||||
"fetchingEntitiesByType": "获取类型为 {type} 的实体...",
|
||||
"foundEntitiesByType": "找到 {count} 个 {type} 类型的实体",
|
||||
"fetchingEntitySummary": "获取实体 {name} 的关系摘要...",
|
||||
"fetchingGraphStats": "获取图谱 {graphId} 的统计信息...",
|
||||
"fetchingSimContext": "获取模拟上下文: {requirement}...",
|
||||
"insightForgeStart": "InsightForge 深度洞察检索: {query}...",
|
||||
"generatedSubQueries": "生成 {count} 个子问题",
|
||||
"insightForgeComplete": "InsightForge完成: {facts}条事实, {entities}个实体, {relationships}条关系",
|
||||
"generateSubQueriesFailed": "生成子问题失败: {error},使用默认子问题",
|
||||
"panoramaSearchStart": "PanoramaSearch 广度搜索: {query}...",
|
||||
"panoramaSearchComplete": "PanoramaSearch完成: {active}条有效, {historical}条历史",
|
||||
"quickSearchStart": "QuickSearch 简单搜索: {query}...",
|
||||
"quickSearchComplete": "QuickSearch完成: {count}条结果",
|
||||
"interviewAgentsStart": "InterviewAgents 深度采访(真实API): {requirement}...",
|
||||
"profilesNotFound": "未找到模拟 {simId} 的人设文件",
|
||||
"loadedProfiles": "加载到 {count} 个Agent人设",
|
||||
"selectedAgentsForInterview": "选择了 {count} 个Agent进行采访: {indices}",
|
||||
"generatedInterviewQuestions": "生成了 {count} 个采访问题",
|
||||
"callingBatchInterviewApi": "调用批量采访API(双平台): {count} 个Agent",
|
||||
"interviewApiReturned": "采访API返回: {count} 个结果, success={success}",
|
||||
"interviewApiReturnedFailure": "采访API返回失败: {error}",
|
||||
"interviewApiCallFailed": "采访API调用失败(环境未运行?): {error}",
|
||||
"interviewApiCallException": "采访API调用异常: {error}",
|
||||
"interviewAgentsComplete": "InterviewAgents完成: 采访了 {count} 个Agent(双平台)",
|
||||
"loadedRedditProfiles": "从 reddit_profiles.json 加载了 {count} 个人设",
|
||||
"readRedditProfilesFailed": "读取 reddit_profiles.json 失败: {error}",
|
||||
"loadedTwitterProfiles": "从 twitter_profiles.csv 加载了 {count} 个人设",
|
||||
"readTwitterProfilesFailed": "读取 twitter_profiles.csv 失败: {error}",
|
||||
"llmSelectAgentFailed": "LLM选择Agent失败,使用默认选择: {error}",
|
||||
"generateInterviewQuestionsFailed": "生成采访问题失败: {error}",
|
||||
"generateInterviewSummaryFailed": "生成采访摘要失败: {error}"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue