Closed majdyz closed 2 months ago
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
PR Description updated to latest commit (https://github.com/Significant-Gravitas/codex/commit/b730129aba32bb8e47c1e7b07183ecf5550da587)
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
⏱️ Estimated effort to review [1-5] | 4, due to the complexity of the changes involving multiple files and the integration of new functionality with existing systems. The PR includes enhancements to validation logic, database interactions, and template updates, requiring careful review to ensure correctness and maintainability. |
🧪 Relevant tests | No |
🔍 Possible issues | Possible Bug: The implementation of `__fix_missing_imports` now includes asynchronous calls but does not handle exceptions that might be thrown by `get_object_type_referred_functions`. This could lead to unhandled promise rejections or crashes if the database queries fail. |
Inconsistency: The `validate` method in `PageDecompositionBlock` uses a new `ListValidationError` for accumulating validation errors, but it's unclear how these errors are handled or reported back to the user. This could potentially lead to a situation where errors are collected but not properly utilized or displayed. | |
🔒 Security concerns | No |
relevant file | codex/develop/code_validation.py |
suggestion | Consider handling exceptions for asynchronous database calls within `__fix_missing_imports`. This will ensure that the function is robust against database connectivity issues or data inconsistencies. You can wrap the `await get_object_type_referred_functions(object_type_id)` call in a try-except block and handle specific exceptions to provide clearer error messages or fallback behaviors. [important] |
relevant line | functions = await get_object_type_referred_functions(object_type_id) |
relevant file | codex/develop/code_validation.py |
suggestion | Refactor the `__fix_missing_imports` to improve readability and maintainability. Currently, the function is quite long and handles multiple responsibilities. Consider breaking it down into smaller functions or methods, each handling a specific part of the import fixing process, such as resolving missing types, fetching necessary functions, and constructing import statements. This will make the code easier to understand and maintain. [medium] |
relevant line | async def __fix_missing_imports( |
relevant file | codex/requirements/blocks/ai_page_decompose.py |
suggestion | Ensure that the `ListValidationError` is properly utilized in the `validate` method of `PageDecompositionBlock`. If the intention is to collect all validation errors and then raise them at once, make sure that the `raise_if_errors` method effectively communicates these errors back to the caller or logs them appropriately. This might involve integrating with the existing error handling framework or ensuring compatibility with the response structure expected by callers. [important] |
relevant line | validation_errors.raise_if_errors() |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
Changelog updates:
PageConnection
model to describe connections between pages in page decomposition.ui.link
usage ensuring it references valid functions and implemented detailed function usage in page decomposition templates.__fix_missing_imports
function to support async fetching of functions related to object types and improved error message integration.PageDecompositionEntry
to use a dictionary for used_functions
to include descriptions.PageDecompositionBlock
to check for main function naming, existence of a home page, and valid page connections.to commit the new content to the CHANGELOG.md file, please type: '/update_changelog --pr_update_changelog.push_changelog_changes=true'
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
file | Changed components | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code_validation.py |
| |||||||||||||||
database.py |
| |||||||||||||||
ai_page_decompose.py |
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
**Action:** test |
**Failed stage:** [Test with pytest](https://github.com/Significant-Gravitas/codex/actions/runs/8910837291/job/24470887065) [❌] |
**Failed test name:** compile_test.py |
**Failure summary:**
The action failed due to two assertion errors in codex/tests/compile_test.py . The tests test_process_object_type and test_process_enum_type failed because the generated output did not match the expected output. Specifically, the formatting of the output was incorrect, with differences in indentation and line breaks around the class and enum definitions. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Ubuntu ... 589: codex/tests/endpoint_fixing_test.py ........ [ 49%] 590: codex/tests/exec_external_tool_test.py ...... [ 58%] 591: codex/tests/prisma_parse_test.py ...... [ 68%] 592: codex/tests/type_parsing_test.py .. [ 71%] 593: codex/tests/api_test.py sssss [ 79%] 594: codex/tests/frontend_gen_test.py ss [ 82%] 595: codex/tests/gen_test.py ssssssssss [ 98%] 596: codex/tests/model_test.py s [100%] 597: =================================== FAILURES =================================== ... 629: \"\"\" 630: Represents a person 631: \"\"\" 632: name: str # The name of the person 633: age: int # The age of the person""" 634: > assert ( 635: pydantic_output == expected_output 636: ), f"Expected {pydantic_output} to be {expected_output}" 637: E AssertionError: Expected class Person(BaseModel): ... 653: E ? ++++ 654: E - """ 655: E + """ 656: E ? ++++ 657: E name: str # The name of the person 658: E - age: int # The age of the person 659: E + age: int # The age of the person 660: E ? ++++ 661: codex/tests/compile_test.py:48: AssertionError ... 691: output = generate_object_template(obj) 692: expected_output = """class Role(Enum): 693: \"\"\" 694: Represents a role 695: \"\"\" 696: ADMIN: str # The admin role 697: USER: str # The user role""" 698: > assert output == expected_output, f"Expected {output} to be {expected_output}" 699: E AssertionError: Expected class Role(Enum): ... 715: E ? ++++ 716: E - """ 717: E + """ 718: E ? ++++ 719: E ADMIN: str # The admin role 720: E - USER: str # The user role 721: E + USER: str # The user role 722: E ? ++++ 723: codex/tests/compile_test.py:89: AssertionError 724: =============================== warnings summary =============================== 725: ../../../.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11 726: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning 727: warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') 728: codex/common/parse_prisma.py:31 729: /home/runner/work/codex/codex/codex/common/parse_prisma.py:31: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ 730: @validator("provider") 731: codex/common/parse_prisma.py:44 732: /home/runner/work/codex/codex/codex/common/parse_prisma.py:44: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 749: codex/tests/type_parsing_test.py:26 750: /home/runner/work/codex/codex/codex/tests/type_parsing_test.py:26: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 751: @pytest.mark.unit 752: codex/tests/endpoint_fixing_test.py::test_using_model_not_in_db 753: codex/tests/endpoint_fixing_test.py::test_cross_model 754: /home/runner/work/codex/codex/codex/requirements/blocks/ai_endpoint.py:330: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead 755: logging.warn(f"Resolving invalid type: {invalid_type}") 756: codex/tests/endpoint_fixing_test.py::test_cross_model 757: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/pydantic/main.py:1265: PydanticDeprecatedSince20: The `copy` method is deprecated; use `model_copy` instead. See the docstring of `BaseModel.copy` for details about how to handle `include` and `exclude`. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 825: codex/tests/frontend_gen_test.py 89 57 36% 826: codex/tests/gen_test.py 128 64 50% 827: codex/tests/model_test.py 24 13 46% 828: codex/tests/prisma_parse_test.py 178 0 100% 829: codex/tests/type_parsing_test.py 14 0 100% 830: -------------------------------------------------------------------- 831: TOTAL 5015 2247 55% 832: =========================== short test summary info ============================ 833: FAILED codex/tests/compile_test.py::test_process_object_type - AssertionError: Expected class Person(BaseModel): ... 849: ? ++++ 850: - """ 851: + """ 852: ? ++++ 853: name: str # The name of the person 854: - age: int # The age of the person 855: + age: int # The age of the person 856: ? ++++ 857: FAILED codex/tests/compile_test.py::test_process_enum_type - AssertionError: Expected class Role(Enum): ... 873: ? ++++ 874: - """ 875: + """ 876: ? ++++ 877: ADMIN: str # The admin role 878: - USER: str # The user role 879: + USER: str # The user role 880: ? ++++ 881: ============ 2 failed, 43 passed, 18 skipped, 12 warnings in 50.82s ============ 882: ##[error]Process completed with exit code 1. ``` |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
**Action:** test |
**Failed stage:** [Test with pytest](https://github.com/Significant-Gravitas/codex/actions/runs/8911109716/job/24471741791) [❌] |
**Failure summary:**
The action failed due to a syntax error in the file codex/common/model.py at line 113. The error was caused by an f-string expression that incorrectly included a backslash. This syntax error prevented the successful collection of tests across multiple test modules, resulting in errors during the test collection phase for all test files that imported the problematic module. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Ubuntu ... 575: env: 576: pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64 577: ##[endgroup] 578: ============================= test session starts ============================== 579: platform linux -- Python 3.11.9, pytest-7.4.4, pluggy-1.5.0 580: rootdir: /home/runner/work/codex/codex 581: plugins: anyio-4.3.0, asyncio-0.23.6, integration-0.2.3, cov-4.1.0 582: asyncio: mode=Mode.STRICT 583: collected 6 items / 10 errors 584: ==================================== ERRORS ==================================== 585: ___________________ ERROR collecting codex/tests/api_test.py ___________________ ... 609: from codex.develop.compile import create_bundle_code 610: codex/develop/compile.py:24: in |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
**Action:** test |
**Failed stage:** [Test with pytest](https://github.com/Significant-Gravitas/codex/actions/runs/8911152827/job/24471870343) [❌] |
**Failed test name:** compile_test.py |
**Failure summary:**
The action failed due to two assertion errors in the compile_test.py file. The tests test_process_object_type and test_process_enum_type failed because the output generated by the code did not match the expected output. Specifically: test_process_object_type , the formatting of the output for a class definition was incorrect, with discrepancies in indentation and line breaks around the class properties. test_process_enum_type , similar formatting issues occurred with an enum definition, affecting the indentation and line breaks around the enum values. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Ubuntu ... 587: codex/tests/endpoint_fixing_test.py ........ [ 49%] 588: codex/tests/exec_external_tool_test.py ...... [ 58%] 589: codex/tests/prisma_parse_test.py ...... [ 68%] 590: codex/tests/type_parsing_test.py .. [ 71%] 591: codex/tests/api_test.py sssss [ 79%] 592: codex/tests/frontend_gen_test.py ss [ 82%] 593: codex/tests/gen_test.py ssssssssss [ 98%] 594: codex/tests/model_test.py s [100%] 595: =================================== FAILURES =================================== ... 627: \"\"\" 628: Represents a person 629: \"\"\" 630: name: str # The name of the person 631: age: int # The age of the person""" 632: > assert ( 633: pydantic_output == expected_output 634: ), f"Expected {pydantic_output} to be {expected_output}" 635: E AssertionError: Expected class Person(BaseModel): ... 651: E ? ++++ 652: E - """ 653: E + """ 654: E ? ++++ 655: E name: str # The name of the person 656: E - age: int # The age of the person 657: E + age: int # The age of the person 658: E ? ++++ 659: codex/tests/compile_test.py:48: AssertionError ... 689: output = generate_object_template(obj) 690: expected_output = """class Role(Enum): 691: \"\"\" 692: Represents a role 693: \"\"\" 694: ADMIN: str # The admin role 695: USER: str # The user role""" 696: > assert output == expected_output, f"Expected {output} to be {expected_output}" 697: E AssertionError: Expected class Role(Enum): ... 713: E ? ++++ 714: E - """ 715: E + """ 716: E ? ++++ 717: E ADMIN: str # The admin role 718: E - USER: str # The user role 719: E + USER: str # The user role 720: E ? ++++ 721: codex/tests/compile_test.py:89: AssertionError 722: =============================== warnings summary =============================== 723: ../../../.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11 724: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning 725: warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') 726: codex/common/parse_prisma.py:31 727: /home/runner/work/codex/codex/codex/common/parse_prisma.py:31: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ 728: @validator("provider") 729: codex/common/parse_prisma.py:44 730: /home/runner/work/codex/codex/codex/common/parse_prisma.py:44: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 747: codex/tests/type_parsing_test.py:26 748: /home/runner/work/codex/codex/codex/tests/type_parsing_test.py:26: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 749: @pytest.mark.unit 750: codex/tests/endpoint_fixing_test.py::test_using_model_not_in_db 751: codex/tests/endpoint_fixing_test.py::test_cross_model 752: /home/runner/work/codex/codex/codex/requirements/blocks/ai_endpoint.py:330: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead 753: logging.warn(f"Resolving invalid type: {invalid_type}") 754: codex/tests/endpoint_fixing_test.py::test_cross_model 755: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/pydantic/main.py:1265: PydanticDeprecatedSince20: The `copy` method is deprecated; use `model_copy` instead. See the docstring of `BaseModel.copy` for details about how to handle `include` and `exclude`. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 823: codex/tests/frontend_gen_test.py 89 57 36% 824: codex/tests/gen_test.py 128 64 50% 825: codex/tests/model_test.py 24 13 46% 826: codex/tests/prisma_parse_test.py 178 0 100% 827: codex/tests/type_parsing_test.py 14 0 100% 828: -------------------------------------------------------------------- 829: TOTAL 5016 2248 55% 830: =========================== short test summary info ============================ 831: FAILED codex/tests/compile_test.py::test_process_object_type - AssertionError: Expected class Person(BaseModel): ... 847: ? ++++ 848: - """ 849: + """ 850: ? ++++ 851: name: str # The name of the person 852: - age: int # The age of the person 853: + age: int # The age of the person 854: ? ++++ 855: FAILED codex/tests/compile_test.py::test_process_enum_type - AssertionError: Expected class Role(Enum): ... 871: ? ++++ 872: - """ 873: + """ 874: ? ++++ 875: ADMIN: str # The admin role 876: - USER: str # The user role 877: + USER: str # The user role 878: ? ++++ 879: ============ 2 failed, 43 passed, 18 skipped, 12 warnings in 51.15s ============ 880: ##[error]Process completed with exit code 1. ``` |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.
**Action:** test |
**Failed stage:** [Test with pytest](https://github.com/Significant-Gravitas/codex/actions/runs/8911210735/job/24472042678) [❌] |
**Failed test name:** compile_test.py |
**Failure summary:**
The action failed due to two assertion errors in codex/tests/compile_test.py . The first failure occurred in the test_process_object_type function where the output did not match the expected class definition for Person . The second failure was in the test_process_enum_type function, where the output did not match the expected enum definition for Role . Both failures were due to formatting issues in the generated output, specifically incorrect indentation and spacing around class and enum definitions. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Ubuntu ... 587: codex/tests/endpoint_fixing_test.py ........ [ 49%] 588: codex/tests/exec_external_tool_test.py ...... [ 58%] 589: codex/tests/prisma_parse_test.py ...... [ 68%] 590: codex/tests/type_parsing_test.py .. [ 71%] 591: codex/tests/api_test.py sssss [ 79%] 592: codex/tests/frontend_gen_test.py ss [ 82%] 593: codex/tests/gen_test.py ssssssssss [ 98%] 594: codex/tests/model_test.py s [100%] 595: =================================== FAILURES =================================== ... 627: \"\"\" 628: Represents a person 629: \"\"\" 630: name: str # The name of the person 631: age: int # The age of the person""" 632: > assert ( 633: pydantic_output == expected_output 634: ), f"Expected {pydantic_output} to be {expected_output}" 635: E AssertionError: Expected class Person(BaseModel): ... 651: E ? ++++ 652: E - """ 653: E + """ 654: E ? ++++ 655: E name: str # The name of the person 656: E - age: int # The age of the person 657: E + age: int # The age of the person 658: E ? ++++ 659: codex/tests/compile_test.py:48: AssertionError ... 689: output = generate_object_template(obj) 690: expected_output = """class Role(Enum): 691: \"\"\" 692: Represents a role 693: \"\"\" 694: ADMIN: str # The admin role 695: USER: str # The user role""" 696: > assert output == expected_output, f"Expected {output} to be {expected_output}" 697: E AssertionError: Expected class Role(Enum): ... 713: E ? ++++ 714: E - """ 715: E + """ 716: E ? ++++ 717: E ADMIN: str # The admin role 718: E - USER: str # The user role 719: E + USER: str # The user role 720: E ? ++++ 721: codex/tests/compile_test.py:89: AssertionError 722: =============================== warnings summary =============================== 723: ../../../.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11 724: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning 725: warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') 726: codex/common/parse_prisma.py:31 727: /home/runner/work/codex/codex/codex/common/parse_prisma.py:31: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ 728: @validator("provider") 729: codex/common/parse_prisma.py:44 730: /home/runner/work/codex/codex/codex/common/parse_prisma.py:44: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 747: codex/tests/type_parsing_test.py:26 748: /home/runner/work/codex/codex/codex/tests/type_parsing_test.py:26: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html 749: @pytest.mark.unit 750: codex/tests/endpoint_fixing_test.py::test_using_model_not_in_db 751: codex/tests/endpoint_fixing_test.py::test_cross_model 752: /home/runner/work/codex/codex/codex/requirements/blocks/ai_endpoint.py:330: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead 753: logging.warn(f"Resolving invalid type: {invalid_type}") 754: codex/tests/endpoint_fixing_test.py::test_cross_model 755: /home/runner/.cache/pypoetry/virtualenvs/codex-ORswSzyp-py3.11/lib/python3.11/site-packages/pydantic/main.py:1265: PydanticDeprecatedSince20: The `copy` method is deprecated; use `model_copy` instead. See the docstring of `BaseModel.copy` for details about how to handle `include` and `exclude`. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 823: codex/tests/frontend_gen_test.py 89 57 36% 824: codex/tests/gen_test.py 128 64 50% 825: codex/tests/model_test.py 24 13 46% 826: codex/tests/prisma_parse_test.py 178 0 100% 827: codex/tests/type_parsing_test.py 14 0 100% 828: -------------------------------------------------------------------- 829: TOTAL 5017 2248 55% 830: =========================== short test summary info ============================ 831: FAILED codex/tests/compile_test.py::test_process_object_type - AssertionError: Expected class Person(BaseModel): ... 847: ? ++++ 848: - """ 849: + """ 850: ? ++++ 851: name: str # The name of the person 852: - age: int # The age of the person 853: + age: int # The age of the person 854: ? ++++ 855: FAILED codex/tests/compile_test.py::test_process_enum_type - AssertionError: Expected class Role(Enum): ... 871: ? ++++ 872: - """ 873: + """ 874: ? ++++ 875: ADMIN: str # The admin role 876: - USER: str # The user role 877: + USER: str # The user role 878: ? ++++ 879: ============ 2 failed, 43 passed, 18 skipped, 12 warnings in 50.51s ============ 880: ##[error]Process completed with exit code 1. ``` |
User description
Changes:
Out of scope:
ui.link
, we are not failing this yet!)Type
Enhancement, Bug fix
Description
ui.link
usage and ensure it references valid functions.__fix_missing_imports
by adding async fetching of functions related to object types and better error message integration.get_object_type_referred_functions
to fetch functions related to an object type.PageDecompositionEntry
to use a dictionary forused_functions
to include descriptions, and addedPageConnection
model for describing connections between pages.PageDecompositionBlock
to include checks for main function naming, existence of a home page, and valid page connections.Changes walkthrough
code_validation.py
Enhance Code Validation and Import Handling
codex/develop/code_validation.py
ui.link
usage in function code to ensure itreferences valid functions.
__fix_missing_imports
function to handle missing importsmore accurately, including async fetching of functions related to
object types.
messages.
database.py
Add Database Function for Object Type Function Fetching
codex/develop/database.py
get_object_type_referred_functions
to fetchfunctions related to an object type.
ai_page_decompose.py
Enhance Page Decomposition with Detailed Function Usage and Page
Connections
codex/requirements/blocks/ai_page_decompose.py
PageDecompositionEntry
to use a dictionary forused_functions
to include descriptions.
PageConnection
model to describe connections between pages.PageDecompositionBlock
to include checks formain function naming, existence of a home page, and valid page
connections.
system.j2
Update Example to Demonstrate Enhanced Page Decomposition Features
codex/prompts/gpt-4-turbo/requirements/page_decompose/system.j2
PageDecompositionEntry
model using a dictionary for
used_functions
.connections
field to demonstrate inter-page linking in theexample.