75 Commits

Author SHA1 Message Date
kagami
ec0103eaf3 Add try-catch for some ide services 2024-04-29 15:05:46 +08:00
kagami
77dead7745 Add find_def_locations in IDE Service 2024-03-11 22:18:00 +08:00
kagami
26d2a91192 Improve lint issues 2024-03-11 22:18:00 +08:00
kagami
06074e744c Make ide service types hashable 2024-03-11 22:18:00 +08:00
bobo
9e84e88677 fix: Prevent empty string submission in chat decorator
- Added a check to prevent empty strings from being added to the chat
- This ensures no messages with an empty 'content' field are inserted
- Enhances stability and error handling in chat functionality
2024-02-05 12:48:09 +08:00
kagami
ef1c9ef3cb Replace the usage of services functions with IDEService client 2024-02-03 23:43:13 +08:00
kagami
5f1926fcdd Type casting for returns of ide service 2024-02-03 23:15:52 +08:00
kagami
9efc523577 Implement IDEService class 2024-02-03 22:22:42 +08:00
kagami
2288eb480b Add type hint for ide services 2024-02-03 00:36:17 +08:00
kagami
c31817f44a Add type definitions for IDE service 2024-02-03 00:14:37 +08:00
kagami
8d302b1533 Expose get symbols andd find type definitions 2024-02-03 00:13:54 +08:00
kagami
ea80e1c4a4 Expose ide_logging in ide service 2024-02-02 10:14:32 +08:00
bobo
5a8704a58d fix lint error 2024-02-01 17:58:23 +08:00
bobo
366b17d092 feat: Add Python API for accessing raw VSCode data
- Added vscode_services.py to enable direct access to raw data from VSCode.
- Updated ide_services/services.py to use the new rpc_call function.
- Added vscode_services.py for specific VSCode service functionalities.
2024-02-01 17:46:49 +08:00
bobo
7b6bc1a7bc Add exception handling decorator to pipeline.py 2024-01-31 16:19:36 +08:00
bobo
7d639f93f4 Refactor llm_api module 2024-01-31 16:15:30 +08:00
bobo
b271a13f66 chore: Optimize LLM API function call handling
- Refactored chunks_call to utilize a list of tool calls
- Updated to_dict_content_and_call to handle multiple tool calls
- Enhanced chat_tools to display function call details
2024-01-31 16:14:51 +08:00
bobo
dac115ed32 Refactor llm_api package imports and add new modules 2024-01-31 16:14:51 +08:00
bobo
173fa768e5 Refactor error handling in openai.py 2024-01-31 16:14:51 +08:00
bobo
9a3325469a feat: Add new LLM API features
- Added new chat functionalities for LLM API
- Implemented text confirmation for LLM API
- Updated code for better user interaction
2024-01-31 16:14:51 +08:00
bobo
48b8590ea0 feat: Add new file tools_call.py
- Added new file tools_call.py containing functions and decorators
- Implements tool and function schemas for use in the application
- Includes a function to prompt the user to confirm function calls

.
2024-01-31 16:14:51 +08:00
bobo
212537b8a2 chore: Add memory module for LLM API
- Added memory module for LLM API
- Implemented ChatMemory and FixSizeChatMemory classes
- Included methods for appending, requesting, and responding to memory
2024-01-31 16:14:51 +08:00
bobo
997c3f86dc new openai api 2024-01-31 16:14:50 +08:00
bobo
162c545b74 add openai api pipeline.py 2024-01-31 16:14:15 +08:00
bobo
3e93883c4f feat: Enhance LLM API with new decorators and confirmations
- Added new decorators for LLM functions, parameters, and confirmations.
- Introduced confirmation dialogs for calls and edits within LLM interactions.
- Streamlined integration of LLM tool schemas and response handling.
2024-01-31 16:14:15 +08:00
bobo
b3c0810e54 Refactor pipeline imports and exception handling 2024-01-31 15:22:19 +08:00
bobo
bde44aa50e Update exception handling in llm_api/openai.py 2024-01-31 15:22:19 +08:00
bobo
6f1b5ca2ef Refactor pipeline imports and function calls 2024-01-24 21:26:11 +08:00
bobo
47887ca6f9 Add pipeline module with retry and exception handling functions 2024-01-24 21:23:44 +08:00
bobo
f0ed2a64ee Fix commit message length limit 2024-01-24 18:01:29 +08:00
bobo
b81624c764 fix: Improve error handling for context overflows
- Refactor error output for token limit issues to ensure clarity
- Update the error handling strategy to unify exception responses
- Remove redundant error handling blocks for streamlining
2024-01-24 17:34:27 +08:00
bobo
3d3241f282 chore: Correct lint errors
- Refactored language_prompt to handle Chinese characters
- Updated model_token_limit_error message formatting
- Modified function signature for chat_completion_stream
2024-01-24 17:34:27 +08:00
bobo
c805239183 fix: Resolve context overflow commit failure
- Updated commit/command.yml to use "en" language code
- Updated commit/commit.py to handle model's maximum context length error
- Updated commit/zh/command.yml to use "zh" language code
- Updated libs/llm_api/openai.py to ignore tokens limit error

Closes devchat-ai/devchat#189
2024-01-24 17:34:27 +08:00
kagami
c584b186e0 Implement chatmark Step 2024-01-12 11:12:12 +08:00
kagami
bca2507c2f Sort and format import blocks 2024-01-05 12:27:57 +08:00
kagami
56aedf8793 Remove ui_utils/ 2024-01-05 12:24:50 +08:00
bobo
05d8e6dda7 format file 2024-01-05 12:01:01 +08:00
bobo
7d5887e98c refactor: Enhance form and button label flexibility
- Make submit and cancel button labels optional in form and widgets
- Refactor chatmark header construction for conditional button labels
- Implement assertion for Radio widget's default_selected option
2024-01-05 12:01:01 +08:00
bobo
57da9e9841 style: Standardize button label parameters
- Add trailing commas to button name parameters in widgets
- Reformat constructor definitions for consistency
- Clean up unnecessary whitespace in widget render logic
2024-01-05 12:01:01 +08:00
bobo
69e178e7a7 feat: Implement default option selection in Radio
- Introduced the default_selected parameter in the Radio widget
- Updated Radio widget to mark default selected option visually
- Removed TODO comment for the default_selected implementation
2024-01-05 12:01:01 +08:00
bobo
21217d2bb7 feat: Add customizable button labels to forms and widgets
- Form and TextEditor classes now accept submit_button_name and cancel_button_name
- Widget's chatmark header updated with customizable submit and cancel labels
- Adjusted initialization of Checkbox and Radio classes with button label parameters
2024-01-05 12:01:01 +08:00
kagami
75ff48c6bc Support different languages in write_tests 2024-01-04 17:19:08 +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
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
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
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
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
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
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
kagami
07a418f239 Update README and TODOs 2024-01-02 11:50:17 +08:00