Kevin
186375648d
软著pdf源码准备
2026-05-12 15:25:09 +08:00
Kevin
c794fe8ee8
chore(app-expo): bump version to 1.2.0
...
Align Expo config, package.json, and lockfile root with release tag v1.2.0.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 13:44:57 +08:00
Kevin
71bf62166e
fix(app-expo): 稳定 WS TTS 与「正在回复」状态
...
- useRealtimeSession:恢复 uiRef 同步与 AppState 后台/前台重连,收窄长连 effect 依赖,修正 send API 类型
- 会话页:用派生条件控制 AssistantTypingBubble,避免缓存已有助手末条仍显示 typing
- RealtimeSession:在 commit 落缓存时统一 clearAssistantPendingUi,避免漏掉流式完成帧
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 13:42:54 +08:00
Sully
ddefb78dc4
Merge pull request #23 from penghanyuan/feat/english-support-and-ws-fix
...
- 添加英文模式支持
- 修复WS预热机制以及由此引起的语音tts功能异常
2026-05-12 11:31:17 +08:00
Kevin
b97bb64b4a
feat(conversation): push topic chips after each assistant turn
...
- Extract maybe_send_topic_chips_ws for WS connect + pipeline reuse
- Default memoir stage to childhood when empty for chip bank lookup
- Resend suggestions after normal assistant reply (English/Chinese)
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 11:16:39 +08:00
Kevin
d155e45a44
fix(conversation): topic chips after warmup + English chip copy
...
- Buffer topic_suggestions until chat UI attaches (uiOwner + callback); replay on attach
- build_topic_chips respects user language for label/text; router passes user_language
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 11:10:21 +08:00
Kevin
7e64fc3faf
Merge commit e95582a: PR #20 proactive chat, topic chips, low-info turn plan
...
- Merge staging workflow parent and resolve conflicts with English/i18n and WS pool
- Re-greeting: language-aware fallbacks and prompts; router passes user_language
- RealtimeSession: topic suggestion callbacks + TTS sync path preserved
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 11:03:35 +08:00
Kevin
3d01085442
fix(conversation): 修复实时会话 TTS/回复被离屏 WS 抢占
...
- 列表预热仅预取消息缓存,避免后台 WebSocket 覆盖服务端连接
- RealtimeSession UI 回调按 owner 独占,防止 offscreen 覆盖聊天页
- 列表页聚焦时再 prewarm,会话页 TTS 入队优先 base64
- 管线下发 TTS 同时带 audio_base64 与 audio_url;协议说明同步
- 移除 TTS 排查用前后端调试日志,保留错误/告警
- 补充 WS / RealtimeSession / entry-warmup / 播放器相关单测
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-12 10:42:44 +08:00
Kevin
93be60f74c
fix(tts): gate auto reply by ENABLE_TTS; allow on-demand and manual playback
...
- Pipeline: skip _send_tts_audio only for non-manual when ENABLE_TTS=false;
remove enable_tts early return from handle_tts_request_on_demand.
- Tencent TTS: PrimaryLanguage/chunking follow user language preference only.
- Expo: let manual tts_audio bypass late-segment playback gate after interrupt.
- Docs: clarify ENABLE_TTS vs tts_request in api/.env.example and TTSProvider port.
- Tests: add manual bypass cases; adjust pipeline language tests for en+Chinese text.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-11 17:15:02 +08:00
Kevin
ccdc4e4277
feat(i18n): persist language preference and thread through chat, memoir, TTS
...
- Add users.language_preference (Alembic 0018, default zh); capture at signup/SMS
only; expose on auth and profile APIs
- Lite English prompts for chat and memoir; localized stage labels and agent
names (Life Echo / 岁月知己)
- Tencent TTS: language-aware synthesis, ModelType=1 for 501004, English chunking
- WebSocket pipeline: emit all AGENT_RESPONSE segments when TTS cancels; INFO logs
for tts_this_turn and TTS decisions; on-demand TTS logging
- Expo: device language on auth, i18n tiers/agent name, [SPLIT] streaming UX fixes
- Tests for migration, prompts, pipeline, router tts_this_turn, reply segments
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-11 16:16:49 +08:00
Sully
e95582a5c3
Merge pull request #20 from penghanyuan/claude/agent-proactive-chat-UYHu9
...
feat: agent proactively re-engages users on returning sessions
2026-05-11 13:07:33 +08:00
Sully
dd2d47289d
Merge branch 'development' into claude/agent-proactive-chat-UYHu9
2026-05-11 13:07:18 +08:00
Kevin
705fe951b3
feat(chat): 低信息短答主动续话;修复本地 dev 环境与迁移链
...
- interview_turn_plan: 识别低信息短回复,引导 AI 承接后主动追问新话题
- development.sh / docker-compose.dev: Postgres/Redis 端口与 .env 对齐,补充宿主机端口监听检查
- Alembic: 补回 0016 memory pipeline status、0017 segment narrative defer
- app-expo: api/ws URL 去掉末尾斜杠,避免 WS 双斜杠;更新 .env.staging
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-11 12:06:17 +08:00
Sully
cb84c00eca
添加staging release workflow ( #22 )
...
* update variable name
* update docker port
* fix alembic migration files
* 给远端 SSH 调用加了 keepalive
* fix app-expo code file format
* comment out quality test threshold
---------
Co-authored-by: Kevin <kevin@brighteng.org >
2026-05-11 11:33:07 +08:00
Kevin
5ce29aad64
comment out quality test threshold
2026-05-11 10:53:21 +08:00
Kevin
b9425e806b
fix app-expo code file format
2026-05-11 10:25:06 +08:00
Kevin
219c833157
给远端 SSH 调用加了 keepalive
2026-05-11 10:07:07 +08:00
Kevin
e165a07da5
fix alembic migration files
2026-05-11 09:37:33 +08:00
Kevin
cea8fa99ad
update docker port
2026-05-09 17:44:23 +08:00
Kevin
8e344b4246
update variable name
2026-05-09 17:15:11 +08:00
Kevin
175784292d
implement staging workflow
2026-05-09 16:16:48 +08:00
Kevin
f0e37c5e76
fix porduction docker file
2026-05-09 13:22:10 +08:00
Sully
3413a28ebe
Merge pull request #21 from penghanyuan/codex/simplify-ai-memory-pipeline
...
简化AI pipeline等其他bug修复
2026-05-08 17:34:49 +08:00
Kevin
d0c26242db
fix(conversation): 离屏不丢回复、列表预热 WS 与非阻塞进入聊天
...
- 后端:文本/转写后 AI 生成改为独立任务,避免断连取消整轮;按需 TTS 等与 WS 改动
- 前端:RealtimeSession 重绑 UI 时恢复流式 buffer;列表 onPressIn/挂载预热、已有会话立即 push
- 同步会话相关类型、i18n、测试与 env/资源等累计改动
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-08 17:28:31 +08:00
Claude
55cfbc7f80
feat: agent proactively re-engages users on returning sessions
...
Two complementary changes to reduce conversation cold-start friction:
A. Returning-user re-greeting (backend)
- When WS reconnects to a non-empty conversation and last_message_at is older
than chat_re_greeting_idle_hours (default 6h), the agent emits a warm
continuation message that references prior history instead of staying silent.
- Self-debouncing: the AI message updates last_message_at, so reconnects
within the window will not re-trigger.
- Skipped while profile collection is still pending.
D. Topic suggestion chips (backend + Expo)
- New WS message type topic_suggestions carries 3-4 quick-start chips derived
from the current memoir stage's empty slots (deterministic, no extra LLM
cost). Sent alongside opening / re-greeting / resume.
- Expo chat screen renders a horizontally-scrollable chip row above the input
bar; tapping a chip sends the chip's text as a user message and clears the
row. Sending any text/voice also clears the chips.
2026-05-07 15:39:33 +00:00
Kevin
5dac3efd52
feat(app-expo): conversation WS warmup, background pool, lifecycle
...
Prefetch opening over WebSocket from the conversations list before navigation, with prepared-session handoff into the chat screen. Add a single-slot background pool so leaving chat (in-app) keeps the last session socket with UI callbacks stripped; dispose on app background and reconnect after resume when the chat screen is mounted. Tear down pooled sockets on logout, purge, and conversation delete. RealtimeSession supports attachUiCallbacks and idempotent dispose, and the chat composer hides the connection notice while connecting if assistant history already exists. Fix pause handler wiring in the conversation screen.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-06 14:54:47 +08:00
Kevin
7ad52fce89
feat(profile): avatar presets, upload, nickname editing
...
- FastAPI: preset assets 01–08, GET list/static, PUT /me/avatar/preset,
safer uploaded-avatar path validation, preset_avatars + HTTP tests.
- Expo: personal-info (library + presets), profile tab avatar,
resolveApiMediaUrl, auth hooks cache sync, Web multipart helper,
partial-save messaging + profile i18n.
- Includes existing edits to conversation screen and voice use-player.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-06 13:51:43 +08:00
Kevin
59d4b19d7d
feat(api): 回忆录管线简化、路由延迟池与相关加固
...
- Phase1/2:移除 MemoirOrchestrator.run 与 process_memoir_segments 别名;文档改为 process_memoir_phase1。
- 槽位校验集中到 stage_constants(filter_stage_slots),批处理与顺序路径及 state_service 写库一致。
- StoryRoute:no_llm/parse_error/invalid_target 保守 new_story;短篇护栏不覆盖这些 fallback。
- Phase2 低置信单路径可选延迟(StoryPipelineResult.deferred):不写 Chapter/Story,Segment 记录 defer 元数据,冷却内不重复消费;上限后停自动重试,Phase1 同类目新段唤醒池内段。
- Alembic 0017:segments 表 narrative_defer_* 列。
- ProfileAgent:经 LlmGateway/注入 Provider 统一聊天与 JSON,新增测试。
- ImagePromptOrchestrator:LLM 初始化失败可依配置降级或硬失败;补充策略测试。
- 配套单测与 README/本地开发文档表述更新。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-05-06 13:18:02 +08:00
Kevin
3234396254
Simplify AI memory pipeline
2026-04-30 16:22:55 +08:00
Sully
7617ea902c
Merge pull request #19 from penghanyuan/fix/memory-system
...
AI相关代码修复
2026-04-30 14:16:12 +08:00
Kevin
9f993ee5c3
chore/ add frpc config file
2026-04-30 14:13:53 +08:00
Kevin
71fbd39e32
feat(api)!: memory single chain — async MemoryService, strict eval closure
...
Route all memory ingest/retrieve/enrichment/compaction through async MemoryService.
Remove legacy sync memory implementations (ingest/retrieve/compaction); Celery and
memoir Phase2 call asyncio.run into MemoryService-backed helpers.
Memoir Phase1 batch ingest uses MemoryService.ingest_transcripts_batch; drop chapters.
evidence_bundle_json mirror (Alembic 0015). Evaluation uses snapshot/link-only bundles;
raise EvidenceClosureMissing instead of partial/fallback lineage tiers.
Split memoir state into NarrativeCoverageState and InterviewControlState; delete the
_interview_meta_store adapter layer. Remove rolling-query and recent-fact fallback
settings from config and evidence assembly.
Update judges, docs, tests, and PlaygroundPage alignment.
Made-with: Cursor
2026-04-30 14:11:50 +08:00
Kevin
ac436b87a2
feat(api): 收敛对话与记忆流程边界,引入 LLM 网关与专用服务
...
- MemoryService 异步路径委托 MemoryIngestService / MemoryRetrievalService;富化派发经 MemoryEnrichmentScheduler
- WebSocket pipeline 经 ChatTurnService 与显式 DTO 编排单轮对话;回忆录片段入队由 MemoirIngestScheduler 封装
- 新增 LlmGateway(LlmUseCase),各 agent、任务与适配器对齐 ports
- 补充 memory 提示适配、runtime 类型、memory-retrieval 文档、ai-touchpoints 说明与扫描脚本及配套测试
Made-with: Cursor
2026-04-30 09:17:01 +08:00
Kevin
eddb2c3078
fix(expo): 发送后延时 refocus 聊天输入框
...
发送会递增 inputResetKey 以 remount TextInput,需在下一帧再 focus 才能延续键盘输入。
Made-with: Cursor
2026-04-29 10:37:49 +08:00
Kevin
80833f7033
feat(api): DeepSeek V4 Flash 默认、HTTP 错讯与多供应商分层
...
- 主链路默认 deepseek-v4-flash,DEEPSEEK_THINKING_ENABLED 对齐旧非思考 chat
- 评测台评审装配迁入 adapters/llm(deepseek_eval_judge、zhipu_eval_judge)与 eval_judge_spec
- 拆分 llm_http_openai_chat_errors 与 llm_errors(DeepSeek/智谱品牌与文档链),llm_call 支持 http_error_vendor
- EvalJudgeService 按 spec.provider 传入 allm_json_call;评测台前端文案改为 V4 Flash
- 更新 .env 示例与 staging/production 的 DEEPSEEK_MODEL;补充 openai/供应商错讯测试
Made-with: Cursor
2026-04-27 14:34:30 +08:00
Kevin
3121d1384d
WIP: memory system improvements (in progress)
...
Interview/chat prompt layers, reply planner, style profiles, memory
injection, interview meta store, and related tests. Work not finished.
Made-with: Cursor
2026-04-22 16:56:28 +08:00
Kevin
e848f26354
feat/ internal eval平台现支持实机联调。 1. 显示当前本地数据库里登录用户的历史聊天,已生成的回忆录。支持在网页直接对话,不依赖手机app。
2026-04-20 11:58:32 +08:00
yangshilin
1194e1ed71
fix: 提示词优化
2026-04-17 17:37:05 +08:00
yangshilin
9af2060259
fix:
...
1. 修复安卓部分机型顶部安全区遮挡回忆录标题的问题;
2. 降低封面图生成阈值和展示逻辑,独立封面图未生成时,使用正文图;
3. 去掉“嗯。”生硬回答,去掉不合理段首承接词;
4. 新增章节封面所需最少插图数的配置项
2026-04-16 20:42:54 +08:00
yangshilin
17b9fa3466
fix:
...
1. 修复登录界面文字被遮挡问题
2. 大字模式关闭后显示异常问题
3. 重新调整大字模式是否开启时的字体显示效果
2026-04-10 20:35:57 +08:00
Kevin
abf8497c2e
fix/ 修复workflow对env占位符的处理
2026-04-10 16:44:26 +08:00
Kevin
1b2aeb98ee
fix/ 修复后端的pytest
2026-04-10 16:09:44 +08:00
Kevin
ccf7125473
fix(chat): 重复追问被拦截时再多问一次模型
...
防重复问句会把整段回复削成「这一段我记住了。」只剩一句套话时,用带纠偏说明的 system 再调一次 LLM,尽量避免用户只看到干巴巴_ack。仍只重试一次,并打日志与 meta 标记 duplicate_question_guard_llm_retry。
2026-04-10 15:35:34 +08:00
Kevin
5ff495729e
feat(chat): server-side interview turn plan (mode, anchor slot, snippet)
...
- Add plan_interview_turn: emotion_first / memoir_push / follow_user_only
- Inject hard directive block at top of guided system prompt
- Pass stage_switched_this_turn from ChatOrchestrator after stage detection
- Log interview_turn_plan for observability; add unit tests
2026-04-10 14:34:38 +08:00
Kevin
df6eafeae2
feat(chat): host-style memoir prompts and strip parenthetical stage directions
...
- Add strip_parenthetical_asides_for_chat in reply pipeline before [SPLIT]
- Expand output_rules bans (performance parens) and voice as warm host
- Refocus opening/guided prompts on pulling conversation toward memoir oral history
- Align interview opening fallbacks with memoir-first tone
- Add unit tests for parenthetical stripping
2026-04-10 13:55:56 +08:00
Kevin
deeacfb7ee
fix(eval): use ev_cap for structured evidence slice in memoir judge prompt
...
_merge left an undefined _MEMOIR_EVIDENCE_MAX; align with evidence budget from settings.
2026-04-10 10:42:14 +08:00
Kevin
204ae24697
Merge branch 'eval/elapsed-time-memoir-batch-chunk' into development
2026-04-10 10:27:41 +08:00
Kevin
ac49bc7f23
feat(eval): memoir A/B chapter judging and eval-web parity with dialogue
...
- Judge baseline excerpt and library chapter separately; build_memoir_compare_summary for gate, nine-dim and leaf deltas.
- Memoir SSE chapter payload: baseline_judge, compare_summary, baseline_judge_error.
- MemoirJudgeOutput: loose score coercion and post-validate clamp; memoir judge prompt caps from settings.
- app-eval-web: two-column MemoirScoreCard layout, MemoirCompareSummary, chapter blocks and CSS.
- Add memoir_compare_summary, log_events, celery_log_context, memoir_pipeline_progress; tests and migration 0014.
- Misc: memory/evidence and enrichment paths, task/orchestrator updates, internal-eval docs, env examples.
2026-04-10 10:25:15 +08:00
yangshilin
31fc1c24cf
fix: 优化模型提示词,照顾用户情绪
2026-04-09 18:18:28 +08:00
yangshilin
8ac1de02c1
feat: 丰富问题模板库大纲
2026-04-09 15:44:14 +08:00