DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

fix(desktop): keep project history topics out of blank reuse

Open GTC2080 opened this issue 5 months ago • 0 comments

Summary

  • Fix #5097 by checking the target desktop session directory before reusing an indexed blank project topic.
  • Keep project topics that already have saved sessions from being reset/reused as 新的会话 when another new session is created.
  • Add regression coverage for the project-topic/session case that previously reproduced the sidebar history corruption.

Verification

  • cd desktop && go test . -run 'TestEnsureBlankTab|TestNewSessionNoopsWhenCurrentTabIsBlank' -count=1
  • git diff --check
  • gofmt -l desktop/tabs.go desktop/app_session_dedup_test.go
  • go vet ./...
  • cd desktop && go vet ./...
  • go test ./...
  • cd desktop && go test ./...

Cache impact

Cache-impact: none. This is limited to desktop sidebar topic/session reuse and does not change provider-visible prompts, memory prefix, tool schemas, tool ordering, request serialization, compaction, or MCP/tool registration. Cache-guard: cd desktop && go test . -run 'TestEnsureBlankTab|TestNewSessionNoopsWhenCurrentTabIsBlank' -count=1 System-prompt-review: N/A

Fixes #5097

GTC2080 avatar Jun 23 '26 08:06 GTC2080