Record Class McpCodingPartnerDiff
java.lang.Object
java.lang.Record
com.shaft.mcp.McpCodingPartnerDiff
- Record Components:
schemaVersion- response schema versiontargetSourcePath- repository-relative Java target pathinsertionAnchor- method or textual anchor the insertion was placed aftertargetExists- whether the target file already existsinsertedLineCount- number of lines the diff would addunifiedDiff- standard unified-diff text the client can render or applywarnings- preview-only and guardrail reminders
public record McpCodingPartnerDiff(String schemaVersion, String targetSourcePath, String insertionAnchor, boolean targetExists, int insertedLineCount, String unifiedDiff, List<String> warnings)
extends Record
Preview-only unified diff that inserts reviewed SHAFT code into an existing Java target.
The diff is never written to disk by the MCP server. IntelliJ (or another client) shows the preview and applies it only under explicit user approval.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinsertedLineCountrecord component.Returns the value of theinsertionAnchorrecord component.Returns the value of theschemaVersionrecord component.booleanReturns the value of thetargetExistsrecord component.Returns the value of thetargetSourcePathrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunifiedDiffrecord component.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
McpCodingPartnerDiff
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
schemaVersion
Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
targetSourcePath
Returns the value of thetargetSourcePathrecord component.- Returns:
- the value of the
targetSourcePathrecord component
-
insertionAnchor
Returns the value of theinsertionAnchorrecord component.- Returns:
- the value of the
insertionAnchorrecord component
-
targetExists
public boolean targetExists()Returns the value of thetargetExistsrecord component.- Returns:
- the value of the
targetExistsrecord component
-
insertedLineCount
public int insertedLineCount()Returns the value of theinsertedLineCountrecord component.- Returns:
- the value of the
insertedLineCountrecord component
-
unifiedDiff
Returns the value of theunifiedDiffrecord component.- Returns:
- the value of the
unifiedDiffrecord component
-
warnings
-