Skip to content

Conversation

@JeffreySu
Copy link
Contributor

@JeffreySu JeffreySu commented Nov 4, 2025

Note

Introduces an AIKernel admin dashboard with charts and adds an end-to-end AI grading toggle (IsAIGrade) for PromptRange, including UI, service logic, and DB migrations.

  • AIKernel (Admin Dashboard):
    • Adds Areas/Admin/Pages/Dashboard/Index.cshtml with metric cards and six ECharts containers.
    • Implements front-end logic in wwwroot/js/Admin/Dashboard/Index.js to fetch stats and render charts with hover animations.
    • Registers menu entry "仪表盘" via Register.Area.cs.
  • PromptRange (AI Grading Toggle):
    • Adds IsAIGrade to PromptItem domain model, DTO (PromptItemDto), and add request (PromptItem_AddRequest).
    • Updates PromptResultService to auto-score only when isAIGrade is enabled and ExpectedResultsJson is present.
    • Updates UI: Prompt.cshtml adds AI grading switch and gating for “设置 AI 评分标准”; prompt.js wires isAIGrade into requests and defaults it to true.
    • Introduces migrations for SQL Server/Sqlite adding IsAIGrade column and updates model snapshots.
  • Docs:
    • Tweaks Quick Start numbering and adds optional dotnet workload restore step in README.md.

Written by Cursor Bugbot for commit 7a99226. This will update automatically on new commits. Configure here.

Nanlv-56 and others added 7 commits July 22, 2025 14:57
在快速开始中添加了运行所需的步骤
在 `Index.cshtml` 中添加样式和结构,构建仪表盘用户界面,增强统计数据展示和图表容器的响应式布局,同时引入动画效果。

更新 `Register.Area.cs` 文件,新增指向仪表盘的菜单项。

在 `Senparc.Xncf.AIKernel.csproj` 中移除与仪表盘相关的 JavaScript 文件引用,保持项目结构整洁。

在 `Index.js` 中添加 Vue.js 实例初始化代码,定义数据和方法,提升仪表盘的交互性和动态效果。
在数据库中添加了是否进行ai评分的字段对这个模块进行了版本号升级
优化仪表盘界面和交互功能
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new isAIGrade flag feature to the PromptRange module to control whether AI-based grading is enabled, along with UI enhancements for the AIKernel dashboard.

  • Adds a boolean isAIGrade field across the PromptRange domain model, DTOs, and database schema to toggle AI grading functionality
  • Updates the PromptRange UI to include a switch control for enabling/disabling AI grading
  • Introduces a new dashboard page for the AIKernel module with statistics and charts
  • Includes database migrations for SQLite and SQL Server to add the IsAIGrade column
  • Updates version numbers and removes an obsolete project file

Reviewed Changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
PromptItem_AddRequest.cs Adds isAIGrade property to control AI grading in requests
PromptItemDto.cs Adds isAIGrade property to the DTO for data transfer
PromptItem.cs Adds IsAIGrade property to the domain model and updates constructors
PromptResultService.cs Modifies logic to check isAIGrade flag before automatic scoring
prompt.js Adds isAIGrade to Vue data and sends it with form submissions
Prompt.cshtml Adds toggle switch UI for AI grading control
Register.cs Bumps version from 0.19.11 to 0.19.12
Senparc.Xncf.PromptRange.csproj Removes obsolete folder reference
Senparc.Xncf.PromptRange.ForNcf.csproj Deletes entire deprecated project file
Migration files Adds database migrations for IsAIGrade column
Dashboard/Index.cshtml Creates new dashboard page with statistics and charts
Index.js Adds JavaScript for dashboard functionality
Register.Area.cs Adds new dashboard menu item
BuildXncfAppService.Generated.cs Auto-generated code formatting changes
README.md Updates quick start formatting and adds workload restore step
Files not reviewed (2)
  • src/Extensions/Senparc.Xncf.PromptRange/Domain/Migrations/Migrations.SqlServer/20250816100529_Add_IsAIGrade.Designer.cs: Language not supported
  • src/Extensions/Senparc.Xncf.PromptRange/Domain/Migrations/Sqlite/20250816100504_Add_IsAIGrade.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

JaneConan and others added 2 commits November 5, 2025 00:54
# Conflicts:
#	src/Extensions/Senparc.Xncf.AIKernel/Senparc.Xncf.AIKernel.csproj
#	src/Extensions/Senparc.Xncf.PromptRange/Register.cs
#	src/Extensions/Senparc.Xncf.PromptRange/Senparc.Xncf.PromptRange.ForNcf.csproj
#	src/Extensions/Senparc.Xncf.PromptRange/Senparc.Xncf.PromptRange.csproj
Copy link
Contributor

Copilot AI commented Nov 5, 2025

@JeffreySu I've opened a new pull request, #468, to work on those changes. Once the pull request is ready, I'll request review from you.

JeffreySu and others added 6 commits November 5, 2025 22:59
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Copy link
Contributor

Copilot AI commented Nov 5, 2025

@JeffreySu I've opened a new pull request, #469, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Nov 5, 2025

@JeffreySu I've opened a new pull request, #470, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits November 5, 2025 15:02
@JeffreySu JeffreySu requested a review from Copilot November 5, 2025 16:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 16 out of 18 changed files in this pull request and generated 6 comments.

Files not reviewed (2)
  • src/Extensions/Senparc.Xncf.PromptRange/Domain/Migrations/Migrations.SqlServer/20250816100529_Add_IsAIGrade.Designer.cs: Language not supported
  • src/Extensions/Senparc.Xncf.PromptRange/Domain/Migrations/Sqlite/20250816100504_Add_IsAIGrade.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

type: 'line',
stack: '总量',
areaStyle: { color: '#91c7ae' }, // 添加区域填充颜色
data: this.chartData.map(item => item.normalLogCount),
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chart 2 ('活跃用户数') is using 'normalLogCount' data instead of user-specific data. This appears to be copy-pasted from Chart 1 and should use appropriate user count data.

Suggested change
data: this.chartData.map(item => item.normalLogCount),
data: this.chartData.map(item => item.activeUserCount),

Copilot uses AI. Check for mistakes.
type: 'line',
stack: '总量',
areaStyle: { color: '#91c7ae' }, // 添加区域填充颜色
data: this.chartData.map(item => item.normalLogCount),
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chart 3 ('平均会话互动数') is using 'normalLogCount' data instead of interaction-specific data. This should map to the appropriate interaction count property.

Suggested change
data: this.chartData.map(item => item.normalLogCount),
data: this.chartData.map(item => item.interactionCount),

Copilot uses AI. Check for mistakes.
type: 'line',
stack: '总量',
areaStyle: { color: '#91c7ae' }, // 添加区域填充颜色
data: this.chartData.map(item => item.normalLogCount),
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chart 4 ('Token 输出速度') is using 'normalLogCount' data instead of token speed data. This should map to the appropriate token output speed property.

Suggested change
data: this.chartData.map(item => item.normalLogCount),
data: this.chartData.map(item => item.tokenOutputSpeed),

Copilot uses AI. Check for mistakes.
type: 'line',
stack: '总量',
areaStyle: { color: '#91c7ae' }, // 添加区域填充颜色
data: this.chartData.map(item => item.normalLogCount),
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chart 5 ('用户满意度') is using 'normalLogCount' data instead of satisfaction data. This should map to the appropriate user satisfaction property.

Suggested change
data: this.chartData.map(item => item.normalLogCount),
data: this.chartData.map(item => item.userSatisfaction),

Copilot uses AI. Check for mistakes.
type: 'line',
stack: '总量',
areaStyle: { color: '#91c7ae' }, // 添加区域填充颜色
data: this.chartData.map(item => item.normalLogCount),
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chart 6 ('全部消息数') is using 'normalLogCount' data instead of message-specific data. This should map to the appropriate message count property.

Suggested change
data: this.chartData.map(item => item.normalLogCount),
data: this.chartData.map(item => item.messageCount),

Copilot uses AI. Check for mistakes.
public override string Uid => "C6175B8E-9F79-4053-9523-F8E4AC0C3E18"; //必须确保全局唯一,生成后必须固定,已自动生成,也可自行修改

public override string Version => "0.13.17"; //必须填写版本号
public override string Version => "0.13.18"; //必须填写版本号
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version mismatch: Register.cs shows '0.13.18' but the .csproj file shows '0.14.0-preview.1'. These version numbers should be synchronized.

Suggested change
public override string Version => "0.13.18"; //必须填写版本号
public override string Version => "0.14.0-preview.1"; //必须填写版本号

Copilot uses AI. Check for mistakes.
@JeffreySu JeffreySu merged commit 8dee8e8 into Developer-MCP Nov 5, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants