feat: 将成长档案调整为近期实修回顾
This commit is contained in:
@@ -1660,30 +1660,25 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") {
|
||||
<div><span>生成记录</span><strong>求助卡 {{ selectedUserDetail.metrics.helpCardCount }} / 分享稿 {{ selectedUserDetail.metrics.shareDraftCount }}</strong></div>
|
||||
</section>
|
||||
|
||||
<h3 class="detail-title">成长档案摘要</h3>
|
||||
<h3 class="detail-title">近期实修回顾</h3>
|
||||
<section v-if="selectedUserDetail.growthProfile" class="topic-summary-card">
|
||||
<pre>{{ selectedUserDetail.growthProfile.profileText || '暂无成长档案摘要' }}</pre>
|
||||
<div class="topic-summary-fields">
|
||||
<p v-if="selectedUserDetail.growthProfile.recurringTopics"><strong>反复议题</strong>{{ selectedUserDetail.growthProfile.recurringTopics }}</p>
|
||||
<p v-if="selectedUserDetail.growthProfile.commonEmotions"><strong>常见情绪</strong>{{ selectedUserDetail.growthProfile.commonEmotions }}</p>
|
||||
<p v-if="selectedUserDetail.growthProfile.bodyPatterns"><strong>身体模式</strong>{{ selectedUserDetail.growthProfile.bodyPatterns }}</p>
|
||||
<p v-if="selectedUserDetail.growthProfile.homeworkDone"><strong>做过功课</strong>{{ selectedUserDetail.growthProfile.homeworkDone }}</p>
|
||||
<p v-if="selectedUserDetail.growthProfile.effectiveHomework"><strong>有效功课</strong>{{ selectedUserDetail.growthProfile.effectiveHomework }}</p>
|
||||
<p v-if="selectedUserDetail.growthProfile.recentProgress"><strong>近期变化</strong>{{ selectedUserDetail.growthProfile.recentProgress }}</p>
|
||||
<pre>{{ selectedUserDetail.growthProfile.reviewText || '暂无近期回顾' }}</pre>
|
||||
<div v-if="selectedUserDetail.growthProfile.currentFocus" class="topic-summary-fields">
|
||||
<p><strong>近期关注</strong>{{ selectedUserDetail.growthProfile.currentFocus }}</p>
|
||||
</div>
|
||||
</section>
|
||||
<el-empty v-else description="该用户暂无成长档案沉淀" :image-size="64" />
|
||||
<el-empty v-else description="该用户暂无新版近期实修回顾,将在下一次主题沉淀后生成" :image-size="64" />
|
||||
|
||||
<section class="user-report-head">
|
||||
<div>
|
||||
<h3 class="detail-title">周期报告</h3>
|
||||
<p>基于已沉淀的主题摘要生成,不读取整段原始聊天;同一周期重复生成会覆盖旧报告。</p>
|
||||
<h3 class="detail-title">周期实修回顾</h3>
|
||||
<p>只基于本周期主题摘要回顾近期关注,不评价成长结果;同一周期重复生成会覆盖旧版本。</p>
|
||||
</div>
|
||||
<div class="user-report-actions">
|
||||
<el-button size="small" @click="refreshSelectedUserDetail">刷新状态</el-button>
|
||||
<el-button size="small" :loading="userReportGenerating === 'weekly'" @click="generateUserReport('weekly')">生成周报</el-button>
|
||||
<el-button size="small" :loading="userReportGenerating === 'monthly'" @click="generateUserReport('monthly')">生成月报</el-button>
|
||||
<el-button size="small" :loading="userReportGenerating === 'stage'" @click="generateUserReport('stage')">生成阶段总结</el-button>
|
||||
<el-button size="small" :loading="userReportGenerating === 'stage'" @click="generateUserReport('stage')">生成阶段回顾</el-button>
|
||||
</div>
|
||||
</section>
|
||||
<el-collapse v-if="selectedUserDetail.recentReports.length" class="topic-summary-collapse">
|
||||
@@ -1738,12 +1733,10 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") {
|
||||
</div>
|
||||
<p v-if="topic.summary.errorMessage" class="report-error">最近错误:{{ topic.summary.errorMessage }}</p>
|
||||
<pre v-if="topic.summary.status === 'success' || topic.summary.status === 'fallback'">{{ topic.summary.summary }}</pre>
|
||||
<p v-else-if="topic.summary.status === 'pending' || topic.summary.status === 'running'" class="report-pending">主题已结束,摘要和成长档案正在后台生成。</p>
|
||||
<p v-else-if="topic.summary.status === 'pending' || topic.summary.status === 'running'" class="report-pending">主题已结束,摘要和近期实修回顾正在后台生成。</p>
|
||||
<div v-if="topic.summary.status === 'success' || topic.summary.status === 'fallback'" class="topic-summary-fields">
|
||||
<p v-if="topic.summary.emotions"><strong>情绪</strong>{{ topic.summary.emotions }}</p>
|
||||
<p v-if="topic.summary.bodyFeelings"><strong>身体感受</strong>{{ topic.summary.bodyFeelings }}</p>
|
||||
<p v-if="topic.summary.recommendedHomework"><strong>推荐功课</strong>{{ topic.summary.recommendedHomework }}</p>
|
||||
<p v-if="topic.summary.nextObservation"><strong>下一步观察</strong>{{ topic.summary.nextObservation }}</p>
|
||||
<p v-if="topic.summary.currentFocus"><strong>本次关注</strong>{{ topic.summary.currentFocus }}</p>
|
||||
<p v-if="topic.summary.nextObservation"><strong>可以继续留意</strong>{{ topic.summary.nextObservation }}</p>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="topic.summary.status === 'failed'"
|
||||
@@ -1844,11 +1837,8 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") {
|
||||
<template v-if="topic.summary">
|
||||
<pre>{{ topic.summary.summary }}</pre>
|
||||
<div class="topic-summary-fields">
|
||||
<p v-if="topic.summary.mainEvents"><strong>主要事件</strong>{{ topic.summary.mainEvents }}</p>
|
||||
<p v-if="topic.summary.emotions"><strong>情绪</strong>{{ topic.summary.emotions }}</p>
|
||||
<p v-if="topic.summary.bodyFeelings"><strong>身体感受</strong>{{ topic.summary.bodyFeelings }}</p>
|
||||
<p v-if="topic.summary.recommendedHomework"><strong>推荐功课</strong>{{ topic.summary.recommendedHomework }}</p>
|
||||
<p v-if="topic.summary.nextObservation"><strong>下一步观察</strong>{{ topic.summary.nextObservation }}</p>
|
||||
<p v-if="topic.summary.currentFocus"><strong>本次关注</strong>{{ topic.summary.currentFocus }}</p>
|
||||
<p v-if="topic.summary.nextObservation"><strong>可以继续留意</strong>{{ topic.summary.nextObservation }}</p>
|
||||
</div>
|
||||
</template>
|
||||
<el-empty v-else description="该主题尚未沉淀摘要" :image-size="60" />
|
||||
|
||||
@@ -569,7 +569,7 @@ function errorMessage(error: unknown, fallback: string) {
|
||||
:remote-method="searchDebugUsers"
|
||||
:loading="debugUserLoading"
|
||||
:disabled="agentDebugging"
|
||||
placeholder="不选择则不注入学员权益和成长档案"
|
||||
placeholder="不选择则不注入学员权益和近期实修回顾"
|
||||
@change="handleDebugUserChange"
|
||||
>
|
||||
<el-option
|
||||
@@ -579,7 +579,7 @@ function errorMessage(error: unknown, fallback: string) {
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="agent-form-help">加载该学员的权益和长期成长档案;不会消耗额度或改动正式会话。</div>
|
||||
<div class="agent-form-help">加载该学员的权益和近期实修回顾;只用于保持近期对话连续性,不会消耗额度或改动正式会话。</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="模拟主题(可选)">
|
||||
<el-select
|
||||
|
||||
@@ -37,8 +37,8 @@ const enabledCount = computed(() => props.plans.filter((plan) => plan.status ===
|
||||
const capabilityOptions = [
|
||||
{
|
||||
key: "enableGrowthProfile" as const,
|
||||
title: "成长档案",
|
||||
description: "持续沉淀学员主题、变化与成长记录",
|
||||
title: "近期实修回顾",
|
||||
description: "基于近期主题保持连续性,不做长期画像和成长评价",
|
||||
},
|
||||
{
|
||||
key: "enablePeriodicReports" as const,
|
||||
@@ -251,7 +251,7 @@ async function editPlan(plan: EntitlementPlan) {
|
||||
<el-table-column label="能力" min-width="360">
|
||||
<template #default="{ row }">
|
||||
<div class="entitlement-capabilities">
|
||||
<el-tag v-if="row.enableGrowthProfile" type="success" effect="plain">成长档案</el-tag>
|
||||
<el-tag v-if="row.enableGrowthProfile" type="success" effect="plain">近期实修回顾</el-tag>
|
||||
<el-tag v-if="row.enablePeriodicReports" type="success" effect="plain">周期报告</el-tag>
|
||||
<el-tag v-if="row.allowHelpCard" effect="plain">求助卡片</el-tag>
|
||||
<el-tag v-if="row.allowShareDraft" effect="plain">分享草稿</el-tag>
|
||||
|
||||
@@ -489,13 +489,9 @@ export interface TopicSummaryRecord {
|
||||
id: number;
|
||||
topicSessionId: number;
|
||||
userId: number;
|
||||
schemaVersion: number;
|
||||
summary: string;
|
||||
mainEvents?: string | null;
|
||||
emotions?: string | null;
|
||||
bodyFeelings?: string | null;
|
||||
beliefs?: string | null;
|
||||
recommendedHomework?: string | null;
|
||||
insights?: string | null;
|
||||
currentFocus?: string | null;
|
||||
nextObservation?: string | null;
|
||||
modelName?: string | null;
|
||||
status: string;
|
||||
@@ -511,14 +507,10 @@ export interface TopicSummaryRecord {
|
||||
export interface UserGrowthProfileRecord {
|
||||
id: number;
|
||||
userId: number;
|
||||
profileText: string;
|
||||
recurringTopics?: string | null;
|
||||
commonEmotions?: string | null;
|
||||
bodyPatterns?: string | null;
|
||||
relationPatterns?: string | null;
|
||||
homeworkDone?: string | null;
|
||||
effectiveHomework?: string | null;
|
||||
recentProgress?: string | null;
|
||||
schemaVersion: number;
|
||||
reviewText: string;
|
||||
currentFocus?: string | null;
|
||||
sourceSummaryIds: number[];
|
||||
lastTopicSummaryId?: number | null;
|
||||
updatedBy: string;
|
||||
createdAt: string;
|
||||
@@ -528,6 +520,7 @@ export interface UserGrowthProfileRecord {
|
||||
export interface PeriodicReportRecord {
|
||||
id: number;
|
||||
userId: number;
|
||||
schemaVersion: number;
|
||||
reportType: "weekly" | "monthly" | "stage" | string;
|
||||
reportTypeLabel: string;
|
||||
periodStart: string;
|
||||
@@ -561,7 +554,6 @@ export interface TopicSessionRecord {
|
||||
tokenInput: number;
|
||||
tokenOutput: number;
|
||||
quotaDeducted: boolean;
|
||||
recommendedHomework?: string | null;
|
||||
startedAt: string;
|
||||
endedAt?: string | null;
|
||||
createdAt?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user