zmeir
ba3f22d81e
Move logging to a central location for all AI Handlers
2024-01-04 16:22:22 +02:00
zmeir
ac7aaa0cd3
Add support for Azure OpenAI in LangChainOpenAIHandler
2024-01-04 16:22:22 +02:00
zmeir
1ade09eaa3
Fix failing /config command
...
All commands need the `ai_handler` argument. The PRConfig class was missing it in the `__init__` method and so it failed with this error:
```
File "/home/vcap/app/pr_agent/agent/pr_agent.py", line 76, in handle_request
await command2class[action](pr_url, ai_handler=self.ai_handler, args=args).run()
TypeError: PRConfig.__init__() got an unexpected keyword argument 'ai_handler'
```
2024-01-04 14:49:34 +02:00
Tal
b7af45166a
Merge pull request #561 from zmeir/zmeir/fix/get_user_description
...
Fix `get_user_description`
2024-01-04 00:40:08 -08:00
mrT23
ed78bfd946
use_collapsible_file_list
2024-01-04 10:27:07 +02:00
mrT23
4204d78d7e
feat: Remove file walkthrough feature from PR agent
2024-01-04 09:59:44 +02:00
mrT23
3c2ed8bbf1
feat: Remove file walkthrough feature from PR agent
2024-01-04 09:42:15 +02:00
Zohar Meir
8d2da74380
Find user description in a case-insensitive way
2024-01-04 09:41:55 +02:00
Zohar Meir
39c1866121
Revert title() to capitalize()
2024-01-04 09:41:24 +02:00
zmeir
2f9fbbf0ac
Prevent reducing the number of suggestions if already low enough
2024-01-03 16:43:39 +02:00
zmeir
0189e12fb1
Automatically enable improve extended mode for large PRs
2024-01-03 16:43:38 +02:00
zmeir
967494ce17
Refine the prompt for add_docs command
...
I found that without it, python docstrings are sometimes suggested above the function signature, instead of below.
2024-01-03 12:27:23 +02:00
zmeir
560d30dbb1
Fix get_user_description
...
The headers changed from "PR Type"/"PR Description"/etc to "Type"/"Description"/etc
2024-01-03 12:20:51 +02:00
Phill Zarfos
0bd2f045a3
feat: Fix typo
2024-01-02 08:11:31 -05:00
mrT23
7dfc306e7c
feat: Add SOC2 compliance review feature to PR agent
2024-01-01 20:15:36 +02:00
KennyDizi
fce52a66ff
feat: Update enable_help_text flag explaination
2023-12-27 10:22:43 +07:00
KennyDizi
dff31ff8f5
feat: Fix typo
2023-12-27 10:17:56 +07:00
KennyDizi
37b040b50a
Use 'and' in lieu of '&' operator
2023-12-27 10:17:08 +07:00
KennyDizi
31168cd7de
Get PR review enable help text from setting
2023-12-27 10:12:41 +07:00
mrT23
815862e428
markdown
2023-12-26 17:06:29 +02:00
mrT23
b1ce29e27a
global configuration
2023-12-26 16:45:39 +02:00
mrT23
a6764c9058
feat: Update help text addition condition in pr_reviewer.py
2023-12-26 09:25:15 +02:00
mrT23
a854e1a408
feat: Refactor help text addition in pr_reviewer.py and update tool names in README.md
2023-12-26 09:18:38 +02:00
PrashantDixit-dev
26cb85c4f5
default pinecone
2023-12-25 14:50:15 +05:30
PrashantDixit-dev
1d435ef3fa
removed comments
2023-12-25 00:45:24 +05:30
PrashantDixit-dev
1632696c2f
Merge branch 'main' of github.com:PrashantDixit0/pr-agent
2023-12-25 00:41:28 +05:30
PrashantDixit-dev
d8d954bb0f
lancedb integration
2023-12-25 00:38:24 +05:30
mrT23
08e9a91021
Merge pull request #547 from Codium-ai/tr/readme_update
...
Readme for PR-Agent-Pro
2023-12-24 06:30:04 -08:00
mrT23
0c4d451d9a
readme
2023-12-24 16:18:20 +02:00
mrT23
e698c7e2f3
Merge pull request #546 from Codium-ai/tr/backticks_review
...
Single-label for suggestions
2023-12-24 03:35:49 -08:00
mrT23
663632e2d9
fixed bug
2023-12-24 10:27:48 +02:00
mrT23
5fd3fdfae1
feat: Add loop to populate suggestion_list in pr_code_suggestions.py
2023-12-24 10:08:36 +02:00
mrT23
47b267a73d
prompt
2023-12-24 09:52:59 +02:00
mrT23
5c49ff216a
feat: Update inline comment creation in git providers and improve code suggestion handling
...
- Update `create_inline_comment` method in various git providers to include `absolute_position` parameter
- Remove `create_inline_comment` method from providers that do not support inline comments
- Enhance `find_line_number_of_relevant_line_in_file` function to handle absolute position
- Modify `pr_code_suggestions.py` to handle improved code inclusion in suggestions
- Add `include_improved_code` configuration option in `configuration.toml` and update documentation accordingly
2023-12-24 09:44:08 +02:00
mrT23
5dc2595dcf
feat: Refactor code suggestion handling and update YAML schema in pr_code_suggestions.py and pr_code_suggestions_prompts.toml
...
- Update key names in pr_code_suggestions.py to use snake_case for consistency
- Implement removal of invalid suggestions where existing code is equal to improved code
- Update YAML parsing in _prepare_pr_code_suggestions method to include keys_fix_yaml parameter
- Refactor push_inline_code_suggestions method to use updated key names
- Update _prepare_prediction_extended method to use new key names
- Refactor _prepare_markdown method to include suggestion label and use updated key names
- Update instructions and YAML schema in pr_code_suggestions_prompts.toml to reflect changes in pr_code_suggestions.py
- Remove redundant removal of invalid suggestions in rank_suggestions method
2023-12-24 08:30:35 +02:00
mrT23
664b1c9d17
Merge pull request #545 from Codium-ai/tr/backticks_review
...
feat: Improve suggestion formatting in markdown text generation
2023-12-23 10:41:17 -08:00
mrT23
ba7781ba00
feat: Update instruction formatting in pr_code_suggestions_prompts.toml and pr_reviewer_prompts.toml
2023-12-23 20:40:30 +02:00
mrT23
42be96a99b
feat: Improve suggestion formatting in markdown text generation
2023-12-23 20:32:03 +02:00
mrT23
eca8078071
feat: Reorder keys in PR description data and update PRDescription model in toml file
2023-12-21 08:51:57 +02:00
mrT23
9995ccd4c7
feat: Update PR description prompts in toml file to include semantic file types and custom labels options
2023-12-21 08:31:54 +02:00
mrT23
2b23700aec
feat: Enhance YAML parsing with additional fallbacks and key customization in load_yaml and try_fix_yaml functions
2023-12-21 08:24:07 +02:00
mrT23
553dad0bee
feat: Enhance YAML parsing with additional fallbacks and key customization in load_yaml and try_fix_yaml functions
2023-12-21 08:21:34 +02:00
mrT23
37259e550f
Merge pull request #540 from Codium-ai/tr/backticks
...
Enhancement of PR Description Formatting and Instructions Update
2023-12-20 22:16:53 -08:00
mrT23
66cbd6ef8f
Merge pull request #537 from koid/feature/ignore-header-description-in-ai-response
...
Enhancement of AI Response Parsing Mechanism
2023-12-20 22:15:43 -08:00
koid
a9d789978b
fix: remove last line
2023-12-21 11:11:46 +09:00
koid
e2797ad09a
re-implemented YAML extraction as a fallback
2023-12-21 11:06:41 +09:00
Ori Kotek
ccb116922f
Merge pull request #529 from lukefx/bitbucket_webhook_improvements
...
feat: Improved server, security and commands
2023-12-20 17:27:06 +02:00
mrT23
c079deba21
feat: Enhance PR description formatting and update instructions in pr_description_prompts.toml
2023-12-20 16:45:21 +02:00
koid
16b61eb4e8
ignore header description in ai response
2023-12-20 11:50:27 +09:00
Hussam.lawen
6e63cf4014
Add log
2023-12-18 17:35:04 +02:00
Hussam.lawen
c59e9f77a6
fix
2023-12-18 17:06:02 +02:00
Luca Simone
e25980f141
fix: using the same get_settings convention
2023-12-18 14:58:25 +01:00
mrT23
d2aef95847
Merge pull request #530 from Codium-ai/tr/labels
...
Enhancement: Implement label case conversion and update label descriptions in settings files
2023-12-18 03:21:48 -08:00
mrT23
1c4e64333c
feat: Implement label case conversion and update label descriptions in settings files
2023-12-18 12:29:06 +02:00
Luca Simone
7a5acb29ac
feat: Improved server, security and commands
...
Signed-off-by: Luca Simone <info@lucasimone.info>
2023-12-17 17:38:27 +01:00
mrT23
5fb373b212
Refactor AI handler instantiation to use lazy initialization in PR tools
2023-12-17 16:52:03 +02:00
mrT23
54891ad1d2
Merge pull request #514 from brianpham93/abstract-BaseAiHandler
...
Abstract AiHandler to BaseAiHandler
2023-12-14 07:54:13 -08:00
mrT23
02871b1e3d
Remove logging from pr_agent.py and add line breaks in cli.py and github_action_runner.py
2023-12-14 09:08:47 +02:00
mrT23
38ea9143f3
Make LangChain dependency optional in pr-agent and update requirements.txt
2023-12-14 09:05:53 +02:00
mrT23
246be6147f
Set LiteLLMAIHandler as default AI handler in all PR tools and simplify AI handler injection in PRAgent
2023-12-14 09:00:14 +02:00
mrT23
3531016a2c
Refactor AI handler instantiation in PRAgent and related classes
2023-12-14 08:53:22 +02:00
Brian Pham
e37598fdca
Merge remote-tracking branch 'upstream/main' into abstract-BaseAiHandler
2023-12-14 07:45:43 +08:00
Brian Pham
557b39ec87
Merge branch 'base-ai-handler' into abstract-BaseAiHandler
2023-12-14 07:44:13 +08:00
Brian Pham
69a7c77a0d
Refactor PRAgent class and has_ai_handler_param
...
method
This commit refactors the PRAgent class and the has_ai_handler_param
method. The has_ai_handler_param method is moved outside the class and
made a standalone function. This change improves code organization and
readability. The has_ai_handler_param function now takes a class object
as a parameter and checks if the class constructor has an "ai_handler"
parameter. This refactoring is done to streamline the code and improve
its maintainability.
No issue references.
2023-12-14 07:15:56 +08:00
Hussam.lawen
89c30ab5dc
feat: Add repository labels retrieval function in gitlab_provider.py
2023-12-13 17:21:58 +02:00
Brian Pham
ebb2ed891b
Add logging to pr_agent.py
2023-12-13 08:16:45 +08:00
Brian Pham
8fb4a42ef1
Update AI handler instantiation in server files
2023-12-13 08:16:02 +08:00
Brian Pham
ca1ccd7b91
update base
2023-12-12 23:56:20 +08:00
Brian Pham
b7225cc674
update langchain
2023-12-12 23:52:50 +08:00
Brian Pham
a627dcd64f
Update langchain
2023-12-12 23:28:58 +08:00
Brian Pham
0c66554d50
langchain: move model and temperature to chat_completion
2023-12-12 23:07:46 +08:00
Brian Pham
6c7beccb4f
add LangChain AI Handler
2023-12-12 23:03:49 +08:00
Brian Pham
7eb2e769cf
Move ai handlers to specific folder
2023-12-12 23:03:38 +08:00
Brian Pham
5239e1c3e9
Load default AI Handler from util function
2023-12-12 21:51:05 +08:00
mrT23
648dd3299f
Merge pull request #521 from Codium-ai/tr/bitbucket_app
...
feat: Enable PR description publishing as comment in bitbucket_app.py
2023-12-12 00:27:48 -08:00
mrT23
512c92fe51
feat: Enable PR description publishing as comment in bitbucket_app.py
2023-12-12 10:19:17 +02:00
mrT23
1853b4ef47
Merge pull request #520 from Codium-ai/tr/bitbucket_app
...
Refactor auto tool execution order and enhance logging and documentation
2023-12-12 00:02:02 -08:00
mrT23
2f10b4f3c5
feat: Refactor auto tool execution order in bitbucket_app.py, add logging in pr_description.py, and update tool configuration instructions in Usage.md
2023-12-12 09:59:26 +02:00
mrT23
73a20076eb
Merge pull request #519 from Codium-ai/tr/bitbucket_app
...
Enhancement: Automatic Tool Configuration for Bitbucket App
2023-12-11 23:26:30 -08:00
mrT23
afb633811f
remove bad default
2023-12-12 09:18:51 +02:00
mrT23
81da328ae3
feat: Add automatic tool configuration for Bitbucket app in bitbucket_app.py and configuration.toml, update Usage.md
2023-12-12 08:06:20 +02:00
Hussam Lawen
729f5e9c8e
Merge pull request #518 from Codium-ai/hl/github_native_labels
...
Refactoring Label Handling Across Git Providers
2023-12-11 16:50:19 +02:00
Hussam.lawen
fdc776887d
Refactor labels
2023-12-11 16:47:38 +02:00
mrT23
cb64f92cce
Merge pull request #511 from Codium-ai/tr/local_settings_on_push
...
Enhancement: Apply Repository Settings on Every 'Synchronize' Event
2023-12-11 06:27:29 -08:00
mrT23
f3ad0e1d2a
Merge pull request #517 from Codium-ai/tr/main_tmp
...
Improve PR description formatting and handling in pr_description.py
2023-12-11 06:15:46 -08:00
mrT23
480e2ee678
feat: Improve PR description formatting in pr_description.py
2023-12-11 15:55:04 +02:00
mrT23
9b97073174
s
2023-12-11 12:00:44 +02:00
Brian Pham
ebf7027aab
add openai handler
2023-12-11 17:49:20 +08:00
Brian Pham
a1cbd80b2a
update base ai handler
2023-12-11 17:49:09 +08:00
Brian Pham
b8021d7ca3
rename file
2023-12-11 16:57:23 +08:00
Brian Pham
523a896465
Rename AiHandler to LiteLLMAiHandler
2023-12-11 16:56:49 +08:00
mrT23
02c0c89b13
feat: Add exception handling for discussion creation in gitlab_provider.py
2023-12-11 08:29:09 +02:00
mrT23
2b1e841ef1
s
2023-12-10 19:45:54 +02:00
mrT23
a247fc3263
s
2023-12-10 17:46:49 +02:00
mrT23
654938f27c
feat: Enhance code feedback formatting in utils.py
2023-12-10 17:30:27 +02:00
Brian Pham
b6409929d2
Remove extra code
2023-12-09 16:51:50 +00:00
Brian Pham
c0303ff9ec
Merge remote-tracking branch 'upstream/main' into abstract-BaseAiHandler
2023-12-09 16:47:13 +00:00
Brian Pham
f2abe5c73e
Abstract AiHandler to BaseAiHandler
2023-12-09 16:39:25 +00:00
Brian Pham
7e47baa9db
Refactor AI handler classes
2023-12-10 00:25:25 +08:00
mrT23
f908d02ab4
readme
2023-12-07 15:26:36 +02:00
mrT23
7d2a35e32c
final commit
2023-12-07 10:27:19 +02:00
mrT23
e351428848
s
2023-12-07 10:24:36 +02:00
mrT23
4cd6649a44
feat: Enhance PR description formatting in pr_description.py
...
Improve the table structure for relevant files in PR description by adjusting the header and filename display. Add padding for filename and change summary, and move diff_plus_minus to a separate column. Refactor _insert_br_after_x_chars function to accept a variable length parameter.
2023-12-07 10:14:18 +02:00
mrT23
e62acef6d2
s1
2023-12-07 09:50:36 +02:00
mrT23
a043eb939b
feat: Apply repo settings on push trigger in github_app.py
2023-12-07 08:42:18 +02:00
mrT23
a61e492fe1
feat: Refactor PR files processing into separate function in pr_description.py
2023-12-06 17:01:21 +02:00
mrT23
93b6d31505
s
2023-12-06 16:36:27 +02:00
mrT23
429aed04b1
s
2023-12-06 16:32:53 +02:00
mrT23
eeb20b055a
feat: Add line count to file patch info and enhance PR description formatting
2023-12-06 15:29:45 +02:00
mrT23
4b073b32a5
feat: Enhance PR description with file label dictionary and update prompts in pr_description_prompts.toml
2023-12-06 12:30:51 +02:00
mrT23
f629755a9a
feat: Refine field descriptions in pr_description_prompts.toml for semantic file labels
2023-12-06 10:59:44 +02:00
mrT23
c1ed3ee511
feat: Refine field descriptions in pr_description_prompts.toml for semantic file labels
2023-12-06 08:08:01 +02:00
mrT23
0b70e07b8c
feat: Improve formatting in help.py command descriptions
2023-12-05 18:26:35 +02:00
mrT23
862c236076
s
2023-12-05 18:10:13 +02:00
mrT23
cf3401536a
feat: Remove 'Refactoring' label from custom labels and update related descriptions
2023-12-05 07:48:21 +02:00
mrT23
2feaee4306
feat: Update field descriptions in pr_description_prompts.toml for clarity
2023-12-04 21:45:22 +02:00
mrT23
863eb0105d
feat: Refactor semantic labels in PR description and improve clarity in pr_description.py and pr_description_prompts.toml
2023-12-04 21:23:59 +02:00
mrT23
21a7a0f136
feat: Enhance link generation for relevant lines and refactor code in git providers and PR description tools
2023-12-04 21:06:56 +02:00
Hussam.lawen
d2a129fe30
Add labeling files
2023-12-04 18:22:35 +02:00
mrT23
fe796245a3
Merge pull request #501 from Codium-ai/tr/prompt_tuning
...
Refactoring and Enhancement of PR Agent Prompts
2023-12-04 03:18:12 -08:00
Phill Zarfos
317fec0536
Throw descriptive error message if model is not in MAX_TOKENS array
2023-12-03 21:06:55 -05:00
mrT23
4dcbce41c8
feat: Refine prompts and improve formatting in pr_sort_code_suggestions_prompts.toml and pr_update_changelog_prompts.toml
2023-12-03 17:27:22 +02:00
mrT23
b3fa654446
feat: Refactor prompts and improve formatting in pr_questions_prompts.toml
2023-12-03 17:23:52 +02:00
mrT23
e09439fc1b
feat: Enhance formatting and clarity in pr_information_from_user_prompts.toml
2023-12-03 17:17:24 +02:00
mrT23
324e481ce7
feat: Improve formatting and clarity in pr_custom_labels.toml
2023-12-03 17:15:29 +02:00
mrT23
abfad088e3
feat: Refine prompts and instructions in pr_add_docs.toml
2023-12-03 17:10:33 +02:00
mrT23
f30789e6c8
feat: Refactor and enhance prompts in pr_code_suggestions_prompts.toml
2023-12-03 16:59:47 +02:00
mrT23
5c01f97f54
feat: Enhance PR description prompts in pr_description_prompts.toml
2023-12-03 16:48:26 +02:00
mrT23
2d726edbe4
feat: Improve formatting and clarity in pr_reviewer_prompts.toml
2023-12-03 16:40:06 +02:00
mrT23
37812dfede
feat: Update pr_url assignment in github_provider.py for GitHub Actions compatibility
2023-12-03 11:34:17 +02:00
mrT23
586785ffde
feat: Add pr_url attribute to git providers and final update message in PR description
2023-12-03 10:46:02 +02:00
mrT23
3af9c3bfb9
feat: Enhance code suggestion publishing with language-specific formatting in pr_code_suggestions.py
2023-12-01 12:12:49 +02:00
mrT23
c22084c7ac
feat: Add exception handling for missing previous review in github_provider.py
2023-12-01 11:56:03 +02:00
mrT23
b90dde48c0
Merge pull request #483 from tmokmss/add-bedrock-support
...
Add Amazon Bedrock support
2023-11-29 03:08:01 -08:00
Ori Kotek
0e54a13272
Improve error handling in settings retrieval
...
Fix bug where default values were not being used in GitHub Action runners when environmental variables are not set. Now, if an environmental variable cannot be found and no default is given, the default value will be used if one exists. This will prevent errors during setup on different environments and ensure system stability.
2023-11-29 11:52:02 +02:00
Ori Kotek
b67d06ae59
"Add fallback to environment variables in GitHub Action Runner"
...
A new function `get_setting_or_env` was implemented to facilitate fetching of either settings or environmental variables in the GitHub Action Runner. This was necessary to resolve an issue where a certain undefined behaviour occurs in GitHub Actions, leading to an attribute error. The new function also provides a default value parameter to ensure the return of a value even in failed attempts to fetch from either settings or environment variables.
2023-11-29 11:47:52 +02:00
tmokmss
5e642c10fa
fallback to try_fix_yaml
2023-11-29 17:57:54 +09:00
Ori Kotek
580eede021
Add utility function to handle boolean type conversion
...
A utility function (`is_true`) was added to take care of validating and converting boolean values from string or boolean types. This function is used in three parts of the `run_action` method where automatic PR review, description, and improvement actions are triggered based on environment settings. This change makes the condition checks cleaner and prevents code duplication.
2023-11-29 10:33:12 +02:00
mrT23
ea56910a2f
Merge pull request #485 from Codium-ai/tr/bitbucket
...
Enhancement of Inline Comment Publishing in Bitbucket Provider and Logging Addition
2023-11-28 08:35:40 -08:00
mrT23
51e1278cd7
feat: Enhance inline comment publishing in Bitbucket provider and add logging for no suggestions in pr_code_suggestions.py
2023-11-28 18:29:35 +02:00
mrT23
7e029ead45
refactor: Improve label handling in pr_reviewer.py
2023-11-28 17:03:55 +02:00
tmokmss
f8f57419c4
Update ai_handler.py
2023-11-28 23:08:17 +09:00
tmokmss
917f4b6a01
hard code value
2023-11-28 20:59:21 +09:00
tmokmss
97d6fb999a
set max_tokens_to_sample
2023-11-28 20:58:57 +09:00
tmokmss
1373ca23fc
support Amazon Bedrock
2023-11-28 20:58:42 +09:00
mrT23
6264624c05
Merge branch 'main' into ok/fix_improve
2023-11-27 07:27:25 -08:00
Ori Kotek
2dcee63df5
fix improve
2023-11-27 12:32:53 +02:00
mrT23
b1c374808d
feat: Add line link generation in Bitbucket provider and improve markdown formatting in pr_code_suggestions.py and IMRPOVE.md
2023-11-26 17:12:02 +02:00
mrT23
20978402ea
s
2023-11-26 16:56:06 +02:00
mrT23
8f615e17a3
s
2023-11-26 16:42:41 +02:00