Commit Graph
343 Commits
Author SHA1 Message Date
admin 89d8611ea1 fix(aihr): scope unknown mobile supervisors 2026-07-09 17:29:28 +08:00
admin 8f73cb0c84 fix(mobile): require employee position before user flow 2026-07-09 17:09:26 +08:00
admin 8b92a7e9ac fix(aihr): include org phones in supervisor team scope 2026-07-09 16:45:57 +08:00
admin bba1e00425 fix(aihr): align growth path progress with criteria 2026-07-09 16:01:14 +08:00
admin f1fe0bdfaa fix(aihr): clean video asr snippets 2026-07-09 15:46:03 +08:00
admin 2ef3e39744 fix(aihr): trim sop evidence snippets 2026-07-09 15:37:01 +08:00
admin aa547ef365 fix(mobile): avoid seeded empty competency 2026-07-09 15:15:14 +08:00
admin 68c4b8547e fix(aihr): return pilot export as csv 2026-07-09 14:38:32 +08:00
admin e60520b7aa fix(mobile): proxy review audio downloads 2026-07-09 13:54:19 +08:00
admin 03d9c93ea4 fix(aihr): require candidate identity for materials 2026-07-09 13:13:40 +08:00
admin 0bff6bbfa6 fix(aihr): keep demo question verification read-only 2026-07-09 13:08:54 +08:00
admin 5f92847c00 feat(aihr): map supervisor phone to org scope 2026-07-09 12:54:33 +08:00
admin 9bd567a72f feat(aihr): filter supervisor reviews by org scope 2026-07-09 12:43:16 +08:00
admin a83fb53ecd feat(aihr): scope supervisor practice data 2026-07-09 11:37:33 +08:00
admin 2f5fb853a2 fix(aihr): require assignee for practice assignments 2026-07-09 11:02:11 +08:00
admin 82f861542f fix(aihr): paginate org snapshot view 2026-07-09 10:50:19 +08:00
admin 678543e8a5 feat(aihr): complete uni-app role workflows 2026-07-09 10:42:20 +08:00
admin 15cd789da6 feat(aihr): add SOP answer thumbs up/down feedback loop
- New aihr_knowledge_answer_feedback table; unique (tenant, query_norm,
  fragment_id) pair keeps submissions idempotent
- POST /api/knowledge/answer-feedback (fragmentIds array), GET pending-review
  list, POST /{id}/review — all under existing auth scope
- Down-voted (question, fragment) pairs are filtered from dbSearch fusion
  results; if filtering empties the hit list the original results are kept
  with an explanatory caution (never degrade to no-answer)
- Feedback table missing/unreachable → filter silently skipped, search
  behavior unchanged (degradation chain preserved)
- SnippetResponse gains optional trailing fragmentId (db hits only; seed
  fallback stays null); mobile sopPanel adds 👍/👎 with locked state after
  submit, up votes auto-marked reviewed to keep the review queue clean
2026-07-08 15:09:27 +08:00
admin 8d78bc69d1 feat(aihr): bind SOP direct-answer digest to sop_answer prompt template
- Seed aihr_prompt_template with code=sop_answer (conclusion-first + numbered
  steps + citations appended), matching the built-in prompt
- Digest prefers the enabled sop_answer template, falls back to the built-in
  constant, and logs prompt_version; answer/keyPoints/cautions contract unchanged
2026-07-08 14:52:02 +08:00
admin 7fd61b6ca3 feat(aihr): add coach-hint style regeneration buttons to practice turn
- /turn accepts optional regenerate+style (serious/gentle/detailed/professional);
  regenerate short-circuits before rememberTraineeReply — no round advance,
  no trainee reply write, no scoring impact; only same-round coachHint evidence
  is overwritten
- Style instruction injected into existing LLM turn prompt; LLM missing/failed
  returns original hint with explicit message (no fake data)
- Mobile practice page renders 再严肃/再温柔/更细致/更专业 pills under coach
  hints; success replaces text with a style note, failure toasts and keeps
  original; old clients unaffected (fields appended)
2026-07-08 14:52:02 +08:00
admin eeffbaf752 feat(aihr): return explicit no-evidence SOP answers and log knowledge gaps
- Empty/unanswerable SOP queries now return the fixed 「未在已入库 SOP 中找到明确依据」
  response instead of falling back to seed answers (no fake answers)
- Record knowledge_gap (question/category/position/source) whenever search
  yields no evidence — feeds the phase-two open question board
- Extract NO_CLEAR_SOP_EVIDENCE constant shared by digest prompt and checks
2026-07-08 12:22:33 +08:00
admin 4b10b08eeb feat(aihr): close phase two practice pilot gates 2026-07-08 00:51:32 +08:00
admin f5137a2b05 feat(aihr): add open org snapshot sync endpoint
新增 POST /api/aihr/org/sync,从开放组织系统 /open/v1/sync/snapshot
拉取公司/部门/员工快照刷新 aihr_org_snapshot;支持 dryRun 预检、
Bearer/client-credentials 鉴权与可选 HMAC 签名;外部未配置时保留
SQL seed。附接口契约设计 v1 与 API/DEV_SETUP 配置说明。
2026-07-07 11:05:41 +08:00
admin 617847f7e0 feat(aihr): on-demand summary card with infographic bottom sheet
P0-2 按甲方钦定交互落地(反馈#2:显式按钮+小窗+预期等待):新端点
POST /api/knowledge/summary-card 复用检索命中片段调 chat 模型
(temperature=0,30s超时)生成结构化卡{title,steps,objections,scripts,
reminders},无命中/无模型/失败均明确报错可重试,不兜假数据;检索
底层拆出 dbHits() 避免总结卡重复触发轻概要 LLM。移动端:概要卡下
「✨生成总结卡·约10秒生成」按钮→底部弹层(拖条+X+深遮罩),四区块
信息图排版(蓝序号四步法/橙块异议/绿引用话术/✓提醒)对照设计基准,
430px 两列 375px 单列;听一遍(独立 TTS 状态)+开始跟读(问练焊接);
SOP 面板配色统一蓝色系。「保存图片」需 html2canvas 依赖本轮不做。
实测:端点4s返回结构化卡;浏览器弹层与 summary-modal 设计图逐区块
一致。
2026-07-05 03:21:37 +08:00
admin 4c5c343aca feat(aihr): structured digest answer with layered mobile presentation
用户反馈「检索返回一堆文字不便总结」修复。后端:检索命中后新增
RAG 生成环节 searchDigest——chat 模型 temperature=0 把 top5 片段压
成结构化概要(直接回答≤60字+3-6条可执行要点+0-3条注意红线),硬约束
不得编造、片段答不了则明示无依据;模型未配置/超时/解析失败回退
片段原文拼接,15s 超时不拖垮检索。SearchResponse 增 keyPoints/
cautions 字段。移动端:sopPanel 结果改三层——概要卡(回答大字+要点
列表+警示色块)默认唯一展开;「查看依据」折叠原文片段,单条3行截断
点击展开;「听一遍」按钮把概要送 TTS 播报(独立播放状态,关面板即停,
未配 tts 提示降级)。候选人端知识 tab 同套概要卡+依据折叠,消除
原文倾泻。实测:「客服接待基础流程」4s 返回概要+5要点+3红线。
2026-07-04 23:27:08 +08:00
admin 775873e31b chore: demo fixed-code opt-in flag, sop tweaks and doc sync
短信固定验证码增加 aihr.sms.demo-fixed-code-enabled 显式开关(prod
默认仍禁用,演示环境可显式放行);SOP 服务小调整;mobile base 支持
VITE_BASE;作战清单/TechSpec/API_INTEGRATION/docs README 同步。
2026-07-04 16:05:50 +08:00
admin d622c7fb7e feat(aihr): admin dashboard with real aggregates
新增 /api/aihr/dashboard 聚合面试/对练/知识库/组织快照真实数据,
管理端首页从静态卡片改为 API 优先 + fallback。
2026-07-04 16:05:50 +08:00
admin 0539adf612 feat(aihr): persist interview results and candidate material review
面试记录落 aihr_interview_result(GET /records 查询),候选人补充资料
走 OSS + aihr_candidate_material,管理端 AI 面试页可审核通过/驳回;
案例整理服务增强;两张新表纳入 reset 脚本。
2026-07-04 16:05:50 +08:00
admin df20627fbb feat(aihr): keyframe caption and rerank in retrieval pipeline
视频关键帧 vision prompt 从纯 OCR 扩展为「文字+一句画面描述」,纯视觉
信息(动作/场景演示)进入文本向量可检索;检索 RRF 融合后接
category=rerank 模型(bge-reranker-v2-m3)语义重排,未配置或失败保持
RRF 顺序(TechSpec 12.3 最后一环)。BACKLOG 记入 B7 视觉向量检索
(Doubao-embedding-vision,二期)。端到端验证:重传视频片段带画面描述;
检索「首次反馈时限」视频转写片段重排后命中第一。
2026-07-04 01:06:09 +08:00
admin fe1eef3905 feat(aihr): support video upload with asr transcript and keyframe ocr
新增 AihrVideoService:ffmpeg 抽音轨按5分钟分段调 asr 转写([mm:ss]
时间戳),30s间隔(≤40帧)抽关键帧调 vision 提取画面文字(重复画面去重),
合并文本复用既有归类/切片/向量化链路。视频只走异步队列(同步接口
拒绝),≤500MB/≤60分钟,同时只加工1个,卡死判定放宽到120分钟;无
asr/vision 结果按「待处理」落库不报错。前端 accept/筛选/文案与
overview 类型徽标同步。端到端验证:30s培训视频语音逐字转写+画面
四要点完整提取,自动归类投诉处理SOP。
2026-07-04 00:24:24 +08:00
admin 90e96322bb feat(aihr): allow vision category in model config
模型配置 category 校验与管理端下拉补 vision 类目;此前后端只放行
chat/vector/rerank/asr/tts,视觉模型无法从管理端保存。
2026-07-04 00:02:41 +08:00
admin 61235b6257 fix(aihr): image upload without usable vision model no longer fails
图片 OCR 拿不到文字(未配视觉模型/模型不支持图片/图片无文字)时不再
抛「文件内容不能为空」:改为落 OSS + attach 标待处理、0 片段完成,
说明写入队列条目在面板展示(作战清单 M7 口径);OCR 调用失败补日志,
之前被静默吞掉难排查。前端批次表 error 列改名「说明」。
2026-07-03 23:51:37 +08:00
admin 77aa992872 feat(aihr): switch interview and case flows to real-model-first pipeline
AI 面试 /start 动态出题、/finish 按真实回答结构化评分(未配模型用本地
Rubric 估分);案例沉淀 /upload 改 multipart 真实语音+ASR 转写,
/organize 用真实 transcript 调 chat 模型整理;seed service 重构为
AihrInterviewService/AihrCaseService;前端面试/案例/对练页与移动端、
demo-check、验收文档同步真实链路口径。
2026-07-03 23:45:20 +08:00
admin 4fa23617a4 feat(aihr): decouple batch upload from processing via async queue
批量上传治本:POST /doc/upload-async 只暂存+入队即秒回,后台 worker
(并发2)复用 saveDocument 链路逐条解析/归类/向量化;队列表
aihr_knowledge_upload_item 状态机 0/1/2/3,完成/失败 CAS 写入,同名
文件串行防撞 attach 唯一键,卡住30分钟清扫重置,失败暂存保留72h。
新增 GET /doc/upload-items 批次查询与 POST /doc/upload-items/{id}/retry
单文件重试。资料处理页批量导入改走异步:提交即返回,新增本批次
进度面板(排队/加工中/完成/失败+进度条+单条重试),轮询防过期回写。
同步接口保留给 SOP 页单文件即时预览。
2026-07-03 23:36:56 +08:00
admin 939fba85ff feat(aihr): support cancelling running local import tasks
新增 POST /api/knowledge/doc/import-tasks/{id}/cancel,后台目录导入任务
运行中可取消;资料处理页任务列表接取消按钮与状态刷新。
2026-07-03 21:45:38 +08:00
admin be136dc9f9 fix(aihr): model test picks seed placeholder name and misses db config
前端测试对话发的是合并列表里 seed 占位行的模型名(gpt-4o-mini),后端
按该名查库落空即判未配置返回 seed fallback。后端:请求模型名不存在时
回退默认已启用 chat 配置,且运行参数就绪后以解析出的模型名调用供应商;
前端:优先选 enabled 且 configured 的库行作为当前 chat 模型。
2026-07-03 21:31:03 +08:00
admin 8ead250025 chore(aihr): add org/person static snapshot seed for demo
aihr_org_snapshot 表+两个住宅项目22人快照(项目经理/主管/一线三层),
支撑按项目看人数叙事;reset-dev-db.sh 纳入该脚本。
2026-07-03 20:55:38 +08:00
admin cf45131d80 feat(auth): dev-only fixed sms code to unblock demo login
aihr.sms.dev-fixed-code 非空时不真发短信、验证码固定(dev 默认
123456),把阿里云短信凭证从演示关键路径摘掉;代码级 prod profile
闸门,生产配置该项也不生效。
2026-07-03 20:55:38 +08:00
admin e0490b28cb feat(aihr): add asr/tts speech gateway and mobile voice practice
新增 /api/ai/asr(multipart转写)与 /api/ai/tts(mp3 base64 dataURL),走
OpenAI 兼容 audio 接口(硅基流动 SenseVoice/CosyVoice2,复用模型管理
配置,新增 asr/tts 类目);移动端对练页接语音输入(MediaRecorder)与
客户台词自动播报,未配置/失败降级文本。ASR 限 5MB、TTS 限 300 字,
multipart 头部字段去 CRLF 防注入。
2026-07-03 20:55:38 +08:00
admin 96c70a618f feat(aihr): wire practice turn/finish to real LLM with seed fallback
/turn 客户回复按人设走 LLM 生成(seed 台词作剧情锚点),/finish 单次
temperature=0 结构化评分(4维+导师改写+点评,档位锚点60/75/90),维度
缺失回落 total、文本截断防落库溢出;模型未配置或调用失败逐级回退
seed,前后端契约不变。会话列表读写同锁,评分只在 finish 跑一次。
2026-07-03 20:55:38 +08:00
admin f869d66c90 feat: complete aihr mvp mobile workflow 2026-07-03 16:43:37 +08:00
admin 0126b0c661 feat(aihr): add siliconflow embedding provider 2026-07-03 02:08:08 +08:00
admin 62ffcb6e99 chore: initialize wygj monorepo 2026-07-03 01:25:10 +08:00