hydro-ai-helper 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +1 -0
  2. package/dist/handlers/adminConfigHandler.js +30 -0
  3. package/dist/handlers/adminConfigHandler.js.map +1 -1
  4. package/dist/handlers/batchSummaryHandler.js +15 -8
  5. package/dist/handlers/batchSummaryHandler.js.map +1 -1
  6. package/dist/handlers/studentHandler.js +1 -1
  7. package/dist/handlers/studentHandler.js.map +1 -1
  8. package/dist/handlers/teachingSummaryHandler.js +38 -9
  9. package/dist/handlers/teachingSummaryHandler.js.map +1 -1
  10. package/dist/models/aiConfig.js +15 -2
  11. package/dist/models/aiConfig.js.map +1 -1
  12. package/dist/models/studentSummary.js +13 -0
  13. package/dist/models/studentSummary.js.map +1 -1
  14. package/dist/models/teachingSummary.js +2 -0
  15. package/dist/models/teachingSummary.js.map +1 -1
  16. package/dist/services/analyzers/errorClusterAnalyzer.js +1 -0
  17. package/dist/services/analyzers/errorClusterAnalyzer.js.map +1 -1
  18. package/dist/services/analyzers/findingConsolidator.js +172 -0
  19. package/dist/services/analyzers/findingConsolidator.js.map +1 -0
  20. package/dist/services/batchSummaryService.js +79 -38
  21. package/dist/services/batchSummaryService.js.map +1 -1
  22. package/dist/services/openaiClient.js +59 -28
  23. package/dist/services/openaiClient.js.map +1 -1
  24. package/dist/services/promptService.js +49 -24
  25. package/dist/services/promptService.js.map +1 -1
  26. package/dist/services/teachingAnalysisService.js +13 -2
  27. package/dist/services/teachingAnalysisService.js.map +1 -1
  28. package/dist/services/teachingSuggestionService.js +43 -44
  29. package/dist/services/teachingSuggestionService.js.map +1 -1
  30. package/frontend/admin/BudgetConfigForm.tsx +1 -1
  31. package/frontend/admin/ConfigPanel.tsx +53 -3
  32. package/frontend/admin/EndpointManager.tsx +1 -1
  33. package/frontend/admin/FeedbackForm.tsx +1 -1
  34. package/frontend/admin/JailbreakLogsViewer.tsx +1 -1
  35. package/frontend/admin/ScenarioModelSelector.tsx +238 -0
  36. package/frontend/admin/TelemetrySettings.tsx +1 -1
  37. package/frontend/admin/VersionBadge.tsx +1 -1
  38. package/frontend/admin/configTypes.ts +9 -0
  39. package/frontend/batchSummary/BatchSummaryPanel.tsx +29 -1
  40. package/frontend/batchSummary/StudentSummaryView.tsx +47 -14
  41. package/frontend/batchSummary/SummaryCard.tsx +1 -1
  42. package/frontend/batchSummary/useBatchSummary.ts +26 -8
  43. package/frontend/components/AIHelperDashboard.tsx +1 -1
  44. package/frontend/components/ErrorBoundary.tsx +1 -1
  45. package/frontend/components/ScoreboardTabContainer.tsx +1 -1
  46. package/frontend/generated/localeFallback.ts +1502 -0
  47. package/frontend/problem_detail.page.tsx +1 -1
  48. package/frontend/student/AIAssistantPanel.tsx +1 -1
  49. package/frontend/student/ChatInput.tsx +1 -1
  50. package/frontend/student/ChatMessageList.tsx +1 -1
  51. package/frontend/student/ThinkingBlock.tsx +1 -1
  52. package/frontend/student/hooks/useChatSession.ts +1 -1
  53. package/frontend/teacher/AnalyticsPage.tsx +1 -1
  54. package/frontend/teacher/ClassAnalyticsTable.tsx +1 -1
  55. package/frontend/teacher/ConversationDetail.tsx +1 -1
  56. package/frontend/teacher/ConversationDetailModal.tsx +1 -1
  57. package/frontend/teacher/ConversationList.tsx +1 -1
  58. package/frontend/teacher/CostDashboard.tsx +1 -1
  59. package/frontend/teacher/ExportDialog.tsx +1 -1
  60. package/frontend/teacher/MetricsPanel.tsx +1 -1
  61. package/frontend/teacher/ProblemAnalyticsTable.tsx +1 -1
  62. package/frontend/teacher/StudentAnalyticsTable.tsx +1 -1
  63. package/frontend/teacher/analyticsTypes.ts +1 -1
  64. package/frontend/teachingSummary/TeachingReviewPanel.tsx +1 -1
  65. package/frontend/teachingSummary/TeachingSummaryPanel.tsx +525 -175
  66. package/frontend/teachingSummary/useTeachingSummary.ts +10 -0
  67. package/frontend/utils/i18n.ts +32 -0
  68. package/frontend/utils/i18nFallbackCore.ts +30 -0
  69. package/locales/en.yaml +30 -6
  70. package/locales/zh.yaml +30 -6
  71. package/package.json +3 -1
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React, { useState, useEffect, useCallback, useRef } from 'react';
8
- import { i18n } from '@hydrooj/ui-default';
8
+ import { i18n } from './utils/i18n';
9
9
  import { renderComponent } from './utils/renderHelper';
10
10
  import { AIAssistantPanel } from './student/AIAssistantPanel';
11
11
  import { ErrorBoundary } from './components/ErrorBoundary';
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useCallback } from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import 'highlight.js/styles/github.css';
4
4
  import { useChatSession } from './hooks/useChatSession';
5
5
  import { useTextSelection } from './hooks/useTextSelection';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { TypeIcon, SendIcon, AttachIcon, RefreshIcon, RemoveIcon } from './icons';
4
4
 
5
5
  // ── 方案 A · 克制蓝 调色 ───────────────────────────────────────────────
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { renderMarkdown as renderMarkdownSafe, renderStreamingMarkdown } from '../utils/markdown';
4
4
  import { ZINDEX } from '../utils/styles';
5
5
  import { ThinkingBlock } from './ThinkingBlock';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
 
4
4
  interface ThinkingBlockProps {
5
5
  isStreaming: boolean;
@@ -1,5 +1,5 @@
1
1
  import { useReducer, useRef, useCallback, useEffect, useMemo } from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../../utils/i18n';
3
3
  import { buildApiUrl } from '../../utils/domainUtils';
4
4
  import {
5
5
  clearConversationId as clearStoredConversationId,
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { buildApiUrl } from '../utils/domainUtils';
4
4
  import {
5
5
  COLORS, FONT_FAMILY, SPACING, RADIUS, SHADOWS, TRANSITIONS,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { buildPageUrl } from '../utils/domainUtils';
4
4
  import { COLORS, getTableHeaderStyle, getTableRowStyle, TRANSITIONS } from '../utils/styles';
5
5
  import {
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState, useEffect } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import 'highlight.js/styles/github.css';
9
9
  import { renderMarkdown } from '../utils/markdown';
10
10
  import { buildApiUrl, buildPageUrl } from '../utils/domainUtils';
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState, useEffect, useCallback } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import 'highlight.js/styles/github.css';
9
9
  import { renderMarkdown } from '../utils/markdown';
10
10
  import { buildApiUrl } from '../utils/domainUtils';
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState, useEffect } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import { ExportDialog } from './ExportDialog';
9
9
  import { ConversationDetailModal } from './ConversationDetailModal';
10
10
  import { buildApiUrl } from '../utils/domainUtils';
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState, useEffect, useCallback, useRef } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import { Chart, registerables } from 'chart.js';
9
9
  import {
10
10
  COLORS,
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import { buildApiUrl } from '../utils/domainUtils';
9
9
  import {
10
10
  COLORS, SPACING, RADIUS, TYPOGRAPHY,
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import React, { useState } from 'react';
7
- import { i18n } from '@hydrooj/ui-default';
7
+ import { i18n } from '../utils/i18n';
8
8
  import type { ConversationMetricsDTO, MetricsStatus } from './analyticsTypes';
9
9
  import {
10
10
  COLORS, SPACING, RADIUS, SHADOWS, TYPOGRAPHY,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { buildPageUrl } from '../utils/domainUtils';
4
4
  import { COLORS, RADIUS, SPACING, TRANSITIONS, getTableHeaderStyle, getTableRowStyle } from '../utils/styles';
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { buildPageUrl } from '../utils/domainUtils';
4
4
  import { formatDateTime } from '../utils/formatDate';
5
5
  import { COLORS, getTableHeaderStyle, getTableRowStyle, TRANSITIONS } from '../utils/styles';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { i18n } from '@hydrooj/ui-default';
2
+ import { i18n } from '../utils/i18n';
3
3
  import { tableRootStyle, getTableCellStyle, COLORS, getBadgeStyle } from '../utils/styles';
4
4
 
5
5
  export type Dimension = 'class' | 'problem' | 'student';
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React, { useEffect } from 'react';
8
- import { i18n } from '@hydrooj/ui-default';
8
+ import { i18n } from '../utils/i18n';
9
9
  import {
10
10
  COLORS, SPACING, RADIUS,
11
11
  cardStyle, getButtonStyle, getPaginationButtonStyle,