Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 67 additions & 5 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"axios": "1.13.2",
"d3": "^7.9.0",
"vue": "^3.5.24",
"vue-i18n": "^9.14.5",
"vue-router": "^4.6.3"
},
"devDependencies": {
Expand Down
38 changes: 20 additions & 18 deletions frontend/src/components/HistoryDatabase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<div class="gradient-overlay"></div>
</div>

<!-- 标题区域 -->
<!-- Title Section -->
<div class="section-header">
<div class="section-line"></div>
<span class="section-title">推演记录</span>
<span class="section-title">{{ t('components.history.title') }}</span>
<div class="section-line"></div>
</div>

Expand All @@ -33,20 +33,20 @@
<div class="card-header">
<span class="card-id">{{ formatSimulationId(project.simulation_id) }}</span>
<div class="card-status-icons">
<span
class="status-icon"
:class="{ available: project.project_id, unavailable: !project.project_id }"
title="图谱构建"
>◇</span>
<span
class="status-icon available"
title="环境搭建"
>◈</span>
<span
class="status-icon"
:class="{ available: project.report_id, unavailable: !project.report_id }"
title="分析报告"
>◆</span>
<span
class="status-icon"
:class="{ available: project.project_id, unavailable: !project.project_id }"
:title="t('components.step1.title')"
>◇</span>
<span
class="status-icon available"
:title="t('components.step2.title')"
>◈</span>
<span
class="status-icon"
:class="{ available: project.report_id, unavailable: !project.report_id }"
:title="t('components.step4.title')"
>◆</span>
</div>
</div>

Expand Down Expand Up @@ -99,10 +99,10 @@
</div>
</div>

<!-- 加载状态 -->
<!-- Loading State -->
<div v-if="loading" class="loading-state">
<span class="loading-spinner"></span>
<span class="loading-text">加载中...</span>
<span class="loading-text">{{ t('common.loading') }}</span>
</div>

<!-- 历史回放详情弹窗 -->
Expand Down Expand Up @@ -193,10 +193,12 @@
<script setup>
import { ref, computed, onMounted, onUnmounted, onActivated, watch, nextTick } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { getSimulationHistory } from '../api/simulation'

const router = useRouter()
const route = useRoute()
const { t } = useI18n()

// 状态
const projects = ref([])
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/i18n.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { createI18n } from 'vue-i18n'
import en from './locales/en'
import zh from './locales/zh'

const i18n = createI18n({
legacy: false,
locale: 'en', // Default to English
fallbackLocale: 'en',
messages: {
en,
zh
}
})

export default i18n
170 changes: 170 additions & 0 deletions frontend/src/locales/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
export default {
common: {
start: 'Start',
back: 'Back',
next: 'Next',
cancel: 'Cancel',
confirm: 'Confirm',
upload: 'Upload',
download: 'Download',
delete: 'Delete',
save: 'Save',
edit: 'Edit',
view: 'View',
loading: 'Loading...',
processing: 'Processing',
completed: 'Completed',
error: 'Error',
success: 'Success',
status: 'Status',
settings: 'Settings',
help: 'Help',
about: 'About'
},
home: {
nav: {
github: 'Visit our GitHub page'
},
hero: {
tag: 'Simple and Universal Swarm Intelligence Engine',
version: '/ v0.1-beta',
title: 'Upload Any Report',
titleHighlight: 'Predict the Future Instantly',
desc: 'Even with just a piece of text, <span class="highlight-bold">MiroFish</span> can automatically generate a parallel world with up to <span class="highlight-orange">millions of Agents</span> based on the real-world seeds it contains. Inject variables from a god\'s-eye view and find <span class="highlight-code">"local optimal solutions"</span> in complex group interactions.',
slogan: 'Rehearse the future in Agent groups, win decisions after hundreds of battles<span class="blinking-cursor">_</span>'
},
systemStatus: {
title: 'System Status',
ready: 'Ready',
readyDesc: 'Prediction engine on standby, ready to upload multiple unstructured data to initialize simulation sequence',
metrics: {
lowCost: 'Low Cost',
lowCostDesc: 'Average $5 per simulation',
highAvailability: 'High Availability',
highAvailabilityDesc: 'Up to millions of Agent simulations'
}
},
workflow: {
title: 'Workflow Sequence',
steps: [
{
title: 'Graph Construction',
desc: 'Real-world seed extraction & individual and group memory injection & GraphRAG construction'
},
{
title: 'Environment Setup',
desc: 'Entity relationship extraction & persona generation & environment configuration Agent injection simulation parameters'
},
{
title: 'Start Simulation',
desc: 'Dual platform parallel simulation & automatic parsing of prediction requirements & dynamic update of temporal memory'
},
{
title: 'Report Generation',
desc: 'Report Agent has rich toolset for deep interaction with post-simulation environment'
},
{
title: 'Deep Interaction',
desc: 'Chat with anyone in the simulated world & interact with Report Agent'
}
]
},
console: {
upload: {
label: '01 / Real-world Seeds',
formats: 'Supported formats: PDF, MD, TXT',
dragTitle: 'Drag files to upload',
dragHint: 'Or click to browse file system',
uploadedFiles: 'Uploaded files'
},
input: {
label: '>_ 02 / Simulation Prompt',
placeholder: '// Enter simulation or prediction requirements in natural language (e.g. What public opinion trend would be triggered if Wuhan University announces revoking Xiao\'s punishment)',
engine: 'Engine: MiroFish-V1.0'
},
button: {
start: 'Start Engine',
initializing: 'Initializing...'
}
}
},
main: {
viewModes: {
graph: 'Graph',
split: 'Split',
workbench: 'Workbench'
},
steps: [
'Graph Construction',
'Environment Setup',
'Start Simulation',
'Report Generation',
'Deep Interaction'
],
status: {
ready: 'Ready',
error: 'Error',
building: 'Building Graph',
generating: 'Generating Ontology',
initializing: 'Initializing'
}
},
components: {
step1: {
title: 'Graph Construction',
status: {
initializing: 'Initializing...',
uploading: 'Uploading and analyzing documents...',
generating: 'Generating ontology...',
building: 'Building knowledge graph...',
completed: 'Graph construction completed',
failed: 'Graph construction failed'
},
buttons: {
nextStep: 'Next Step: Environment Setup'
}
},
step2: {
title: 'Environment Setup',
description: 'Configure simulation environment and agent personas',
buttons: {
startSimulation: 'Start Simulation',
goBack: 'Go Back'
}
},
step3: {
title: 'Start Simulation',
description: 'Run multi-agent simulation',
buttons: {
nextStep: 'Next Step: Report Generation'
}
},
step4: {
title: 'Report Generation',
description: 'Generate analysis report from simulation results',
buttons: {
nextStep: 'Next Step: Deep Interaction'
}
},
step5: {
title: 'Deep Interaction',
description: 'Chat with agents and explore the simulated world',
buttons: {
chat: 'Start Chat'
}
},
history: {
title: 'Project History',
empty: 'No projects yet',
open: 'Open Project',
delete: 'Delete Project'
}
},
errors: {
noFiles: 'No files selected',
noPrompt: 'Please enter simulation requirements',
uploadFailed: 'File upload failed',
networkError: 'Network error, please try again',
unknownError: 'Unknown error occurred'
}
}
Loading