Skip to content

Commit df8cfc0

Browse files
authored
1.5.10 (#173)
* 1.5.10 * ChatWithWorkingCopyDiffAction * 1. The `CommandAutofixAction` class in `CommandAutofixAction.kt` has been modified to improve the `isGitignore` function, making it more robust in checking if a file should be ignored based on `.gitignore` rules. 2. A new class `TestResultAutofixAction` has been added in `TestResultAutofixAction.kt`. This class: - Implements a new action for analyzing test results using AI. - Creates a custom application (`TestResultAutofixApp`) to handle the analysis and suggestion of fixes. - Uses OpenAI's API to analyze test failures and suggest code fixes. - Provides a user interface for displaying the analysis results and suggested fixes. 3. The `plugin.xml` file has been updated to include a new action: - "AI Analyze Test Result" has been added to the TestTreePopupMenu group. * 1. In `TestResultAutofixAction.kt`: - Added imports for `addApplyFileDiffLinks` and `addSaveLinks` from a diff utility. - Imported `Retryable` from a SkyeNet package. 2. Main changes in the `runAutofix` function: - Wrapped the main logic in a `Retryable` block, likely for error handling and retry capabilities. - Extracted the response generation logic into a separate function `generateAndAddResponse`. - Implemented file diff generation and added interactive links for applying and saving changes: - Uses `addApplyFileDiffLinks` to create clickable links for applying suggested changes. - Uses `addSaveLinks` to add functionality for saving the changes to files. 3. New `generateAndAddResponse` function: - Generates a response using an AI model to suggest fixes for test failures. - Adds interactive elements to the response for applying and saving changes. - Returns the formatted response with clickable links. * AnalyzeProoblemAction * 1. In `CommandAutofixAction.kt`: - Refactored the `isGitignore` function to work with both `VirtualFile` and `Path` objects. - Improved the gitignore pattern matching logic. 2. In `GenerateDocumentationAction.kt`: - Enhanced the `transformContent` function to include project structure information in the API request. - Added a `findGitRoot` function to locate the Git root directory. - Improved the logic for generating individual output paths for documentation files. 3. In `TestResultAutofixAction.kt`: - Added a new `getFiles` function that works with `Path` objects. - Refactored the `getProjectStructure` function to work with both `VirtualFile` and `Path` objects. - Added a `findGitRoot` function that works with `Path` objects.
1 parent 3d846d7 commit df8cfc0

18 files changed

+2103
-203
lines changed

CHANGELOG.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,38 @@
44

55
## [Unreleased]
66

7-
## [1.4.0]
7+
## [1.5.10]
88

99
### Added
10+
- New Git-related actions: ChatWithCommitAction, ChatWithCommitDiffAction, and ChatWithWorkingCopyDiffAction
11+
- SimpleCommandAction for executing custom commands
12+
- VCS menu integration with AI Coder options in the VCS log context menu
13+
14+
### Changed
15+
- Updated dependencies: skyenet_version to 1.0.79 and jo-penai to 1.0.62
16+
- Removed kotlinx-coroutines-core dependency
17+
- Added Git4Idea and GitHub plugins to the intellij block
18+
- Refactored CommandAutofixAction for more modular and extensible code
19+
- Updated plugin.xml to include new actions and dependencies
20+
21+
### Improved
22+
- Enhanced Git integration capabilities
23+
- Streamlined build system and dependency management
24+
25+
## [1.4.0]
1026

27+
### Added
1128
- Support for Gemini models
1229
- Support for Mistral Large
13-
1430
### Removed
15-
1631
- Dynamic action support (temporarily) due to performance issues and bugs
17-
1832
### Improved
19-
2033
- Patching logic
2134
- Various fixes
2235

2336
## [1.3.0]
2437

2538
### Added
26-
2739
- `DiffChatAction`: A new action for engaging in a chat session to generate and apply code diffs directly within the
2840
IDE.
2941
- `MultiDiffChatAction`: Allows for collaborative code review and diff generation across multiple files.
@@ -455,7 +467,15 @@
455467
- Initial scaffold created
456468
from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)
457469

458-
[Unreleased]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.18...HEAD
470+
[Unreleased]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.5.10...HEAD
471+
[1.5.10]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.4.0...v1.5.10
472+
[1.4.0]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.3.0...v1.4.0
473+
[1.3.0]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.24...v1.3.0
474+
[1.2.24]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.23...v1.2.24
475+
[1.2.23]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.22...v1.2.23
476+
[1.2.22]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.21...v1.2.22
477+
[1.2.21]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.19...v1.2.21
478+
[1.2.19]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.18...v1.2.19
459479

460480
[1.2.18]: https://github.com/SimiaCryptus/intellij-aicoder/compare/v1.2.14...v1.2.18
461481

build.gradle.kts

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
33

4+
// ... (rest of the file)
45
fun properties(key: String) = providers.gradleProperty(key).get()
56
fun environment(key: String) = providers.environmentVariable(key).get()
67

7-
plugins {
8+
plugins {
89
id("java") // Java support
910
id("org.jetbrains.kotlin.jvm") version "2.0.0-Beta5"
1011
id("org.jetbrains.intellij") version "1.17.2"
@@ -16,33 +17,31 @@ plugins {
1617
group = "com.github.simiacryptus"
1718
version = properties("pluginVersion")
1819

19-
repositories {
20-
mavenCentral()
20+
repositories {
21+
mavenCentral()
2122
maven(url = "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
2223
maven(url = "https://packages.jetbrains.team/maven/p/iuia/qa-automation-maven")
2324
}
2425

25-
val kotlin_version = "2.0.0-Beta5"
26+
val kotlin_version = "2.0.0-Beta5" // This line can be removed if not used elsewhere
2627
val jetty_version = "11.0.18"
2728
val slf4j_version = "2.0.9"
28-
val skyenet_version = "1.0.77"
29+
val skyenet_version = "1.0.79"
2930
val remoterobot_version = "0.11.21"
3031
val jackson_version = "2.17.0"
3132

3233
dependencies {
3334
implementation("software.amazon.awssdk:bedrock:2.25.7")
3435
implementation("software.amazon.awssdk:bedrockruntime:2.25.7")
3536

36-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
37-
3837
implementation("org.apache.commons:commons-text:1.11.0")
3938

4039
implementation(group = "com.simiacryptus.skyenet", name = "kotlin", version = skyenet_version)
4140
{
4241
exclude(group = "org.jetbrains.kotlin", module = "")
4342
}
4443

45-
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.61")
44+
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.62")
4645
{
4746
exclude(group = "org.jetbrains.kotlin", module = "")
4847
}
@@ -57,11 +56,6 @@ dependencies {
5756
exclude(group = "org.jetbrains.kotlin", module = "")
5857
}
5958

60-
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.8.0-RC")
61-
{
62-
exclude(group = "org.jetbrains.kotlin", module = "")
63-
}
64-
6559
implementation(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = jackson_version)
6660
implementation(group = "com.fasterxml.jackson.core", name = "jackson-annotations", version = jackson_version)
6761
implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version = jackson_version)
@@ -108,10 +102,9 @@ tasks.named("processResources") {
108102
*/
109103

110104

111-
kotlin {
112-
jvmToolchain(17)
113-
}
114-
105+
kotlin {
106+
jvmToolchain(17)
107+
}
115108
tasks {
116109
compileKotlin {
117110
compilerOptions {
@@ -189,6 +182,8 @@ intellij {
189182
listOf(
190183
"com.intellij.java",
191184
"org.jetbrains.kotlin",
185+
"Git4Idea",
186+
"org.jetbrains.plugins.github"
192187
)
193188
)
194189
}
@@ -198,13 +193,16 @@ changelog {
198193
repositoryUrl.set(properties("pluginRepositoryUrl"))
199194
}
200195

196+
tasks {
197+
patchPluginXml {
198+
sinceBuild.set(properties("pluginSinceBuild"))
199+
untilBuild.set(properties("pluginUntilBuild"))
200+
}
201+
}
202+
201203
qodana {
202204
cachePath.set(file(".qodana").canonicalPath)
203205
// reportPath.set(file("build/reports/inspections").canonicalPath)
204206
// saveReport.set(true)
205207
// showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false)
206-
}
207-
208-
//kover.xmlReport {
209-
// onCheck.set(true)
210-
//}
208+
}

docs/file_metadata.template.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# File Metadata Template
2+
3+
- **Filename:**
4+
5+
## Code Overview
6+
- **Language & Frameworks:**
7+
- **Primary Purpose:**
8+
- **Brief Description:**
9+
10+
## Public Interface
11+
- **Exported Functions/Classes:**
12+
- **Public Constants/Variables:**
13+
- **Types/Interfaces (if applicable):**
14+
15+
## Dependencies
16+
- **External Libraries**
17+
- **Internal Code: Symbol References**
18+
19+
## Architecture
20+
- **Sequence or Flow Diagrams:** Using Mermaid syntax, include sequence or flow diagram(s) to illustrate important or complex logic. (if applicable)
21+
- **Class Diagrams:** If applicable, describe (do not create) class diagrams needed to illustrate the context of the code
22+
23+
## Example Usage
24+
25+
## Code Analysis
26+
- **Code Style Observations:**
27+
- **Code Review Feedback:**
28+
- **Potential Improvements:**
29+
30+
## Features
31+
- **Key Functionalities:**
32+
- **Algorithms Used:**
33+
- **Data Structures:**
34+
- **Potential Improvements:**
35+
36+
## Tags
37+
- **Categories:**
38+
- **Keywords:**
39+
40+
## Additional Notes
41+
- **TODO Items:**
42+
- **Known Issues:**
43+
- **Future Enhancements:**

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginName=intellij-aicoder
22
pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder
3-
pluginVersion=1.5.9
3+
pluginVersion=1.5.10
44

55
jvmArgs=-Xmx8g
66
org.gradle.jvmargs=-Xmx8g

src/main/kotlin/com/github/simiacryptus/aicoder/actions/BaseAction.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ abstract class BaseAction(
4444

4545
open fun isEnabled(event: AnActionEvent): Boolean = true
4646

47+
4748
companion object {
4849
val log by lazy { LoggerFactory.getLogger(javaClass) }
4950
val scheduledPool = java.util.concurrent.Executors.newScheduledThreadPool(1)

0 commit comments

Comments
 (0)