优化编辑工具调用的行号解析
This commit is contained in:
@@ -1755,6 +1755,16 @@ function StructuredToolInput({
|
||||
)
|
||||
}
|
||||
}
|
||||
// Prefer tool output if it contains a structured diff with real line numbers
|
||||
// (injected by backend from toolUseResult.structuredPatch)
|
||||
if (output && typeof output === "string" && /^@@ /m.test(output)) {
|
||||
return (
|
||||
<>
|
||||
{truncationBanner}
|
||||
<UnifiedDiffPreview diffText={output} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
if (isCanonicalEditPayload(parsed)) {
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user