948 Commits

Author SHA1 Message Date
bobo.yang
a998b11f1e add log for update slash commands 2024-11-05 11:27:30 +08:00
bobo.yang
a3b0078a1c add startup log 2024-11-05 11:27:06 +08:00
bobo.yang
429f52357d feat: Add configurable conda-forge URL for Python installation
- Implement getCondaForgeUrl function to fetch URL from config
- Use configurable URL in Python installation process
- Add error handling and fallback to default URL if needed
2024-09-20 15:45:41 +08:00
bobo.yang
3851448ec0 fix: Correct workflow directory path
- Added missing directory path for Merico scripts
- Updated directory existence check to use the new path
- Ensured workflow commands are correctly installed
2024-09-10 11:32:23 +08:00
bobo.yang
adec4726ce feat: Add logging in code completion
- Added try-catch blocks to handle errors in creating task description context.
- Added logging for errors in creating call definition context, similar block context, symbol context, recent edit context, and neighbor file context.
- Wrapped the main function logic in a try-catch block to log errors in createPrompt.
2024-09-06 13:56:37 +08:00
Rankin Zheng
cb11ec567e Merge branch 'main' into auto_custom_workflow 2024-09-02 15:49:27 +08:00
Rankin Zheng
60cc1e376e workflow(update): refresh workflow commands on registration
Update the workflow command list automatically when new workflows are registered
or modified. This ensures the command list displayed to the user is always current
and accurate, eliminating the need for manual refreshes.
2024-08-28 06:50:35 +08:00
Rankin Zheng
3e2ccd5ab2 feat(ide_services): add endpoint for retrieving local service port
Add a new endpoint `/get_local_service_port` to ide_services for obtaining the port
number of the local service. This endpoint utilizes the `getLocalServicePort` function,
which logs the local service port and retrieves it from the environment variable
`DC_LOCALSERVICE_PORT`.
2024-08-27 17:35:23 +08:00
Luo Tim
cc35fd3380 Replace assistant names in source 2024-08-27 16:44:49 +08:00
Rankin Zheng
adedbec510 feat(workflow): update custom workflows asynchronously
Modify the workflow update mechanism to include asynchronous updates for custom workflows
in addition to the standard workflows. This ensures that both default and custom workflows
are updated efficiently, improving the overall functionality and user experience within the
DevChat environment.

BREAKING CHANGE: Custom workflow updates now occur asynchronously alongside standard
workflow updates. This may affect downstream systems that rely on synchronous workflow
updates. Systems should now handle the asynchronous nature of custom workflow updates.
2024-08-26 18:31:03 +08:00
bobo.yang
fa57ebe527 fix: Improve LLM stream handling in devchatComplete function
- Refactor stream processing for better chunk handling
- Add max_tokens parameter to API payload
- Implement simulated stream receive for testing purposes
2024-08-19 18:29:57 +08:00
bobo.yang
d272bddf2b feat: Update stop tokens in devchatComplete function
- Remove "```" and "//" from stop tokens list
- Retain "<|endoftext|>", "<|EOT|>", "<file_sep>", "\n\n"
- Adjust code completion behavior for improved results
2024-07-18 17:59:35 +08:00
bobo.yang
bd3d9c1ce3 feat: Add new quick fix option using DevChat
- Introduce "Fix using DevChat" as a preferred quick fix action
- Rename existing quick fix command to "Ask DevChat"
- Update package.json and TypeScript files to reflect new commands
2024-07-18 15:28:10 +08:00
bobo.yang
01555650ef feat: Add select range functionality
- Implement selectRange function in UnofficialEndpoints
- Add select_range endpoint to functionRegistry
- Import vscode module for text editor operations
2024-07-18 14:13:38 +08:00
bobo.yang
964a545393 feat: Add local service port check for workflow commands
- Introduce conditional check for DC_LOCALSERVICE_PORT
- Call getWorkflowCommandList if local service port is set
- Enhance handleRegCommandList function with new logic
2024-07-18 07:30:30 +08:00
kagami
ca507d7667 Hide service's console on Windows 2024-07-16 15:54:28 +08:00
bobo.yang
dad1f10513 chore: Remove unused endpoint "/get_symbol_defines_in_selected_code" and related code 2024-07-16 07:57:13 +08:00
bobo.yang
3fa139ff91 feat: Add local service management
- Implement start and stop functionality for local service
- Register new command to start local service
- Add error handling for local service shutdown
2024-07-16 07:56:36 +08:00
bobo.yang
99f7a1d4da feat: Implement local service management
- Add local service start/stop functionality
- Integrate local service port discovery and setup
- Update DevChatClient to use dynamic port from environment
2024-07-16 07:55:02 +08:00
kagami
f707bef5fc Handle exception with default return value for devchat client methods 2024-07-11 12:09:01 +08:00
kagami
b663fdcc3f Change some logging message from debug to trace 2024-07-11 10:43:51 +08:00
kagami
0910fbf1ec Remove unnecessary fileds in log related response 2024-07-11 10:38:06 +08:00
kagami
718d2824f0 Update the route of workflows 2024-07-11 10:38:06 +08:00
kagami
feb34588ab Use the inner get/post method 2024-07-11 10:38:06 +08:00
kagami
f421bcae56 Add the following TODOs 2024-07-11 10:38:06 +08:00
kagami
7551a55ce6 Handle large log data 2024-07-11 10:38:06 +08:00
kagami
6eb7f1f408 Get workflows info via client 2024-07-11 10:38:06 +08:00
kagami
8becdb00aa Update workflows via client 2024-07-11 10:38:05 +08:00
kagami
b9df28d20d Get and delete topics via client 2024-07-11 10:38:05 +08:00
kagami
bebe32fa18 Get logs of a topic via client 2024-07-11 10:38:05 +08:00
kagami
84ef68c500 Delete log via client 2024-07-11 10:38:05 +08:00
kagami
2be88bd9ad Use devchat client & cli for chatting and workflow respectively 2024-07-11 10:38:05 +08:00
kagami
d1f712ff90 Init DevChatClient and DevChatCLI 2024-07-11 10:38:05 +08:00
bobo.yang
71778df267 feat: Add code editing and diff display functionality
- Implement applyDiffToCode function for code editing
- Add getCodeEditorPath to locate platform-specific binaries
- Integrate new functionality with existing diff display system
2024-07-04 21:48:01 +08:00
bobo.yang
6e72521142 feat: Handle OPTIONS requests for CORS support
- Add handling for OPTIONS requests in RPC server
- Return 200 status with JSON response for OPTIONS
- Update diffApply function keys to include "autoedit"
2024-07-04 21:45:45 +08:00
bobo.yang
f9131447c5 feat: Add autoedit flag for automatic code editing
- Introduce autoedit parameter in diffApply function
- Implement conditional logic for code application method
- Use applyEditCodeWithDiff when autoedit is true
2024-07-04 21:45:00 +08:00
bobo.yang
2831337515 refactor: Simplify quick fix command implementation
- Refactor quick fix command to use document, range, and diagnostic
- Remove code collapsing and surrounding code extraction
- Update command arguments to pass document, range, and diagnostic
2024-06-26 10:13:57 +08:00
bobo.yang
2b5412b0bc feat: Add new IDE service endpoints
- Implement getDiagnosticsInRange for code diagnostics
- Create getCollapsedCode for code collapsing functionality
- Add getExtensionToolsPath to retrieve tools directory
- Update services.ts with new endpoint handlers
2024-06-26 10:13:21 +08:00
bobo.yang
b96e476c80 fix: Limit code completion context to prevent exceeding limit
- Adjusted collapseCodeBlock function to respect complete_context_limit
- Implemented prefix and suffix length limiting to prevent exceeding limit
- Ensured code completion does not exceed context limit even with folded functions

Closes #403
2024-06-20 16:30:14 +08:00
bobo.yang
9681738eca refactor: Remove chat messages cache
- Removed messageHistory utility and related functions
- Updated loadTopicHistoryFromCurrentMessageHistory to fetch logs directly
- Removed addMessageToHistory and message deletion from messageHistory
2024-06-18 20:33:55 +08:00
bobo.yang
76771f1392 fix: Add async to registerQuickFixCommand and generatePrompt
- Modified registerQuickFixCommand to be an async function
- Updated generatePrompt to also be async and handle active editor context
- Improved error handling and context management in prompt generation
2024-06-18 15:18:05 +08:00
bobo.yang
a8e125afab Refactor messageHandler.ts and workflowContextHandler.ts 2024-06-17 21:33:30 +08:00
bobo.yang
c937e67c70 Refactor historyMessagesBase.ts and handlerRegister.ts 2024-06-17 21:33:30 +08:00
bobo.yang
3589d497f1 fix: Remove default model configuration
- Removed the code that sets the default model in the configuration
- This change is to address the issue where the default model was being incorrectly set
- Simplified the configuration migration process by removing unnecessary steps
2024-06-17 21:14:31 +08:00
bobo.yang
5ec19946d5 Refactor getCurrentFileInfo endpoint and add CORS headers 2024-06-17 09:20:16 +08:00
bobo.yang
2bdf9d01eb feat: Add getCurrentFileInfo and getIDEServicePort handlers
- Added getCurrentFileInfo handler to retrieve the absolute path of the current file
- Added getIDEServicePort handler to retrieve the IDE service port
- Updated fileHandler.ts and handlerRegister.ts to include the new handlers
- Created getCurrentFileInfo.ts in ide_services/endpoints to implement the getCurrentFileInfo handler
- Updated services.ts in ide_services to include the getCurrentFileInfo handler
2024-06-16 22:06:27 +08:00
bobo.yang
3c777f3c19 feat: Add model to completion event
- Added model property to LogEventRequest interface
- Included model in log events sent to server
- Retrieved model from DevChatConfig instance
2024-06-14 14:00:09 +08:00
bobo.yang
cce0020696 Refactor configHandler.ts to read and write YAML configuration files 2024-06-14 13:24:07 +08:00
bobo.yang
0756779a94 Refactor chunkFilter.ts to include CodeCompleteResultWithMeta interface 2024-06-12 14:57:05 +08:00
bobo.yang
28845c47f1 feat: Add IDE and language information to log event requests in InlineCompletionProvider 2024-06-11 12:22:47 +08:00