509 Commits

Author SHA1 Message Date
kagami
d19faf4f5c
Merge pull request #26 from devchat-ai/fix/gitlab-sync-error
fix: Add fetch depth to GitHub repository checkout
2024-01-04 12:36:38 +08:00
bobo
d53433d618 fix: Add fetch depth to GitHub repository checkout
- Add fetch-depth option to GitHub repository checkout step for improved syncing
- Update sync-to-gitlab.yml workflow file
- Ensure proper setup of Git for synchronization
2024-01-04 12:23:59 +08:00
kagami
05625059d5
Merge pull request #25 from devchat-ai/fixes/test-feedback
Fixes/test feedback
2024-01-04 11:17:40 +08:00
bobo
8ac6fb3c6a fix: Update print statements in commit.py
- Update print statements for Step 1/2 and Step 2/2 in commit.py
- Modify the formatting for better readability in the code
- Ensure consistent use of escape characters for line breaks
2024-01-04 11:03:17 +08:00
bobo
64192e0b2c fix: Update git push command in sync-to-gitlab.yml
- Update git push command to force push changes to main branch
- Remove unnecessary git rebase command
- Make adjustments to improve synchronization with GitLab
2024-01-04 11:00:04 +08:00
bobo
36fc46212a refactor: Improve user experience and streamline commit workflow
- Simplify and clarify user prompts and output messages
- Remove unnecessary print statements and text
- Handle commit abort and errors more gracefully
- Improve error logging in OpenAI chat stream handler
2024-01-04 10:59:46 +08:00
kagami
e10817375f
Merge pull request #24 from devchat-ai/fix_sync_error
fix: Resolve sync error with git rebase
2024-01-04 08:52:21 +08:00
bobo
83f6922f63 fix: Resolve sync error with git rebase
- Modify git rebase command to use -Xours strategy option
2024-01-03 21:39:33 +08:00
kagami
b3eb8c6670
Merge pull request #23 from devchat-ai/fix_python_error
fix: Update type hints in form.py
2024-01-03 17:49:48 +08:00
bobo
4ac2167146 fix: Update type hints in form.py
- Update type hints for components to use Union
- Update type hints for components method to use Union
- Fix python error
2024-01-03 17:32:15 +08:00
bobo
f5b430e712 chore: Add function to extract markdown block
- Added function to extract the first Markdown code block from the given text
- Updated the get_current_branch function to include the current repo branch name in the user input
- Enhanced the commit message generation process by extracting the markdown block content
2024-01-03 15:38:46 +08:00
boob.yang
c83b273e64
Merge pull request #22 from devchat-ai/sync_github_to_gitlab
Sync GitHub to gitlab
2024-01-03 15:35:09 +08:00
bobo
328af00e41 use gh-action as user name 2024-01-03 15:32:07 +08:00
bobo
a28b3d676b ci: Downgrade nick-invision/retry action to v2
- Downgrade the GitHub action nick-invision/retry to version 2
- This change addresses compatibility issues with the workflow
2024-01-03 14:59:35 +08:00
bobo
6e7c9e7bed type: ci: Add sync workflow for GitLab
- Add a new GitHub Actions workflow for syncing to GitLab
- Trigger the workflow on push to the main branch
- Remove commented out code for setting GitLab remote URL
2024-01-03 14:59:35 +08:00
bobo
02a0f871e0 type: feat: Add sync workflow to GitLab
- Implement workflow for syncing GitHub repo with GitLab
- Setup GitHub action to checkout, configure Git, and add remote
- Use retry action to fetch, rebase, and push to GitLab repository
2024-01-03 14:59:35 +08:00
kagami
d99a05ebc9
Merge pull request #19 from devchat-ai/update_commit_step_info
Update commit step info
2024-01-03 11:39:47 +08:00
bobo
5d1ddda356 chore: Update commit message 2024-01-03 11:26:04 +08:00
bobo
d4e262dfd9 chore: Update commit message content 2024-01-03 11:20:56 +08:00
bobo
7fbf44cd06 feat: Update chat_completion_stream function signature
- Update the signature of the chat_completion_stream function
- Remove unnecessary line breaks and indents
- Improve code readability and maintainability
2024-01-03 11:20:09 +08:00
bobo
2ec603a944 feat: Update prompt_commit_message_by_diff_user_input_llm_config
- Updated the prompt_commit_message_by_diff_user_input_llm_config to use the "gpt-3.5-turbo-1106" model
- Refactored the print statement in the display_commit_message_and_commit function for better readability
2024-01-03 11:14:56 +08:00
bobo
98233481df chore: Update llm_api in commit.py
- Updated llm_api import to chat_completion_stream
- Updated llm_api config with environment variable
- Improved user prompt for file selection
- Revised user message for commit editing
- Enhanced user guidance in main function
2024-01-03 11:10:35 +08:00
bobo
b5ad6f25ea chore: Update Python script imports
- Updated import from `chat_completion_no_stream` to `chat_completion_stream`
- Updated requirements file name from `requirements.txt` to `requirements-test.txt`
- Renamed requirements file in `run.sh` from `requirements.txt` to `requirements-test.txt`
2024-01-03 11:10:00 +08:00
bobo
788a6f08f8 fix: Update chat_completion_stream function names
- Update function names in openai.py
- Modify function import in __init__.py
- Update function call in openai.py
2024-01-03 11:08:38 +08:00
bobo
8b6767dc7d chore: Update commit message description
- Update commit message description to provide guidance on writing a well-formatted commit message for selected code changes and committing them via Git. Include an issue number if desired (e.g., input "/commit to close #12").
- Update commit message description in Chinese to provide guidance on generating a well-formatted submission message for the selected code changes and committing them via Git. If necessary, it can include the corresponding issue number (e.g., input "/commit to close #12").
2024-01-03 11:06:20 +08:00
bobo
446f80ebad type: refactor: Clean up import and improve readability
- Remove unused List import from typing module
- Reformat Checkbox and Form instantiation for clearer code structure
- Enhance step description in the commit process output
2024-01-02 22:17:05 +08:00
bobo
590b744dc9 type: refactor: Rework file selection and commit prompt UI
- Replace ui_utils with chatmark module for better UX in file selection
- Implement TextEditor class to handle commit message editing
- Switch from ui_checkbox_select to Checkbox and Form classes for file staging
2024-01-02 22:14:03 +08:00
bobo
74b933eecc type: feat: Add new script for test environment setup
- Add run.sh to configure and run test environment
- Ensure Node.js and Python 3 are installed before proceeding
- Install JavaScript and Python dependencies and run test cases
2024-01-02 21:37:02 +08:00
bobo
93178e521e type: style: Improve code readability
- Add blank lines for better code separation
- Consolidate header dict in requests.get call
- Remove unnecessary blank lines for consistency
2024-01-02 21:37:02 +08:00
bobo
51aa71a0cb fix: Remove placeholder from commit message content
- Remove the 'Closes #IssueNumber' placeholder in the commit message
- Ensure commit messages are generated without closing reference by default
- Implement code to strip the specific placeholder text
2024-01-02 21:37:02 +08:00
bobo
6af7ff68cc add commit prompt tests 2024-01-02 21:37:02 +08:00
bobo
86d087dd12 refactor: Improve readability and syntax in codebase
- Reformatted multiline strings for clarity in commit.py
- Applied consistent quotation marks for string literals in commit.py
- Introduced newlines between rpc_call decorator functions in services.py
2024-01-02 21:37:02 +08:00
bobo
ea809d8ac1 docs: Add docstring for read_prompt_from_file function
- Enhance read_prompt_from_file with a detailed docstring
- Specify parameters, return type, and possible raised exceptions
- Improve function's usability and maintainability with clear documentation
2024-01-02 21:37:02 +08:00
bobo
5891e22194 refactor: Update model configuration for diff prompt
- Change LLM model in commit prompt script from gpt-3.5-turbo to gpt-4
2024-01-02 21:37:02 +08:00
bobo
ce6fcddd82 feat: Added commit message prompt
- Added a new file `diffCommitMessagePrompt.txt` that provides guidelines for creating commit messages based on the provided diff.
- The guidelines include the structure of the commit message, summary of changes, and optional closing reference.
- The commit message should adhere to best practices, such as keeping the title under 50 characters and each summary line under 72 characters.
2024-01-02 21:37:02 +08:00
bobo
47e2bd9b9b feat: Add stream_out parameter to chat_completion_no_stream
- Add stream_out parameter to chat_completion_no_stream function
- Print delta content when stream_out is True
- Ensure seamless streaming of chat completion response
2024-01-02 21:37:02 +08:00
bobo
68b4258660 feat: Update commit.py to read prompt from file
- Removed unused imports and updated file reading functionality
- Set prompt from the diffCommitMessagePrompt.txt file
- Added error handling for file not found and reading exceptions
2024-01-02 21:37:02 +08:00
bobo
6de24f0d06 refactor: Refactor code to remove unused functions
- Removed unused functions `gpt_file_summary`, `gpt_file_group`, `get_file_summaries`, `get_file_summaries_and_groups`, `get_marked_files`, `generate_commit_message_base_file_summaries`
- Updated function `get_marked_files` to accept only `modified_files` and `staged_files`
- Updated function `generate_commit_message_base_diff` to provide a more descriptive start message for the commit workflow
2024-01-02 21:37:02 +08:00
bobo
960a8b9494 feat: Add progress indicators to commit script
- Implemented step-wise progress indicators in commit.py
- Enhanced user feedback during file modifications
- Improved commit message generation with feedback loops
2024-01-02 21:37:02 +08:00
boob.yang
21fe7678a1
Merge pull request #18 from devchat-ai/chatmark
Python implementation for ChatMark
2024-01-02 16:42:30 +08:00
kagami
07a418f239 Update README and TODOs 2024-01-02 11:50:17 +08:00
kagami
11420f7808 Add chatmark_example 2024-01-01 14:45:08 +08:00
kagami
08c001d5be Improve ID management for elements 2024-01-01 14:45:08 +08:00
kagami
7ffb03a857 Implement chatmark Form 2024-01-01 14:29:11 +08:00
kagami
9049046034 Implement chatmark widgets: button, checkbox, text editor, radio 2024-01-01 14:29:10 +08:00
kagami
d84aa2bd15 Init chatmark module 2024-01-01 14:29:10 +08:00
kagami
1e01fb644c
Merge pull request #17 from devchat-ai/add_limit_to_generate_commit_message
Add limit to generate commit message
2023-12-27 21:28:58 +08:00
bobo.yang
14dc3b2b52 Fix formatting in ask-code.py and commit.py 2023-12-27 15:42:51 +08:00
bobo.yang
d67c3d26a1 Refactor cost calculation in ask-code.py 2023-12-27 15:26:17 +08:00
bobo.yang
8cf2208a7b Add decode_path function to handle encoded paths 2023-12-27 15:02:07 +08:00