Skip to content

fix(history): 修复纯路径输入会话被误判为仅助手输出#197

Merged
lulu-sk merged 1 commit intomasterfrom
fix/claude-history-path-preview
Mar 17, 2026
Merged

fix(history): 修复纯路径输入会话被误判为仅助手输出#197
lulu-sk merged 1 commit intomasterfrom
fix/claude-history-path-preview

Conversation

@lulu-sk
Copy link
Copy Markdown
Owner

@lulu-sk lulu-sk commented Mar 17, 2026

Claude 历史索引依赖 preview 判断会话是否存在有效用户输入。
当用户首条消息只有图片或文件路径时,cleanClaudeUserPrompt 会把路径
作为噪声过滤掉,导致 preview 为空,索引阶段把该会话误判为仅助手输出并忽略。

本次调整:

  • 在 Claude 用户消息清洗阶段增加路径型输入回退,提取文件名作为预览
  • 对常见图片扩展名生成“图片:<文件名>”,其他路径生成“文件:<文件名>”
  • 补充纯路径输入场景测试,覆盖 summaryOnly 历史索引链路

产品效果:

  • 上传图片或仅引用文件路径的 Claude 会话会正常出现在历史列表
  • 避免这类会话在项目扫描和历史候选中被误判丢失

Claude 历史索引依赖 preview 判断会话是否存在有效用户输入。
当用户首条消息只有图片或文件路径时,cleanClaudeUserPrompt 会把路径
作为噪声过滤掉,导致 preview 为空,索引阶段把该会话误判为仅助手输出并忽略。

本次调整:
- 在 Claude 用户消息清洗阶段增加路径型输入回退,提取文件名作为预览
- 对常见图片扩展名生成“图片:<文件名>”,其他路径生成“文件:<文件名>”
- 补充纯路径输入场景测试,覆盖 summaryOnly 历史索引链路

产品效果:
- 上传图片或仅引用文件路径的 Claude 会话会正常出现在历史列表
- 避免这类会话在项目扫描和历史候选中被误判丢失

Signed-off-by: Lulu <58587930+lulu-sk@users.noreply.github.com>
@lulu-sk lulu-sk self-assigned this Mar 17, 2026
@lulu-sk lulu-sk merged commit 52961d2 into master Mar 17, 2026
4 checks passed
@lulu-sk lulu-sk deleted the fix/claude-history-path-preview branch March 17, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant