feat: restore learning feedback and knowledge capabilities

This commit is contained in:
2026-07-18 00:50:11 +08:00
parent 876a23a123
commit 6bdc86e3fc
152 changed files with 30337 additions and 953 deletions
+258
View File
@@ -18,6 +18,15 @@ export interface MobileIdentity {
positionLevel: string;
}
export interface TtsResponse {
audioUrl: string;
inlineAudioUrl?: string;
source?: string;
ossId?: number | string;
}
export type SpeechPlaybackStatus = 'idle' | 'loading' | 'playing';
export interface ToolItem {
title: string;
desc: string;
@@ -82,6 +91,8 @@ export interface KnowledgeSnippet {
content: string;
source?: string;
fragmentId?: number | null;
spaceCode?: string | null;
sourceType?: 'DOCUMENT' | 'DATA_TOOL' | string;
}
export interface KnowledgeDoc {
@@ -91,6 +102,7 @@ export interface KnowledgeDoc {
}
export interface KnowledgeSearchResponse {
requestId?: string;
queryText: string;
category: string;
answer: string;
@@ -103,6 +115,38 @@ export interface KnowledgeSearchResponse {
cautions?: string[];
promptVersion?: string | null;
reviewId?: number | null;
citations?: KnowledgeCitation[];
usedSpaceCodes?: string[];
noEvidence?: boolean;
data?: unknown;
}
export interface KnowledgeMediaSelectedFile {
path: string;
name: string;
size: number;
kind: 'image' | 'video';
}
export interface KnowledgeCitation {
spaceCode?: string | null;
sourceType: 'DOCUMENT' | 'DATA_TOOL' | string;
docId?: string | null;
title: string;
snippet: string;
fragmentId?: number | null;
}
export interface UnifiedKnowledgeResponse {
requestId: string;
queryText: string;
answer: string;
citations: KnowledgeCitation[];
usedSpaceCodes: string[];
noEvidence: boolean;
promptVersion?: string | null;
legacy?: KnowledgeSearchResponse | null;
data?: unknown;
}
export interface CaseCapabilities {
@@ -313,6 +357,33 @@ export interface PracticeAssignment {
scoreMode?: string;
audioUrl?: string;
audioOssId?: number | string;
dueDate?: string;
contentVersion?: string;
contentHash?: string;
questionCode?: string;
itemFeedback?: 'useful' | 'not_useful' | null;
}
export interface PracticeQuestionFeedback {
assignmentId: number;
verdict: 'useful' | 'not_useful';
comment?: string;
savedAt?: string;
}
export interface PracticeDifficulty {
scenarioId: string;
scenarioName: string;
cause: string;
count: number;
affectedPeople: number;
averageScore: number;
latestTime: string;
position?: string;
assignmentStatus?: string;
attempts?: number;
mistakeCount?: number;
difficultyScore?: number;
}
export interface OnboardTask {
@@ -355,6 +426,40 @@ export interface PracticeAssignmentRequest {
scenarioName?: string;
source?: string;
reason?: string;
dueDate?: string;
requestId?: string;
}
export interface PracticeAssignmentTarget {
extPartyId: string;
traineeName: string;
}
export interface PracticeAssignmentBatchRequest {
requestId: string;
targets: PracticeAssignmentTarget[];
scenarioId: string;
reason?: string;
dueDate: string;
}
export type PracticeAssignmentBatchItemStatus = 'CREATED' | 'DUPLICATE' | 'FAILED';
export interface PracticeAssignmentBatchItemResult {
extPartyId: string;
traineeName: string;
status: PracticeAssignmentBatchItemStatus;
message: string;
assignment?: PracticeAssignment | null;
}
export interface PracticeAssignmentBatchResponse {
requestId: string;
total: number;
created: number;
duplicate: number;
failed: number;
results: PracticeAssignmentBatchItemResult[];
}
export interface DailyDrillAnswerResponse {
@@ -369,6 +474,159 @@ export interface DailyDrillAnswerResponse {
audioOssId?: number | string;
}
export interface WebAiCapabilities {
enabled: boolean;
requiresConsent: boolean;
providerName?: string;
maxQuestionLength: number;
notice?: string;
}
export interface WebAiCitation {
title: string;
url: string;
domain: string;
snippet: string;
publishedAt?: string | null;
retrievedAt?: string | null;
}
export interface WebAiResponse {
requestId: string;
status: string;
provider: string;
answer: string;
citations: WebAiCitation[];
noEvidence: boolean;
warning: string;
redacted: boolean;
}
export type QuestionBoardTab = 'HOT' | 'UNANSWERED' | 'REWARDED' | 'MINE';
export interface QuestionBoardAnswer {
id: number;
questionId: number;
content: string;
authorName: string;
authorPosition?: string;
status: string;
best: boolean;
recommended?: boolean;
mine?: boolean;
createTime: string;
}
export interface QuestionBoardItem {
id: number;
type: 'HELP' | 'BOUNTY' | string;
title: string;
content?: string;
category: string;
authorName: string;
position?: string;
status: string;
rewardPoints: number;
rewardAccountType?: 'POINTS' | 'STUDY_CREDIT' | string;
answerCount: number;
viewCount?: number;
deadline?: string | null;
createTime: string;
bestAnswerId?: number | null;
mine?: boolean;
answers?: QuestionBoardAnswer[];
}
export interface IncentiveBalance {
accountType: 'REWARD' | 'STUDY_CREDIT' | string;
displayName: string;
balance: number;
unitName: string;
}
export interface IncentiveLedgerItem {
id: number;
accountType: string;
points: number;
direction: 'EARN' | 'REVERSE' | string;
sourceType: string;
remark: string;
createTime: string;
}
export interface ExamQuestion {
id: number;
format: 'single' | 'multiple' | 'judge' | 'short' | string;
stem: string;
options: string[];
score: number;
answer?: string | string[];
explanation?: string;
}
export interface ExamSummary {
id: number;
title: string;
projectCode?: string;
positionCode?: string;
status: string;
totalScore: number;
passingScore: number;
dueDate?: string | null;
questionCount: number;
targetCount: number;
submissionCount: number;
bestScore?: number | null;
passed?: boolean | null;
}
export interface ExamTarget {
extPartyId: string;
traineeName: string;
projectCode?: string;
positionName?: string;
}
export interface ExamDetail extends ExamSummary {
questions: ExamQuestion[];
targets: ExamTarget[];
}
export interface ExamSubmitResult {
attemptId: number;
score: number;
passed: boolean;
status: string;
submittedTime: string;
results: Array<{
questionId: number;
correct: boolean;
earnedScore: number;
maxScore: number;
explanation: string;
}>;
}
export interface SupervisorExamDraft {
title: string;
projectCode: string;
positionCode: string;
passScore: number;
dueDate: string;
targets: PracticeAssignmentTarget[];
questions: ExamQuestion[];
}
export interface ExamResultItem {
attemptId: number | null;
extPartyId: string;
traineeName: string;
score: number | null;
passed: boolean | null;
submittedTime: string | null;
status: string;
}
export interface PracticeAlert {
type: string;
title: string;