* Load excluded items from the exclusions file. * Returns empty set if file doesn't exist or can't be read.
()
| 5893 | * Returns empty set if file doesn't exist or can't be read. |
| 5894 | */ |
| 5895 | private async loadExcludedItems(): Promise<Set<string>> { |
| 5896 | const exclusionsPath = path.join( |
| 5897 | this.config.getSessionDir(this.workspaceId), |
| 5898 | "exclusions.json" |
| 5899 | ); |
| 5900 | try { |
| 5901 | const data = await readFile(exclusionsPath, "utf-8"); |
| 5902 | const exclusions = JSON.parse(data) as PostCompactionExclusions; |
| 5903 | return new Set(exclusions.excludedItems); |
| 5904 | } catch { |
| 5905 | return new Set(); |
| 5906 | } |
| 5907 | } |
| 5908 | |
| 5909 | private coerceTodoItems(value: unknown): TodoItem[] { |
| 5910 | if (!Array.isArray(value)) { |
no test coverage detected