create_file variant of an apply_patch_call.operation. Carries a V4A diff describing the new file contents.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ApplyPatchCreateFileOperation type definition
create_file variant of an apply_patch_call.operation. Carries a V4A diff describing the new file contents.
import { ApplyPatchCreateFileOperation } from "@openrouter/sdk/models";
let value: ApplyPatchCreateFileOperation = {
diff: "@@ function main() {\n+ console.log(\"hi\");\n }",
path: "/src/main.ts",
type: "create_file",
};
| Field | Type | Required | Description |
|---|---|---|---|
diff | string | :heavy_check_mark: | N/A |
path | string | :heavy_check_mark: | N/A |
type | ”create_file” | :heavy_check_mark: | N/A |