()
| 2074 | } |
| 2075 | |
| 2076 | fn openai_tool_definitions() -> Vec<Value> { |
| 2077 | vec![ |
| 2078 | json!({ |
| 2079 | "type": "function", |
| 2080 | "function": { |
| 2081 | "name": "read_file", |
| 2082 | "description": "Read a file from the project", |
| 2083 | "parameters": { |
| 2084 | "type": "object", |
| 2085 | "properties": { |
| 2086 | "path": { |
| 2087 | "type": "string", |
| 2088 | "description": "File path relative to project root" |
| 2089 | } |
| 2090 | }, |
| 2091 | "required": ["path"] |
| 2092 | } |
| 2093 | } |
| 2094 | }), |
| 2095 | json!({ |
| 2096 | "type": "function", |
| 2097 | "function": { |
| 2098 | "name": "write_file", |
| 2099 | "description": "Write content to a file", |
| 2100 | "parameters": { |
| 2101 | "type": "object", |
| 2102 | "properties": { |
| 2103 | "path": { "type": "string" }, |
| 2104 | "content": { "type": "string" } |
| 2105 | }, |
| 2106 | "required": ["path", "content"] |
| 2107 | } |
| 2108 | } |
| 2109 | }), |
| 2110 | json!({ |
| 2111 | "type": "function", |
| 2112 | "function": { |
| 2113 | "name": "patch_file", |
| 2114 | "description": "Replace a unique string in a file with new content. Use this instead of write_file when you only need to change part of a file. old_string must match exactly one location in the file.", |
| 2115 | "parameters": { |
| 2116 | "type": "object", |
| 2117 | "properties": { |
| 2118 | "path": { "type": "string", "description": "File path to patch" }, |
| 2119 | "old_string": { "type": "string", "description": "Exact text to find (must be unique in file)" }, |
| 2120 | "new_string": { "type": "string", "description": "Replacement text" } |
| 2121 | }, |
| 2122 | "required": ["path", "old_string", "new_string"] |
| 2123 | } |
| 2124 | } |
| 2125 | }), |
| 2126 | json!({ |
| 2127 | "type": "function", |
| 2128 | "function": { |
| 2129 | "name": "list_dir", |
| 2130 | "description": "List directory contents", |
| 2131 | "parameters": { |
| 2132 | "type": "object", |
| 2133 | "properties": { |
no outgoing calls
no test coverage detected