@@ -11,7 +11,7 @@ import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
11
11
import {GithubLinkNote } from ' /snippets/GithubLinkNote.mdx' ;
12
12
import {Attribute } from ' /snippets/Attribute.mdx' ;
13
13
14
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L117-L1561 " />
14
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L117-L1566 " />
15
15
16
16
17
17
## Attributes
@@ -89,7 +89,7 @@ import {Attribute} from '/snippets/Attribute.mdx';
89
89
<HorizontalDivider />
90
90
### <span className = " text-primary" >ai</span >
91
91
Generates a response from the AI based on the provided prompt, target, and context.
92
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1192-L1279 " />
92
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1196-L1283 " />
93
93
94
94
<ParameterWrapper >
95
95
<Parameter
@@ -124,7 +124,7 @@ Generates a response from the AI based on the provided prompt, target, and conte
124
124
125
125
### <span className = " text-primary" >checkout</span >
126
126
Checks out a git branch or commit and syncs the codebase graph to the new state.
127
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L865-L905 " />
127
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L865-L909 " />
128
128
129
129
<ParameterWrapper >
130
130
<Parameter
@@ -234,7 +234,7 @@ Creates a new file in the codebase with specified content.
234
234
235
235
### <span className = " text-primary" >create_pr</span >
236
236
Creates a pull request from the current branch to the repository's default branch.
237
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L970-L1002 " />
237
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L974-L1006 " />
238
238
239
239
<ParameterWrapper >
240
240
<Parameter
@@ -257,15 +257,15 @@ Creates a pull request from the current branch to the repository's default branc
257
257
258
258
### <span className = " text-primary" >create_pr_comment</span >
259
259
Create a comment on a pull request
260
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1533-L1535 " />
260
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1538-L1540 " />
261
261
262
262
263
263
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >None</code > } description = " " />
264
264
265
265
266
266
### <span className = " text-primary" >create_pr_review_comment</span >
267
267
Create a review comment on a pull request.
268
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1537-L1561 " />
268
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1542-L1566 " />
269
269
270
270
271
271
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >None</code > } description = " " />
@@ -281,7 +281,7 @@ A list property that returns all files in the codebase.
281
281
282
282
### <span className = " text-primary" >find_by_span</span >
283
283
Finds editable objects that overlap with the given source code span.
284
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1289-L1304 " />
284
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1293-L1308 " />
285
285
286
286
<ParameterWrapper >
287
287
<Parameter
@@ -298,15 +298,15 @@ Finds editable objects that overlap with the given source code span.
298
298
299
299
### <span className = " text-primary" >from_files</span >
300
300
Creates a Codebase instance from multiple files.
301
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1443-L1523 " />
301
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1448-L1528 " />
302
302
303
303
304
304
<Return return_type = { <><a href = " /api-reference/core/Codebase" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Codebase</a ></> } description = " A Codebase instance initialized with the provided files" />
305
305
306
306
307
307
### <span className = " text-primary" >from_repo</span >
308
308
Fetches a codebase from GitHub and returns a Codebase instance.
309
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1327-L1394 " />
309
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1331-L1398 " />
310
310
311
311
<ParameterWrapper >
312
312
<Parameter
@@ -359,7 +359,7 @@ Fetches a codebase from GitHub and returns a Codebase instance.
359
359
360
360
### <span className = " text-primary" >from_string</span >
361
361
Creates a Codebase instance from a string of code.
362
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1397-L1440 " />
362
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1401-L1445 " />
363
363
364
364
365
365
<Return return_type = { <><a href = " /api-reference/core/Codebase" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Codebase</a ></> } description = " A Codebase instance initialized with the provided code Example: >>> # Python code >>> code = " def add(a, b): return a + b" >>> codebase = Codebase.from_string(code, language=" python" ) >>> # TypeScript code >>> code = " function add(a: number, b: number): number { return a + b; }" >>> codebase = Codebase.from_string(code, language=" typescript" )" />
@@ -465,7 +465,7 @@ Retrieves a function from the codebase by its name.
465
465
466
466
### <span className = " text-primary" >get_modified_symbols_in_pr</span >
467
467
Get all modified symbols in a pull request
468
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1525-L1531 " />
468
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1530-L1536 " />
469
469
470
470
471
471
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >tuple[str, dict[str, str], list[str]]</code > } description = " " />
@@ -624,15 +624,15 @@ Resets the codebase by
624
624
625
625
### <span className = " text-primary" >set_ai_key</span >
626
626
Sets the OpenAI key for the current Codebase instance.
627
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1281-L1287 " />
627
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1285-L1291 " />
628
628
629
629
630
630
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >None</code > } description = " " />
631
631
632
632
633
633
### <span className = " text-primary" >set_session_options</span >
634
634
Sets the session options for the current codebase.
635
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1306-L1324 " />
635
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1310-L1328 " />
636
636
637
637
<ParameterWrapper >
638
638
<Parameter
@@ -661,7 +661,7 @@ Sets the session options for the current codebase.
661
661
662
662
### <span className = " text-primary" >should_fix</span >
663
663
Returns True if the flag should be fixed based on the current mode and active group.
664
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1056-L1070 " />
664
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1060-L1074 " />
665
665
666
666
<ParameterWrapper >
667
667
<Parameter
@@ -678,7 +678,7 @@ Returns True if the flag should be fixed based on the current mode and active gr
678
678
679
679
### <span className = " text-primary" >visualize</span >
680
680
Visualizes a NetworkX graph or Plotly figure.
681
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1008-L1021 " />
681
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/codebase.py#L1012-L1025 " />
682
682
683
683
<ParameterWrapper >
684
684
<Parameter
0 commit comments