Commit Graph

236 Commits

Author SHA1 Message Date
ghostubborn da2490ec31 fix(i18n): protect JSON field values from language instruction in config generator
Ensure poster_type stays PascalCase English and stance stays English enum
values regardless of language setting. Only natural language fields follow
the user's language preference.
2026-04-01 16:41:22 +08:00
ghostubborn 97aa58384e fix(i18n): ensure ontology names stay PascalCase regardless of language setting
The language instruction was causing LLM to change entity/relation naming
conventions. Now explicitly enforce PascalCase/UPPER_SNAKE_CASE for technical
identifiers while only applying language preference to description fields.
2026-04-01 16:40:17 +08:00
ghostubborn e1db8bacc2 feat(i18n): replace hardcoded Chinese in frontend addLog() messages 2026-04-01 16:35:35 +08:00
ghostubborn 9d43b77511 feat(i18n): replace hardcoded Chinese in backend SSE progress messages 2026-04-01 16:32:10 +08:00
ghostubborn ffe6369c52 fix(i18n): fix curly quotes in Home.vue and remove unused dark theme from LanguageSwitcher 2026-04-01 16:23:52 +08:00
ghostubborn f75c6487b3 fix(i18n): replace remaining hardcoded language directives in LLM prompts
- oasis_profile_generator: replace hardcoded "使用中文" with dynamic get_language_instruction()
- ontology_generator: remove hardcoded "(中文)" from schema annotation
- report_agent: replace Chinese-specific language consistency rules with language-neutral ones
- zep_tools: dynamically select quote style based on locale
2026-04-01 15:55:04 +08:00
ghostubborn fbaa3dbbeb fix(i18n): fix curly quotes and missing @ alias in vite config 2026-04-01 15:45:43 +08:00
ghostubborn fc47ae81b5 feat(i18n): replace hardcoded Chinese in frontend components with i18n calls
Replace all user-visible hardcoded Chinese strings in 7 component files
with $t() / t() calls using vue-i18n:

- Step1GraphBuild: ontology generation, graph build, status badges
- Step2EnvSetup: simulation setup, agent personas, platform config,
  time config, initial activation, modal profile details
- Step3Simulation: report generation button
- Step4Report: section loading text, interaction button
- Step5Interaction: chat interface, survey UI, tool descriptions,
  error messages, agent selection
- GraphPanel: graph status hints, loading states, tooltips
- HistoryDatabase: history cards, modal, replay buttons

Added missing translation keys to both zh.json and en.json locale files.
Added useI18n imports to components that need script-level translations.
2026-04-01 15:43:11 +08:00
ghostubborn 70833821a2 feat(i18n): replace hardcoded Chinese in frontend views with i18n calls 2026-04-01 15:36:29 +08:00
ghostubborn 74f673a238 feat(i18n): replace hardcoded Chinese in backend API responses with t() calls 2026-04-01 15:32:24 +08:00
ghostubborn 3d5e5d024d feat(i18n): add language switcher component to navigation 2026-04-01 15:24:58 +08:00
ghostubborn 8f6110df0f feat(i18n): inject language instruction into LLM system prompts 2026-04-01 15:24:12 +08:00
ghostubborn 22bf50f877 feat(i18n): set up vue-i18n with dynamic locale loading 2026-04-01 15:22:14 +08:00
ghostubborn 0c18e1aeca feat(i18n): add backend translation utility with shared locale files 2026-04-01 15:22:14 +08:00
ghostubborn 2ffadd3038 feat(i18n): add Accept-Language header to all API requests 2026-04-01 15:22:07 +08:00
ghostubborn c8a1bd5cbf feat(i18n): add shared translation files and language registry 2026-04-01 15:20:49 +08:00
666ghj 1536a79334 fix(readme): update Discord link to valid invite URL 2026-03-20 10:50:39 +08:00
666ghj 985f89f49a fix: resolve 500 error caused by <think> tags and markdown code fences in content field from reasoning models like MiniMax/GLM 2026-03-06 00:30:31 +08:00
666ghj a1ff79c0ef Update README 2026-03-05 23:22:26 +08:00
666ghj 85b03d4f0f Update README 2026-02-27 17:29:41 +08:00
666ghj c6cea12774 docs(readme): add live demo section with link to online prediction simulation for both English and Chinese README files 2026-02-27 17:27:49 +08:00
666ghj da6548e96f feat(graph): implement pagination for fetching nodes and edges; add utility functions for streamlined data retrieval 2026-02-27 15:53:29 +08:00
666ghj d30a0a23ef Update README 2026-02-25 16:16:24 +08:00
666ghj 25aa4f75d2 fix(report_agent): refine tool call handling and response validation; enforce strict separation between tool calls and final answers 2026-02-24 17:47:44 +08:00
666ghj a795405428 style(home): add overflow-y property to upload zone and adjust alignment for files 2026-02-22 23:40:40 +08:00
666ghj 040c745c86 feat(readme): add Trendshift badge to README files for repository visibility 2026-02-22 23:07:28 +08:00
666ghj 08ec856a58 fix(report_agent): update max_agents parameter description and enforce maximum limit of 10 agents 2026-02-14 18:35:05 +08:00
666ghj ae1f38cdcc fix(report_agent): improve markdown rendering by cleaning up <br> tags around block-level elements and enhancing list formatting 2026-02-14 18:25:20 +08:00
666ghj ddd9ff2479 feat(report_agent): update report language consistency guidelines; ensure all quoted content is translated to the report language for clarity 2026-02-14 18:24:03 +08:00
666ghj 709a0d7023 feat(report_agent): enhance markdown rendering for lists and improve formatting; support nested lists and clean up HTML output 2026-02-14 17:04:04 +08:00
666ghj 7601d78fd4 feat(report_agent): enhance interview text processing and response handling; improve quote extraction and formatting for better clarity 2026-02-14 16:56:48 +08:00
666ghj dc0a9261d1 feat(report_agent): add detailed tool descriptions and prompts for future prediction report generation 2026-02-14 15:16:17 +08:00
666ghj d2041f6fb8 fix(report_agent): update description of insight_forge tool to remove "最强大" and enhance clarity 2026-02-14 14:48:23 +08:00
666ghj 0a59bace92 fix(report_agent): increase minimum tool call requirement from 2 to 3 per chapter and enhance user prompts to encourage diverse tool usage 2026-02-06 19:37:52 +08:00
666ghj e004fe8f14 fix(report_agent): update tool call requirements in content generation to allow up to 5 tool calls per chapter and clarify user prompts for insufficient data 2026-02-06 18:34:19 +08:00
666ghj f9abaf8e9f refactor(report_agent, Step4Report): simplify logging and remove subsection handling; update UI to reflect changes in section content generation 2026-02-06 18:13:30 +08:00
666ghj 54f1291967 fix(report_agent): handle None responses from LLM during content generation and enforce fallback behavior 2026-01-29 17:08:39 +08:00
666ghj 0b71f89f96 fix(Step2EnvSetup): update expectedTotal only when API returns a valid value to prevent overwriting existing data 2026-01-29 10:58:36 +08:00
666ghj 40f7035947 fix(config): enable overriding of environment variables when loading .env file 2026-01-23 16:20:24 +08:00
666ghj 93e1a592df feat(README): add Docker badge to README files for enhanced visibility of Docker support 2026-01-22 19:03:44 +08:00
666ghj 390c120fef fix(file_parser): handle non-UTF-8 encoded text files with automatic encoding detection 2026-01-22 18:28:37 +08:00
666ghj 0efd9352a0 feat(docker): add Docker support with Dockerfile, docker-compose.yml, and .dockerignore; update README for Docker deployment instructions 2026-01-22 14:35:41 +08:00
666ghj 9556854fbf refactor(.env.example): update LLM API configuration comments for clarity and add usage note 2026-01-20 18:05:36 +08:00
666ghj 94633e1330 refactor(README): update demo video section titles and clarify LLM API configuration instructions 2026-01-20 18:02:33 +08:00
666ghj b0e065ed20 refactor(README): update demo video section to include new financial and political prediction examples 2026-01-20 11:25:24 +08:00
666ghj 824e81e1a4 refactor(README): update demo video section titles for clarity and consistency 2026-01-20 11:21:45 +08:00
666ghj fa19242477 fix(README): update image asset for Dream of the Red Chamber demo video section 2026-01-20 11:18:35 +08:00
666ghj be2acf663d feat(README): add demo video sections for Wuhan University Public Opinion and Dream of the Red Chamber simulations; include new image asset 2026-01-20 11:17:11 +08:00
666ghj 57e72250a9 chore(README): remove note about Windows compatibility from prerequisites section. 2026-01-18 22:37:02 +08:00
666ghj 085aa6bbe6 fix(GraphPanel): optimize force graph drag behavior to prevent simulation restart on click
Background:
- With many nodes, D3 force simulation tick callback updates all nodes/edges/labels every frame
- Original implementation called simulation.restart() in drag start event on mousedown
- Even after simulation converged, clicking a node to view details would restart simulation, causing lag

Solution:
- Distinguish between "click" and "drag" using 3px movement threshold
- On drag start: only record initial position, do not restart simulation
- On drag event: detect movement exceeding threshold before marking as actual drag and restarting simulation
- Pure click operations no longer trigger simulation restart, keeping graph static

Bug fix:
- Fixed issue where nodes became undraggable after initial optimization
- Cause: incorrectly used if(!event.active) check in drag event
- event.active equals 1 during drag event, causing restart() to never execute
- Removed that condition, using custom _isDragging flag to control logic instead
2026-01-18 22:35:24 +08:00