返回 DeepSeek-Reasonix
tab_restore_identity.go
根目录 / desktop / tab_restore_identity.go
1 package main
2
3 import "strings"
4
5 func prepareRestoredTabIdentity(tab *WorkspaceTab, entry desktopTabEntry) bool {
6 tab.goal = strings.TrimSpace(entry.Goal)
7 if entry.historicalSource != nil {
8 tab.HistoricalSource = entry.historicalSource
9 tab.retainLegacyPinnedFiles(entry.PinnedFiles)
10 return false
11 }
12 if entry.restoreBlocked {
13 tab.StartupErr = "Saved session identity could not be verified. Recovery data was preserved."
14 tab.retainLegacyPinnedFiles(entry.PinnedFiles)
15 return false
16 }
17 tab.goal = runningTabSessionGoal(strings.TrimSpace(entry.SessionPath), tab.goal)
18 restoreTabPinnedContext(tab, entry.PinnedFiles)
19 return true
20 }
21
21 lines GO