dsh-vscode-mode 0.19.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/store.ts CHANGED
@@ -221,10 +221,10 @@ export async function readForCache(ctx: Ctx, session: Session, cache: Map<string
221
221
  */
222
222
  export async function recordIsStale(ctx: Ctx, session: Session, cache: Map<string, ReadState>, rec: DiffRecord): Promise<boolean> {
223
223
  if (rec.superseded === true) return true
224
- if (!Array.isArray(rec.hunks) || !rec.hunks.length) return true
224
+ if (!Array.isArray(rec.hunks) || !rec.hunks.length) { rec.conflict = true; return false }
225
225
  const state = await readForCache(ctx, session, cache, rec.path)
226
226
  if (state.kind === 'unavailable') return false
227
- if (state.kind === 'missing') return true
227
+ if (state.kind === 'missing') { rec.conflict = true; return false }
228
228
  if (rec.create === true) return false
229
229
  const pending = rec.hunks.map((_, idx) => ({ idx, hunk: preciseHunk(rec, idx), status: rec.decisions.perHunk[idx] ?? rec.decisions.call }))
230
230
  .filter((item) => item.status === 'pending' && item.hunk && !isNoopHunk(item.hunk))