Skip to content
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

Inline Chat #157

Closed
phodal opened this issue Dec 12, 2024 · 0 comments
Closed

Inline Chat #157

phodal opened this issue Dec 12, 2024 · 0 comments

Comments

@phodal
Copy link
Owner

phodal commented Dec 12, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

phodal added a commit that referenced this issue Dec 31, 2024
Introduce `EditorGutterHandler` to manage gutter icons in the editor, allowing for dynamic icon rendering based on line selections. The handler listens to editor events and updates gutter icons accordingly.
phodal added a commit that referenced this issue Dec 31, 2024
…icon #157

Introduce `ShireInlineChatService` to handle inline chat functionality within the editor. Integrate the service with the gutter icon click
phodal added a commit that referenced this issue Jan 1, 2025
…te management #157

- Added `ConcurrentHashMap` to manage multiple chat panels and their states.
- Improved UI with rounded borders, background colors, and better layout handling.
- Implemented close functionality for chat panels on ESC key press.
- Enhanced panel resizing and redrawing logic for better user experience.
phodal added a commit that referenced this issue Jan 1, 2025
- Integrate `LlmProvider` to stream responses from the LLM on input submission.
- Refactor `ShireInlineChatInputPanel` to handle input submission with Enter and newline insertion with Shift+Enter.
- Remove redundant escape action and streamline input handling logic.
phodal added a commit that referenced this issue Jan 1, 2025
Removed redundant action objects and directly assigned actions to the text area's action map. Cleaned up unused code and streamlined the implementation for better readability.
phodal added a commit that referenced this issue Jan 1, 2025
- Add `ShirePanelView` for better chat display and progress handling.
- Improve input handling with new submit button and keybindings.
- Refactor UI components for better responsiveness and visibility.
phodal added a commit that referenced this issue Jan 1, 2025
Removed redundant border-related code and streamlined the border creation process. Updated background and border colors for consistency. Improved focus traversal and component layout. Simplified text submission logic by trimming text before clearing the input area.
phodal added a commit that referenced this issue Jan 1, 2025
- Modify panel minimum size and add resize functionality for dynamic height adjustment.
- Update border styles to use `JBColor.border()` for consistency.
- Remove unused imports and redundant color assignments.
phodal added a commit that referenced this issue Jan 1, 2025


- Removed focus cycle root and traversal policy settings.
- Updated `JBTextArea` to implement `KeyboardAwareFocusOwner` and adjusted border padding.
- Changed border style in `ShireInlineChatService` and opacity in `Editor
phodal added a commit that referenced this issue Jan 1, 2025
Moved the `ShireInlineChatPanel` class and related components from `ShireInlineChatService.kt` to a new file `ShireInlineChatPanel.kt` for better code organization and maintainability. Also cleaned up unused imports and minor code adjustments in other files.
phodal added a commit that referenced this issue Jan 1, 2025
Extract `ShireSonarLintToolWindowListener` from `ShireActionStartupActivity.kt` into a dedicated file in the `thirdparty` package. Rename `create` method to `listen` in `EditorGutterHandler` for clarity.
phodal added a commit that referenced this issue Jan 1, 2025
Introduce `InlineChatProvider` interface and its implementation `ShireInlineChatProvider` to enable inline chat functionality. Added `INLINE_CHAT` location to `ShireActionLocation` and integrated the provider into the startup activity. Renamed `EditorGutterHandler` to `ShireInlineChatProvider` for clarity.
phodal added a commit that referenced this issue Jan 1, 2025
Rename the class `ShireInput` to `ShireChatBoxInput` to better reflect its purpose. Updated all references to the class across the codebase. Additionally, adjusted border styling and introduced `ShireLineBorder` for improved UI consistency.
phodal added a commit that referenced this issue Jan 1, 2025
- Set editor background color for Markdown and plain text files.
- Reduce border radius for inline chat panel for a cleaner look.
phodal added a commit that referenced this issue Jan 2, 2025
Introduce a new `prompt` method in `ShireInlineChatService` to handle input processing. This method is now used in `ShireInlineChatPanel` to generate the prompt for the LLM provider.
phodal added a commit that referenced this issue Jan 2, 2025
Refactor the `prompt` method in `ShireInlineChatService` to support dynamic actions from `DynamicShireActionService`. Update `ShireInlineChatPanel` to pass the project context. Modify `ShireActionLocation` and documentation to reflect changes in inline chat functionality.
phodal added a commit that referenced this issue Jan 2, 2025
Introduce a new `ShirePromptBuilder` interface and its implementation `ShireActionPromptBuilder` to handle dynamic prompt generation. This replaces the previous inline logic in `ShireInlineChatService` with a more extensible and modular approach. The builder is registered as an extension point, allowing for future customizations
phodal added a commit that referenced this issue Jan 2, 2025
…er` #157

The `shireFile` parameter was removed from the `ShireRunner` constructor as it was no longer used in the implementation. This change simplifies the constructor and aligns with the actual usage in the code.
phodal added a commit that referenced this issue Jan 2, 2025
- Refactored `processTemplateCompile` and `prepareExecute` methods to simplify logic and improve readability.
- Removed redundant code and consolidated variable handling.
- Updated `ShireActionPromptBuilder` to use `compileFileContext` for consistent prompt generation.
- Improved error handling
phodal added a commit that referenced this issue Jan 2, 2025
Introduce `OnStreamingService` to handle streaming events during execution. Also, update `resize` method in `ShirePanelView` to accept a customizable `maxHeight` parameter for better flexibility.
phodal added a commit that referenced this issue Jan 2, 2025
- Updated border radius and replaced `RoundedLineBorder` with `ShireLineBorder` for improved visual consistency.
- Added a submit button with a cancel icon to close the inline chat,
@phodal phodal closed this as completed Jan 2, 2025
phodal added a commit that referenced this issue Jan 3, 2025
…ion #157

Introduce `ShirePreviewEditorProvider` for rendering shire file previews. Enhance `ShireFileEditorProvider` with proper editor creation logic and policy. Adjust layout comments for future workflow view implementation.
phodal added a commit that referenced this issue Jan 3, 2025
…#157

- Split ShireFileEditor into ShireFileEditor and ShirePreviewEditor for better separation of concerns.
- Introduce ShirePreviewEditorProvider for handling preview editor creation.
- Simplify toolbar creation and action handling in ShireFileEditor.
- Remove unused imports and redundant code.
phodal added a commit that referenced this issue Jan 3, 2025
- Introduce `ReparseContentDocumentListener` to handle document changes and trigger updates.
- Add `CodeHighlightSketch` for syntax highlighting and real-time rendering.
- Refactor initialization logic to use `runInEdt` for thread safety
phodal added a commit that referenced this issue Jan 3, 2025
Ensure CodeHighlightSketch uses PlainTextLanguage for proper text highlighting initialization.
phodal added a commit that referenced this issue Jan 3, 2025
- Remove unused coroutine-related imports and `ShireEditorScope` class.
- Replace `runInEdt` with `ApplicationManager.getApplication().invokeLater`.
- Add scrollable panel and experimental preview label.
- Improve error handling in `updateOutput` method.
phodal added a commit that referenced this issue Jan 3, 2025
- Remove redundant `invokeLater` calls and directly call `updateOutput`.
- Move `updateOutput` logic inside `invokeLater` to ensure thread safety.
- Rename editor type ID from "markdown-preview-editor" to "shire-preview-editor".
phodal added a commit that referenced this issue Jan 4, 2025
Ensure consistent line separators by normalizing text before replacing document content. This prevents potential issues with mixed line endings in the editor.
phodal added a commit that referenced this issue Jan 4, 2025
- Rename `ShireFileEditorProvider` to `ShireSplitEditorProvider`.
- Introduce `ShireFileEditorWithPreview` with enhanced scrolling and preview synchronization.
- Add support for Markdown language in code highlighting.
- Implement scroll synchronization between main editor and preview.
phodal added a commit that referenced this issue Jan 4, 2025
- Rename `jPanel` to `mainPanel` for clarity.
- Add `variableDebugPanel` to display compiled variables.
- Update UI styling for the preview label.
- Introduce `rerenderShire` method to refresh the preview.
- Adjust action group to include a preview toggle action.
phodal added a commit that referenced this issue Jan 4, 2025
- Refactor variable panel layout using `JBPanel` and `GridBagLayout`.
- Add copy button to each variable for easy value copying.
- Improve styling with custom fonts, colors, and borders.
- Ensure proper panel updates with `revalidate()` and `repaint()`.
phodal added a commit that referenced this issue Jan 4, 2025
- Introduce ShireVariablePanel to handle variable display in the editor.
- Refactor ShirePreviewEditor to use ShireVariablePanel for cleaner code.
- Remove redundant variable panel logic from ShirePreviewEditor.
phodal added a commit that referenced this issue Jan 4, 2025
Move ShirePreviewEditor and ShireFileEditorWithPreview classes into their own files for better code organization and maintainability.
phodal added a commit that referenced this issue Jan 4, 2025
…#157

- Replace the variable panel's custom layout with a JBTable for better scalability and usability.
- Add a refresh action to manually update the preview output.
- Remove automatic document re-parsing to improve performance and control.
phodal added a commit that referenced this issue Jan 4, 2025
…widths

#157

- Remove unused imports and copy button functionality.
- Rename "Key" column to "Name".
- Set preferred column widths and auto-resize mode for better UI.
phodal added a commit that referenced this issue Jan 4, 2025
…thPreview #157

Consolidate action group creation logic into a single method, removing redundant helper methods and simplifying the code structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant