Skip to content

Commit

Permalink
refactor(counit): refactor CoUnit components and settings to support …
Browse files Browse the repository at this point in the history
…custom RAG #51

Refactored CoUnit components and settings to support a custom RAG system. The modifications include:
- Changing imports and class names to reflect the new 'Custom RAG' branding.
  • Loading branch information
phodal committed Mar 4, 2024
1 parent 561e36a commit 067f8b8
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/233/main/resources/META-INF/autodev-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
id="cc.unitmesh.devti.settings.AutoDevSettingsConfigurable"
displayName="AutoDev"/>

<projectConfigurable provider="cc.unitmesh.devti.settings.configurable.CoUnitToolConfigurableProvider"
<projectConfigurable provider="cc.unitmesh.devti.counit.configurable.CoUnitToolConfigurableProvider"
parentId="cc.unitmesh.devti.settings.AutoDevSettingsConfigurable"
id="cc.unitmesh.counit"
bundle="messages.AutoDevBundle" key="counit.name"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import cc.unitmesh.devti.gui.chat.ChatContext
import cc.unitmesh.devti.gui.chat.ChatRole
import cc.unitmesh.devti.llms.LlmFactory
import cc.unitmesh.devti.provider.ContextPrompter
import cc.unitmesh.devti.settings.configurable.coUnitSettings
import cc.unitmesh.devti.counit.configurable.coUnitSettings
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.project.Project
import kotlinx.coroutines.launch
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json

const val CO_UNIT = "/counit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cc.unitmesh.devti.counit.dto.ExplainQuery
import cc.unitmesh.devti.counit.dto.PayloadType
import cc.unitmesh.devti.counit.dto.QueryResponse
import cc.unitmesh.devti.counit.dto.QueryResult
import cc.unitmesh.devti.settings.configurable.coUnitSettings
import cc.unitmesh.devti.counit.configurable.coUnitSettings
import com.intellij.openapi.components.Service
import com.intellij.openapi.project.Project
import retrofit2.Retrofit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cc.unitmesh.devti.settings.configurable
package cc.unitmesh.devti.counit.configurable

import com.intellij.openapi.components.*
import com.intellij.openapi.project.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cc.unitmesh.devti.settings.configurable
package cc.unitmesh.devti.counit.configurable

import cc.unitmesh.devti.AutoDevBundle
import cc.unitmesh.devti.fullWidthCell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cc.unitmesh.devti.settings.configurable
package cc.unitmesh.devti.counit.configurable

import com.intellij.openapi.options.Configurable
import com.intellij.openapi.options.ConfigurableProvider
Expand Down
8 changes: 0 additions & 8 deletions src/main/kotlin/cc/unitmesh/devti/counit/model/Tool.kt

This file was deleted.

16 changes: 16 additions & 0 deletions src/main/kotlin/cc/unitmesh/devti/counit/model/Tooling.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package cc.unitmesh.devti.counit.model

/**
* `Tooling` class represents a tooling configuration.
*
* @property name The name of the tooling.
* @property description A short description of what the tooling is used for.
* @property schema A JSON schema that defines the structure of the tooling configuration.
* @property examples A list of example configurations that illustrate how to use the tooling.
*/
data class Tooling(
val name: String,
val description: String,
val schema: String,
val examples: List<String>
)
8 changes: 4 additions & 4 deletions src/main/resources/messages/AutoDevBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ settings.external.counit.location.label=CoUnit Location (TODO, with JSON RPC) :
settings.external.counit.server.address.label=CoUnit Server address:
devti.loading=Loading

counit.name=CoUnit
counit.enable.label=Enable CoUnit (Experimental)
counit.name=Custom RAG
counit.enable.label=Enable Custom RAG (Experimental)
counit.enable.label.comment=https://github.com/unit-mesh/co-unit
counit.location.label=CoUnit Location (TODO, with JSON RPC) :
counit.server.address.label=CoUnit Server address:
counit.location.label=Custom RAG Location (TODO, with JSON RPC):
counit.server.address.label=Custom RAG Server address:

group.DevOpsGenius.NewActions.text=SRE Genius (AutoDev)
action.new.genius.dockerfile=Generate Dockerfile
Expand Down

0 comments on commit 067f8b8

Please sign in to comment.