✨ feat(ui): 重新设计判题结果页与提交页
- 判题结果页引入友好错误解释面板,按 verdict 类型给出提示与改进建议 - 新增 dedup_runtimeinfo() 函数将重复 RE 测试点折叠为区间汇总 - 区分管理员/源浏览者与普通用户视图,原始错误默认折叠 - 错误模式匹配扩展至 28 条,覆盖 glibc/Java/Python/Go 等常见运行时异常 - 提交页改用卡片式布局,编辑器工具栏与测试运行区交互优化 - 中英文语言文件补充相关文案与快捷操作标签 - 切换 LLM 点评 API 至 newapi.klarkxy.xyz,模型改为 minimax-m3 - 新增 .codegraph/.gitignore 忽略本地调试数据
This commit is contained in:
@@ -357,6 +357,39 @@
|
||||
$MSG_INVALID_CONVERSION="The implicit type conversion is invalid, try to use explicit coercion such as (int *)malloc(....)";
|
||||
$MSG_NO_RETURN_TYPE_IN_MAIN="In the C++ standard, the main function must have a return value.";
|
||||
$MSG_NOT_DECLARED_IN_SCOPE="The variable has not been declared, check for spelling errors!";
|
||||
|
||||
// reinfo.php friendly hints
|
||||
$MSG_RUNTIME_GENERIC_ERROR="An unspecified runtime error occurred. Check boundary conditions, empty inputs, and edge cases.";
|
||||
$MSG_FORBIDDEN_SYSCALL="A forbidden system call was used. Check if you tried to access files, network, or processes directly.";
|
||||
$MSG_HINT_TLE="Time Limit Exceeded (TLE). Common causes: high algorithm complexity (e.g. O(n²) when n ≤ 10⁵), infinite loops, slow I/O. Use scanf/printf or faster I/O.";
|
||||
$MSG_HINT_MLE="Memory Limit Exceeded (MLE). Common causes: oversized arrays, deep recursion, unreleased memory.";
|
||||
$MSG_HINT_OLE="Output Limit Exceeded (OLE). Common causes: infinite output loops, missing newlines, leftover debug prints.";
|
||||
$MSG_RAW_ERROR="View raw error information";
|
||||
$MSG_RESULT_BANNER="Verdict";
|
||||
$MSG_QUICK_ACTIONS="Quick actions";
|
||||
$MSG_RESUBMIT="Resubmit";
|
||||
$MSG_VIEW_SOURCE="View my code";
|
||||
$MSG_VIEW_PROBLEM="View problem";
|
||||
$MSG_DOWNLOAD_DATA="Download test data";
|
||||
$MSG_FRIENDLY_EXPLAIN="Error explanation";
|
||||
$MSG_DEDUP_HINT="Collapsed %d duplicate test cases";
|
||||
$MSG_AI_REVIEW_DESC="Analyzing your code and verdict";
|
||||
$MSG_DEDUP_GROUP="%s: %s (in %d test cases)";
|
||||
|
||||
// Additional RE patterns
|
||||
$MSG_STACK_SMASHING_DETECTED="Stack smashing detected. Usually means an out-of-bounds write into a stack buffer. Check char arrays and loop write bounds.";
|
||||
$MSG_TERMINATE_CALLED="C++ exception was thrown but not caught (terminate called after throwing). Check that all throw statements are wrapped in try/catch.";
|
||||
$MSG_NULL_POINTER_EXCEPTION="NullPointerException. A method or field was called on an uninitialized object.";
|
||||
$MSG_NUMBER_FORMAT_EXCEPTION="NumberFormatException. Failed to parse a non-numeric string as a number. Check your input parsing.";
|
||||
$MSG_CLASS_CAST_EXCEPTION="ClassCastException. Tried to cast an object to an incompatible type.";
|
||||
$MSG_NEGATIVE_ARRAY_SIZE_EXCEPTION="NegativeArraySizeException. The array size computed to a negative value.";
|
||||
$MSG_PYTHON_TRACEBACK="Python raised an exception. The traceback below shows the call stack — read from bottom to top to find the origin.";
|
||||
$MSG_PYTHON_RECURSION_ERROR="RecursionError: maximum recursion depth exceeded. Consider converting to iteration or raising the limit.";
|
||||
$MSG_PYTHON_INDENTATION_ERROR="IndentationError. Python uses indentation for code blocks. Check for mixed tabs/spaces.";
|
||||
$MSG_PYTHON_ZERO_DIVISION="ZeroDivisionError.";
|
||||
$MSG_PYTHON_NAME_ERROR="NameError. Used an undefined name (variable or function). Check spelling and imports.";
|
||||
$MSG_GO_PANIC="Go panic — usually out-of-bounds access, nil pointer, or failed type assertion.";
|
||||
$MSG_ABORTED_CORE_DUMPED="Aborted. Usually caused by a failed assert or std::terminate.";
|
||||
$MSG_MAIN_MUST_RETURN_INT="In the standard C language, the return value type of the main function must be int, and the use of void in teaching materials and VC is a non-standard usage.";
|
||||
$MSG_PRINTF_NOT_DECLARED_IN_SCOPE="The printf function is called without a declaration, and check whether the <stdio.h> or <cstdio> header file is imported.";
|
||||
$MSG_IGNOREING_RETURN_VALUE="Warning: Ignore the return value of the function, it may be that the function is used incorrectly or the return value is not considered abnormal.";
|
||||
|
||||
Reference in New Issue
Block a user