generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Lifecycle Control Flow #24
Comments
phodal
added a commit
that referenced
this issue
Jun 25, 2024
… test #24 - Update GitHub repository link in config file - Add real world parsing test for Shire language with test data
phodal
added a commit
that referenced
this issue
Jun 25, 2024
Add "onStreaming", "onStreamingEnd", and "afterStreaming" lifecycle keywords to the ShireParser.bnf and ShireLexer.flex files. Update the related grammar rules and test cases to accommodate the new keywords. This change enhances the language capabilities for handling different streaming lifecycle stages.
phodal
added a commit
that referenced
this issue
Jun 25, 2024
Refactor the ShireParser grammar to include new function body and flag condition expressions. Update the lifecycle syntax in the Shire language to allow for more flexible patterns and actions, including improved case handling and new variable definitions. Additionally, clarify a potential delay in documentation updates within the development guide.
phodal
added a commit
that referenced
this issue
Jun 25, 2024
…ty body support #24 - Reordered action expressions to prioritize function calls over case bodies. - Added support for optional case flag conditions and empty function bodies. -Introduced a new `EMPTY` class in `FrontMatterType` to handle empty function bodies in the AST.
phodal
added a commit
that referenced
this issue
Jun 25, 2024
The commit introduces the 'condition' keyword as a replacement for 'flags' in the language's grammar. This change affects the parser and lexer, updating the syntax for case statements and related constructs. The test file has been updated to reflect the use of the new 'condition' syntax.
phodal
added a commit
that referenced
this issue
Jun 25, 2024
…ods and dependencies #24 - Renamed `preFilter` to `ruleBasedFilter` for clarity. - Renamed `postProcess` to `onStreamingEnd` to reflect end-of-stream processing. - Added deprecated `onStreaming` with a note for future use. - Introduced `TaskRoutes` to manage actions dependencies and conditional tasks. - Updated related method calls and test cases to reflect new naming and structure.
phodal
added a commit
that referenced
this issue
Jun 25, 2024
…#24 Add the ability to specify a default condition in the lifecycle configuration of Shirelang. This change also includes a new test file and a test case for the afterStreaming condition. The commit adheres to the Conventional Commits specification, providing a clear and concise description of the main action.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…#24 This change updates the grammar file and corresponding parser to use `psi_var_decl` instead of `variable_decl` to maintain naming consistency within the parser codebase.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…24 Update the parser to better handle when conditions and expressions in Shire files. This includes: - Changing the syntax for when conditions to include curly braces. - Ensuring non-nullability of parsed expressions. - Adding support for new lifecycle IDs and ignoring certain expressions in the front matter. - Enhancing the logic for processing front matter entries and expressions.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…ing #24 The commit refines the handling of post-processors and pattern actions within the compiler. It introduces the capability to process multiple post-processors defined in an array and improves the overall structure for handling different front matter types. Additionally, a new test case is added to verify the streaming end handling, ensuring proper functionality. The commit also standardizes the naming convention for action names and updates the test data accordingly.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
#24 Renamed the `postProcessors` variable and related logic to `endProcessors` for clarity. Updated the code to consistently use the new name, including in the `HobbitHole.kt` and `FrontmatterParser.kt` files. This change reflects the intended use of the processors at the end of a streaming process. Additionally, simplified the when-expression checks and removed unnecessary type casting for improved readability.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…ogic #24 This commit modifies the hobbit hole and front matter processing logic by: - Enhancing the handling of end processors in `HobbitHole.kt`. - Adding a print statement for debugging in `ShireLifecycleTest.kt`. - Refactoring the display method in `ShireExpression.kt` to handle method calls more effectively. - Simplifying the code for method calls and parameter parsing in `FrontmatterParser.kt`. - Adding more detailed logging in `ShireCompiler.kt` to identify unknown element types.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
This commit updates the `HobbitHole.kt` and associated test cases to replace the `PostProcessor` with the new `ProcessFuncNode` data class. It involves changing the type of the `onStreamingEnd` list and the corresponding processing logic. The commit also includes the addition of the new `ProcessFuncNode` class file and updates the test assertions to reflect these changes.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
The commit extracts the logic for building streaming end processors into a separate private function. This improves code readability and reusability. Additionally, it updates the documentation for the `onStreamingEnd` property to provide a clearer description of its purpose. The import statement for the unused `PatternActionProcessor` has been removed in the test file to clean up the codebase.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
Use `let` for conditional initialization of endProcessors, filenameRules, and variables in HobbitHole. This change enhances the readability and safety of the code by ensuring that the collections are initialized only when the relevant FrontMatterType is present. Additionally, it modifies the method signatures to directly accept the specific FrontMatterType.OBJECT, simplifying the parameter types and logic within the builder functions.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
#24 This commit simplifies the use of `let` expressions and lambda notation by removing unnecessary parentheses and braces for cleaner code readability. It also renames local variables for better clarity in the `HobbitHole.kt` file of the shirelang project.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
- Replace direct string conversion with fromString factory method for selection strategy. - Enhance build methods to directly return results, simplifying code by removing unnecessary local variables and return statements. - Introduce toValue extension method to FrontMatterType to extract and utilize the underlying value directly.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
The commit updates the compiler module by removing the `ProcessFuncNode` class and replacing it with the new `PostProcessorNode` class. This change affects the `HobbitHole` and its associated processing functions, as well as the test cases to reflect the use of the new node type. The `PostProcessor` interface has been extended to include the execution of the `PostProcessorNode`.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
#24 Rename the `CodeVerify` to `VerifyCode` across the middleware and test files. The update includes changes to the method names, references, and the post processor implementation. This change ensures consistency and clarity in the codebase.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…r, and relocate utility classes #24 This commit streamlines the middleware execution process by removing the `genText` parameter from the `execute` method. It also introduces a new `ParseCodeProcessor` to handle code parsing. Additionally, several utility classes have been moved from the `shirelang` module to the `core` module for better organization.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…ecution #24 Add a new RunCodeProcessor to handle post-processing for code execution. Additionally, introduce an ExtensionPoint in FileRunService to provide a pluggable way of running files within the project. Update plugin configuration to include the new processor.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
…on processing #24 This commit introduces the 'afterStreaming' feature to the compiler, which allows for specified actions to be executed following streaming operations. Additionally, it refines the pattern action processing by restructuring the case pattern action syntax and improving the handling of custom user functions within the pattern actions.
phodal
added a commit
that referenced
this issue
Jun 26, 2024
The commit updates the `TaskRoutes` creation logic by changing the expected type from `EXPRESSION` to `ARRAY`. It removes the redundant `buildTaskRoutes` function and enhances the `from` method to handle the new `ARRAY` type. Additionally, it strengthens the `ShireLifecycleTest` by adding assertions to validate the structure and content of the created `TaskRoutes`.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
… in TaskRoutes initialization #24 The commit introduces a post-processing function to the runners, allowing for additional actions after the main execution. It also adds a try-catch block to handle exceptions during the TaskRoutes initialization process.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…sor #24 - Enhanced FrontmatterParser to handle new expression types and simplified existing code. - Updated PatternActionProcessor to provide more informative error logging.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…onfigurationProfileState and PatternActionProcessor #24 Improve error handling by adding a check for empty prompt content in ShireRunConfigurationProfileState. This prevents running the process when there's no content to execute. Additionally, enhance logging in FrontmatterParser and PatternActionProcessor to warn and error respectively for unknown pattern actions. This will help in debugging and identifying issues with custom user actions.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…xecution #24 Refactor the way run configurations are created and executed. Now, the event is passed to intention actions to allow for more context in execution. The `executeShireFile` method has been updated to handle configuration creation more efficiently, separating the logic for configuration retrieval and execution.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…ethods #24 Update the `pickupElement` function to accept `Project` and `Editor` parameters and return a `SelectedEntry`. Correspondingly, modify the `SelectElementStrategy` to include these parameters in the `select` method and introduce a new method `getSelectedElement`. This refactor enhances the selection mechanism by providing more context and flexibility for the selected element.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…ents #24 Update the PostCodeHandleContext to use SelectedEntry instead of PsiElement. This change includes: - Adding a new DATA_KEY for storing the context. - Changing the way the context is created and used in various places, including intention and context menu actions. - Commenting out the previous file running logic in the RunCodeProcessor.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…ion #24 Update the `PostCodeHandleContext` by renaming the `currentElement` to `selectedEntry` for clarity. Simplify the creation method by removing the need to pass the language and editor explicitly, as it can be derived from the provided `PsiFile`. This results in a cleaner API and reduces redundant code in the context's usage.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
Updated the code structure in several Kotlin files: - HobbitHole.kt: Refactored the executeAfterStreamingProcessor method by adding parameter continuation and comment-out a redundant line. - PostCodeHandleContext.kt: Removed an unnecessary import. - ShireRunConfigurationProfileState.kt: Added a new parameter to the PostCodeHandleContext instance. - TaskRoutes.kt: Added necessary imports and a data class for conditions. This commit aims to enhance the overall code maintainability and understanding.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
Add ConsoleViewContentType to improve console output in HobbitHole by printing "execute" messages with appropriate content type. This change enhances the readability of the console output by specifying the content type for the printed messages.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
Enhanced the `ParseCodeProcessor` to support parsing of target language and storing parsed code text in `PostCodeHandleContext`. Updated `PostCodeHandleContext` to use `Language` type for `currentLanguage` and `targetLanguage`. Improved `SaveFileProcessor` to save parsed code text to a file in the project directory. Added a new constant `SHIRE_TEMP_OUTPUT` for the output directory name.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
Wrapped various code blocks with appropriate application run actions such as `runReadAction`, `runWriteAction`, and `runInEdt` for better thread-safety and performance. This includes selection strategy, file saving process, and coroutine scope adjustments. Also, unnecessary imports were removed.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
…#24 Enhanced the RunCodeProcessor to handle both VirtualFile and String types of code. Improved SaveFileProcessor to throw an exception when file saving fails and refresh the project directory after saving. Updated VerifyCodeProcessor to handle code verification for VirtualFile type of code and print syntax errors if any.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
This commit adds Python support to the Shirelang plugin. It includes the necessary changes in the Gradle properties, plugin.xml, and build.gradle.kts files. It also introduces a new ShirePythonRunService class for handling Python run configurations. The settings.gradle.kts and .idea/gradle.xml files have been updated to include the new Python language module.
phodal
added a commit
that referenced
this issue
Jun 27, 2024
Added a new middleware, OpenFileProcessor, to handle file opening in the editor. This feature is now included in the onStreamingEnd pipeline. Updated the relevant documentation and test data to reflect this change.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
Added a new feature to insert code at the current cursor position in the editor. This includes a new InsertCodeProcessor and an update to the CodeModifier interface to support smart code insertion. Also, the CodeModifier class has been moved to a new package. The return types of setup, execute, and finish methods in PostProcessor have been changed to Any.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…lasses #24 - Introduced a new class FunctionStatementProcessor to handle function statements. - Refactored QueryStatementProcessor to extend FunctionStatementProcessor, removing duplicate code. - Updated HobbitHole and ShireLifecycleTest to accommodate changes in function execution. - Modified TaskRoutes to use the new FunctionStatementProcessor. - Adjusted PatternActionProcessor to use the refactored QueryStatementProcessor.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…age #24 The patternaction classes, including FunctionStatementProcessor, PatternSearcher, QueryStatementProcessor, and PatternActionProcessor, have been moved to the hobbit.execute package. The import statements in the affected files have been updated accordingly.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…essor #24 Updated the FunctionStatementProcessor to handle different types of comparison statements. Also, improved logging for unknown statements and operators. Renamed 'variables' to 'variableElementsMap' for clarity.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
Refactor the `execute` function in `FunctionStatementProcessor` to use a `variableTable` instead of an `emptyMap`. Improve logging for unknown statements by including the statement expression. Update `PatternActionFunc` subclasses to correctly reflect their function. Add `toString` method in `UserCustom` for better representation. Handle `Processor` in `ShireExpression` display method. Update `conditionResult` in `TaskRoutes` to allow null values
phodal
added a commit
that referenced
this issue
Jun 28, 2024
- Refactor PatternActionProcessor to inherit from PatternFuncProcessor for better code reuse. - Update ShireLifecycleTest to handle new conditions and cases. - Add PatternFuncProcessor to handle pattern function execution. - Modify FunctionStatementProcessor and QueryStatementProcessor to open project property. - Update FunctionStatementProcessor to handle Processor and PatternActionFunc. - Add new test JSON data in ShireLifecycleTest. - Minor code formatting and cleanup.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…essor #24 Removed the unused Editor parameter from the PatternFuncProcessor and PatternActionProcessor classes in the Shirelang compiler. This simplifies the function signatures and reduces unnecessary dependencies.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…tern actions #24 Enhanced the function statement processing in the Shire language compiler by refactoring the execution of processors and adding support for local method calls. Introduced new pattern actions including 'ExecuteShire' and 'Notify'. Also, improved the handling of unknown pattern processor types and added better logging for user custom actions.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
Added support for jsonpath in the FunctionStatementProcessor. Also, modified the error condition in ShireLifecycleTest to check if output length is greater than 1. Updated build.gradle.kts to include the jsonpathkt dependency.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
Update the execution logic in FunctionStatementProcessor to use a valueMap instead of an emptyMap. Modify the case matching logic in TaskRoutes to filter cases based on condition results. Also, update the test in ShireLifecycleTest to assert the size of the matched cases.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
Added a "success" condition in ShireLifecycleTest and updated the condition and case sizes accordingly. Improved the function execution in FunctionStatementProcessor by handling string calls directly. Also, added a default case execution in TaskRoutes when no case is matched.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…in ShireExpression.kt #24 The commit extracts the logic for evaluating expressions into a separate method in the ShireExpression.kt file. This improves code readability and maintainability. The error messages have also been updated to use the methodNode variable instead of the previously used methodName.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…-streaming.md #24 Corrected the jsonpath syntax in the afterStreaming section of the lifecycle documentation. Also added an example of a JSON result returned by LLM and how it matches the 'json-result' condition.
phodal
added a commit
that referenced
this issue
Jun 28, 2024
…gic #24 Updated the TaskRoutes data class to make the defaultTask field optional. Refactored the execute function to handle the case when defaultTask is null. Also, modified the case mapping logic to assign a default task when the case key is "default".
phodal
added a commit
that referenced
this issue
Jun 29, 2024
… Ruby files #24 The update introduces a new function `runInCli` in `FileRunService.kt` that allows Python, JavaScript, and Ruby files to be executed directly from the command line. This function is then utilized in `RunCodeProcessor.kt` to provide an alternative execution method when no file run service is found.
phodal
added a commit
that referenced
this issue
Jun 29, 2024
The ShireRunner classes now include a HobbitHole parameter. This change affects the CustomRemoteAgentRunner and ShireDefaultRunner classes. The HobbitHole parameter is used to handle different types of interactions in the handleResult function.
phodal
added a commit
that referenced
this issue
Jun 30, 2024
Updated the ShireVcsActionGroup to dynamically generate actions based on the DynamicShireActionConfig. Also added a new ShireVcsAction class to handle these dynamic actions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: