@gitkraken/conflict-tools 0.7.1-beta.7 → 0.7.1-beta.8
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/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/dist/resolver/entry-decision.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
9
9
|
|
|
10
10
|
### Changed
|
|
11
11
|
|
|
12
|
-
- A delete-modify `dropped-edits` finding and the resolution description now name the sides as the operation does (`upstream branch`/`replayed commit` for rebase and cherry-pick, `current branch`/`incoming branch` for merge) and say what to do next. The fix loop now returns a file that still has error findings with confidence capped at 0.5 and an `Unresolved: <n> error(s) remain after the fix pass (…)` description prefix. `sideNames` is exported from the resolver prompt module. (#237)
|
|
12
|
+
- A delete-modify `dropped-edits` finding and the resolution description now name the sides as the operation does (`upstream branch`/`replayed commit` for rebase and cherry-pick, `current branch`/`incoming branch` for merge) and say what to do next. The fix loop now returns a file that still has error findings with confidence capped at 0.5 and an `Unresolved: <n> error(s) remain after the fix pass (…)` description prefix. `sideNames` is exported from the resolver prompt module. (#237) A delete-modify `dropped-edits` finding no longer claims the deleting side removed the file when no commit on it did: it says the side does not have the file and the file comes from a line merged into the other side. (#238)
|
|
13
13
|
- Merge conflicts now get `<upstream-commits>` fetched by the resolver: when `refs` are set and `upstreamCommits` is undefined, it lists the incoming branch's commits for the file (`base..theirs`), and the system prompt explains the block. Hosts that name no `operation` keep the old behavior. (#217)
|
|
14
14
|
- A delete-modify conflict is now settled by rule, with no model call: the deletion is applied (confidence 0.8) and the other side's edits are reported as a `dropped-edits` warning finding, so the verdict becomes `needs-review`. When `refs` are set, the finding names the deleting commit. A `fileGuidance` entry matching the file, or `userGuidance` naming it, hands the file to the model as before. `LogOptions` gains optional `diffFilter` and `format`. (#236)
|
|
15
15
|
- The resolver system prompt now tells the model up front to escape quotes, backslashes, newlines and tabs inside the JSON reply, and that the raw CDATA file content does not change that. This cuts parse rejections caused by unescaped `"` in chunk `content`. (#232)
|
package/README.md
CHANGED
|
@@ -236,7 +236,7 @@ interface ResolutionContext {
|
|
|
236
236
|
}
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
A delete-modify conflict is settled without a model call: the deletion is applied with confidence 0.8, and one `dropped-edits` warning finding (`tier: 'file'`, line 1) says, in the operation's side names (`current branch`/`incoming branch` for a merge, `upstream branch`/`replayed commit` for a rebase or cherry-pick, `ours side`/`theirs side` without an `operation`): `The upstream branch removed this file in abc1234 "subject"; the replayed commit's changes to it (+12 −3 lines) were dropped with it. If they are still needed, apply them where that code now lives.` The commit and the line counts appear when `refs` are set and the lookups succeed. The finding takes the verdict to `needs-review`. A `fileGuidance` entry matching the file, or `userGuidance` containing its path or basename, hands the file to the model instead.
|
|
239
|
+
A delete-modify conflict is settled without a model call: the deletion is applied with confidence 0.8, and one `dropped-edits` warning finding (`tier: 'file'`, line 1) says, in the operation's side names (`current branch`/`incoming branch` for a merge, `upstream branch`/`replayed commit` for a rebase or cherry-pick, `ours side`/`theirs side` without an `operation`): `The upstream branch removed this file in abc1234 "subject"; the replayed commit's changes to it (+12 −3 lines) were dropped with it. If they are still needed, apply them where that code now lives.` The commit and the line counts appear when `refs` are set and the lookups succeed. When the lookup finds no deleting commit, the message says instead that the deleting side does not have the file and no commit on it removed the file, so the file comes from a line merged into the other side; when the lookup cannot run or fails, it only says the deleting side does not have the file. The finding takes the verdict to `needs-review`. A `fileGuidance` entry matching the file, or `userGuidance` containing its path or basename, hands the file to the model instead.
|
|
240
240
|
|
|
241
241
|
`fileGuidance` uses the same patterns as file rules: patterns without `/` match basenames. Every matching entry applies in order, in a separate `<file-guidance>` block without the operation-wide `userGuidance` hedge. Rename/rename groups match against the base and both destination paths. Refine receives the file guidance, including during fixes; it does not receive the general `userGuidance`.
|
|
242
242
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{log as e}from"../git/port-dispatch.js";import{createResolution as t}from"../resolution/create-resolution.js";import{sideNames as n}from"./prompt.js";import{buildThreeWayDiff as r}from"./three-way-diff.js";function i(e,t,n){return t?.kind===`removed`?{filePath:e,content:``,strategy:`deleted`,confidence:1,description:`Undecided rename: both sides removed ${e}; the surviving name is unresolved.`}:t?.kind===`mechanical`&&!n?{filePath:e,content:``,strategy:`mechanical`,confidence:1,description:`Git settled this path itself; its working-tree content is staged unchanged.`}:null}function a(e,t){return t?e===`take-ours`?t.stage2==null:e===`take-theirs`?t.stage3==null:!1:!1}function o(e,t,n){let r=a(t,n)?`deleted`:t;return{filePath:e,content:``,strategy:r,confidence:1,description:r===t?`No conflict markers; applied the configured '${t}' strategy directly.`:`No conflict markers, and the index holds no side to take; removed instead.`}}async function s(e,r,i){let a=e.deletedBy??`ours`,o=a===`ours`?`theirs`:`ours`,s=n(r.operation),u=await c(e.filePath,o,r,i),d=u?` (+${u.insertions} \u2212${u.deletions} lines)`:``,f=await l(e.filePath,a,r,i);return{...t(e,[],{confidence:.8,fileStrategy:`deleted`,description
|
|
1
|
+
import{log as e}from"../git/port-dispatch.js";import{createResolution as t}from"../resolution/create-resolution.js";import{sideNames as n}from"./prompt.js";import{buildThreeWayDiff as r}from"./three-way-diff.js";function i(e,t,n){return t?.kind===`removed`?{filePath:e,content:``,strategy:`deleted`,confidence:1,description:`Undecided rename: both sides removed ${e}; the surviving name is unresolved.`}:t?.kind===`mechanical`&&!n?{filePath:e,content:``,strategy:`mechanical`,confidence:1,description:`Git settled this path itself; its working-tree content is staged unchanged.`}:null}function a(e,t){return t?e===`take-ours`?t.stage2==null:e===`take-theirs`?t.stage3==null:!1:!1}function o(e,t,n){let r=a(t,n)?`deleted`:t;return{filePath:e,content:``,strategy:r,confidence:1,description:r===t?`No conflict markers; applied the configured '${t}' strategy directly.`:`No conflict markers, and the index holds no side to take; removed instead.`}}async function s(e,r,i){let a=e.deletedBy??`ours`,o=a===`ours`?`theirs`:`ours`,s=n(r.operation),u=await c(e.filePath,o,r,i),d=u?` (+${u.insertions} \u2212${u.deletions} lines)`:``,f=await l(e.filePath,a,r,i);return{...t(e,[],{confidence:.8,fileStrategy:`deleted`,description:f.kind===`found`?`Deleted: the ${s[a]} removed the file; the ${s[o]}'s changes to it${d} were dropped.`:`Deleted: the ${s[a]} does not have the file; the ${s[o]}'s changes to it${d} were dropped.`}),findings:[{category:`dropped-edits`,severity:`warning`,tier:`file`,location:{file:e.filePath,line:1},message:`${f.kind===`found`?`The ${s[a]} removed this file in ${f.commit}; the ${s[o]}'s changes to it${d} were dropped with it.`:f.kind===`none`?`The ${s[a]} does not have this file and no commit on it removed the file, so the file comes from a line merged into the ${s[o]}; the ${s[o]}'s changes to it${d} were dropped.`:`The ${s[a]} does not have this file; the ${s[o]}'s changes to it${d} were dropped.`} If they are still needed, apply them where that code now lives.`}]}}async function c(e,t,n,i){if(n.refs)try{let a=await r(e,n.refs,i);return t===`ours`?a.oursStats:a.theirsStats}catch{if(i.signal?.aborted)throw i.signal.reason;return}}async function l(t,n,r,i){if(!r.refs)return{kind:`unknown`};let a=r.refs[n];try{let[n,o]=(await e(i.git,{ref:r.refs.base?`${r.refs.base}..${a}`:a,path:t,maxCount:1,diffFilter:`D`,format:`%h%x09%s`,signal:i.signal})).trim().split(` `);return n&&o?{kind:`found`,commit:`${n} "${o}"`}:{kind:`none`}}catch{if(i.signal?.aborted)throw i.signal.reason;return{kind:`unknown`}}}export{i as classifiedResolution,s as deleteModifyResolution,o as noMarkerResolution};
|