-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev 0.0.8 #156
Conversation
- Updated the system message in chat presets to include context analysis and structured response guidelines for improved user interaction. - Implemented dynamic system message updates in the ChatCoreContext to ensure the latest configuration is used for each request. - Modified StorageManager to merge user chat presets with system configurations, allowing for more personalized responses.
…structured response guidelines - Updated the chat presets configuration to include detailed context analysis and a structured response format for improved user interaction. - Added guidelines for analyzing user message context and formulating responses, ensuring clarity and relevance in AI interactions.
…tool preview - Added functionality to manage system presets within the ToolDropdown component, allowing users to select and display the current preset. - Integrated fetching of system presets and the current preset from storage, improving user experience by providing context-aware options. - Enhanced the ToolPreview component to adjust its positioning dynamically based on cursor location, ensuring better visibility and usability. - Updated StorageManager to support retrieval and storage of system presets, streamlining the configuration process for user tools.
…onality - Added SystemPromptDropdown to AskPanel for improved user interaction. - Removed unused state and logic related to system presets in ToolDropdown, simplifying the component. - Adjusted dropdown item layout in ModelDropdown for better readability and user experience. - Updated display name truncation in ModelDropdown for enhanced visibility.
- Refactored SystemPromptDropdown to utilize MenuItem and Transition components for improved dropdown behavior and animations. - Updated dropdown item layout for better readability and user interaction, including an index display for system presets. - Enhanced styling for the dropdown button and items to improve visual consistency and accessibility. - Integrated mouse event handling to maintain dropdown visibility, ensuring a smoother user experience.
- Implemented a new asynchronous model fetching function to retrieve user models from storage, improving data handling. - Added detailed logging throughout the component to assist in debugging and provide better insights into the dropdown's state and actions. - Removed redundant model fetching logic to streamline the component's functionality. - Updated the display name handling for improved clarity in the dropdown items.
…ropdown component - Updated ToolDropdown and ModelDropdown to utilize the new BaseDropdown component for improved code reusability and maintainability. - Added 'id' property to ToolsPromptInterface and ModelItem for better identification of dropdown items. - Streamlined dropdown item rendering and event handling, enhancing user interaction and visual consistency. - Removed redundant state management and logging, simplifying component logic and improving performance.
…wn and dropdown management - Added SystemPromptDropdown to AskPanel, improving user interaction with system presets. - Introduced state management for the new system prompt dropdown, allowing for better control and visibility. - Refactored ToolDropdown to remove unused state and streamline functionality. - Enhanced BaseDropdown to support selected item highlighting and improved rendering logic. - Updated SystemPromptDropdown to utilize BaseDropdown for consistent behavior and styling across dropdowns. - Improved logging and event handling for better debugging and user experience.
…down components - Added statusListener calls to ToolDropdown, SystemPromptDropdown, and ModelDropdown to improve state management upon item selection. - Implemented Enter key support in ModelDropdown for better accessibility and user interaction. - Enhanced logging in BaseDropdown for improved debugging and tracking of user actions. - Streamlined event handling across dropdown components to ensure consistent behavior and responsiveness.
- Updated button class to limit maximum width for better responsiveness. - Reduced maximum width of displayed item name for enhanced visibility. - Modified shortcut key display to ensure consistent layout and prevent overflow. - Improved icon layout to maintain visual consistency within the dropdown.
- Eliminated console log statements from SystemPromptDropdown, ModelDropdown, and BaseDropdown for cleaner code and improved performance. - Updated event handling in SystemPromptDropdown to include onMouseDown for better user interaction. - Streamlined dropdown components by refining the useEffect hooks and ensuring consistent behavior across dropdowns.
- Commented out focus calls in AskPanel to prevent unwanted input field focus behavior. - Updated onClick handlers in ToolDropdown and ModelDropdown for improved clarity and consistency. - Refactored ModelDropdown to simplify item click handling and enhance readability. - Enhanced BaseDropdown to manage command key state more effectively and improve item rendering logic.
… logs - Refactored tooltip positioning in ToolPreview to improve alignment with the cursor and menu items. - Commented out erroneous calculations for tooltip placement and added console logs for better debugging. - Updated useToolPreview hook to correct vertical positioning of the tooltip based on button height.
- Re-enabled input focus calls in AskPanel to ensure the input field receives focus as intended. - Adjusted timing for focus calls to improve user experience during dropdown interactions.
- Bumped version from 0.0.6 to 0.0.7 in package.json and updated the description to clarify the purpose of the Askman extension. - Modified BaseDropdown component to display 'Untitled' for unnamed items, improving user experience by providing a default label when displayName is not a string. - Enforced the 'template' property in SystemPresetInterface to be required, ensuring better type safety in the StorageManager utility.
…oning and event handling - Updated ToolDropdown, SystemPromptDropdown, and ModelDropdown to utilize useRef for better reference management. - Adjusted tooltip positioning logic in useToolPreview to align previews more accurately with dropdown items. - Enhanced BaseDropdown to support right alignment for dropdown menus, improving layout flexibility. - Streamlined event handling in dropdown components for improved user interaction and responsiveness.
- Added .vscode and .cursor to .gitignore to prevent unnecessary files from being tracked in the repository. - Ensured that the .gitignore file is up to date with the latest development environment configurations.
…eview - Removed console log statements in AskPanel and useToolPreview to clean up the code and improve performance. - This change enhances the overall readability and maintainability of the components without affecting functionality.
…lity - Updated BaseDropdown component to improve button styling by adding a 'group' class for better hover effects. - Refactored item display logic to include a tooltip that appears on hover, providing additional context for unnamed items. - Ensured consistent display of 'Untitled' for unnamed items while maintaining accessibility through title attributes. - Enhanced layout structure for improved usability and visual clarity.
…onents - Updated ToolDropdown and ModelDropdown to utilize a consistent approach for managing selected tools and models, enhancing state management. - Replaced `getSelectedModel` with `getCurrentModel` in configStorage for improved clarity and consistency in naming. - Introduced `setCurrentTool` and `setCurrentModel` methods in StorageManager for better encapsulation of tool and model state. - Enhanced dropdown components to reflect the currently selected tool or model, improving user experience and interaction. - Streamlined event handling in dropdowns to ensure consistent behavior across components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (8)
- package.json: Language not supported
- src/components/ask-panel.tsx: Evaluated as low risk
- src/components/ask/ModelDropDown.tsx: Evaluated as low risk
- src/components/ask-tooldropdown.tsx: Evaluated as low risk
- src/shared/storages/configStorage.ts: Evaluated as low risk
- src/chat/chat.ts: Evaluated as low risk
- src/types.ts: Evaluated as low risk
- src/components/tool-preview.tsx: Evaluated as low risk
Comments suppressed due to low confidence (5)
src/utils/StorageManager.ts:254
- The comment is in Chinese. It should be translated to English for consistency: 'If userConfigObj is an array, do not merge'.
// 如果 userConfigObj 是数组,则不合并
src/utils/StorageManager.ts:215
- Ensure that Handlebars.compileAST returns a TemplateDelegate to avoid type inconsistencies with the SystemPresetInterface.
template: Handlebars.compileAST(preset.system)
src/utils/StorageManager.ts:237
- The key 'current-tool' should be defined as a constant to avoid potential typos and improve maintainability.
return await StorageManager.get('current-tool');
src/utils/StorageManager.ts:163
- Ensure that the merging logic of chatPresets and userChatPresets does not unintentionally overwrite important configurations.
const mergedConfig = { ...chatPresets, ...userChatPresets };
src/utils/StorageManager.ts:181
- Ensure that the fallback mechanism for the 'system-init' preset is properly tested to avoid any runtime issues.
const template = Handlebars.compileAST(mergedConfig['system-init'].system);
className={`${ | ||
active ? 'bg-black text-white' : 'text-gray-900' | ||
} group flex w-full items-center rounded-md px-2 py-2 text-sm focus:outline-none`} | ||
onMouseDown={() => handleSystemPresetClick(preset)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handleSystemPresetClick function is called twice on onMouseDown and onClick events. Remove one of the event handlers to avoid duplicate calls.
onMouseDown={() => handleSystemPresetClick(preset)} | |
onClick={() => handleSystemPresetClick(preset)} |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For touchpad operations, a light touch is a click operation, and pressing down is a mousedown operation
…wn export - Added functionality to fetch the currently selected tool from StorageManager in AskPanel, improving user experience by maintaining tool state. - Enhanced ToolDropdown by exporting the tools array for better accessibility in other components. - Integrated Handlebars compilation for user-defined tools, allowing for dynamic template rendering. - Improved error handling during tool fetching to ensure robustness.
Features
Bug Fixes
Refactors
Chores |
Pull Request: Enhance Dropdown Components and System Prompt Management
Main Changes
This pull request primarily includes the following improvements:
1. Dropdown Component Refactoring and Standardization
2. System Prompt Management
3. Performance and User Experience Enhancements
4. Other Improvements
Technical Details
Testing Recommendations
Please focus on testing the following functionalities:
Related Issues
Changed Files