chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-25 02:06:42 +00:00
parent f023c63a60
commit 9c7de47031
8 changed files with 142 additions and 63 deletions

View File

@@ -1089,8 +1089,12 @@ function DiffViewer<T>(props: DiffFileProps<T>) {
return sampledChecksum(contents)
}
const before = local.before ? { ...local.before, contents: beforeContents, cacheKey: cacheKey(beforeContents) } : undefined
const after = local.after ? { ...local.after, contents: afterContents, cacheKey: cacheKey(afterContents) } : undefined
const before = local.before
? { ...local.before, contents: beforeContents, cacheKey: cacheKey(beforeContents) }
: undefined
const after = local.after
? { ...local.after, contents: afterContents, cacheKey: cacheKey(afterContents) }
: undefined
const targetChanged =
local.fileDiff !== undefined
? instanceFileDiff !== local.fileDiff

View File

@@ -2278,7 +2278,12 @@ ToolRegistry.register({
}
>
<div data-component="apply-patch-file-diff">
<Dynamic component={fileComponent} mode="diff" virtualize={props.virtualizeDiff} fileDiff={single()!.view.fileDiff} />
<Dynamic
component={fileComponent}
mode="diff"
virtualize={props.virtualizeDiff}
fileDiff={single()!.view.fileDiff}
/>
</div>
</ToolFileAccordion>
</BasicTool>

View File

@@ -71,7 +71,8 @@ describe("session diff", () => {
test("keeps capped header-only patches partial", () => {
const fileDiff = resolveFileDiff({
file: "a.ts",
patch: "Index: a.ts\n===================================================================\n--- a.ts\t\n+++ a.ts\t\n",
patch:
"Index: a.ts\n===================================================================\n--- a.ts\t\n+++ a.ts\t\n",
})
expect(fileDiff.name).toBe("a.ts")

View File

@@ -92,12 +92,7 @@ export function ToolErrorCard(props: ToolErrorCardProps) {
return (
<Card {...rest} data-kind="tool-error-card" data-open={open() ? "true" : "false"} variant="error">
<Collapsible
class="tool-collapsible"
data-open={open() ? "true" : "false"}
open={open()}
onOpenChange={setOpen}
>
<Collapsible class="tool-collapsible" data-open={open() ? "true" : "false"} open={open()} onOpenChange={setOpen}>
<Collapsible.Trigger>
<div data-component="tool-trigger">
<div data-slot="basic-tool-tool-trigger-content">